Skip to content
Roboto
Esc
↑↓navigate↵open⌘Jpreview
On this page

roboto.domain.topics.operations

Module Contents

AddMessagePathRepresentationRequest

class roboto.domain.topics.operations.AddMessagePathRepresentationRequest(/, **data)#View Source

Bases: BaseAddRepresentationRequest

Request to associate a message path with a representation.

Creates a link between a specific message path and a data representation, enabling efficient access to individual fields within topic data.

Parameters

data Any

Attributes

AddMessagePathRepresentationRequest.message_path_id

message_path_id str #

AddMessagePathRepresentationRequest.model_config

model_config #

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

AddMessagePathRequest

class roboto.domain.topics.operations.AddMessagePathRequest(/, **data)#View Source

Bases: pydantic.BaseModel

Request to add a new message path to a topic.

Defines a new message path within a topic’s schema, specifying its data type, canonical type, and initial metadata. Used during topic creation or when extending an existing topic’s schema.

Parameters

data Any

Attributes

AddMessagePathRequest.canonical_data_type

Normalized Roboto data type that enables specialized platform features for maps, images, timestamps, and other data.

AddMessagePathRequest.data_type

data_type str #

Native data type as it appears in the original data source (e.g., “float32”, “geometry_msgs/Pose”). Used for display purposes.

AddMessagePathRequest.message_path

message_path str #

Dot-delimited path to the attribute (e.g., “pose.position.x”).

AddMessagePathRequest.metadata

metadata dict[str, Any] = None #

Initial key-value pairs to associate with the message path.

AddMessagePathRequest.model_config

model_config #

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

AddMessagePathRequest.path_in_schema

path_in_schema list[str] = None #

List of path components representing the field’s location in the original data schema. Unlike message_path, which assumes dots separate path parts implying nested data, this preserves the exact path from the source data for accurate attribute access.

BaseAddRepresentationRequest

class roboto.domain.topics.operations.BaseAddRepresentationRequest(/, **data)#View Source

Bases: pydantic.BaseModel

Base request for adding a representation to a topic.

Defines the common fields required when creating any type of representation for topic data, including the storage location, format, and version information.

Parameters

data Any

Attributes

BaseAddRepresentationRequest.association

BaseAddRepresentationRequest.format

format str | None = None #

BaseAddRepresentationRequest.storage_format

BaseAddRepresentationRequest.transformations

transformations list[str] | None = None #

BaseAddRepresentationRequest.version

version int #

CreateTopicRequest

class roboto.domain.topics.operations.CreateTopicRequest(/, **data)#View Source

Bases: pydantic.BaseModel

Request to create a new topic in the Roboto platform.

Contains all the information needed to register a topic found within a source recording file, including its schema, temporal boundaries, and initial message paths.

Parameters

data Any

Attributes

CreateTopicRequest.association

CreateTopicRequest.end_time

end_time int | None = None #

CreateTopicRequest.message_count

message_count int | None = None #

CreateTopicRequest.message_paths

message_paths collections.abc.Sequence[AddMessagePathRequest] | None = None #

CreateTopicRequest.metadata

metadata collections.abc.Mapping[str, Any] | None = None #

CreateTopicRequest.model_config

model_config #

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

CreateTopicRequest.schema_checksum

schema_checksum str | None = None #

CreateTopicRequest.schema_name

schema_name str | None = None #

CreateTopicRequest.start_time

start_time int | None = None #

CreateTopicRequest.topic_name

topic_name str #

DeleteMessagePathRequest

class roboto.domain.topics.operations.DeleteMessagePathRequest(/, **data)#View Source

Bases: pydantic.BaseModel

Request to delete a message path from a topic.

Removes a message path from a topic’s schema. This operation cannot be undone and will remove all associated data and metadata for the specified path.

Parameters

data Any

Attributes

DeleteMessagePathRequest.message_path

message_path str #

Message path name.

DeleteMessagePathRequest.model_config

