pub struct Publisher { /* private fields */ }Expand description
A DDS publisher (DDS 1.4, 2.2.2.4.1): creates data writers.
Implementations§
Source§impl Publisher
impl Publisher
Sourcepub fn qos(&self) -> &PublisherQos
pub fn qos(&self) -> &PublisherQos
The publisher’s QoS.
Sourcepub fn set_listener(
&self,
listener: impl PublisherListener + 'static,
mask: StatusMask,
)
pub fn set_listener( &self, listener: impl PublisherListener + 'static, mask: StatusMask, )
Sets the publisher’s listener (set_listener), replacing any
earlier one: it is called for the statuses in mask of its writers
that their own listeners do not take (DDS 1.4, 2.2.4.3.1). See
PublisherListener.
Sourcepub fn clear_listener(&self)
pub fn clear_listener(&self)
Removes the publisher’s listener.
Sourcepub fn create_datawriter<T>(&self, topic: &Topic<T>) -> Result<DataWriter<T>>
pub fn create_datawriter<T>(&self, topic: &Topic<T>) -> Result<DataWriter<T>>
Creates a writer for topic with the default QoS: RELIABLE,
KEEP_LAST(1), VOLATILE.
Sourcepub fn create_datawriter_with_qos<T>(
&self,
topic: &Topic<T>,
qos: DataWriterQos,
) -> Result<DataWriter<T>>
pub fn create_datawriter_with_qos<T>( &self, topic: &Topic<T>, qos: DataWriterQos, ) -> Result<DataWriter<T>>
Creates a writer for topic.
A VOLATILE writer sends a reader the samples written after it was
matched; a TRANSIENT_LOCAL one also those it kept from before, to
TRANSIENT_LOCAL readers. A TRANSIENT or PERSISTENT one also, and
its samples outlive it (see DataWriterQos::durability); a
PERSISTENT one fails with Error::Io when its file cannot be
written. A RELIABLE writer keeps samples until its reliable
readers acknowledge them, and sends them again when asked; it also
serves BEST_EFFORT readers. A BEST_EFFORT writer sends each sample
once and matches only BEST_EFFORT readers.
Sourcepub fn create_datawriter_with_listener<T: 'static>(
&self,
topic: &Topic<T>,
qos: DataWriterQos,
listener: impl DataWriterListener<T> + 'static,
mask: StatusMask,
) -> Result<DataWriter<T>>
pub fn create_datawriter_with_listener<T: 'static>( &self, topic: &Topic<T>, qos: DataWriterQos, listener: impl DataWriterListener<T> + 'static, mask: StatusMask, ) -> Result<DataWriter<T>>
Creates a writer for topic with a listener for the statuses in
mask, set before the writer is matched, so that it is told of
the readers already there (DDS 1.4, 2.2.2.4.1.5).