Struct rustdds::dds::DomainParticipant[][src]

pub struct DomainParticipant { /* fields omitted */ }
Expand description

DDS DomainParticipant generally only one per domain per machine should be active

Implementations

Examples

let domain_participant = DomainParticipant::new(0).unwrap();

Creates DDS Publisher

Arguments

  • qos - Takes qos policies for publisher and given to DataWriter as default.

Examples

let domain_participant = DomainParticipant::new(0).unwrap();
let qos = QosPolicyBuilder::new().build();
let publisher = domain_participant.create_publisher(&qos);

Creates DDS Subscriber

Arguments

  • qos - Takes qos policies for subscriber and given to DataReader as default.

Examples

let domain_participant = DomainParticipant::new(0).unwrap();
let qos = QosPolicyBuilder::new().build();
let subscriber = domain_participant.create_subscriber(&qos);

Create DDS Topic

Arguments

  • name - Name of the topic.
  • type_desc - Name of the type this topic is supposed to deliver.
  • qos - Takes qos policies that are distributed to DataReaders and DataWriters.

Examples

use rustdds::dds::data_types::TopicKind;

let domain_participant = DomainParticipant::new(0).unwrap();
let qos = QosPolicyBuilder::new().build();
let topic = domain_participant.create_topic("some_topic", "SomeType", &qos, TopicKind::WithKey);

Examples

let domain_participant = DomainParticipant::new(0).unwrap();
let domain_id = domain_participant.domain_id();

Examples

let domain_participant = DomainParticipant::new(0).unwrap();
let participant_id = domain_participant.participant_id();

Gets all DiscoveredTopics from DDS network

Examples

let domain_participant = DomainParticipant::new(0).unwrap();
let discovered_topics = domain_participant.get_discovered_topics();
for dtopic in discovered_topics.iter() {
  // do something
}

Manually asserts liveliness, affecting all writers with LIVELINESS QoS of MANUAL_BY_PARTICIPANT created by this particular participant.

Example

let domain_participant = DomainParticipant::new(0).expect("Failed to create participant");
domain_participant.assert_liveliness();

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.