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

pub struct DomainParticipant { /* fields omitted */ }

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

Implementations

impl DomainParticipant[src]

pub fn new(domain_id: u16) -> Result<DomainParticipant>[src]

Examples

let domain_participant = DomainParticipant::new(0);

pub fn create_publisher(&self, qos: &QosPolicies) -> Result<Publisher>[src]

Creates DDS Publisher

Arguments

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

Examples

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

pub fn create_subscriber(&self, qos: &QosPolicies) -> Result<Subscriber>[src]

Creates DDS Subscriber

Arguments

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

Examples

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

pub fn create_topic(
    &self,
    name: &str,
    type_desc: &str,
    qos: &QosPolicies,
    topic_kind: TopicKind
) -> Result<Topic>
[src]

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);
let qos = QosPolicyBuilder::new().build();
let topic = domain_participant.create_topic("some_topic", "SomeType", &qos, TopicKind::WithKey);

pub fn domain_id(&self) -> u16[src]

Examples

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

pub fn participant_id(&self) -> u16[src]

Examples

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

pub fn get_discovered_topics(&self) -> Vec<DiscoveredTopicData>[src]

Gets all DiscoveredTopics from DDS network

Examples

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

Trait Implementations

impl Clone for DomainParticipant[src]

impl Debug for DomainParticipant[src]

impl PartialEq<DomainParticipant> for DomainParticipant[src]

impl RTPSEntity for DomainParticipant[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,