You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before 1.0.0.beta-4, I used to enable timestamping with zenoh::Config. With the new release (beta4) it is no longer possible, but only with zenoh_config::Config, which in turn cannot be used to open a session.
It is not clear the relationship between the two config constructors, and how to go from one to the other one.
See some annotated code that exemplify my issue more clearly:
fnsetup_zenoh() -> Result<zenoh::Session, zenoh::Error>{letmut config_ext = zenoh_config::Config::default();
config_ext.timestamping.set_enabled(Some(ModeDependentValue::Unique(true)));letmut config = zenoh::Config::default();// Below line no longer compiles//config.timestamping.set_enabled(Some(ModeDependentValue::Unique(true)));println!("Opening session...");// Below line does not work//let session = zenoh::open(config_ext).wait().unwrap();let session = zenoh::open(config).wait().unwrap();Ok(session)}
When debugging, I can see that the same config structure is now inside this tuple 0 inside config:
And when I try to explicitly convert one into the other, I get this issue:
the trait bound `zenoh::Config: From<zenoh_config::Config>` is not satisfied
required for `zenoh_config::Config` to implement `Into<zenoh::Config>`
required for `zenoh::Config` to implement `TryFrom<zenoh_config::Config>`
joaofl
changed the title
Is is no longer clear how to enable timestamping programatically on 1.0.0.beta-4
It is no longer possible to enable timestamping programatically
Oct 4, 2024
Description of the Issue
Before 1.0.0.beta-4, I used to enable timestamping with zenoh::Config. With the new release (beta4) it is no longer possible, but only with zenoh_config::Config, which in turn cannot be used to open a session.
It is not clear the relationship between the two config constructors, and how to go from one to the other one.
See some annotated code that exemplify my issue more clearly:
When debugging, I can see that the same config structure is now inside this tuple 0 inside config:
And when I try to explicitly convert one into the other, I get this issue:
To reproduce
Run the code snippet attached.
System info
Fedora 39
zenoh = "1.0.0-beta.4"
zenoh-config = "1.0.0-beta.4"
zenoh-ext = "1.0.0-beta.4"
The text was updated successfully, but these errors were encountered: