◆ Port
SPI Port definition.
Enumerator |
---|
SPI_PORT_1 | SPI Port 1
|
SPI_PORT_2 | SPI Port 2
|
NUM_SPI_PORTS | Number of SPI ports
|
◆ SPI()
Constructs a SPI object with provided payload data.
- Parameters
-
data | Reference to payload data |
◆ deserialize()
void deserialize |
( |
std::string & |
spiDatagramPayload | ) |
|
Deserializes SPI data from payload string.
- Parameters
-
spiDatagramPayload | String containing serialized SPI data |
◆ getBuffer()
const uint8_t * getBuffer |
( |
| ) |
const |
Gets the SPI buffer.
- Returns
- Pointer to the buffer array
◆ getBufferLength()
size_t getBufferLength |
( |
| ) |
const |
Gets the SPI buffer length.
- Returns
- Buffer length
◆ getSPIPort()
Gets the target SPI port.
- Returns
- Target port
◆ serialize()
std::string serialize |
( |
const CommandCode & |
commandCode | ) |
const |
Serializes SPI data with command code for transmission.
- Parameters
-
commandCode | Command code to include in serialized data |
- Returns
- Serialized string containing SPI data
◆ setBuffer()
void setBuffer |
( |
const uint8_t * |
data, |
|
|
size_t |
length |
|
) |
| |
Sets data in the SPI buffer.
- Parameters
-
data | Pointer to data to copy into buffer |
length | Length of data to copy |
◆ setSPIPort()
void setSPIPort |
( |
const Port & |
spiPort | ) |
|
Sets the target SPI port.
- Parameters
-
spiPort | Port to set as target |
◆ m_spiDatagram
◆ SPI_MAX_BUFFER_SIZE
constexpr size_t SPI_MAX_BUFFER_SIZE = 256 |
|
staticconstexpr |
Maximum permitted buffer size
The documentation for this class was generated from the following files:
- simulation/common/inc/spi_datagram.h
- simulation/common/src/spi_datagram.cc