Skip to content
Merged
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
14 changes: 12 additions & 2 deletions crates/hiroz/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//! # Architecture
//! - Common overrides: 10 settings shared between router and session
//! - Router-specific: 5 settings unique to router mode
//! - Session-specific: 6 settings unique to peer mode
//! - Session-specific: 8 settings unique to peer mode
//!
//! # Example
//! ```no_run
Expand Down Expand Up @@ -230,7 +230,7 @@ fn router_specific_overrides() -> &'static [ConfigOverride] {
&ROUTER_SPECIFIC
}

/// Session-specific overrides (6 settings)
/// Session-specific overrides (8 settings)
fn session_specific_overrides() -> &'static [ConfigOverride] {
static SESSION_SPECIFIC: LazyLock<Vec<ConfigOverride>> = LazyLock::new(|| {
vec![
Expand All @@ -244,6 +244,16 @@ fn session_specific_overrides() -> &'static [ConfigOverride] {
value: serde_json::json!(["tcp/localhost:7447"]),
reason: "Connect to Zenoh router on localhost at standard ROS 2 port 7447",
},
ConfigOverride {
key: "connect/timeout_ms",
value: serde_json::json!({"router": -1, "peer": -1, "client": 0}),
reason: "Matches rmw_zenoh_cpp's default: -1 for peer and router means the connect does not block session start, not that it waits forever",
},
ConfigOverride {
key: "connect/exit_on_failure",
value: serde_json::json!({"router": false, "peer": false, "client": true}),
reason: "Matches rmw_zenoh_cpp's default: a peer with no reachable router must not fail session creation; only a client, which needs one, does",
},
ConfigOverride {
key: "listen/endpoints",
value: serde_json::json!(["tcp/localhost:0"]),
Expand Down
Loading