Rerun C++ SDK
|
Archetype: A channel within an MCAP file that defines how messages are structured and encoded. More...
#include <rerun/archetypes/mcap_channel.hpp>
Public Member Functions | |
McapChannel (McapChannel &&other)=default | |
McapChannel (const McapChannel &other)=default | |
McapChannel & | operator= (const McapChannel &other)=default |
McapChannel & | operator= (McapChannel &&other)=default |
McapChannel (rerun::components::ChannelId _id, rerun::components::Text _topic, rerun::components::Text _message_encoding) | |
McapChannel | with_id (const rerun::components::ChannelId &_id) && |
Unique identifier for this channel within the MCAP file. | |
McapChannel | with_many_id (const Collection< rerun::components::ChannelId > &_id) && |
This method makes it possible to pack multiple id in a single component batch. | |
McapChannel | with_topic (const rerun::components::Text &_topic) && |
The topic name that this channel publishes to. | |
McapChannel | with_many_topic (const Collection< rerun::components::Text > &_topic) && |
This method makes it possible to pack multiple topic in a single component batch. | |
McapChannel | with_message_encoding (const rerun::components::Text &_message_encoding) && |
The encoding format used for messages in this channel. | |
McapChannel | with_many_message_encoding (const Collection< rerun::components::Text > &_message_encoding) && |
This method makes it possible to pack multiple message_encoding in a single component batch. | |
McapChannel | with_metadata (const rerun::components::KeyValuePairs &_metadata) && |
Additional metadata for this channel stored as key-value pairs. | |
McapChannel | with_many_metadata (const Collection< rerun::components::KeyValuePairs > &_metadata) && |
This method makes it possible to pack multiple metadata in a single component batch. | |
Collection< ComponentColumn > | columns (const Collection< uint32_t > &lengths_) |
Partitions the component data into multiple sub-batches. | |
Collection< ComponentColumn > | columns () |
Partitions the component data into unit-length sub-batches. | |
Static Public Member Functions | |
static McapChannel | update_fields () |
Update only some specific fields of a McapChannel . | |
static McapChannel | clear_fields () |
Clear all the fields of a McapChannel . | |
Public Attributes | |
std::optional< ComponentBatch > | id |
Unique identifier for this channel within the MCAP file. | |
std::optional< ComponentBatch > | topic |
The topic name that this channel publishes to. | |
std::optional< ComponentBatch > | message_encoding |
The encoding format used for messages in this channel. | |
std::optional< ComponentBatch > | metadata |
Additional metadata for this channel stored as key-value pairs. | |
Static Public Attributes | |
static constexpr const char | ArchetypeName [] = "rerun.archetypes.McapChannel" |
The name of the archetype as used in ComponentDescriptor s. | |
static constexpr auto | Descriptor_id |
ComponentDescriptor for the id field. | |
static constexpr auto | Descriptor_topic |
ComponentDescriptor for the topic field. | |
static constexpr auto | Descriptor_message_encoding |
ComponentDescriptor for the message_encoding field. | |
static constexpr auto | Descriptor_metadata |
ComponentDescriptor for the metadata field. | |
Archetype: A channel within an MCAP file that defines how messages are structured and encoded.
Channels in MCAP files group messages by topic and define their encoding format. Each channel has a unique identifier and specifies the message schema and encoding used for all messages published to that topic.
See also archetypes::McapMessage
for individual messages within a channel, archetypes::McapSchema
for the 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.
|
inline |
Unique identifier for this channel within the MCAP file.
Channel IDs must be unique within a single MCAP file and are used to associate messages with their corresponding channel definition.
|
inline |
This method makes it possible to pack multiple id
in a single component batch.
This only makes sense when used in conjunction with columns
. with_id
should be used when logging a single row's worth of data.
|
inline |
The topic name that this channel publishes to.
Topics are hierarchical paths from the original robotics system (e.g., "/sensors/camera/image") that categorize and organize different data streams. Topics are separate from Rerun's entity paths, but they often can be mapped to them.
|
inline |
This method makes it possible to pack multiple topic
in a single component batch.
This only makes sense when used in conjunction with columns
. with_topic
should be used when logging a single row's worth of data.
|
inline |
The encoding format used for messages in this channel.
Common encodings include:
ros1
- ROS1 message formatcdr
- Common Data Representation (CDR) message format, used by ROS2protobuf
- Protocol Buffersjson
- JSON encoding
|
inline |
This method makes it possible to pack multiple message_encoding
in a single component batch.
This only makes sense when used in conjunction with columns
. with_message_encoding
should be used when logging a single row's worth of data.
|
inline |
Additional metadata for this channel stored as key-value pairs.
This can include channel-specific configuration, description, units, coordinate frames, or any other contextual information that helps interpret the data in this channel.
|
inline |
This method makes it possible to pack multiple metadata
in a single component batch.
This only makes sense when used in conjunction with columns
. with_metadata
should be used when logging a single row's worth of data.
Collection< ComponentColumn > rerun::archetypes::McapChannel::columns | ( | const Collection< uint32_t > & | lengths_ | ) |
Partitions the component data into multiple sub-batches.
Specifically, this transforms the existing ComponentBatch
data into ComponentColumn
s 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.
Collection< ComponentColumn > rerun::archetypes::McapChannel::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.
std::optional<ComponentBatch> rerun::archetypes::McapChannel::id |
Unique identifier for this channel within the MCAP file.
Channel IDs must be unique within a single MCAP file and are used to associate messages with their corresponding channel definition.
std::optional<ComponentBatch> rerun::archetypes::McapChannel::topic |
The topic name that this channel publishes to.
Topics are hierarchical paths from the original robotics system (e.g., "/sensors/camera/image") that categorize and organize different data streams. Topics are separate from Rerun's entity paths, but they often can be mapped to them.
std::optional<ComponentBatch> rerun::archetypes::McapChannel::message_encoding |
The encoding format used for messages in this channel.
Common encodings include:
ros1
- ROS1 message formatcdr
- Common Data Representation (CDR) message format, used by ROS2protobuf
- Protocol Buffersjson
- JSON encoding std::optional<ComponentBatch> rerun::archetypes::McapChannel::metadata |
Additional metadata for this channel stored as key-value pairs.
This can include channel-specific configuration, description, units, coordinate frames, or any other contextual information that helps interpret the data in this channel.
|
staticconstexpr |
ComponentDescriptor
for the id
field.
|
staticconstexpr |
ComponentDescriptor
for the topic
field.
|
staticconstexpr |
ComponentDescriptor
for the message_encoding
field.
|
staticconstexpr |
ComponentDescriptor
for the metadata
field.