Bluenet
5.7.0
Bluenet, firmware for nRF52 smart home devices
|
Base class for a buffer accessor object. More...
#include <cs_BufferAccessor.h>
Public Member Functions | |
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... | |
Base class for a buffer accessor object.
Any object that works on a buffer can use this as a base class.
|
inlinevirtual |
Default destructor.
|
pure virtual |
Assign the buffer used to hold the data.
[in] | buffer | The buffer to be used. |
[in] | size | Size of buffer in bytes. |
Implemented in ControlPacketAccessor< PAYLOAD_SIZE >, and ResultPacketAccessor< PAYLOAD_SIZE >.
|
pure virtual |
Get the capacity of the buffer.
Implemented in ControlPacketAccessor< PAYLOAD_SIZE >, and ResultPacketAccessor< PAYLOAD_SIZE >.
|
inlinevirtual |
|
pure virtual |
Get the pointer to the buffer.
Implemented in ControlPacketAccessor< PAYLOAD_SIZE >, and ResultPacketAccessor< PAYLOAD_SIZE >.
|
pure virtual |
Get the size of the serialized data in the buffer.
Implemented in ControlPacketAccessor< PAYLOAD_SIZE >, and ResultPacketAccessor< PAYLOAD_SIZE >.