model_config #

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

MessagePathChangeset

class roboto.domain.topics.operations.MessagePathChangeset(/, **data)#View Source

Bases: pydantic.BaseModel

Changeset for batch operations on topic message paths.

Defines a collection of add, delete, and update operations to be applied to a topic’s message paths in a single atomic operation. Useful for making multiple schema changes efficiently.

Parameters

data Any

MessagePathChangeset.check_replace_all_correctness()

check_replace_all_correctness()#View Source

MessagePathChangeset.from_replacement_message_paths()

classmethod from_replacement_message_paths(message_paths)#View Source

Create a changeset that replaces all existing message paths.

Creates a changeset that will replace all existing message paths on a topic with the provided set of message paths. This is useful for completely redefining a topic’s schema.

Parameters

message_paths collections.abc.Sequence[AddMessagePathRequest]

Sequence of message path requests to replace existing paths.

Returns

MessagePathChangeset configured to replace all existing message paths.

Usage

from roboto.domain.topics import AddMessagePathRequest, CanonicalDataType
new_paths = [
    AddMessagePathRequest(
        message_path="velocity.x", data_type="float32", canonical_data_type=CanonicalDataType.Number
    )
]
changeset = MessagePathChangeset.from_replacement_message_paths(new_paths)

MessagePathChangeset.has_changes()

has_changes()#View Source

Check whether the changeset contains any actual changes.

Returns

bool

True if the changeset contains operations that would modify the topic’s message paths.

Attributes

MessagePathChangeset.message_paths_to_add

message_paths_to_add collections.abc.Sequence[AddMessagePathRequest] | None = None #

Message paths to add to a topic.

MessagePathChangeset.message_paths_to_delete

message_paths_to_delete collections.abc.Sequence[DeleteMessagePathRequest] | None = None #

Message paths to delete from a topic.

MessagePathChangeset.message_paths_to_update

message_paths_to_update collections.abc.Sequence[UpdateMessagePathRequest] | None = None #

Message paths to update on a topic.

MessagePathChangeset.replace_all

replace_all bool = False #

Flag indicating whether this changeset should replace all message paths on a topic.

It assumes that the replacement message paths will be provided via message_paths_to_add. Rather than setting this flag directly, use appropriate class methods such as from_replacement_message_paths.

SetDefaultRepresentationRequest

class roboto.domain.topics.operations.SetDefaultRepresentationRequest(/, **data)#View Source

Bases: BaseAddRepresentationRequest

Request to set the default representation for a topic.

Designates a specific representation as the default for accessing topic data. The default representation is used when no specific representation is requested for data access operations.

Parameters

data Any

Attributes

SetDefaultRepresentationRequest.model_config

model_config #

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

SetTimelineOffsetsRequest

class roboto.domain.topics.operations.SetTimelineOffsetsRequest(/, **data)#View Source

Bases: pydantic.BaseModel

Request body for POST /v1/files/id/<id>/timeline-offsets.

Atomic request: the server applies all entries together or fails.

Parameters

data Any

Attributes

SetTimelineOffsetsRequest.model_config

model_config #

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

SetTimelineOffsetsRequest.offsets

offsets list[TimelineOffsetEntry] = None #

Offsets to apply, at least one. An entry whose selectors reach no extent on this file is skipped as long as another entry reaches one; a request whose entries together reach none is refused. When two entries reach the same extent, the later entry’s offset applies.

TimelineOffsetEntry

class roboto.domain.topics.operations.TimelineOffsetEntry(/, **data)#View Source

Bases: pydantic.BaseModel

One offset for set_timeline_offsets().

Optional selectors narrow which of the file’s timelines the offset applies to.

Topic selector:

  • topic_name: the topic’s name (e.g. "/imu/raw"); topic names are unique within a single file. Scopes the offset to a single topic on the file.

