Go to the documentation of this file.
18 #include "ReadBufferInterface.h"
21 #define CANPB_BASE64_DECODE_BUFFER_SIZE (CANPB_INPUT_MESSAGE_LENGTH_MAX * 2)
28 class ReadBuffer :
public EmbeddedProto::ReadBufferInterface
36 uint32_t get_size()
const override;
38 uint32_t get_max_size()
const override;
40 bool peek(uint8_t &
byte)
const override;
42 bool advance()
override;
44 bool advance(
const uint32_t n)
override;
46 bool pop(uint8_t &
byte)
override;
58 bool push(uint8_t &
byte);
73 uint32_t write_index_;
void clear()
Clear all indices, in effect allowing the data to be overwritten.
uint8_t * get_base64_data()
Return a pointer to the data array.
ReadBuffer()
Class constructor.
bool push(uint8_t &byte)
Push new data into the buffer.
ReadBuffer class used to decode Protobuf messages.
Differential drive controller.
size_t base64_decode()
Decode the data buffer from base64 before deserialization.
#define CANPB_BASE64_DECODE_BUFFER_SIZE
Size of the base64 decoding buffer.
#define CANPB_INPUT_MESSAGE_LENGTH_MAX
max incoming message length
uint32_t & get_bytes_written()
Return a non constant reference to the number of bytes written to the data array.
uint8_t * get_data_array()
Return a pointer to the data array.