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