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

Archetype: A status update, representing a change in the status of an entity. More...

#include <rerun/archetypes/status.hpp>

Public Member Functions

 Status (Status &&other)=default
 
 Status (const Status &other)=default
 
Statusoperator= (const Status &other)=default
 
Statusoperator= (Status &&other)=default
 
Status with_status (const rerun::components::Text &_status) &&
 The new status value. A null status is ignored, it can be used to partially update a multi-instance status array.
 
Status with_many_status (const Collection< rerun::components::Text > &_status) &&
 This method makes it possible to pack multiple status 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 Status update_fields ()
 Update only some specific fields of a Status.
 
static Status clear_fields ()
 Clear all the fields of a Status.
 

Public Attributes

std::optional< ComponentBatchstatus
 The new status value. A null status is ignored, it can be used to partially update a multi-instance status array.
 

Static Public Attributes

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

Detailed Description

Archetype: A status update, representing a change in the status of an entity.

Useful for representing discrete state machines, mode transitions, or status changes over time. Each logged archetypes::Status marks a new status at the given time. A null status is ignored by the Status view.

The Status view displays these as horizontal colored lanes over time.

Example

Status changes over time

image

#include <rerun.hpp>
int main(int argc, char* argv[]) {
const auto rec = rerun::RecordingStream("rerun_example_status");
rec.spawn().exit_on_failure();
rec.set_time_sequence("step", 0);
rec.log("door", rerun::Status().with_status("open"));
rec.set_time_sequence("step", 1);
rec.log("door", rerun::Status().with_status("closed"));
rec.set_time_sequence("step", 2);
rec.log("door", rerun::Status().with_status("open"));
}
A RecordingStream handles everything related to logging data into Rerun.
Definition recording_stream.hpp:73
Archetype: A status update, representing a change in the status of an entity.
Definition status.hpp:51
Status with_status(const rerun::components::Text &_status) &&
The new status value. A null status is ignored, it can be used to partially update a multi-instance s...
Definition status.hpp:80

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

Member Function Documentation

◆ with_many_status()

Status rerun::archetypes::Status::with_many_status ( const Collection< rerun::components::Text > &  _status) &&
inline

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

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

◆ columns() [1/2]

Collection< ComponentColumn > rerun::archetypes::Status::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::Status::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

◆ Descriptor_status

constexpr auto rerun::archetypes::Status::Descriptor_status
staticconstexpr
Initial value:
= ComponentDescriptor(
ArchetypeName, "Status:status", Loggable<rerun::components::Text>::ComponentType
)
static constexpr const char ArchetypeName[]
The name of the archetype as used in ComponentDescriptors.
Definition status.hpp:57

ComponentDescriptor for the status field.


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