Timeline-source selector (give at most one):

  • timeline_source_name: the source’s name (e.g. "header.stamp"). Source names are not unique, so the offset applies to every source with that name within the topic selector’s scope.
  • timeline_source_id: explicit id, for callers holding a TimelineSourceRecord.

Omitting every selector applies the offset to every timeline on the file.

Parameters

data Any

Attributes

TimelineOffsetEntry.model_config

model_config #

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

TimelineOffsetEntry.timeline_source_id

timeline_source_id str | None = None #

TimelineOffsetEntry.timeline_source_name

timeline_source_name str | None = None #

TimelineOffsetEntry.topic_name

topic_name str | None = None #

TimelineOffsetEntry.unix_epoch_offset_ns

unix_epoch_offset_ns roboto.time._EpochNanosecondsFromTime = None #

Nanoseconds added to the file’s stored timestamps so they read as Unix-epoch time (session_time_ns = stored_time_ns + unix_epoch_offset_ns). Must not be negative, and must fit in the signed 64-bit integer the platform stores it in. Also accepts any roboto.time.Time at runtime, read as roboto.time.to_epoch_nanoseconds() reads it, so an instant such as a datetime becomes the nanoseconds since the Unix epoch at which stored time 0 occurred; convert with that function first to satisfy a type checker.

TimelineSourceUpdate

class roboto.domain.topics.operations.TimelineSourceUpdate(/, **data)#View Source

Bases: pydantic.BaseModel

Partial update for a timeline source.

Fields left at NotSet are not modified.

Parameters

data Any

Attributes

TimelineSourceUpdate.is_default

is_default bool | roboto.sentinels.NotSetType #

TimelineSourceUpdate.model_config

model_config #

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

TimelineSourceUpdate.name

UpdateMessagePathRequest

class roboto.domain.topics.operations.UpdateMessagePathRequest(/, **data)#View Source

Bases: pydantic.BaseModel

Request to update an existing message path within a topic.

Allows modification of message path attributes including metadata, data type, and canonical data type. Used to correct or enhance message path definitions after initial creation.

Parameters

data Any

Attributes

UpdateMessagePathRequest.canonical_data_type

Canonical Roboto data type for the data under this message path (optional).

Note: updating this attribute should be done with care, as it affects Roboto’s ability to interpret and visualize the data.

UpdateMessagePathRequest.data_type

Native data type for the data under this message path (optional).

UpdateMessagePathRequest.has_updates()

has_updates()#View Source

Check whether this request would result in any message path modifications.

Returns

bool

True if the request contains changes that would modify the message path.

Attributes

UpdateMessagePathRequest.message_path

message_path str #

Message path name (required).

UpdateMessagePathRequest.metadata_changeset

A set of changes to the message path’s metadata (optional).

UpdateMessagePathRequest.model_config

model_config #

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

UpdateMessagePathRequest.path_in_schema

path_in_schema list[str] | roboto.sentinels.NotSetType #

List of path components representing the field’s location in the source data schema (optional).

For nested fields like ‘position.x’, this would be [‘position’, ‘x’].

UpdateTopicRequest

class roboto.domain.topics.operations.UpdateTopicRequest(/, **data)#View Source

Bases: pydantic.BaseModel

Request to update an existing topic’s properties.

Allows modification of topic attributes including temporal boundaries, message count, schema information, metadata, and message paths.

Parameters

data Any

Attributes

UpdateTopicRequest.end_time

end_time int | None | roboto.sentinels.NotSetType #

UpdateTopicRequest.message_count

message_count int | roboto.sentinels.NotSetType #

UpdateTopicRequest.message_path_changeset

UpdateTopicRequest.metadata_changeset

UpdateTopicRequest.model_config

model_config #

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

UpdateTopicRequest.schema_checksum

schema_checksum str | None | roboto.sentinels.NotSetType #

UpdateTopicRequest.schema_name

schema_name str | None | roboto.sentinels.NotSetType #

UpdateTopicRequest.start_time

start_time int | None | roboto.sentinels.NotSetType #

Was this page helpful?