pub struct RmwConfig<'a> {
pub locator: &'a str,
pub mode: SessionMode,
pub domain_id: u32,
pub node_name: &'a str,
pub namespace: &'a str,
pub properties: &'a [(&'a str, &'a str)],
}Expand description
Middleware-agnostic session configuration.
RmwConfig provides a uniform interface that any RMW backend can
interpret. Backends map the universal fields to their own connection
parameters and interpret properties for anything backend-specific.
§Examples
use nros_rmw::{RmwConfig, SessionMode};
let config = RmwConfig {
locator: "tcp/192.168.1.1:7447",
mode: SessionMode::Client,
domain_id: 0,
node_name: "talker",
namespace: "",
properties: &[],
};Fields§
§locator: &'a strMiddleware-specific connection string.
- zenoh:
"tcp/192.168.1.1:7447"or"udp/224.0.0.224:7447" - XRCE-DDS:
"udp/192.168.1.1:2019"
mode: SessionModeSession mode (zenoh: client/peer; XRCE-DDS: always client)
domain_id: u32ROS 2 domain ID (maps to DDS domain or zenoh key prefix)
node_name: &'a strNode name (e.g., "talker")
namespace: &'a strNode namespace (e.g., "" or "/ns1")
properties: &'a [(&'a str, &'a str)]Backend-specific key/value properties.
Uniform escape hatch for backend-specific tuning that doesn’t fit
the universal fields above. Each backend documents the keys it
understands; unknown keys are ignored. Passing &[] is always
valid.
Examples:
- zenoh:
"tls.root_ca","scouting.multicast.enabled" - XRCE-DDS:
"agent_port","client_key"
Trait Implementations§
impl<'a> Copy for RmwConfig<'a>
Auto Trait Implementations§
impl<'a> Freeze for RmwConfig<'a>
impl<'a> RefUnwindSafe for RmwConfig<'a>
impl<'a> Send for RmwConfig<'a>
impl<'a> Sync for RmwConfig<'a>
impl<'a> Unpin for RmwConfig<'a>
impl<'a> UnsafeUnpin for RmwConfig<'a>
impl<'a> UnwindSafe for RmwConfig<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more