pub struct DeployOverlay {
pub locator: Option<&'static str>,
pub ip: Option<[u8; 4]>,
pub gateway: Option<[u8; 4]>,
pub netmask: Option<[u8; 4]>,
pub domain_id: Option<u32>,
pub transport: Option<&'static str>,
pub node_name: Option<&'static str>,
pub boot_config: Option<&'static BakedBootConfig>,
}Expand description
Deploy-metadata overlay threaded from nros::main!() into the board’s
boot config (issue #48 cause 1).
The nros::main!() macro reads the Entry pkg’s
[package.metadata.nros.deploy.<board>] block at expansion time and bakes
the present keys here. Each field is None when the deploy block omitted
it, so the board overlays only the supplied values onto its own
Config::default() (the firmware’s compiled-in default stays the source of
truth for everything the deploy block does not name).
Boards whose BoardEntry::run ignores network/locator config (POSIX hosts,
RTIC/Embassy MCUs that take their transport elsewhere) inherit the default
BoardEntry::run_with_deploy body, which drops the overlay and calls
BoardEntry::run — so adding a network field here never touches those
boards. The exception is node_name: hosted
boards override run_with_deploy to apply it to the boot config (issue #98),
since the ROS graph node name is a launch identity, not a network knob.
Fields§
§locator: Option<&'static str>locator = "tcp/10.0.2.2:7451" — the zenoh/RMW endpoint the firmware
dials. None → keep the board default.
ip: Option<[u8; 4]>ip = "10.0.2.15" — static guest IP. None → keep the board default.
gateway: Option<[u8; 4]>gateway = "10.0.2.2" — default route. None → keep the board default.
netmask: Option<[u8; 4]>netmask = "255.255.255.0". None → keep the board default.
domain_id: Option<u32>domain_id = 0 — ROS 2 domain. None → keep the board default.
transport: Option<&'static str>transport = "xrce" — select a board custom transport that must be
installed BEFORE the linked RMW registers (e.g. an XRCE-over-UART vtable).
None → the board’s default transport. Honored by
BoardEntry::setup_transport (phase-244.D1).
node_name: Option<&'static str>The ROS graph node name for the primary session, baked from the launch
file’s single <node name=…> / system.toml [[component]].name (issue
#98). None → the board default (from_env()’s "node"). Only set by
nros::main! when the launch declares exactly one node — multiple nodes
share one primary session, so naming it after one component would be
wrong (per-node naming is the deferred multi-node piece). Applied to the
boot ExecutorConfig by the board, so unlike locator this IS honored on
hosted boards (locator stays env-driven; node name is a launch identity).
boot_config: Option<&'static BakedBootConfig>Issue #101 / RFC-0045 — the patchable baked boot-config static
(.nros_boot_config), emitted by nros::main! for embedded targets and
read by the board to resolve node_name/locator/domain. None on hosted /
when the macro emits no static.
Trait Implementations§
Source§impl Clone for DeployOverlay
impl Clone for DeployOverlay
Source§fn clone(&self) -> DeployOverlay
fn clone(&self) -> DeployOverlay
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more