builtin

class cyclonedds.builtin.BuiltinDataReader(subscriber_or_participant, builtin_topic, qos=None, listener=None)[source]

Bases: cyclonedds.sub.DataReader

Builtin topics have sligtly different behaviour than normal topics, so you should use this BuiltinDataReader instead of the normal DataReader. They are identical in the rest of their functionality.

Parameters
Return type

None

__init__(subscriber_or_participant, builtin_topic, qos=None, listener=None)[source]

Initialize the BuiltinDataReader

Parameters
  • subscriber_or_participant (cyclonedds.sub.Subscriber, cyclonedds.domain.DomainParticipant) – The subscriber to which this reader will be added. If you supply a DomainParticipant a subscriber will be created for you.

  • builtin_topic (cyclonedds.builtin.BuiltinTopic) – Which Builtin Topic to subscribe to. This can be one of BuiltinTopicDcpsParticipant, BuiltinTopicDcpsTopic, BuiltinTopicDcpsPublication or BuiltinTopicDcpsSubscription. Please note that BuiltinTopicDcpsTopic will fail if you built CycloneDDS without Topic Discovery.

  • qos (cyclonedds.core.Qos, optional = None) – Optionally supply a Qos.

  • listener (cyclonedds.core.Listener = None) – Optionally supply a Listener.

Return type

None

read(N=1, condition=None)[source]

Read a maximum of N samples, non-blocking. Optionally use a read/query-condition to select which samples you are interested in.

Parameters
Raises

DDSException – If any error code is returned by the DDS API it is converted into an exception.

take(N=1, condition=None)[source]

Take a maximum of N samples, non-blocking. Optionally use a read/query-condition to select which samples you are interested in.

Parameters
Raises

DDSException – If any error code is returned by the DDS API it is converted into an exception.

class cyclonedds.builtin.DcpsParticipant(key, qos)[source]

Data sample as returned when you subscribe to the BuiltinTopicDcpsParticipant topic.

Parameters
Return type

None

key

Unique participant identifier

Type

uuid.UUID

qos

Qos policies associated with the participant.

Type

Qos

class cyclonedds.builtin.DcpsEndpoint(key, participant_key, participant_instance_handle, topic_name, type_name, qos, type_id)[source]

Data sample as returned when you subscribe to the BuiltinTopicDcpsTopic, BuiltinTopicDcpsPublication or BuiltinTopicDcpsSubscription topic.

Parameters
Return type

None

key

Unique identifier for the topic, publication or subscription endpoint.

Type

uuid.UUID

participant_key

Unique identifier of the participant the endpoint belongs to.

Type

uuid.UUID

participant_instance_handle

Instance handle

Type

int

topic_name

Name of the associated topic.

Type

str

type_name

Name of the type.

Type

str

qos

Qos policies associated with the endpoint.

Type

Qos

typeid

Complete XTypes TypeIdentifier of the type, can be None.

Type

TypeIdentifier, optional

class cyclonedds.builtin.BuiltinTopic(_ref, data_type)[source]

Bases: cyclonedds.topic.Topic

Represent a built-in CycloneDDS Topic by magic reference number.

cyclonedds.builtin.BuiltinTopicDcpsParticipant

Built-in topic, is published to when a new participants appear on the network.

cyclonedds.builtin.BuiltinTopicDcpsTopic

Built-in topic, is published to when a new topic appear on the network.

cyclonedds.builtin.BuiltinTopicDcpsPublication

Built-in topic, is published to when a publication happens.

cyclonedds.builtin.BuiltinTopicDcpsSubscription

Built-in topic, is published to when a subscription happens.