Skip to main content

DeployOverlay

Struct DeployOverlay 

Source
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

Source§

fn clone(&self) -> DeployOverlay

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DeployOverlay

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for DeployOverlay

Source§

fn default() -> DeployOverlay

Returns the “default value” for a type. Read more
Source§

impl Copy for DeployOverlay

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.