Voyant API 0.2.1
Loading...
Searching...
No Matches
Public Member Functions | List of all members
PointGroupWrapper Class Referenceabstract

Wrapper for PointGroup messages. More...

#include <point_group_wrapper.hpp>

Inheritance diagram for PointGroupWrapper:
CapnpWrapper< PointGroup >

Public Member Functions

 ~PointGroupWrapper () override
 Destructor.
 
void fromProto (PointGroup::Reader reader) override
 Update wrapper fields from a reader.
 
void toProto (PointGroup::Builder &builder) const override
 Write wrapper fields to a builder.
 
void debugString (std::ostream &os) const override
 Generate a debug string representation.
 
const VoyantHeaderWrapperheader () const
 Get the common header.
 
VoyantHeaderWrapperheaderMut ()
 Get mutable access to the common header.
 
const PointGroupHeaderWrapperpointGroupHeader () const
 Get the point group header.
 
PointGroupHeaderWrapperpointGroupHeaderMut ()
 Get mutable access to the point group header.
 
const std::array< DataBlockWrapper, 4 > & dataBlocks () const
 Get the array of data blocks.
 
std::array< DataBlockWrapper, 4 > & dataBlocksMut ()
 Get mutable access to the array of data blocks.
 
void updateValidPoints ()
 Calculate and set the valid points bitfield based on drop reasons.
 
uint32_t countValidPoints () const
 Count the number of valid points in the group.
 
bool isPointValid (size_t blockIdx, size_t channelIdx) const
 Check if a specific point is valid.
 
void reset_data_blocks ()
 Reset all data blocks to their default state.
 
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.
 

Detailed Description

Wrapper for PointGroup messages.

Contains a complete group of point data organized in a fixed structure with header information and an array of data blocks.

Constructor & Destructor Documentation

◆ ~PointGroupWrapper()

PointGroupWrapper::~PointGroupWrapper ( )
override

Destructor.

Member Function Documentation

◆ countValidPoints()

uint32_t PointGroupWrapper::countValidPoints ( ) const

Count the number of valid points in the group.

Returns
Total count of valid points

◆ dataBlocks()

const std::array< DataBlockWrapper, 4 > & PointGroupWrapper::dataBlocks ( ) const
inline

Get the array of data blocks.

Returns
Const reference to the array of 4 data blocks

◆ dataBlocksMut()

std::array< DataBlockWrapper, 4 > & PointGroupWrapper::dataBlocksMut ( )
inline

Get mutable access to the array of data blocks.

Returns
Reference to the array of 4 data blocks

◆ debugString()

void PointGroupWrapper::debugString ( std::ostream &  os) const
overridevirtual

Generate a debug string representation.

Parameters
osThe output stream to write to

Implements CapnpWrapper< PointGroup >.

◆ fromBuffer()

void CapnpWrapper< PointGroup >::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() [1/2]

void PointGroupWrapper::fromProto ( PointGroup::Reader  reader)
override

Update wrapper fields from a reader.

Parameters
readerThe PointGroup reader to extract data from

◆ fromProto() [2/2]

virtual void CapnpWrapper< PointGroup >::fromProto ( typename T::Reader  reader)
pure virtualinherited

Update wrapper fields from a Cap'n Proto reader.

Parameters
readerThe Cap'n Proto reader to extract data from

◆ header()

const VoyantHeaderWrapper & PointGroupWrapper::header ( ) const
inline

Get the common header.

Returns
Const reference to the Voyant header

◆ headerMut()

VoyantHeaderWrapper & PointGroupWrapper::headerMut ( )
inline

Get mutable access to the common header.

Returns
Reference to the Voyant header

◆ isPointValid()

bool PointGroupWrapper::isPointValid ( size_t  blockIdx,
size_t  channelIdx 
) const

Check if a specific point is valid.

Parameters
blockIdxIndex of the data block (0-3)
channelIdxIndex of the channel within the block (0-7)
Returns
True if the point is valid, false otherwise

◆ pointGroupHeader()

const PointGroupHeaderWrapper & PointGroupWrapper::pointGroupHeader ( ) const
inline

Get the point group header.

Returns
Const reference to the point group header

◆ pointGroupHeaderMut()

PointGroupHeaderWrapper & PointGroupWrapper::pointGroupHeaderMut ( )
inline

Get mutable access to the point group header.

Returns
Reference to the point group header

◆ reset_data_blocks()

void PointGroupWrapper::reset_data_blocks ( )

Reset all data blocks to their default state.

◆ toBuffer()

size_t CapnpWrapper< PointGroup >::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() [1/2]

void PointGroupWrapper::toProto ( PointGroup::Builder builder) const
override

Write wrapper fields to a builder.

Parameters
builderThe PointGroup builder to write data to

◆ toProto() [2/2]

virtual void CapnpWrapper< PointGroup >::toProto ( typename T::Builder &  builder) const
pure virtualinherited

Write wrapper fields to a Cap'n Proto builder.

Parameters
builderThe Cap'n Proto builder to write data to

◆ updateValidPoints()

void PointGroupWrapper::updateValidPoints ( )

Calculate and set the valid points bitfield based on drop reasons.

Updates the validPoints field in the point group header based on the drop_reason of each point in each channel.


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