Skip to main content

BoardConfig

Trait BoardConfig 

Source
pub trait BoardConfig {
    // Required methods
    fn locator(&self) -> &str;
    fn domain_id(&self) -> u32;
}
Expand description

Universal board configuration accessors.

Implemented by every board crate’s top-level config struct (Config, NodeConfig, etc.). Generic code that needs to read the transport locator or the ROS 2 domain ID can take &impl BoardConfig instead of cfg-gating on each board type.

Required Methods§

Source

fn locator(&self) -> &str

Transport locator string the RMW backend connects through (e.g. "tcp/192.168.1.50:7447", "serial/UART_0#baudrate=115200", "ivc/2").

The name matches the RMW vtable’s own locator parameter and ExecutorConfig::new. It is deliberately backend-neutral: this is a core, RMW-agnostic trait, so it must not name a concrete backend (issue 0330 — the same class as issue 0225).

Source

fn domain_id(&self) -> u32

ROS 2 domain ID (default 0).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§