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

Arrow-encoded data for a column of time points. More...

#include <rerun/time_column.hpp>

Public Member Functions

 TimeColumn (Timeline timeline, Collection< int64_t > times, SortingStatus sorting_status=SortingStatus::Unknown)
 Creates a time column from an array of time points.
 
Error to_c_ffi_struct (rr_time_column &out_column) const
 To rerun C API component batch.
 

Static Public Member Functions

static TimeColumn from_sequence_points (std::string timeline_name, Collection< int64_t > sequence_points, SortingStatus sorting_status=SortingStatus::Unknown)
 Creates a time column from an array of sequence points.
 
static TimeColumn from_nanoseconds (std::string timeline_name, Collection< int64_t > times_in_nanoseconds, SortingStatus sorting_status=SortingStatus::Unknown)
 Creates a time column from an array of nanoseconds.
 
static TimeColumn from_seconds (std::string timeline_name, Collection< double > times_in_seconds, SortingStatus sorting_status=SortingStatus::Unknown)
 Creates a time column from an array of seconds.
 
template<typename TRep , typename TPeriod >
static TimeColumn from_times (std::string timeline_name, const Collection< std::chrono::duration< TRep, TPeriod > > &chrono_times, SortingStatus sorting_status=SortingStatus::Unknown)
 Creates a time column from an array of arbitrary std::chrono durations.
 

Public Attributes

Timeline timeline
 The timeline this column belongs to.
 
std::shared_ptr< arrow::Array > array
 Time points as a primitive array of i64.
 
SortingStatus sorting_status
 The sorting order of the times array.
 

Detailed Description

Arrow-encoded data for a column of time points.

See also
rerun::RecordingStream::send_columns

Constructor & Destructor Documentation

◆ TimeColumn()

rerun::TimeColumn::TimeColumn ( Timeline  timeline,
Collection< int64_t >  times,
SortingStatus  sorting_status = SortingStatus::Unknown 
)

Creates a time column from an array of time points.

Parameters
timelineThe timeline this column belongs to.
timesThe time values. Depending on the TimeType of the timeline this may be either timestamps or sequence numbers. Make sure the sorting status is correctly specified.
sorting_statusThe sorting status of the time points. Already sorted time points may perform better.

Member Function Documentation

◆ from_sequence_points()

static TimeColumn rerun::TimeColumn::from_sequence_points ( std::string  timeline_name,
Collection< int64_t >  sequence_points,
SortingStatus  sorting_status = SortingStatus::Unknown 
)
inlinestatic

Creates a time column from an array of sequence points.

Parameters
timeline_nameThe name of the timeline this column belongs to.
sequence_pointsThe sequence points. Make sure the sorting status is correctly specified.
sorting_statusThe sorting status of the sequence points. Already sorted time points may perform better.

◆ from_nanoseconds()

static TimeColumn rerun::TimeColumn::from_nanoseconds ( std::string  timeline_name,
Collection< int64_t >  times_in_nanoseconds,
SortingStatus  sorting_status = SortingStatus::Unknown 
)
static

Creates a time column from an array of nanoseconds.

Parameters
timeline_nameThe name of the timeline this column belongs to.
times_in_nanosecondsTime values in nanoseconds. Make sure the sorting status is correctly specified.
sorting_statusThe sorting status of the time points. Already sorted time points may perform better.

◆ from_seconds()

static TimeColumn rerun::TimeColumn::from_seconds ( std::string  timeline_name,
Collection< double >  times_in_seconds,
SortingStatus  sorting_status = SortingStatus::Unknown 
)
static

Creates a time column from an array of seconds.

Parameters
timeline_nameThe name of the timeline this column belongs to.
times_in_secondsTime values in seconds. Make sure the sorting status is correctly specified.
sorting_statusThe sorting status of the time points. Already sorted time points may perform better.

◆ from_times()

template<typename TRep , typename TPeriod >
static TimeColumn rerun::TimeColumn::from_times ( std::string  timeline_name,
const Collection< std::chrono::duration< TRep, TPeriod > > &  chrono_times,
SortingStatus  sorting_status = SortingStatus::Unknown 
)
inlinestatic

Creates a time column from an array of arbitrary std::chrono durations.

Parameters
timeline_nameThe name of the timeline this column belongs to.
chrono_timesTime values as chrono durations. Make sure the sorting status is correctly specified.
sorting_statusThe sorting status of the time points. Already sorted time points may perform better.

◆ to_c_ffi_struct()

Error rerun::TimeColumn::to_c_ffi_struct ( rr_time_column &  out_column) const

To rerun C API component batch.

The resulting rr_time_column keeps the arrow::Array alive until it is released.


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