19#include "command_code.h"
93 void setBuffer(
const uint8_t *data,
size_t length);
Definition: spi_datagram.h:36
const uint8_t * getBuffer() const
Gets the SPI buffer.
Definition: spi_datagram.cc:69
void clearBuffer()
Clear the SPI data buffer.
Definition: spi_datagram.cc:57
static constexpr size_t SPI_MAX_BUFFER_SIZE
Definition: spi_datagram.h:38
void setBuffer(const uint8_t *data, size_t length)
Sets data in the SPI buffer.
Definition: spi_datagram.cc:52
Port getSPIPort() const
Gets the target SPI port.
Definition: spi_datagram.cc:61
SPI()=default
Default constructor for SPI object.
void deserialize(std::string &spiDatagramPayload)
Deserializes SPI data from payload string.
Definition: spi_datagram.cc:35
Port
SPI Port definition.
Definition: spi_datagram.h:43
std::string serialize(const CommandCode &commandCode) const
Serializes SPI data with command code for transmission.
Definition: spi_datagram.cc:27
Payload m_spiDatagram
Definition: spi_datagram.h:119
void setSPIPort(const Port &spiPort)
Sets the target SPI port.
Definition: spi_datagram.cc:48
size_t getBufferLength() const
Gets the SPI buffer length.
Definition: spi_datagram.cc:65
CommandCode
Command Code Class.
Definition: command_code.h:28
SPI Datagram payload storage.
Definition: spi_datagram.h:52
uint8_t buffer[SPI_MAX_BUFFER_SIZE]
Definition: spi_datagram.h:55
Port spiPort
Definition: spi_datagram.h:53
size_t bufferLength
Definition: spi_datagram.h:54