pub¶
- class cyclonedds.pub.Publisher(domain_participant, qos=None, listener=None)[source]¶
Bases:
Entity
- Parameters:
domain_participant (DomainParticipant) –
- class cyclonedds.pub.DataWriter(publisher_or_participant, topic, qos=None, listener=None)[source]¶
-
- Parameters:
- write_dispose(sample, timestamp=None)[source]¶
Similar to
write()
but also marks the sample for disposal by setting itsInstanceState
to NotAliveDisposed.
- dispose(sample, timestamp=None)[source]¶
Marks the sample for disposal by setting its
InstanceState
to NotAliveDisposed.
- dispose_instance_handle(handle, timestamp=None)[source]¶
Marks the instance and all samples associated wiht the given handle for disposal by setting their
InstanceState
to NotAliveDisposed.- Parameters:
handle (int) – An instance handle received from
register_instance()
orlookup_instance()
.timestamp (Optional[int]) – The instance’s source_timestamp (in nanoseconds since the UNIX Epoch)
- unregister_instance_handle(handle, timestamp=None)[source]¶
- Parameters:
handle (int) – An instance handle received from
register_instance()
orlookup_instance()
.timestamp (Optional[int]) – The timestamp used at registration (in nanoseconds since the UNIX Epoch)
- wait_for_acks(timeout)[source]¶
This operation blocks the calling thread until either all data written by the publisher or writer is acknowledged by all matched reliable reader entities, or else the duration specified by the timeout parameter elapses, whichever happens first.
- lookup_instance(sample)[source]¶
This operation takes a sample and returns an instance handle to be used for subsequent operations.
- get_matched_subscriptions()[source]¶
Get instance handles of the data readers matching a writer.
- Raises:
DDSException – When the number of matching readers < 0.:
- Returns:
A list of instance handles of the matching data readers.
- Return type:
List[int]
- property matched_sub: List[int]¶
Get instance handles of the data readers matching a writer.
- Raises:
DDSException – When the number of matching readers < 0.:
- Returns:
A list of instance handles of the matching data readers.
- Return type:
List[int]
- get_matched_subscription_data(handle)[source]¶
Get a description of a reader matched with the provided writer
- Parameters:
handle (Int) – The instance handle of a reader.
- Returns:
The sample of the DcpsEndpoint built-in topic.
- Return type:
- get_liveliness_lost_status()[source]¶
Get LIVELINESS_LOST status
- Raises:
- Returns:
The class ‘liveness_lost_status’ value.
- Return type:
liveness_lost_status
- get_offered_deadline_missed_status()[source]¶
Get OFFERED DEADLINE MISSED status
- Raises:
- Returns:
The class ‘offered_deadline_missed_status’ value.
- Return type:
- get_offered_incompatible_qos_status()[source]¶
Get OFFERED INCOMPATIBLE QOS status
- Raises:
- Returns:
The class ‘offered_incompatible_qos_status’ value.
- Return type: