6#include "../archetype_utils.hpp"
7#include "../collection.hpp"
8#include "../component_batch.hpp"
9#include "../component_column.hpp"
10#include "../components/channel_message_counts.hpp"
11#include "../components/count.hpp"
12#include "../components/timestamp.hpp"
13#include "../result.hpp"
82 static constexpr const char ArchetypeName[] =
"rerun.archetypes.McapStatistics";
175 .value_or_throw()) {}
192 return std::move(*
this);
204 return std::move(*
this);
213 return std::move(*
this);
225 return std::move(*
this);
234 return std::move(*
this);
246 return std::move(*
this);
256 return std::move(*
this);
269 return std::move(*
this);
280 return std::move(*
this);
293 return std::move(*
this);
302 return std::move(*
this);
314 return std::move(*
this);
326 return std::move(*
this);
339 return std::move(*
this);
350 return std::move(*
this);
363 return std::move(*
this);
371 _channel_message_counts,
375 return std::move(*
this);
386 _channel_message_counts,
390 return std::move(*
this);
402 return detail::partition_batches(
422 return detail::partition_batches_of_unit_length({&
message_count,
439 template <
typename T>
444 struct AsComponents<archetypes::McapStatistics> {
446 static Result<Collection<ComponentBatch>> as_batches(
447 const archetypes::McapStatistics& archetype
449 return detail::collect_batches(
450 {&archetype.message_count,
451 &archetype.schema_count,
452 &archetype.channel_count,
453 &archetype.attachment_count,
454 &archetype.metadata_count,
455 &archetype.chunk_count,
456 &archetype.message_start_time,
457 &archetype.message_end_time,
458 &archetype.channel_message_counts}
Generic collection of elements that are roughly contiguous in memory.
Definition collection.hpp:49
All built-in archetypes. See Types in the Rerun manual.
Definition rerun.hpp:90
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:26
Arrow-encoded data of a single batch of components together with a component descriptor.
Definition component_batch.hpp:28
static Result< ComponentBatch > from_loggable(const rerun::Collection< T > &components, const ComponentDescriptor &descriptor)
Creates a new component batch from a collection of component instances.
Definition component_batch.hpp:46
A ComponentDescriptor fully describes the semantics of a column of data.
Definition component_descriptor.hpp:16
The Loggable trait is used by all built-in implementation of rerun::AsComponents to serialize a colle...
Definition loggable.hpp:11
Archetype: Recording-level statistics about an MCAP file.
Definition mcap_statistics.hpp:34
std::optional< ComponentBatch > attachment_count
Number of file attachments embedded in the recording.
Definition mcap_statistics.hpp:54
McapStatistics with_message_count(const rerun::components::Count &_message_count) &&
Total number of data messages contained in the MCAP recording.
Definition mcap_statistics.hpp:189
McapStatistics with_metadata_count(const rerun::components::Count &_metadata_count) &&
Number of metadata records providing additional context about the recording.
Definition mcap_statistics.hpp:276
std::optional< ComponentBatch > message_count
Total number of data messages contained in the MCAP recording.
Definition mcap_statistics.hpp:39
static constexpr auto Descriptor_chunk_count
ComponentDescriptor for the chunk_count field.
Definition mcap_statistics.hpp:110
std::optional< ComponentBatch > channel_message_counts
Detailed breakdown of message counts per channel.
Definition mcap_statistics.hpp:78
static constexpr auto Descriptor_schema_count
ComponentDescriptor for the schema_count field.
Definition mcap_statistics.hpp:90
Collection< ComponentColumn > columns(const Collection< uint32_t > &lengths_)
Partitions the component data into multiple sub-batches.
Definition mcap_statistics.hpp:401
static McapStatistics clear_fields()
Clear all the fields of a McapStatistics.
McapStatistics with_many_channel_count(const Collection< rerun::components::Count > &_channel_count) &&
This method makes it possible to pack multiple channel_count in a single component batch.
Definition mcap_statistics.hpp:241
McapStatistics with_channel_count(const rerun::components::Count &_channel_count) &&
Number of channels defined in the recording.
Definition mcap_statistics.hpp:231
McapStatistics with_many_channel_message_counts(const Collection< rerun::components::ChannelMessageCounts > &_channel_message_counts) &&
This method makes it possible to pack multiple channel_message_counts in a single component batch.
Definition mcap_statistics.hpp:382
McapStatistics with_many_attachment_count(const Collection< rerun::components::Count > &_attachment_count) &&
This method makes it possible to pack multiple attachment_count in a single component batch.
Definition mcap_statistics.hpp:263
std::optional< ComponentBatch > message_end_time
Timestamp of the latest message in the recording.
Definition mcap_statistics.hpp:75
McapStatistics with_many_message_count(const Collection< rerun::components::Count > &_message_count) &&
This method makes it possible to pack multiple message_count in a single component batch.
Definition mcap_statistics.hpp:199
McapStatistics with_message_end_time(const rerun::components::Timestamp &_message_end_time) &&
Timestamp of the latest message in the recording.
Definition mcap_statistics.hpp:345
McapStatistics with_many_chunk_count(const Collection< rerun::components::Count > &_chunk_count) &&
This method makes it possible to pack multiple chunk_count in a single component batch.
Definition mcap_statistics.hpp:309
std::optional< ComponentBatch > chunk_count
Number of data chunks used to organize messages in the file.
Definition mcap_statistics.hpp:65
static constexpr const char ArchetypeName[]
The name of the archetype as used in ComponentDescriptors.
Definition mcap_statistics.hpp:82
static constexpr auto Descriptor_channel_count
ComponentDescriptor for the channel_count field.
Definition mcap_statistics.hpp:95
std::optional< ComponentBatch > schema_count
Number of unique schema definitions in the recording.
Definition mcap_statistics.hpp:44
McapStatistics with_attachment_count(const rerun::components::Count &_attachment_count) &&
Number of file attachments embedded in the recording.
Definition mcap_statistics.hpp:252
McapStatistics with_many_metadata_count(const Collection< rerun::components::Count > &_metadata_count) &&
This method makes it possible to pack multiple metadata_count in a single component batch.
Definition mcap_statistics.hpp:287
McapStatistics with_schema_count(const rerun::components::Count &_schema_count) &&
Number of unique schema definitions in the recording.
Definition mcap_statistics.hpp:210
static constexpr auto Descriptor_attachment_count
ComponentDescriptor for the attachment_count field.
Definition mcap_statistics.hpp:100
static constexpr auto Descriptor_message_end_time
ComponentDescriptor for the message_end_time field.
Definition mcap_statistics.hpp:120
McapStatistics with_chunk_count(const rerun::components::Count &_chunk_count) &&
Number of data chunks used to organize messages in the file.
Definition mcap_statistics.hpp:299
McapStatistics with_many_message_start_time(const Collection< rerun::components::Timestamp > &_message_start_time) &&
This method makes it possible to pack multiple message_start_time in a single component batch.
Definition mcap_statistics.hpp:333
static constexpr auto Descriptor_channel_message_counts
ComponentDescriptor for the channel_message_counts field.
Definition mcap_statistics.hpp:125
McapStatistics with_message_start_time(const rerun::components::Timestamp &_message_start_time) &&
Timestamp of the earliest message in the recording.
Definition mcap_statistics.hpp:320
Collection< ComponentColumn > columns()
Partitions the component data into unit-length sub-batches.
Definition mcap_statistics.hpp:421
std::optional< ComponentBatch > channel_count
Number of channels defined in the recording.
Definition mcap_statistics.hpp:49
McapStatistics with_many_message_end_time(const Collection< rerun::components::Timestamp > &_message_end_time) &&
This method makes it possible to pack multiple message_end_time in a single component batch.
Definition mcap_statistics.hpp:357
static constexpr auto Descriptor_metadata_count
ComponentDescriptor for the metadata_count field.
Definition mcap_statistics.hpp:105
static McapStatistics update_fields()
Update only some specific fields of a McapStatistics.
Definition mcap_statistics.hpp:178
static constexpr auto Descriptor_message_count
ComponentDescriptor for the message_count field.
Definition mcap_statistics.hpp:85
std::optional< ComponentBatch > message_start_time
Timestamp of the earliest message in the recording.
Definition mcap_statistics.hpp:70
static constexpr auto Descriptor_message_start_time
ComponentDescriptor for the message_start_time field.
Definition mcap_statistics.hpp:115
std::optional< ComponentBatch > metadata_count
Number of metadata records providing additional context about the recording.
Definition mcap_statistics.hpp:60
McapStatistics with_channel_message_counts(const rerun::components::ChannelMessageCounts &_channel_message_counts) &&
Detailed breakdown of message counts per channel.
Definition mcap_statistics.hpp:367
McapStatistics with_many_schema_count(const Collection< rerun::components::Count > &_schema_count) &&
This method makes it possible to pack multiple schema_count in a single component batch.
Definition mcap_statistics.hpp:220
Component: A mapping of channel IDs to their respective message counts.
Definition channel_message_counts.hpp:27
Component: A generic count value.
Definition count.hpp:19
Component: When the recording started.
Definition timestamp.hpp:16