Skip to main content

DomainParticipantFactory

Struct DomainParticipantFactory 

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

Factory-Singleton.

Implementations§

Source§

impl DomainParticipantFactory

Source

pub fn instance() -> &'static DomainParticipantFactory

Liefert den Prozess-weiten Factory-Singleton (Spec §2.2.2.2.2.1 get_instance).

Source

pub fn create_participant( &self, domain_id: i32, qos: DomainParticipantQos, ) -> Result<DomainParticipant, DdsError>

Erzeugt einen neuen DomainParticipant fuer die gegebene Domain-Id. Startet die DcpsRuntime mit Default-Config — UDP-Sockets + SPDP/SEDP-Threads.

§Errors

DdsError::TransportError wenn die UDP-Sockets nicht binden.

Source

pub fn create_participant_with_config( &self, domain_id: i32, qos: DomainParticipantQos, config: RuntimeConfig, ) -> Result<DomainParticipant, DdsError>

Variante mit explizit uebergebener RuntimeConfig (z.B. fuer Tests mit kurzen SPDP-Periods).

§Errors

DdsError::TransportError wenn die UDP-Sockets nicht binden.

Source

pub fn create_participant_offline( &self, domain_id: i32, qos: DomainParticipantQos, ) -> DomainParticipant

Offline-Variante ohne Runtime — nur fuer Unit-Tests die kein Netzwerk wollen. Der zurueckgegebene Participant kann Topics erzeugen, aber keine DataWriter/Reader.

Source

pub fn lookup_participant(&self, domain_id: i32) -> Option<DomainParticipant>

Spec §2.2.2.2.2.4 lookup_participant(domain_id) — liefert einen vorher erzeugten Participant zur gleichen Domain-Id, oder None wenn keiner registriert ist. Bei mehreren Participants derselben Domain liefert die Implementation den ersten.

Source

pub fn delete_participant(&self, p: &DomainParticipant) -> Result<(), DdsError>

Spec §2.2.2.2.2.3 delete_participant. Entfernt den Participant aus der Factory-Registry und ruft delete_contained_entities auf. Liefert PreconditionNotMet wenn der Participant nicht in der Registry ist.

§Errors

DdsError::PreconditionNotMet wenn der Participant nicht registriert ist.

Source

pub fn set_default_participant_qos( &self, qos: DomainParticipantQos, ) -> Result<(), DdsError>

Spec §2.2.2.2.2.5 set_default_participant_qos — Default-QoS fuer ab jetzt erzeugte Participants.

§Errors

DdsError::PreconditionNotMet bei Lock-Poisoning.

Source

pub fn get_default_participant_qos(&self) -> DomainParticipantQos

Spec §2.2.2.2.2.5 get_default_participant_qos.

Source

pub fn set_qos(&self, qos: DomainParticipantFactoryQos) -> Result<(), DdsError>

Spec §2.2.2.2.2.6 set_qos (Factory-Level QoS).

§Errors

DdsError::PreconditionNotMet bei Lock-Poisoning.

Source

pub fn get_qos(&self) -> DomainParticipantFactoryQos

Spec §2.2.2.2.2.6 get_qos (Factory-Level QoS).

Trait Implementations§

Source§

impl Debug for DomainParticipantFactory

Source§

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

Formats the value using the given formatter. 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.