Module messages

Source
Expand description

Message types for UI/worker communication.

This module defines the command and event enums used for bidirectional communication between UI threads and background BLE workers. These types are shared between TUI and GUI applications.

§Architecture

+------------------+     Command      +------------------+
|    UI Thread     | --------------> |  SensorWorker    |
|  (egui/ratatui)  |                 |  (tokio runtime) |
|                  | <-------------- |                  |
+------------------+   SensorEvent   +------------------+
  • Command: Messages sent from the UI thread to the background worker
  • SensorEvent: Events sent from the worker back to the UI thread

Structs§

CachedDevice
Cached device data loaded from the store.
ErrorContext
Describes why an error occurred and whether it can be retried.
ServiceDeviceStats
Statistics for a device being monitored by the service.
ServiceMonitoredDevice
A device being monitored by the service.

Enums§

Command
Commands sent from the UI thread to the background worker.
SensorEvent
Events sent from the background worker to the UI thread.
SignalQuality
Signal quality assessment based on RSSI.