EmbeddedProto  2.0.0
EmbeddedProto is a C++ Protocol Buffer implementation specifically suitable for microcontrollers.
Public Member Functions | List of all members
EmbeddedProto::FieldBytes< MAX_LENGTH > Class Template Reference

#include <FieldStringBytes.h>

Inheritance diagram for EmbeddedProto::FieldBytes< MAX_LENGTH >:
Inheritance graph
[legend]
Collaboration diagram for EmbeddedProto::FieldBytes< MAX_LENGTH >:
Collaboration graph
[legend]

Public Member Functions

 FieldBytes ()=default
 
virtual ~FieldBytes ()=default
 
- Public Member Functions inherited from EmbeddedProto::internal::FieldStringBytes< MAX_LENGTH, uint8_t >
 FieldStringBytes ()
 
virtual ~FieldStringBytes ()
 
uint32_t get_length () const
 Obtain the number of characters in the string right now. More...
 
uint32_t get_max_length () const
 Obtain the maximum number characters in the string. More...
 
const uint8_t * get_const () const
 Get a constant pointer to the first element in the array. More...
 
const uint8_t & get_const (uint32_t index) const
 Get a constant reference to the value at the given index. More...
 
uint8_t & get (uint32_t index)
 Get a reference to the value at the given index. More...
 
uint8_t & operator[] (uint32_t index)
 Get a reference to the value at the given index. More...
 
const uint8_t & operator[] (uint32_t index) const
 Get a constant reference to the value at the given index. More...
 
Error set (const uint8_t *data, const uint32_t length)
 
Error serialize_with_id (uint32_t field_number, WriteBufferInterface &buffer) const override
 
Error serialize (WriteBufferInterface &buffer) const override
 
Error deserialize (ReadBufferInterface &buffer) override
 
void clear () override
 Reset the field to it's initial value. More...
 
- Public Member Functions inherited from EmbeddedProto::Field
 Field ()=default
 
virtual ~Field ()=default
 
uint32_t serialized_size () const
 Calculate the size of this message when serialized. More...
 

Additional Inherited Members

- Protected Attributes inherited from EmbeddedProto::internal::FieldStringBytes< MAX_LENGTH, uint8_t >
uint32_t current_length_
 Number of item in the data array. More...
 
uint8_t data_ [MAX_LENGTH]
 The text. More...
 

Constructor & Destructor Documentation

◆ FieldBytes()

template<uint32_t MAX_LENGTH>
EmbeddedProto::FieldBytes< MAX_LENGTH >::FieldBytes ( )
default

◆ ~FieldBytes()

template<uint32_t MAX_LENGTH>
virtual EmbeddedProto::FieldBytes< MAX_LENGTH >::~FieldBytes ( )
virtualdefault

The documentation for this class was generated from the following file: