Skip to main content

EndpointData

Struct EndpointData 

Source
pub struct EndpointData {
Show 23 fields pub guid: Guid, pub participant_guid: Guid, pub topic_name: String, pub type_name: String, pub reliability: Reliability, pub durability: DurabilityKind, pub durability_service: Option<DurabilityService>, pub deadline: Duration, pub liveliness: Liveliness, pub partitions: Vec<String>, pub user_data: Vec<u8>, pub unicast_locators: Vec<Locator>, pub multicast_locators: Vec<Locator>, pub expects_inline_qos: bool, pub type_information: Option<TypeInformation>, pub data_representation: Vec<i16>, pub type_consistency: Option<TypeConsistency>, pub content_filter: Option<ContentFilterProperty>, pub related_entity_guid: Option<Guid>, pub service_instance_name: Option<String>, pub topic_aliases: Vec<String>, pub data_tags: Vec<(String, String)>, pub security: SecurityParameters,
}
Expand description

DiscoveredWriterData or DiscoveredReaderData (8.5.4.4, 9.6.3.2): the parts of PublicationBuiltinTopicData or SubscriptionBuiltinTopicData modelled here, with the writer or reader proxy.

Fields§

§guid: Guid

key, the endpoint’s GUID (PID_ENDPOINT_GUID).

§participant_guid: Guid

participant_key (PID_PARTICIPANT_GUID).

§topic_name: String

topic_name.

§type_name: String

type_name.

§reliability: Reliability

RELIABILITY.

§durability: DurabilityKind

DURABILITY.

§durability_service: Option<DurabilityService>

DURABILITY_SERVICE (writers only), when announced.

§deadline: Duration

DEADLINE period; infinite by default.

§liveliness: Liveliness

LIVELINESS.

§partitions: Vec<String>

PARTITION; empty means the default partition.

§user_data: Vec<u8>

USER_DATA.

§unicast_locators: Vec<Locator>

unicastLocatorList. When both lists are empty, the participant’s default locators apply.

§multicast_locators: Vec<Locator>

multicastLocatorList.

§expects_inline_qos: bool

expectsInlineQos (readers only).

§type_information: Option<TypeInformation>

type_information (DDS-XTypes 1.3, 7.6.3.2.2), when announced.

§data_representation: Vec<i16>

DATA_REPRESENTATION (data_representation): a writer uses and offers the first, a reader accepts any. Empty means XCDR only.

§type_consistency: Option<TypeConsistency>

TYPE_CONSISTENCY_ENFORCEMENT (readers only), when announced.

§content_filter: Option<ContentFilterProperty>

The content filter of a reader of a content filtered topic (PID_CONTENT_FILTER_PROPERTY, 8.7.3.1), for writer side filtering.

§related_entity_guid: Option<Guid>

related_datareader_key of a writer, related_datawriter_key of a reader (PID_RELATED_ENTITY_GUID, DDS-RPC 1.0, 7.6.2.1): the other endpoint of the same client or service.

§service_instance_name: Option<String>

service_instance_name (PID_SERVICE_INSTANCE_NAME, DDS-RPC 1.0, 7.6.2.1), of the endpoints of a service.

§topic_aliases: Vec<String>

topic_aliases (PID_TOPIC_ALIASES, DDS-RPC 1.0, 7.4.3, 7.6.2.1): other names the topic is known by, as the topic of a derived interface is by those of its bases. An endpoint matches those of a topic named by one of these too.

§data_tags: Vec<(String, String)>

data_tags (PID_DATA_TAGS, DDS Security 1.2, 7.5.1.7 and 7.5.1.8): the DataTagQosPolicy, (name, value) pairs.

§security: SecurityParameters

The parameters of DDS Security, such as the endpoint security info.

Implementations§

Source§

impl EndpointData

Source

pub fn writer(guid: Guid, topic_name: &str, type_name: &str) -> Self

A writer with the DDS defaults: RELIABLE, VOLATILE.

Source

pub fn reader(guid: Guid, topic_name: &str, type_name: &str) -> Self

A reader with the DDS defaults: BEST_EFFORT, VOLATILE.

Source

pub fn offered_representation(&self) -> i16

The data representation a writer uses: the first it offers, XCDR when it offers none.

Source

pub fn accepts_representation(&self, id: i16) -> bool

Whether a reader accepts the data representation id.

Source

pub fn effective_type_consistency(&self) -> TypeConsistency

The reader’s type consistency enforcement as matching applies it: what it announced; when it announced none, the default if it announced its type information (an implementation of DDS-XTypes 1.2 or later, such as Cyclone DDS 0.10, which leaves the policy out when it has its default value), and otherwise TypeConsistency::NOT_ANNOUNCED (7.6.3.4.1).

Source

pub fn to_parameter_list(&self, endianness: Endianness) -> ParameterList

The parameter list. RELIABILITY and DURABILITY are always written; other values equal to their defaults are left out, as is the separate proxy GUID (Table 9.17).

Source

pub fn to_payload(&self, endianness: Endianness) -> Vec<u8> ⓘ

The serialized payload: PL_CDR_* header and parameter list.

Source

pub fn from_parameter_list( list: &ParameterList, endianness: Endianness, writer: bool, ) -> Result<Self, DecodeError>

Reads the data from a parameter list. writer selects the RELIABILITY default when the parameter is absent (RELIABLE for writers, BEST_EFFORT for readers).

PID_ENDPOINT_GUID, PID_TOPIC_NAME and PID_TYPE_NAME are required. The participant GUID defaults to the endpoint’s prefix. Unknown parameters are skipped, except protocol-defined ones with the must-understand bit (Table 9.6).

Source

pub fn from_payload(bytes: &[u8], writer: bool) -> Result<Self, DecodeError>

Reads the data from a serialized payload.

Source

pub fn rxo(&self) -> RxO

The policies that a writer offers and a reader requests.

Trait Implementations§

Source§

impl Clone for EndpointData

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

Source§

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

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

impl Eq for EndpointData

Source§

impl PartialEq for EndpointData

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for EndpointData

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 = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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.