oa_gateway_dds::provider

Trait DdsSession

Source
pub trait DdsSession: Send {
    // Required methods
    fn create_topic(&mut self, name: &str) -> Result<(), DdsError>;
    fn write(&self, topic: &str, sample: DdsSample) -> Result<(), DdsError>;
    fn poll_inbound(&mut self) -> Result<Vec<(String, DdsSample)>, DdsError>;
}
Expand description

One participant: topics, writes, and inbound samples.

Required Methods§

Source

fn create_topic(&mut self, name: &str) -> Result<(), DdsError>

§Errors

Returns DdsError if the topic, reader, or writer cannot be created.

Source

fn write(&self, topic: &str, sample: DdsSample) -> Result<(), DdsError>

§Errors

Returns DdsError if the topic was not created or the write fails.

Source

fn poll_inbound(&mut self) -> Result<Vec<(String, DdsSample)>, DdsError>

Samples from other participants. Local writes are omitted.

§Errors

Returns DdsError if a reader fails.

Implementors§