Go to the documentation of this file.
17 #include "WriteBufferInterface.h"
20 #define CANPB_BASE64_ENCODE_BUFFER_SIZE (CANPB_OUTPUT_MESSAGE_LENGTH_MAX * 2)
27 class WriteBuffer :
public EmbeddedProto::WriteBufferInterface
35 virtual void clear()
override;
37 virtual uint32_t get_size()
const override;
39 virtual uint32_t get_max_size()
const override;
41 virtual uint32_t get_available_size()
const override;
43 virtual bool push(
const uint8_t
byte)
override;
45 virtual bool push(
const uint8_t *bytes,
const uint32_t length)
override;
67 uint32_t write_index_;
#define CANPB_OUTPUT_MESSAGE_LENGTH_MAX
max outgoing message length
size_t base64_encode()
Encode the data buffer in base64 before transmission over CAN.
WriteBuffer class used to encode Protobuf messages.
Differential drive controller.
uint8_t * get_base64_data()
Return a pointer to the data array.
uint8_t * get_data()
Return a pointer to the data array.
WriteBuffer()=default
Class constructor.
#define CANPB_BASE64_ENCODE_BUFFER_SIZE
Size of the base64 encoding buffer.