pub struct Topic<T: DdsType> { /* private fields */ }Expand description
Typed Topic-Handle.
Implementations§
Source§impl<T: DdsType> Topic<T>
impl<T: DdsType> Topic<T>
Sourcepub fn new(name: String, qos: TopicQos, participant: DomainParticipant) -> Self
pub fn new(name: String, qos: TopicQos, participant: DomainParticipant) -> Self
Erzeugt einen neuen Topic-Handle. Wird normalerweise vom
DomainParticipant::create_topic<T>(name, qos) aufgerufen.
Sourcepub fn new_orphan(name: String, qos: TopicQos) -> Self
pub fn new_orphan(name: String, qos: TopicQos) -> Self
Erzeugt einen Topic-Handle ohne Participant — fuer Builtin-
Topics (DCPSParticipant/Topic/Publication/Subscription), die im
BuiltinSubscriber-Konstruktor entstehen, bevor der DomainParticipant
fertig ist (Henne-Ei-Problem). get_participant() panickt
auf einem orphan-Topic — Builtin-Reader umgehen das.
Sourcepub fn set_listener(&self, listener: Option<ArcTopicListener>, mask: StatusMask)
pub fn set_listener(&self, listener: Option<ArcTopicListener>, mask: StatusMask)
setzt den TopicListener + StatusMask. None loescht
den Slot. Spec §2.2.2.3.2.x set_listener.
Sourcepub fn get_listener(&self) -> Option<ArcTopicListener>
pub fn get_listener(&self) -> Option<ArcTopicListener>
aktueller Listener-Klon, sofern vorhanden.
Sourcepub fn record_inconsistent_topic(&self)
pub fn record_inconsistent_topic(&self)
Recordet eine InconsistentTopic-Detection (z.B. wenn
ein remote Topic mit demselben Namen, aber anderem Type-Name
entdeckt wurde, oder wenn create_topic mit gleichem Namen aber
unterschiedlichem Type aufgerufen wird). Spec §2.2.4.2.5.
Sourcepub fn inconsistent_topic_status(&self) -> InconsistentTopicStatus
pub fn inconsistent_topic_status(&self) -> InconsistentTopicStatus
aktueller InconsistentTopicStatus + Trigger via
Bubble-Up bei Delta gegenueber dem letzten Aufruf.
Trait Implementations§
Source§impl<T: DdsType> Entity for Topic<T>
Available on crate feature std only.
impl<T: DdsType> Entity for Topic<T>
std only.Source§fn set_qos(&self, qos: Self::Qos) -> Result<()>
fn set_qos(&self, qos: Self::Qos) -> Result<()>
TopicQos. Spec §2.2.3: alle Topic-Policies (TOPIC_DATA, DURABILITY,
RELIABILITY, HISTORY, RESOURCE_LIMITS, …) sind nach enable()
immutable — nur TOPIC_DATA ist Changeable=YES.
Source§fn enable(&self) -> Result<()>
fn enable(&self) -> Result<()>
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) -> StatusMask
fn get_status_changes(&self) -> StatusMask
get_status_changes.Source§fn get_instance_handle(&self) -> InstanceHandle
fn get_instance_handle(&self) -> InstanceHandle
get_instance_handle.Source§impl<T: DdsType> TopicDescription for Topic<T>
impl<T: DdsType> TopicDescription for Topic<T>
Source§fn get_participant(&self) -> &DomainParticipant
fn get_participant(&self) -> &DomainParticipant
Liefert den Owning-Participant. Panickt bei Builtin-Topics
(orphan), die ueber Topic::new_orphan konstruiert wurden —
Builtin-Reader rufen get_participant() nicht.
Source§fn get_type_name(&self) -> &str
fn get_type_name(&self) -> &str
"std_msgs::msg::String").
Spec §2.2.2.3.1 get_type_name.