Skip to main content

Module models

Module models 

Source
Expand description

Data models used by HTTP handlers and runtime control flow.

This module contains:

  • request-body structs for config/control endpoints,
  • runtime enums used by watch channels,
  • common API response payloads.

Structs§

ApiResponse
CollectionModeConfig
CollectionSection
[Collection] section in show-config.
CollectionStatusResponse
CsiConfig
CSI feature flags. Classic (ESP32 / ESP32-C3 / ESP32-S3) and HE (ESP32-C5 / ESP32-C6) parameters are merged here; the firmware will silently ignore flags that are not part of its compiled-in variant. Only flags set to true are forwarded.
CsiConfigSection
[CSI Config] section in show-config. Both classic (ESP32 / C3 / S3) and HE (ESP32-C5 / C6) fields are merged into a single struct so the JSON shape is stable across chip variants. The fields applicable to the active firmware are populated; the others remain None.
CsiDeliveryConfig
POST /api/config/csi-delivery — switch the CSI delivery path and inline log gate. Both fields are independent; either or both may be set.
DeviceConfig
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.
DeviceInfo
Parsed result of the info command on esp-csi-cli-rs.
IoTasksConfig
POST /api/config/io-tasks — toggle the per-direction TX/RX Embassy tasks. Both fields are independently optional; omitted fields keep their current device-side value.
LogModeConfig
OutputModeConfig
RateConfig
POST /api/config/rate — pin the Wi-Fi PHY rate (only honored in ESP-NOW modes).
StartConfig
TrafficConfig
WifiConfig
WifiSection
[WiFi] section in show-config.

Enums§

LogMode
Supported CSI log formats exposed by esp-csi-cli-rs set-log-mode.
OutputMode
Controls where CSI frames are sent after being read from the serial port.