Rerun C++ SDK
Loading...
Searching...
No Matches
rerun Namespace Reference

All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces. More...

Namespaces

namespace  archetypes
 All built-in archetypes. See Types in the Rerun manual.
 
namespace  blueprint
 All blueprint types. This is still experimental and subject to change!
 
namespace  components
 All built-in components. See Types in the Rerun manual.
 
namespace  datatypes
 All built-in datatypes. See Types in the Rerun manual.
 
namespace  traits
 Type trait utilities.
 

Classes

class  Collection
 Generic collection of elements that are roughly contiguous in memory. More...
 
struct  CollectionAdapter
 The rerun::CollectionAdapter trait is responsible for mapping an input argument to a rerun::Collection. More...
 
struct  ComponentType
 A type of component that can be registered. More...
 
struct  DataCell
 Arrow-encoded data of a single batch components for a single entity. More...
 
class  Error
 Status outcome object (success or error) returned for fallible operations. More...
 
struct  half
 IEEE 754 16-bit half-precision floating point number. More...
 
struct  Loggable
 The Loggable trait is used by all built-in implementation of rerun::AsComponents to serialize a collection for logging. More...
 
class  RecordingStream
 A RecordingStream handles everything related to logging data into Rerun. More...
 
struct  RerunGlobalConfig
 Configuration singleton that applies to the entire SDK. More...
 
class  Result
 A class for representing either a usable value, or an error. More...
 
struct  SpawnOptions
 Options to control the behavior of spawn. More...
 

Typedefs

using ComponentTypeHandle = uint32_t
 Handle to a registered component types.
 
using StatusLogHandler = void(*)(const class Error &status, void *userdata)
 Callback function type for log handlers.
 

Enumerations

enum class  CollectionOwnership { Borrowed , VectorOwned }
 Type of ownership of a collection's data. More...
 
enum class  ErrorCode : uint32_t {
  Ok = 0x0000'0000 , OutOfMemory , NotImplemented , SdkVersionMismatch ,
  _CategoryArgument = 0x0000'0010 , UnexpectedNullArgument , InvalidStringArgument , InvalidRecordingStreamHandle ,
  InvalidSocketAddress , InvalidComponentTypeHandle , InvalidTensorDimension , _CategoryRecordingStream = 0x0000'0100 ,
  RecordingStreamCreationFailure , RecordingStreamSaveFailure , RecordingStreamSpawnFailure , _CategoryArrow = 0x0000'1000 ,
  ArrowFfiSchemaImportError , ArrowFfiArrayImportError , ArrowDataCellError , _CategoryFileIO = 0x0001'0000 ,
  FileOpenFailure , _CategoryArrowCppStatus = 0x1000'0000 , ArrowStatusCode_KeyError , ArrowStatusCode_TypeError ,
  ArrowStatusCode_Invalid , ArrowStatusCode_IOError , ArrowStatusCode_CapacityError , ArrowStatusCode_IndexError ,
  ArrowStatusCode_Cancelled , ArrowStatusCode_UnknownError , ArrowStatusCode_NotImplemented , ArrowStatusCode_SerializationError ,
  ArrowStatusCode_RError , ArrowStatusCode_CodeGenError , ArrowStatusCode_ExpressionValidationError , ArrowStatusCode_ExecutionError ,
  ArrowStatusCode_AlreadyExists , Unknown = 0xFFFF'FFFF
}
 Status codes returned by the SDK as part of Status. More...
 
enum class  StoreKind { Recording , Blueprint }
 

Functions

void set_default_enabled (bool default_enabled)
 Change whether RecordingStreams are enabled by default.
 
bool is_default_enabled ()
 Check if Rerun is enabled.
 
const char * version_string ()
 The Rerun C++ SDK version as a human-readable string.
 
Error check_binary_and_header_version_match ()
 Internal check whether the version reported by the rerun_c binary matches sdk_version_string.
 
Error spawn (const SpawnOptions &options={})
 Spawns a new Rerun Viewer process from an executable available in PATH, ready to listen for incoming TCP connections.
 

Variables

template<typename T >
constexpr bool is_loggable = detail::is_loggable<T>()
 True for any type that implements the Loggable trait.
 

Detailed Description

All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.

Enumeration Type Documentation

◆ CollectionOwnership

enum class rerun::CollectionOwnership
strong

Type of ownership of a collection's data.

User access to this is typically only needed for debugging and testing.

Enumerator
Borrowed 

The collection does not own the data and only has a pointer and a size.

VectorOwned 

The collection batch owns the data via an std::vector.

◆ ErrorCode

enum class rerun::ErrorCode : uint32_t
strong

Status codes returned by the SDK as part of Status.

Category codes are used to group errors together, but are never returned directly.

Function Documentation

◆ set_default_enabled()

void rerun::set_default_enabled ( bool  default_enabled)
inline

Change whether RecordingStreams are enabled by default.

This governs the creation of new RecordingStreams. If default_enabled is false, RecordingStreams will be created in the disabled state. Changing the value of default_enabled will not affect existing RecordingStreams.

Note that regardless of usage of this API, the value of default_enabled will be overridden by the RERUN environment variable.

If RERUN is set to 1, true, or yes, then Rerun is enabled. If RERUN is set to 0, false, or no, then Rerun is disabled.

◆ check_binary_and_header_version_match()

Error rerun::check_binary_and_header_version_match ( )

Internal check whether the version reported by the rerun_c binary matches sdk_version_string.

This method is called on various C++ API entry points, calling Error::handle on the return value. There is no need to call this method yourself unless you want to ensure that rerun_c binary and rerun_c header versions match ahead of time.

◆ spawn()

Error rerun::spawn ( const SpawnOptions options = {})

Spawns a new Rerun Viewer process from an executable available in PATH, ready to listen for incoming TCP connections.

If a Rerun Viewer is already listening on this TCP port, the stream will be redirected to that viewer instead of starting a new one.

options: See rerun::SpawnOptions for more information.