Rerun C++ SDK
Loading...
Searching...
No Matches
rerun::archetypes::McapMessage Struct Reference

Archetype: The binary payload of a single MCAP message, without metadata. More...

#include <rerun/archetypes/mcap_message.hpp>

Public Member Functions

 McapMessage (McapMessage &&other)=default
 
 McapMessage (const McapMessage &other)=default
 
McapMessageoperator= (const McapMessage &other)=default
 
McapMessageoperator= (McapMessage &&other)=default
 
 McapMessage (rerun::components::Blob _data)
 
McapMessage with_data (const rerun::components::Blob &_data) &&
 The raw message payload as a binary blob.
 
McapMessage with_many_data (const Collection< rerun::components::Blob > &_data) &&
 This method makes it possible to pack multiple data in a single component batch.
 
Collection< ComponentColumncolumns (const Collection< uint32_t > &lengths_)
 Partitions the component data into multiple sub-batches.
 
Collection< ComponentColumncolumns ()
 Partitions the component data into unit-length sub-batches.
 

Static Public Member Functions

static McapMessage update_fields ()
 Update only some specific fields of a McapMessage.
 
static McapMessage clear_fields ()
 Clear all the fields of a McapMessage.
 

Public Attributes

std::optional< ComponentBatchdata
 The raw message payload as a binary blob.
 

Static Public Attributes

static constexpr const char ArchetypeName [] = "rerun.archetypes.McapMessage"
 The name of the archetype as used in ComponentDescriptors.
 
static constexpr auto Descriptor_data
 ComponentDescriptor for the data field.
 

Detailed Description

Archetype: The binary payload of a single MCAP message, without metadata.

This archetype represents only the raw message data from an MCAP file. It does not include MCAP message metadata such as timestamps, channel IDs, sequence numbers, or publication times. The binary payload represents sensor data, commands, or other information encoded according to the format specified by the associated channel.

See archetypes::McapChannel for channel definitions that specify message encoding, archetypes::McapSchema for data structure definitions, and the MCAP specification for complete format details.

This type is unstable and may change significantly in a way that the data won't be backwards compatible.

Member Function Documentation

◆ with_data()

McapMessage rerun::archetypes::McapMessage::with_data ( const rerun::components::Blob _data) &&
inline

The raw message payload as a binary blob.

This contains the actual message data encoded according to the format specified by the associated channel's message_encoding field. The structure and interpretation of this binary data depends on the encoding format (e.g., ros1, cdr, protobuf) and the message schema defined for the channel.

◆ with_many_data()

McapMessage rerun::archetypes::McapMessage::with_many_data ( const Collection< rerun::components::Blob > &  _data) &&
inline

This method makes it possible to pack multiple data in a single component batch.

This only makes sense when used in conjunction with columns. with_data should be used when logging a single row's worth of data.

◆ columns() [1/2]

Collection< ComponentColumn > rerun::archetypes::McapMessage::columns ( const Collection< uint32_t > &  lengths_)

Partitions the component data into multiple sub-batches.

Specifically, this transforms the existing ComponentBatch data into ComponentColumns instead, via ComponentBatch::partitioned.

This makes it possible to use RecordingStream::send_columns to send columnar data directly into Rerun.

The specified lengths must sum to the total length of the component batch.

◆ columns() [2/2]

Collection< ComponentColumn > rerun::archetypes::McapMessage::columns ( )

Partitions the component data into unit-length sub-batches.

This is semantically similar to calling columns with std::vector<uint32_t>(n, 1), where n is automatically guessed.

Member Data Documentation

◆ data

std::optional<ComponentBatch> rerun::archetypes::McapMessage::data

The raw message payload as a binary blob.

This contains the actual message data encoded according to the format specified by the associated channel's message_encoding field. The structure and interpretation of this binary data depends on the encoding format (e.g., ros1, cdr, protobuf) and the message schema defined for the channel.

◆ Descriptor_data

constexpr auto rerun::archetypes::McapMessage::Descriptor_data
staticconstexpr
Initial value:
= ComponentDescriptor(
ArchetypeName, "McapMessage:data", Loggable<rerun::components::Blob>::ComponentType
)
static constexpr const char ArchetypeName[]
The name of the archetype as used in ComponentDescriptors.
Definition mcap_message.hpp:42

ComponentDescriptor for the data field.


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