pub struct Subscriber { /* private fields */ }Expand description
A DDS subscriber (DDS 1.4, 2.2.2.5.1): creates data readers.
Implementations§
Source§impl Subscriber
impl Subscriber
Sourcepub fn qos(&self) -> &SubscriberQos
pub fn qos(&self) -> &SubscriberQos
The subscriber’s QoS.
Sourcepub fn set_listener(
&self,
listener: impl SubscriberListener + 'static,
mask: StatusMask,
)
pub fn set_listener( &self, listener: impl SubscriberListener + 'static, mask: StatusMask, )
Sets the subscriber’s listener (set_listener), replacing any
earlier one: it is called for DATA_ON_READERS, and for the
statuses in mask of its readers that their own listeners do not
take (DDS 1.4, 2.2.4.3). See SubscriberListener.
Sourcepub fn clear_listener(&self)
pub fn clear_listener(&self)
Removes the subscriber’s listener.
Sourcepub fn notify_datareaders(&self)
pub fn notify_datareaders(&self)
Calls on_data_available of the listeners of its readers that
have new data (notify_datareaders, DDS 1.4, 2.2.2.5.2.8): from
on_data_on_readers, to have each reader handle its own.
Sourcepub fn same_as(&self, other: &Subscriber) -> bool
pub fn same_as(&self, other: &Subscriber) -> bool
Whether self and other are handles of the same subscriber.
Sourcepub fn create_datareader<T>(
&self,
topic: &impl TopicDescription<T>,
) -> Result<DataReader<T>>
pub fn create_datareader<T>( &self, topic: &impl TopicDescription<T>, ) -> Result<DataReader<T>>
Creates a reader for topic with the default QoS: BEST_EFFORT,
KEEP_LAST(1), VOLATILE. topic is a Topic or a
ContentFilteredTopic.
Sourcepub fn create_datareader_with_qos<T>(
&self,
topic: &impl TopicDescription<T>,
qos: DataReaderQos,
) -> Result<DataReader<T>>
pub fn create_datareader_with_qos<T>( &self, topic: &impl TopicDescription<T>, qos: DataReaderQos, ) -> Result<DataReader<T>>
Creates a reader for topic.
A RELIABLE reader gets the samples of each writer in order and without gaps, asking for those lost on the way; it matches only RELIABLE writers. A BEST_EFFORT reader takes what arrives, in order, and matches any writer.
Sourcepub fn create_datareader_with_listener<T: 'static>(
&self,
topic: &impl TopicDescription<T>,
qos: DataReaderQos,
listener: impl DataReaderListener<T> + 'static,
mask: StatusMask,
) -> Result<DataReader<T>>
pub fn create_datareader_with_listener<T: 'static>( &self, topic: &impl TopicDescription<T>, qos: DataReaderQos, listener: impl DataReaderListener<T> + 'static, mask: StatusMask, ) -> Result<DataReader<T>>
Creates a reader for topic with a listener for the statuses in
mask, set before the reader is matched, so that it is told of
the writers already there and of the samples they kept
(DDS 1.4, 2.2.2.5.2.5).