Skip to main content

PublicationBuiltinTopicData

Struct PublicationBuiltinTopicData 

Source
pub struct PublicationBuiltinTopicData {
Show 24 fields pub key: Guid, pub participant_key: Guid, pub topic_name: String, pub type_name: String, pub durability: DurabilityKind, pub reliability: ReliabilityQos, pub ownership: OwnershipKind, pub ownership_strength: i32, pub liveliness: LivelinessQosPolicy, pub deadline: DeadlineQosPolicy, pub lifespan: LifespanQosPolicy, pub partition: Vec<String>, pub user_data: Vec<u8>, pub topic_data: Vec<u8>, pub group_data: Vec<u8>, pub type_information: Option<Vec<u8>>, pub data_representation: Vec<i16>, pub security_info: Option<EndpointSecurityInfo>, pub service_instance_name: Option<String>, pub related_entity_guid: Option<Guid>, pub topic_aliases: Option<Vec<String>>, pub type_identifier: TypeIdentifier, pub unicast_locators: Vec<Locator>, pub multicast_locators: Vec<Locator>,
}
Expand description

Discovered Publication / lokaler DataWriter — Subset.

Fields§

§key: Guid

Endpoint-GUID (= Writer-GUID).

§participant_key: Guid

GUID of the participant the writer belongs to.

§topic_name: String

Topic-Name (DDS-Topic, z.B. “ChatterTopic”).

§type_name: String

IDL-Type-Name (z.B. “std_msgs::String”).

§durability: DurabilityKind

Durability-QoS.

§reliability: ReliabilityQos

Reliability-QoS.

§ownership: OwnershipKind

Ownership-QoS (Spec §2.2.3.23). Default Shared.

§ownership_strength: i32

Ownership strength (spec §2.2.3.24). Only relevant when ownership == Exclusive; default 0.

§liveliness: LivelinessQosPolicy

Liveliness QoS (spec §2.2.3.11).

§deadline: DeadlineQosPolicy

Deadline QoS (spec §2.2.3.7).

§lifespan: LifespanQosPolicy

Lifespan QoS (spec §2.2.3.16) — writer-only.

§partition: Vec<String>

Partition QoS (spec §2.2.3.13). Empty list = “default partition” (“”).

§user_data: Vec<u8>

UserData QoS (spec §2.2.3.1) — opaque sequence, discovery-propagated. Empty vec = not set.

§topic_data: Vec<u8>

TopicData QoS (spec §2.2.3.3) — opaque sequence, propagated from the topic via pub discovery.

§group_data: Vec<u8>

GroupData QoS (spec §2.2.3.2) — opaque sequence, propagated from the publisher via pub discovery.

§type_information: Option<Vec<u8>>

Type information (TypeIdentifier hashes + dependencies, XTypes §7.6.3.2.2). Opaque bytes: the structure lives in zerodds-types, but we transport the serialized blob to avoid circular crate dependencies.

§data_representation: Vec<i16>

Accepted data representations (0=XCDR1, 1=XML, 2=XCDR2, …). Spec: XTypes 1.3 §7.6.3.1.1 / RTPS 2.5 PID 0x0073. The default list when empty is [XCDR1] per XTypes §7.6.3.1.2 — we always emit the PID explicitly so strict vendors like RTI 7.7.0 can SEDP-match.

§security_info: Option<EndpointSecurityInfo>

Endpoint security info (PID 0x1004, DDS-Security 1.1 §7.4.1.5). None for legacy peers without a security PID. WP 4H-c matches on it: writer/reader pairs with incompatible protection levels are rejected.

§service_instance_name: Option<String>

PID_SERVICE_INSTANCE_NAME (DDS-RPC 1.0 §7.8.2) — logical service-instance name of an RPC endpoint. None for ordinary pub/sub topics.

§related_entity_guid: Option<Guid>

PID_RELATED_ENTITY_GUID (DDS-RPC 1.0 §7.8.2) — GUID of the counterpart endpoint in an RPC endpoint pair. For a request writer it points to the reply reader of the same requester; for a reply writer to the request reader of the same replier.

§topic_aliases: Option<Vec<String>>

PID_TOPIC_ALIASES (DDS-RPC 1.0 §7.8.2) — alternative topic names for routing/compat layers. Order is significant.

§type_identifier: TypeIdentifier

PID_ZERODDS_TYPE_ID (vendor PID 0x8002) — XTypes 1.3 §7.3.4.2 TypeIdentifier of the writer type for XTypes-aware reader matching (XTypes §7.6.3.7 + DDS 1.4 §2.2.3 TypeConsistencyEnforcement).

§unicast_locators: Vec<Locator>

Endpoint unicast locators (DDSI-RTPS 2.5 §8.5.3.3: DiscoveredWriterData.writerProxy.unicastLocatorList). Where peers send user data to this writer endpoint. Empty = the peer falls back to the participant DEFAULT_UNICAST_LOCATOR from SPDP (§8.5.5). OpenDDS stores the real user locator exclusively here and sends only the placeholder 127.0.0.1:12345 as the SPDP default.

§multicast_locators: Vec<Locator>

Endpoint multicast locators (DDSI-RTPS 2.5 §8.5.3.3).

Implementations§

Source§

impl PublicationBuiltinTopicData

Source

pub fn to_pl_cdr_le(&self) -> Result<Vec<u8>, WireError>

Encodes to PL_CDR_LE bytes (with a 4-byte encapsulation header). The output is directly usable as the serialized_payload of a DATA submessage.

§Errors

ValueOutOfRange if a string is longer than u32::MAX.

Source

pub fn from_pl_cdr_le(bytes: &[u8]) -> Result<Self, WireError>

Decodes from PL_CDR_LE bytes (with an encapsulation header).

§Errors

UnexpectedEof on too-short bytes, UnsupportedEncapsulation on unknown encoding, ValueOutOfRange if mandatory PIDs are missing or values have the wrong length.

Source§

impl PublicationBuiltinTopicData

Source

pub fn as_writer_qos(&self) -> WriterQos

Builds a WriterQos from the wire fields.

Limitation: only durability + reliability are taken from self; all other policies stay at their WriterQos::default() values. Applications that want to match against the discovered peer must be aware of this limitation — see the module documentation.

Source

pub fn with_writer_qos(self, qos: &WriterQos) -> Self

Applies a full WriterQos to this builtin-topic-data payload, as far as the wire fields allow. Policies not (yet) serialized are lost.

Trait Implementations§

Source§

impl Clone for PublicationBuiltinTopicData

Source§

fn clone(&self) -> PublicationBuiltinTopicData

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 Debug for PublicationBuiltinTopicData

Source§

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

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

impl Eq for PublicationBuiltinTopicData

Source§

impl PartialEq for PublicationBuiltinTopicData

Source§

fn eq(&self, other: &PublicationBuiltinTopicData) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for PublicationBuiltinTopicData

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