pub¶
- class cyclonedds.pub.Publisher(domain_participant, qos=None, listener=None)[source]¶
Bases:
cyclonedds.core.Entity
- Parameters
domain_participant (cyclonedds.domain.DomainParticipant) –
qos (Optional[cyclonedds.qos.Qos]) –
listener (Optional[cyclonedds.core.Listener]) –
- class cyclonedds.pub.DataWriter(publisher_or_participant, topic, qos=None, listener=None)[source]¶
Bases:
cyclonedds.core.Entity
,Generic
[cyclonedds.pub._T
]- Parameters
publisher_or_participant (Union[cyclonedds.domain.DomainParticipant, cyclonedds.pub.Publisher]) –
topic (cyclonedds.topic.Topic[cyclonedds.pub._T]) –
qos (Optional[cyclonedds.qos.Qos]) –
listener (Optional[cyclonedds.core.Listener]) –
- property topic: cyclonedds.topic.Topic[cyclonedds.pub._T]¶
- 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)