Skip to main content

BoardTransportConfig

Trait BoardTransportConfig 

Source
pub trait BoardTransportConfig {
    // Provided methods
    fn set_ipv4(&mut self, _addr: [u8; 4], _prefix: u8) { ... }
    fn set_mac(&mut self, _mac: [u8; 6]) { ... }
    fn set_gateway(&mut self, _addr: [u8; 4]) { ... }
    fn set_baudrate(&mut self, _baud: u32) { ... }
    fn set_ssid(&mut self, _ssid: &str) { ... }
    fn set_password(&mut self, _password: &str) { ... }
    fn set_interfaces(&mut self, _interfaces: &[&str]) { ... }
}
Expand description

Phase 173.5 — mutable transport knobs the orchestration generator writes into a board Config from nros.toml [[transport]] (the NanoRosOwned net-stack path: the board owns smoltcp/lwIP/NetX, so the IP / baud value lands in the board Config rather than an RTOS config fragment).

Every method has a no-op default so a board only overrides the knobs it actually has (a serial-only board ignores set_ipv4; an ethernet-only board ignores set_baudrate). Boards whose net stack is owned by the RTOS (RtosOwned: Zephyr / NuttX) do not impl this — their IP lands in the emitted config fragment instead.

Provided Methods§

Source

fn set_ipv4(&mut self, _addr: [u8; 4], _prefix: u8)

Static IPv4 address + prefix length for the board’s ethernet stack. Boards without a prefix field ignore that argument.

Source

fn set_mac(&mut self, _mac: [u8; 6])

Ethernet MAC address. Boards with a fixed/fused MAC ignore this. (Phase 172.J — the orchestration generator writes it from nros.toml [[transport]] mac, replacing config.toml’s [network].mac.)

Source

fn set_gateway(&mut self, _addr: [u8; 4])

Default IPv4 gateway for the board’s ethernet stack. Boards on a flat link (no gateway) ignore this. (Phase 172.J — from nros.toml [[transport]] gateway, replacing config.toml’s [network].gateway.)

Source

fn set_baudrate(&mut self, _baud: u32)

Serial line rate for the board’s UART transport.

Source

fn set_ssid(&mut self, _ssid: &str)

WiFi SSID for boards with a WiFi transport (ESP32). Wired boards ignore it. (Phase 172.K.4 — from nros.toml [[transport]] ssid, replacing config.toml’s [wifi].ssid.)

Source

fn set_password(&mut self, _password: &str)

WiFi password (paired with [set_ssid]). (Phase 172.K.4 — [[transport]] password, replacing config.toml’s [wifi].password.)

Source

fn set_interfaces(&mut self, _interfaces: &[&str])

NIC name(s) this transport multi-homes over (["eth0", "eth1"]). Boards with a single fixed NIC (every embedded target today) ignore it; the seam exists for a multi-homed hosted board to fold several interfaces into one session. (Phase 172.K.7 — from nros.toml [[transport]] interfaces.)

Implementors§