Skip to main content

Publisher

Struct Publisher 

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

Publisher — Entity-Gruppe fuer DataWriter.

In DDS 1.4 hat der Publisher eigene QoS (Partition, Group-Data, Presentation). v1.2 implementiert nur die API-Shape ohne Partition-Matching.

Implementations§

Source§

impl Publisher

Source

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

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

Source

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

setzt den PublisherListener + StatusMask. None loescht den Slot. Spec §2.2.2.4.3.x.

Source

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

aktueller Listener-Klon, sofern vorhanden.

Source

pub fn suspend_publications(&self)

Spec §2.2.2.4.1.10 suspend_publications — Hint an die Service, dass nachfolgende write()-Aufrufe gepuffert werden duerfen (z.B. fuer Coalescing). Hat keine Pflicht-Semantik fuer den Caller; der Flag ist via is_suspended() lesbar fuer die Writer-Implementation.

Idempotent: ein zweites suspend_publications() ohne resume_publications() dazwischen ist erlaubt.

Source

pub fn resume_publications(&self)

Spec §2.2.2.4.1.11 resume_publications — Gegenstueck zu suspend_publications. Bei aktivem Suspend-Flag ist das Verhalten “Service can stop coalescing”; bei inaktivem Flag ist das ein No-Op.

Source

pub fn is_suspended(&self) -> bool

true wenn suspend_publications() aktiv ist und resume_publications() noch nicht gerufen wurde. Wird vom Writer-Send-Pfad als Coalescing-Hint gelesen.

Source

pub fn copy_from_topic_qos( dw_qos: &mut DataWriterQos, topic_qos: &TopicQos, ) -> Result<(), DdsError>

Spec §2.2.2.4.1.13 copy_from_topic_qos — kopiert die zwischen Topic- und DataWriter-Qos teilbaren Policies aus topic_qos nach dw_qos. Spec-Liste der gemeinsamen Policies (DCPS 1.4 §2.2.2.4.1.13): DURABILITY, DEADLINE, LATENCY_BUDGET, LIVELINESS, RELIABILITY, DESTINATION_ORDER, HISTORY, RESOURCE_LIMITS, TRANSPORT_PRIORITY, LIFESPAN, OWNERSHIP.

§Errors

DdsError::BadParameter wenn das Resultat eine inkonsistente QoS-Kombination ergibt — wird vom QoS-Compatibility-Check des Caller-DataWriter validiert (analog set_qos).

Source

pub fn create_datawriter<T>( &self, topic: &Topic<T>, qos: DataWriterQos, ) -> Result<DataWriter<T>, DdsError>
where T: DdsType + Send + 'static,

Erzeugt einen typed DataWriter<T>. Spec §2.2.2.4.1.5 create_datawriter.

§Errors
  • BadParameter wenn topic.type_name() != T::TYPE_NAME (sollte statisch garantiert sein, aber defensiv pruefen).

Trait Implementations§

Source§

impl Debug for Publisher

Source§

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

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

impl Entity for Publisher

Available on crate feature std only.
Source§

type Qos = PublisherQos

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

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

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

fn set_qos(&self, qos: <Publisher 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.