Skip to main content

DdsBackend

Trait DdsBackend 

Source
pub trait DdsBackend {
    // Required methods
    fn create_application(
        &mut self,
        app_name: &str,
    ) -> Result<BackendResult, BackendError>;
    fn delete_application(
        &mut self,
        app_name: &str,
    ) -> Result<BackendResult, BackendError>;
    fn list_applications(
        &self,
        pattern: &str,
    ) -> Result<BackendResult, BackendError>;
    fn create_participant(
        &mut self,
        app_name: &str,
        domain_id: u32,
    ) -> Result<BackendResult, BackendError>;
    fn delete_participant(
        &mut self,
        app_name: &str,
        participant: &str,
    ) -> Result<BackendResult, BackendError>;
    fn create_topic(
        &mut self,
        app_name: &str,
        participant: &str,
        topic_name: &str,
        type_name: &str,
    ) -> Result<BackendResult, BackendError>;
    fn create_data_writer(
        &mut self,
        app_name: &str,
        participant: &str,
        publisher: &str,
        topic: &str,
    ) -> Result<BackendResult, BackendError>;
    fn create_data_reader(
        &mut self,
        app_name: &str,
        participant: &str,
        subscriber: &str,
        topic: &str,
    ) -> Result<BackendResult, BackendError>;
    fn write_sample(
        &mut self,
        app_name: &str,
        participant: &str,
        publisher: &str,
        writer: &str,
        body: &[u8],
    ) -> Result<BackendResult, BackendError>;
    fn read_samples(
        &mut self,
        app_name: &str,
        participant: &str,
        subscriber: &str,
        reader: &str,
        selector: Option<&str>,
    ) -> Result<BackendResult, BackendError>;
}
Expand description

Bridge-Trait — konkrete Backend-Implementation routet diese Method-Calls auf crates/dcps/-Public-API.

Spec §7.4 fordert genau diese Operationen pro Object-Type (Application/Participant/Topic/Publisher/Subscriber/DataWriter/ DataReader/WaitSet). Wir buendeln sie thematisch.

Required Methods§

Source

fn create_application( &mut self, app_name: &str, ) -> Result<BackendResult, BackendError>

POST /dds/rest1/applications — create_application.

§Errors

Conflict wenn Application-Name bereits existiert.

Source

fn delete_application( &mut self, app_name: &str, ) -> Result<BackendResult, BackendError>

DELETE /dds/rest1/applications/{name}.

§Errors

NotFound wenn Name unbekannt.

Source

fn list_applications( &self, pattern: &str, ) -> Result<BackendResult, BackendError>

GET /dds/rest1/applications (Spec §7.4.1.4 fnmatch).

§Errors

Internal.

Source

fn create_participant( &mut self, app_name: &str, domain_id: u32, ) -> Result<BackendResult, BackendError>

POST /dds/rest1/applications/{app}/domain_participants.

§Errors

NotFound / Conflict.

Source

fn delete_participant( &mut self, app_name: &str, participant: &str, ) -> Result<BackendResult, BackendError>

DELETE /dds/rest1/applications/{app}/domain_participants/{n}.

§Errors

NotFound.

Source

fn create_topic( &mut self, app_name: &str, participant: &str, topic_name: &str, type_name: &str, ) -> Result<BackendResult, BackendError>

POST .../topics.

§Errors

NotFound / Conflict / BadRequest.

Source

fn create_data_writer( &mut self, app_name: &str, participant: &str, publisher: &str, topic: &str, ) -> Result<BackendResult, BackendError>

POST .../data_writers.

§Errors

NotFound / Conflict.

Source

fn create_data_reader( &mut self, app_name: &str, participant: &str, subscriber: &str, topic: &str, ) -> Result<BackendResult, BackendError>

POST .../data_readers.

§Errors

NotFound / Conflict.

Source

fn write_sample( &mut self, app_name: &str, participant: &str, publisher: &str, writer: &str, body: &[u8], ) -> Result<BackendResult, BackendError>

POST .../data_writers/{w}/write_sample_seq.

§Errors

NotFound / BadRequest.

Source

fn read_samples( &mut self, app_name: &str, participant: &str, subscriber: &str, reader: &str, selector: Option<&str>, ) -> Result<BackendResult, BackendError>

POST .../data_readers/{r}/read_sample_seq.

§Errors

NotFound.

Implementors§