Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion srcRs/DustDDS/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use dust_dds::{
};
use rand::{Rng, random, thread_rng};
use std::{
fmt::Debug,
fmt::{Debug, Display},
io::Write,
process::{ExitCode, Termination},
sync::mpsc::Receiver,
Expand Down Expand Up @@ -330,6 +330,16 @@ impl Options {
}
}

impl Display for AccessScope {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str(match self {
AccessScope::I => "INSTANCE_PRESENTATION_QOS",
AccessScope::T => "TOPIC_PRESENTATION_QOS",
AccessScope::G => "GROUP_PRESENTATION_QOS",
})
}
}

struct Listener;
impl<R: DdsRuntime> DomainParticipantListener<R> for Listener {
async fn on_inconsistent_topic(
Expand Down Expand Up @@ -809,6 +819,11 @@ fn main() -> Result<(), Return> {

let options = Options::parse();
options.validate()?;
if let Some(access_scope) = options.access_scope {
println!(" Presentation Access Scope {} : not supported", access_scope);
return Err(InitializeError(String::from("")).into());
}

let participant = initialize(&options)?;
if options.publish {
let data_writer = init_publisher(&participant, options.clone())?;
Expand Down
Loading