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
impl Publisher
Sourcepub fn contains_writer(&self, handle: InstanceHandle) -> bool
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.
Sourcepub fn set_listener(
&self,
listener: Option<Arc<dyn PublisherListener>>,
mask: u32,
)
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.
Sourcepub fn get_listener(&self) -> Option<Arc<dyn PublisherListener>>
pub fn get_listener(&self) -> Option<Arc<dyn PublisherListener>>
aktueller Listener-Klon, sofern vorhanden.
Sourcepub fn suspend_publications(&self)
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.
Sourcepub fn resume_publications(&self)
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.
Sourcepub fn is_suspended(&self) -> bool
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.
Sourcepub fn copy_from_topic_qos(
dw_qos: &mut DataWriterQos,
topic_qos: &TopicQos,
) -> Result<(), DdsError>
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).
Sourcepub fn create_datawriter<T>(
&self,
topic: &Topic<T>,
qos: DataWriterQos,
) -> Result<DataWriter<T>, DdsError>
pub fn create_datawriter<T>( &self, topic: &Topic<T>, qos: DataWriterQos, ) -> Result<DataWriter<T>, DdsError>
Erzeugt einen typed DataWriter<T>. Spec §2.2.2.4.1.5
create_datawriter.
§Errors
BadParameterwenntopic.type_name() != T::TYPE_NAME(sollte statisch garantiert sein, aber defensiv pruefen).
Trait Implementations§
Source§impl Entity for Publisher
Available on crate feature std only.
impl Entity for Publisher
std only.Source§type Qos = PublisherQos
type Qos = PublisherQos
DomainParticipantQos,
DataWriterQos, …).Source§fn get_qos(&self) -> <Publisher as Entity>::Qos
fn get_qos(&self) -> <Publisher as Entity>::Qos
get_qos.Source§fn set_qos(&self, qos: <Publisher as Entity>::Qos) -> Result<(), DdsError>
fn set_qos(&self, qos: <Publisher as Entity>::Qos) -> Result<(), DdsError>
ImmutablePolicy-Error.
Spec §2.2.2.1.2 set_qos. Read moreSource§fn enable(&self) -> Result<(), DdsError>
fn enable(&self) -> Result<(), DdsError>
enable. Read moreSource§fn entity_state(&self) -> Arc<EntityState>
fn entity_state(&self) -> Arc<EntityState>
Arc<EntityState>.Source§fn is_enabled(&self) -> bool
fn is_enabled(&self) -> bool
Source§fn get_status_condition(&self) -> StatusCondition
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
fn get_status_changes(&self) -> u32
get_status_changes.Source§fn get_instance_handle(&self) -> InstanceHandle
fn get_instance_handle(&self) -> InstanceHandle
get_instance_handle.