Skip to main content

BuiltinSubscriber

Struct BuiltinSubscriber 

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

Builtin-Subscriber. Haelt 4 vor-erzeugte DataReader fuer die Builtin-Topics. Die inbox jedes Readers ist als Arc<Mutex<Vec<crate::runtime::UserSample>>> herausgegeben, damit der Runtime- Discovery-Hook neue Samples ohne Lock-Cycles einspeisen kann.

Implementations§

Source§

impl BuiltinSubscriber

Source

pub fn new() -> Self

Konstruiert einen Builtin-Subscriber mit vor-erzeugten Readern fuer alle 4 Builtin-Topics. Wird genau einmal pro DomainParticipant (vom Konstruktor) gerufen.

Source

pub fn subscriber(&self) -> &Subscriber

Underlying Subscriber-Handle (API-Spiegel zu User-Subscribers).

Source

pub fn sinks(&self) -> BuiltinSinks

Sinks fuer den Runtime-Discovery-Hook. Sollte nur intern (im DcpsRuntime) genutzt werden.

Source

pub fn lookup_datareader<T: BuiltinTopic>( &self, topic_name: &str, ) -> Result<DataReader<T>>

Liefert eine Kopie des typed DataReaders fuer ein Builtin-Topic. Spec: Subscriber::lookup_datareader(topic_name) (DDS 1.4 §2.2.2.5.1.5).

Topic-Name + Type-Parameter MUESSEN konsistent sein (z.B. lookup_datareader::<ParticipantBuiltinTopicData>("DCPSParticipant")), sonst gibt es BadParameter.

§Errors

BadParameter wenn topic_name keinem Builtin-Topic entspricht oder Type-Parameter und Topic-Name auseinanderlaufen.

Source

pub fn participant_reader(&self) -> DataReader<ParticipantBuiltinTopicData>

Direkter Zugriff auf den DCPSParticipant-Reader (Convenience- API, vermeidet generische Lookup-Pfade fuer Builtin-Topics).

Source

pub fn topic_reader(&self) -> DataReader<TopicBuiltinTopicData>

Direkter Zugriff auf den DCPSTopic-Reader.

Source

pub fn publication_reader(&self) -> DataReader<PublicationBuiltinTopicData>

Direkter Zugriff auf den DCPSPublication-Reader.

Source

pub fn subscription_reader(&self) -> DataReader<SubscriptionBuiltinTopicData>

Direkter Zugriff auf den DCPSSubscription-Reader.

Trait Implementations§

Source§

impl Debug for BuiltinSubscriber

Source§

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

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

impl Default for BuiltinSubscriber

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

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.