Core Types

enum class osi3::ReadStatus : uint8_t

Status of a read operation.

Mirrors the Python ReadStatus enum for API parity.

  • kOk: message was read and deserialized successfully

  • kIncompatible: message has an incompatible encoding, schema, or message type (e.g. a non-OSI channel in an MCAP file)

  • kError: a runtime read/decode/parse failure occurred

Values:

enumerator kOk

Message read successfully

enumerator kIncompatible

Incompatible encoding/schema/message type

enumerator kError

Runtime read/decode/parse failure

enum class osi3::TraceFileFormat : uint8_t

Trace file format categories.

Mirrors the Python TraceFileFormat enum for API parity.

Values:

enumerator kSingleChannel

Single-channel format (.osi, .txth)

enumerator kMultiChannel

Multi-channel format (.mcap)

enum class osi3::ReaderTopLevelMessage : uint8_t

Enumeration of supported top-level message types in trace files.

Values:

enumerator kUnknown

Unknown message type

enumerator kGroundTruth

OSI3::GroundTruth data

enumerator kSensorData

OSI3::SensorData

enumerator kSensorView

OSI3::SensorView

enumerator kSensorViewConfiguration

OSI3::SensorViewConfiguration

enumerator kHostVehicleData

OSI3::HostVehicleData

enumerator kTrafficCommand

OSI3::TrafficCommand

enumerator kTrafficCommandUpdate

OSI3::TrafficCommandUpdate

enumerator kTrafficUpdate

OSI3::TrafficUpdate

enumerator kMotionRequest

OSI3::MotionRequest

enumerator kStreamingUpdate

OSI3::StreamingUpdate

struct ReadResult

Structure containing the result of a read operation.

For successful reads, status is kOk and message is populated. For incompatible messages (e.g. non-OSI in MCAP), status is kIncompatible and message is nullptr. For errors, status is kError and error_message describes the failure.

Public Members

std::unique_ptr<google::protobuf::Message> message

The parsed protobuf message (nullptr when status != kOk)

ReaderTopLevelMessage message_type = ReaderTopLevelMessage::kUnknown

Type of the message

std::string channel_name

Channel name (only for MCAP format)

ReadStatus status = ReadStatus::kOk

Status of the read operation

std::string error_message

Error description (empty when status == kOk)