EmbeddedProto
2.0.0
EmbeddedProto is a C++ Protocol Buffer implementation specifically suitable for microcontrollers.
|
The pure virtual definition of a message buffer used for writing . More...
#include <WriteBufferInterface.h>
Public Member Functions | |
WriteBufferInterface ()=default | |
virtual | ~WriteBufferInterface ()=default |
virtual void | clear ()=0 |
Delete all data in the buffer. More... | |
virtual uint32_t | get_size () const =0 |
Obtain the total number of bytes currently stored in the buffer. More... | |
virtual uint32_t | get_max_size () const =0 |
Obtain the total number of bytes which can at most be stored in the buffer. More... | |
virtual uint32_t | get_available_size () const =0 |
Obtain the total number of bytes still available in the buffer. More... | |
virtual bool | push (const uint8_t byte)=0 |
Push a single byte into the buffer. More... | |
virtual bool | push (const uint8_t *bytes, const uint32_t length)=0 |
Push an array of bytes into the buffer. More... | |
The pure virtual definition of a message buffer used for writing .
This interface is to be used by classes wishing to use the buffer. An actual implementation is made specific to how you would like to store data.
The buffer deals with bytes (uint8_t) only.
|
default |
|
virtualdefault |
|
pure virtual |
Delete all data in the buffer.
Implemented in EmbeddedProto::MessageSizeCalculator.
|
pure virtual |
Obtain the total number of bytes still available in the buffer.
Implemented in EmbeddedProto::MessageSizeCalculator.
|
pure virtual |
Obtain the total number of bytes which can at most be stored in the buffer.
Implemented in EmbeddedProto::MessageSizeCalculator.
|
pure virtual |
Obtain the total number of bytes currently stored in the buffer.
Implemented in EmbeddedProto::MessageSizeCalculator.
|
pure virtual |
Push an array of bytes into the buffer.
The given array will be appended after already addded data in the buffer.
[in] | bytes | Pointer to the array of bytes. |
[in] | length | The number of bytes in the array. |
Implemented in EmbeddedProto::MessageSizeCalculator.
|
pure virtual |
Push a single byte into the buffer.
[in] | byte | The data to append after previously added data in the buffer. |
Implemented in EmbeddedProto::MessageSizeCalculator.