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: Guidkey, the endpoint’s GUID (PID_ENDPOINT_GUID).
participant_guid: Guidparticipant_key (PID_PARTICIPANT_GUID).
topic_name: Stringtopic_name.
type_name: Stringtype_name.
reliability: ReliabilityRELIABILITY.
durability: DurabilityKindDURABILITY.
durability_service: Option<DurabilityService>DURABILITY_SERVICE (writers only), when announced.
deadline: DurationDEADLINE period; infinite by default.
liveliness: LivelinessLIVELINESS.
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: boolexpectsInlineQos (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_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 (PID_DATA_TAGS, DDS Security 1.2, 7.5.1.7 and
7.5.1.8): the DataTagQosPolicy, (name, value) pairs.
security: SecurityParametersThe parameters of DDS Security, such as the endpoint security info.
Implementations§
Source§impl EndpointData
impl EndpointData
Sourcepub fn writer(guid: Guid, topic_name: &str, type_name: &str) -> Self
pub fn writer(guid: Guid, topic_name: &str, type_name: &str) -> Self
A writer with the DDS defaults: RELIABLE, VOLATILE.
Sourcepub fn reader(guid: Guid, topic_name: &str, type_name: &str) -> Self
pub fn reader(guid: Guid, topic_name: &str, type_name: &str) -> Self
A reader with the DDS defaults: BEST_EFFORT, VOLATILE.
Sourcepub fn offered_representation(&self) -> i16
pub fn offered_representation(&self) -> i16
The data representation a writer uses: the first it offers, XCDR when it offers none.
Sourcepub fn accepts_representation(&self, id: i16) -> bool
pub fn accepts_representation(&self, id: i16) -> bool
Whether a reader accepts the data representation id.
Sourcepub fn effective_type_consistency(&self) -> TypeConsistency
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).
Sourcepub fn to_parameter_list(&self, endianness: Endianness) -> ParameterList
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).
Sourcepub fn to_payload(&self, endianness: Endianness) -> Vec<u8> ⓘ
pub fn to_payload(&self, endianness: Endianness) -> Vec<u8> ⓘ
The serialized payload: PL_CDR_* header and parameter list.
Sourcepub fn from_parameter_list(
list: &ParameterList,
endianness: Endianness,
writer: bool,
) -> Result<Self, DecodeError>
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).
Sourcepub fn from_payload(bytes: &[u8], writer: bool) -> Result<Self, DecodeError>
pub fn from_payload(bytes: &[u8], writer: bool) -> Result<Self, DecodeError>
Reads the data from a serialized payload.