zenoh-plugin-ros2dds icon indicating copy to clipboard operation
zenoh-plugin-ros2dds copied to clipboard

Change zenoh router configuration at run time

Open uupks opened this issue 1 year ago • 1 comments

Describe the feature

Do we have a method or API to change the configuration of the router at runtime?

uupks avatar Jan 05 '24 10:01 uupks

Hi @uupks!

We offer an API for dynamically inserting configuration fields into an already opened session. However, it's important to note that the behavior of the session will vary depending on which configuration you're attempting to modify. As outlined in the documentation, you can add an endpoint dynamically, and this change will take effect immediately:

use zenoh::prelude::r#async::*;

let session = zenoh::open(config::peer()).res().await.unwrap();
let _ = session.config().insert_json5("connect/endpoints", r#"["tcp/127.0.0.1/7447"]"#);

Depending on the specific change you're aiming for, I would recommend moving this issue to the main zenoh repository, as it may not be specific to the zenoh-plugin-ros2dds.

imstevenpmwork avatar Apr 11 '24 09:04 imstevenpmwork