L1Transport Base Class
The base class for all L1 transport layer implementations. Platform-specific transports inherit from this class and implement the abstract low-level methods.
- class tropicsquare.transports.L1Transport[source]
Bases:
objectBase class for L1 transport layer.
Platform-specific classes implement only abstract low-level methods.
- get_response()[source]
Get response from chip with automatic retry logic.
- Returns:
Response data from chip
- Return type:
- Raises:
TropicSquareAlarmError – If chip is in alarm state
TropicSquareCRCError – If CRC validation fails
TropicSquareTimeoutError – If chip remains busy after max retries
TropicSquareError – On other communication errors
Abstract Methods
Subclasses must implement these methods:
_transfer()- Bidirectional SPI transfer_read()- SPI read operation_cs_low()- Activate chip select (optional)_cs_high()- Deactivate chip select (optional)
Implemented Methods
The base class provides:
send_request()- Send request to chipget_response()- Get response with retry logic
See Also
SPI Transport - SPI transport implementation
UART Transport - UART transport implementation
Network-SPI Transport - Network-SPI transport
TCP Transport - TCP transport for model server
L2 Protocol Layer - L2 protocol using L1Transport