Wrapper for PointGroup messages.
More...
#include <point_group_wrapper.hpp>
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.
◆ ~PointGroupWrapper()
PointGroupWrapper::~PointGroupWrapper |
( |
| ) |
|
|
override |
◆ 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()
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 |
◆ 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
-
◆ fromProto() [2/2]
Update wrapper fields from a Cap'n Proto reader.
- Parameters
-
reader | The Cap'n Proto reader to extract data from |
◆ header()
Get the common header.
- Returns
- Const reference to the Voyant header
◆ headerMut()
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
-
blockIdx | Index of the data block (0-3) |
channelIdx | Index of the channel within the block (0-7) |
- Returns
- True if the point is valid, false otherwise
◆ pointGroupHeader()
Get the point group header.
- Returns
- Const reference to the point group header
◆ pointGroupHeaderMut()
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()
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
-
◆ toProto() [2/2]
Write wrapper fields to a Cap'n Proto builder.
- Parameters
-
builder | The 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: