rti.types

This module defines the struct, union, enum, alias decorators that allow turning Python dataclasses into DDS topic-types.

See Data Types for more information.

rti.types also contains rti.types.builtin.

rti.types.builtin

This submodule defines the DDS built-in types. These simple, general-purpose types are available for the user’s convenience to quickly write a publisher or subscriber application.

class rti.types.builtin.Bytes(value: Sequence[NewType.<locals>.new_type] = <factory>)

Built-in type consisting of a sequence of bytes

This type can be used to create a dds.Topic, e.g. topic = dds.Topic(participant, "My Topic", Bytes).

value: Sequence[_octet] = None

The byte payload

class rti.types.builtin.KeyedBytes(key: str = '', value: Sequence[NewType.<locals>.new_type] = <factory>)

Built-in type consisting of a sequence of bytes and a string that is the key.

This type can be used to create a dds.Topic, e.g. topic = dds.Topic(participant, "My Topic", KeyedBytes).

key: str = ''

The key

value: Sequence[_octet] = None

The byte payload

class rti.types.builtin.KeyedString(key: str = '', value: str = '')

Built-in type consisting of a string payload and a second string that is the key.

This type can be used to create a dds.Topic, e.g. topic = dds.Topic(participant, "My Topic", KeyedString).

key: str = ''

The key

value: str = ''

The string payload

class rti.types.builtin.String(value: str = '')

Built-in type consisting of a string

This type can be used to create a dds.Topic, e.g. ` topic = dds.Topic(participant, "My Topic", String) `

value: str = ''

The string payload