jhelovuo / RustDDS

Rust implementation of Data Distribution Service

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug in the example code shape_demo_mio_08?

mango009 opened this issue · comments

Question regarding the example code shape_demo_mio_08/main.rs

Sorry for the confusion but why is the writer register for READABLE readiness in line 72?

  let mut writer_opt = if is_publisher {
    debug!("Publisher");
    let publisher = domain_participant.create_publisher(&qos).unwrap();
    let mut writer = publisher
      .create_datawriter_cdr::<Shape>(&topic, None) // None = get qos policy from publisher
      .unwrap();
    poll
      .registry()
      .register(
        writer.as_status_source(),
        WRITER_STATUS_READY,  
        Interest::READABLE,                   // <-- should this be interest::WRITABLE instead?
      )
      .unwrap();
    Some(writer)
  } else {
    None
  };

Looks like that is just for the readiness