pub struct DeviceConfig {
pub wifi: WifiSection,
pub collection: CollectionSection,
pub csi_config: CsiConfigSection,
pub log_mode: Option<String>,
pub csi_delivery_mode: Option<String>,
pub csi_logging_enabled: Option<bool>,
}Expand description
Server-side cached view of device-side UserConfig, structured to mirror
the firmware’s show-config output (sections [WiFi], [Collection],
[CSI Config]). Fields are best-effort: each is populated when the
matching POST /api/config/* endpoint succeeds, and reset to firmware
defaults by POST /api/config/reset. Values can drift if the device is
re-flashed or commands are sent out-of-band.
sta_password is intentionally not cached even though show-config
echoes it — round-tripping plaintext passwords through a GET endpoint
would defeat the point of having one.
The trailing fields (log_mode, csi_delivery_mode,
csi_logging_enabled) live alongside the show-config sections because
they’re set via separate CLI commands (set-log-mode, set-csi-delivery)
and are useful to surface here even though they aren’t part of the
show-config block.
Fields§
§wifi: WifiSection§collection: CollectionSection§csi_config: CsiConfigSection§log_mode: Option<String>§csi_delivery_mode: Option<String>§csi_logging_enabled: Option<bool>Implementations§
Source§impl DeviceConfig
impl DeviceConfig
Sourcepub fn firmware_defaults() -> Self
pub fn firmware_defaults() -> Self
Snapshot of UserConfig::new() / CsiConfig::default() on the
device, as documented in the show-config spec. Populated into
the cache by POST /api/config/reset so the response after a
reset reflects what the firmware actually holds, even before the
user re-sends any set-* commands.
Both the classic and the HE CSI defaults are populated — the
caller can ignore the fields irrelevant to the connected chip
(consult GET /api/info for the chip field).
Trait Implementations§
Source§impl Clone for DeviceConfig
impl Clone for DeviceConfig
Source§fn clone(&self) -> DeviceConfig
fn clone(&self) -> DeviceConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more