Skip to main content

Subscriber

Struct Subscriber 

Source
pub struct Subscriber { /* private fields */ }
Expand description

Subscriber — Entity-Gruppe fuer DataReader.

Implementations§

Source§

impl Subscriber

Source

pub fn contains_reader(&self, handle: InstanceHandle) -> bool

Spec §2.2.2.2.1.10 — true wenn handle ein DataReader ist, der ueber diesen Subscriber erzeugt wurde.

Source

pub fn begin_access(&self)

Spec §2.2.2.5.2.8 begin_access — markiert den Beginn eines kohaerenten Read-Sets. Verschachtelung ist erlaubt; jeder Aufruf erhoeht einen internen Counter, jedes end_access erniedrigt ihn.

Source

pub fn end_access(&self) -> Result<(), DdsError>

Spec §2.2.2.5.2.9 end_access — Gegenstueck zu begin_access.

§Errors

DdsError::PreconditionNotMet wenn end_access ohne vorhergehendes begin_access gerufen wird.

Source

pub fn is_access_open(&self) -> bool

true wenn aktuell ein Group-Access offen ist.

Source

pub fn set_listener( &self, listener: Option<Arc<dyn SubscriberListener>>, mask: u32, )

setzt den SubscriberListener + StatusMask. None loescht den Slot. Spec §2.2.2.5.6.x set_listener.

Source

pub fn get_listener(&self) -> Option<Arc<dyn SubscriberListener>>

aktueller Listener-Klon.

Source

pub fn create_datareader<T>( &self, topic: &Topic<T>, qos: DataReaderQos, ) -> Result<DataReader<T>, DdsError>
where T: DdsType + Send + 'static,

Erzeugt einen typed DataReader<T>.

§Errors

BadParameter bei Type-Name-Mismatch.

Trait Implementations§

Source§

impl Debug for Subscriber

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Entity for Subscriber

Available on crate feature std only.
Source§

type Qos = SubscriberQos

QoS-Typ fuer diese Entity (z.B. DomainParticipantQos, DataWriterQos, …).
Source§

fn get_qos(&self) -> <Subscriber as Entity>::Qos

Liefert die aktuelle QoS (clone). Spec §2.2.2.1.2 get_qos.
Source§

fn set_qos(&self, qos: <Subscriber as Entity>::Qos) -> Result<(), DdsError>

Aendert QoS. Pre-enable: alles erlaubt. Post-enable: nur Felder mit “Changeable=YES” — sonst ImmutablePolicy-Error. Spec §2.2.2.1.2 set_qos. Read more
Source§

fn enable(&self) -> Result<(), DdsError>

Enabled die Entity (idempotent). Spec §2.2.2.1.4 enable. Read more
Source§

fn entity_state(&self) -> Arc<EntityState>

Interner Accessor — jede Impl liefert ihren Arc<EntityState>.
Source§

fn is_enabled(&self) -> bool

True wenn die Entity bereits enabled ist.
Source§

fn get_status_condition(&self) -> StatusCondition

StatusCondition dieser Entity. Spec §2.2.2.1.6 get_status_condition.
Source§

fn get_status_changes(&self) -> u32

Bitmask der Status-Kinds, die seit letztem Read geaendert haben. Spec §2.2.2.1.5 get_status_changes.
Source§

fn get_instance_handle(&self) -> InstanceHandle

Lokaler 64-Bit-Identifier. Spec §2.2.2.1.7 get_instance_handle.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.