Wrapper for DataBlock messages.
More...
#include <data_block_wrapper.hpp>
|
| ~DataBlockWrapper () override |
| Destructor.
|
|
void | fromProto (DataBlock::Reader reader) override |
| Update wrapper fields from a reader.
|
|
void | toProto (DataBlock::Builder &builder) const override |
| Write wrapper fields to a builder.
|
|
void | debugString (std::ostream &os) const override |
| Generate a debug string representation.
|
|
const std::array< PointDataWrapper, 8 > & | channels () const |
| Get the array of point data channels.
|
|
std::array< PointDataWrapper, 8 > & | channelsMut () |
| Get mutable access to the array of point data channels.
|
|
virtual void | fromProto (typename T::Reader reader)=0 |
| Update wrapper fields from a Cap'n Proto reader.
|
|
virtual void | toProto (typename T::Builder &builder) const=0 |
| Write wrapper fields to a Cap'n Proto builder.
|
|
void | fromBuffer (const uint8_t *buffer, size_t size) |
| Update wrapper fields from a serialized message buffer.
|
|
size_t | toBuffer (uint8_t *buffer, size_t buffer_size) const |
| Serialize this wrapper to a buffer using Cap'n Proto format.
|
|
Wrapper for DataBlock messages.
Represents a fixed-size block containing exactly 8 point data channels.
◆ ~DataBlockWrapper()
DataBlockWrapper::~DataBlockWrapper |
( |
| ) |
|
|
override |
◆ channels()
Get the array of point data channels.
- Returns
- Const reference to the array of 8 channels
◆ channelsMut()
Get mutable access to the array of point data channels.
- Returns
- Reference to the array of 8 channels
◆ debugString()
void DataBlockWrapper::debugString |
( |
std::ostream & |
os | ) |
const |
|
overridevirtual |
◆ fromBuffer()
Update wrapper fields from a serialized message buffer.
- Parameters
-
buffer | Pointer to the buffer containing serialized Cap'n Proto data |
size | Size of the buffer in bytes |
◆ fromProto() [1/2]
Update wrapper fields from a reader.
- Parameters
-
reader | The DataBlock reader to extract data from |
◆ fromProto() [2/2]
Update wrapper fields from a Cap'n Proto reader.
- Parameters
-
reader | The Cap'n Proto reader to extract data from |
◆ toBuffer()
Serialize this wrapper to a buffer using Cap'n Proto format.
- Parameters
-
buffer | Pointer to the buffer to write serialized data to |
buffer_size | Size of the buffer in bytes |
- Returns
- The number of bytes written to the buffer
- Exceptions
-
std::runtime_error | if the buffer is too small |
◆ toProto() [1/2]
Write wrapper fields to a builder.
- Parameters
-
builder | The DataBlock builder to write data to |
◆ toProto() [2/2]
Write wrapper fields to a Cap'n Proto builder.
- Parameters
-
builder | The Cap'n Proto builder to write data to |
The documentation for this class was generated from the following file: