EmbeddedProto
2.0.0
EmbeddedProto is a C++ Protocol Buffer implementation specifically suitable for microcontrollers.
|
The pure virtual definition of a message buffer to read from. More...
#include <ReadBufferInterface.h>
Public Member Functions | |
ReadBufferInterface ()=default | |
virtual | ~ReadBufferInterface ()=default |
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 bool | peek (uint8_t &byte) const =0 |
Obtain the value of the oldest byte in the buffer. More... | |
virtual void | advance ()=0 |
Advances the internal read index by one when the buffer is not empty. More... | |
virtual void | advance (const uint32_t N)=0 |
Advances the internal read index by the given value. More... | |
virtual bool | pop (uint8_t &byte)=0 |
Obtain the value of the oldest byte in the buffer and remove it from the buffer. More... | |
The pure virtual definition of a message buffer to read from.
The buffer deals with bytes (uint8_t) only.
|
default |
|
virtualdefault |
|
pure virtual |
Advances the internal read index by one when the buffer is not empty.
Implemented in EmbeddedProto::ReadBufferSection.
|
pure virtual |
Advances the internal read index by the given value.
The advance is limited to the number of bytes in the buffer.
[in] | N | The number of bytes to advance the read index. |
Implemented in EmbeddedProto::ReadBufferSection.
|
pure virtual |
Obtain the total number of bytes which can at most be stored in the buffer.
Implemented in EmbeddedProto::ReadBufferSection.
|
pure virtual |
Obtain the total number of bytes currently stored in the buffer.
Implemented in EmbeddedProto::ReadBufferSection.
|
pure virtual |
Obtain the value of the oldest byte in the buffer.
This function will not alter the buffer read index.
The parameter byte will not be set if the buffer was empty.
[out] | byte | When the buffer is not empty this variable will hold the oldest value. |
Implemented in EmbeddedProto::ReadBufferSection.
|
pure virtual |
Obtain the value of the oldest byte in the buffer and remove it from the buffer.
This function will alter the internal read index.
The parameter byte will not be set if the buffer was empty.
[out] | byte | When the buffer is not empty this variable will hold the oldest value. |
Implemented in EmbeddedProto::ReadBufferSection.