|
EmbeddedProto
2.0.0
EmbeddedProto is a C++ Protocol Buffer implementation specifically suitable for microcontrollers.
|
Go to the documentation of this file.
31 #ifndef _READ_BUFFER_INTERFACE_H_
32 #define _READ_BUFFER_INTERFACE_H_
51 virtual uint32_t
get_size()
const = 0;
65 virtual bool peek(uint8_t&
byte)
const = 0;
75 virtual void advance(
const uint32_t N) = 0;
86 virtual bool pop(uint8_t&
byte) = 0;
92 #endif // End of _READ_BUFFER_INTERFACE_H_
The pure virtual definition of a message buffer to read from.
Definition: ReadBufferInterface.h:43
virtual bool pop(uint8_t &byte)=0
Obtain the value of the oldest byte in the buffer and remove it from the buffer.
virtual void advance()=0
Advances the internal read index by one when the buffer is not empty.
virtual bool peek(uint8_t &byte) const =0
Obtain the value of the oldest byte in the buffer.
virtual uint32_t get_max_size() const =0
Obtain the total number of bytes which can at most be stored in the buffer.
ReadBufferInterface()=default
virtual uint32_t get_size() const =0
Obtain the total number of bytes currently stored in the buffer.
virtual ~ReadBufferInterface()=default