Bluenet
5.7.0
Bluenet, firmware for nRF52 smart home devices
|
#include <cs_ResultPacketAccessor.h>
Public Member Functions | |
bool | isInitialized () const |
Only set or get fields when this instance is initialized. More... | |
uint8_t | getProtocolVersion () const |
Get the protocol version. More... | |
void | setProtocolVersion (uint8_t protocol) |
Set the protocol version. More... | |
cs_control_cmd_t | getType () const |
Get the command type. More... | |
void | setType (cs_control_cmd_t type) |
Set the command type. More... | |
cs_ret_code_t | getResult () const |
Get the result code. More... | |
void | setResult (cs_ret_code_t result) |
Set the result code. More... | |
cs_data_t | getPayload () |
Get the payload. More... | |
cs_buffer_size_t | getPayloadSize () |
Get the size of the payload. More... | |
buffer_ptr_t | getPayloadBuffer () |
Get the payload buffer. More... | |
cs_buffer_size_t | getMaxPayloadSize () |
Get the capacity of the payload. More... | |
cs_ret_code_t | setPayloadSize (cs_buffer_size_t size) |
cs_ret_code_t | setPayload (buffer_ptr_t payload, cs_buffer_size_t size) |
Copy payload into the packet. More... | |
cs_ret_code_t | assign (buffer_ptr_t buffer, cs_buffer_size_t size) |
Assign the buffer used to hold the data. More... | |
cs_buffer_size_t | getSerializedSize () const |
Get the size of the serialized data in the buffer. More... | |
cs_buffer_size_t | getBufferSize () const |
Get the capacity of the buffer. More... | |
cs_data_t | getSerializedBuffer () |
Get the pointer to the buffer. More... | |
Protected Member Functions | |
void | checkInitialized () const |
Protected Attributes | |
result_packet_t< PAYLOAD_SIZE > * | _buffer |
Pointer to the packet to be sent. More... | |
Additional Inherited Members | |
![]() | |
virtual | ~BufferAccessor () |
Default destructor. More... | |
virtual cs_ret_code_t | assign (buffer_ptr_t buffer, cs_buffer_size_t size)=0 |
Assign the buffer used to hold the data. More... | |
virtual cs_buffer_size_t | getBufferSize () const =0 |
Get the capacity of the buffer. More... | |
virtual cs_buffer_size_t | getSerializedSize () const =0 |
Get the size of the serialized data in the buffer. More... | |
virtual cs_buffer_size_t | getRemainingCapacity () const |
virtual cs_data_t | getSerializedBuffer ()=0 |
Get the pointer to the buffer. More... | |
|
inlinevirtual |
Assign the buffer used to hold the data.
[in] | buffer | The buffer to be used. |
[in] | size | Size of buffer in bytes. |
Implements BufferAccessor.
|
inlineprotected |
|
inlinevirtual |
Get the capacity of the buffer.
Implements BufferAccessor.
|
inline |
Get the capacity of the payload.
|
inline |
Get the payload.
|
inline |
Get the payload buffer.
|
inline |
Get the size of the payload.
Will never be larger than what fits in the buffer.
|
inline |
Get the protocol version.
|
inline |
Get the result code.
|
inlinevirtual |
Get the pointer to the buffer.
Implements BufferAccessor.
|
inlinevirtual |
Get the size of the serialized data in the buffer.
Implements BufferAccessor.
|
inline |
Get the command type.
|
inline |
Only set or get fields when this instance is initialized.
|
inline |
Copy payload into the packet.
[in] | payload | Pointer to the payload. |
[in] | size | Size of the payload. |
|
inline |
|
inline |
Set the protocol version.
|
inline |
Set the result code.
|
inline |
Set the command type.
|
protected |
Pointer to the packet to be sent.