Skip to main content

Topic

Struct Topic 

Source
pub struct Topic<T: DdsType> { /* private fields */ }
Expand description

Typed Topic-Handle.

Implementations§

Source§

impl<T: DdsType> Topic<T>

Source

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.

Source

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.

Source

pub fn name(&self) -> &str

Topic-Name.

Source

pub fn type_name(&self) -> &'static str

Type-Name (aus T::TYPE_NAME).

Source

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.

Source

pub fn get_listener(&self) -> Option<ArcTopicListener>

aktueller Listener-Klon, sofern vorhanden.

Source

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.

Source

pub fn inconsistent_topic_status(&self) -> InconsistentTopicStatus

aktueller InconsistentTopicStatus + Trigger via Bubble-Up bei Delta gegenueber dem letzten Aufruf.

Source

pub fn qos(&self) -> TopicQos

Topic-QoS (cloned). Inner-Mutex erlaubt set_qos.

Trait Implementations§

Source§

impl<T: DdsType> Clone for Topic<T>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Debug + DdsType> Debug for Topic<T>

Source§

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

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

impl<T: DdsType> Entity for Topic<T>

Available on crate feature std only.
Source§

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§

type Qos = TopicQos

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

fn get_qos(&self) -> Self::Qos

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

fn enable(&self) -> Result<()>

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) -> StatusMask

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.
Source§

impl<T: DdsType> TopicDescription for Topic<T>

Source§

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

Type-Name (z.B. "std_msgs::msg::String"). Spec §2.2.2.3.1 get_type_name.
Source§

fn get_name(&self) -> &str

Topic-Name (z.B. "ChatterTopic"). Spec §2.2.2.3.1 get_name.

Auto Trait Implementations§

§

impl<T> Freeze for Topic<T>

§

impl<T> !RefUnwindSafe for Topic<T>

§

impl<T> Send for Topic<T>
where T: Send,

§

impl<T> Sync for Topic<T>
where T: Sync,

§

impl<T> Unpin for Topic<T>
where T: Unpin,

§

impl<T> UnsafeUnpin for Topic<T>

§

impl<T> !UnwindSafe for Topic<T>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.