#include <cs_ControlPacketAccessor.h>
◆ assign()
template<
cs_buffer_size_t PAYLOAD_SIZE = CS_CONTROL_PACKET_DEFAULT_PAYLOAD_SIZE>
Assign the buffer used to hold the data.
- Parameters
-
[in] | buffer | The buffer to be used. |
[in] | size | Size of buffer in bytes. |
- Returns
- ERR_SUCCESS on success.
Implements BufferAccessor.
◆ checkInitialized()
template<
cs_buffer_size_t PAYLOAD_SIZE = CS_CONTROL_PACKET_DEFAULT_PAYLOAD_SIZE>
◆ getBufferSize()
template<
cs_buffer_size_t PAYLOAD_SIZE = CS_CONTROL_PACKET_DEFAULT_PAYLOAD_SIZE>
Get the capacity of the buffer.
- Returns
- Maximum size of the buffer in bytes.
Implements BufferAccessor.
◆ getMaxPayloadSize()
template<
cs_buffer_size_t PAYLOAD_SIZE = CS_CONTROL_PACKET_DEFAULT_PAYLOAD_SIZE>
Get the capacity of the payload.
- Returns
- Max size of the payload in bytes.
◆ getPayload()
template<
cs_buffer_size_t PAYLOAD_SIZE = CS_CONTROL_PACKET_DEFAULT_PAYLOAD_SIZE>
Get pointer to the payload.
- Returns
- Data struct with pointer to payload and size of the payload in bytes.
◆ getPayloadSize()
template<
cs_buffer_size_t PAYLOAD_SIZE = CS_CONTROL_PACKET_DEFAULT_PAYLOAD_SIZE>
Get the size of the payload.
Will never be larger than what fits in the buffer.
- Returns
- Size of the payload.
◆ getProtocolVersion()
template<
cs_buffer_size_t PAYLOAD_SIZE = CS_CONTROL_PACKET_DEFAULT_PAYLOAD_SIZE>
Get the protocol version.
◆ getSerializedBuffer()
template<
cs_buffer_size_t PAYLOAD_SIZE = CS_CONTROL_PACKET_DEFAULT_PAYLOAD_SIZE>
Get the pointer to the buffer.
- Returns
- Struct with pointer to buffer and size of the serialized data in bytes.
Implements BufferAccessor.
◆ getSerializedSize()
template<
cs_buffer_size_t PAYLOAD_SIZE = CS_CONTROL_PACKET_DEFAULT_PAYLOAD_SIZE>
Get the size of the serialized data in the buffer.
- Returns
- Size of the serialized data in bytes.
Implements BufferAccessor.
◆ getType()
template<
cs_buffer_size_t PAYLOAD_SIZE = CS_CONTROL_PACKET_DEFAULT_PAYLOAD_SIZE>
◆ setPayload()
template<
cs_buffer_size_t PAYLOAD_SIZE = CS_CONTROL_PACKET_DEFAULT_PAYLOAD_SIZE>
Copy payload into the packet.
- Parameters
-
[in] | payload | Pointer to the payload. |
[in] | size | Size of the payload. |
- Returns
- error code.
◆ setProtocolVersion()
template<
cs_buffer_size_t PAYLOAD_SIZE = CS_CONTROL_PACKET_DEFAULT_PAYLOAD_SIZE>
Set the protocol version.
◆ setType()
template<
cs_buffer_size_t PAYLOAD_SIZE = CS_CONTROL_PACKET_DEFAULT_PAYLOAD_SIZE>
◆ _buffer
template<
cs_buffer_size_t PAYLOAD_SIZE = CS_CONTROL_PACKET_DEFAULT_PAYLOAD_SIZE>
Pointer to the packet to be sent.
The documentation for this class was generated from the following file: