Voyant API 0.16.0
Loading...
Searching...
No Matches
DataBlockWrapper Class Reference

Wrapper for DataBlock messages. More...

#include <data_block_wrapper.hpp>

Inheritance diagram for DataBlockWrapper:
CapnpWrapper< DataBlock >

Public Member Functions

 ~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.
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.

Private Attributes

std::array< PointDataWrapper, 8 > channels_
 Array of 8 point data channels.

Detailed Description

Wrapper for DataBlock messages.

Represents a fixed-size block containing exactly 8 point data channels.

Constructor & Destructor Documentation

◆ ~DataBlockWrapper()

DataBlockWrapper::~DataBlockWrapper ( )
override

Destructor.

Member Function Documentation

◆ channels()

const std::array< PointDataWrapper, 8 > & DataBlockWrapper::channels ( ) const
inline

Get the array of point data channels.

Returns
Const reference to the array of 8 channels

◆ channelsMut()

std::array< PointDataWrapper, 8 > & DataBlockWrapper::channelsMut ( )
inline

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

Generate a debug string representation.

Parameters
osThe output stream to write to

Implements CapnpWrapper< DataBlock >.

◆ fromBuffer()

void CapnpWrapper< DataBlock >::fromBuffer ( const uint8_t * buffer,
size_t size )
inlineinherited

Update wrapper fields from a serialized message buffer.

Parameters
bufferPointer to the buffer containing serialized Cap'n Proto data
sizeSize of the buffer in bytes

◆ fromProto()

void DataBlockWrapper::fromProto ( DataBlock::Reader reader)
overridevirtual

Update wrapper fields from a reader.

Parameters
readerThe DataBlock reader to extract data from

Implements CapnpWrapper< DataBlock >.

◆ toBuffer()

size_t CapnpWrapper< DataBlock >::toBuffer ( uint8_t * buffer,
size_t buffer_size ) const
inlineinherited

Serialize this wrapper to a buffer using Cap'n Proto format.

Parameters
bufferPointer to the buffer to write serialized data to
buffer_sizeSize of the buffer in bytes
Returns
The number of bytes written to the buffer
Exceptions
std::runtime_errorif the buffer is too small

◆ toProto()

void DataBlockWrapper::toProto ( DataBlock::Builder & builder) const
overridevirtual

Write wrapper fields to a builder.

Parameters
builderThe DataBlock builder to write data to

Implements CapnpWrapper< DataBlock >.

Member Data Documentation

◆ channels_

std::array<PointDataWrapper, 8> DataBlockWrapper::channels_
private

Array of 8 point data channels.


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