pub enum Command {
Show 16 variants
LoadCachedData,
Scan {
duration: Duration,
},
Connect {
device_id: String,
},
Disconnect {
device_id: String,
},
RefreshReading {
device_id: String,
},
RefreshAll,
SyncHistory {
device_id: String,
},
SetInterval {
device_id: String,
interval_secs: u16,
},
SetBluetoothRange {
device_id: String,
extended: bool,
},
SetSmartHome {
device_id: String,
enabled: bool,
},
RefreshServiceStatus,
StartServiceCollector,
StopServiceCollector,
SetAlias {
device_id: String,
alias: Option<String>,
},
ForgetDevice {
device_id: String,
},
Shutdown,
}Expand description
Commands sent from the UI thread to the background worker.
These commands represent user-initiated actions that require Bluetooth operations or other background processing.
Variants§
LoadCachedData
Load cached devices and readings from the store on startup.
Scan
Scan for nearby Aranet devices.
Connect
Connect to a specific device.
Disconnect
Disconnect from a specific device.
RefreshReading
Refresh the current reading for a single device.
RefreshAll
Refresh readings for all connected devices.
SyncHistory
Sync history from device (download from BLE and save to store).
SetInterval
Set the measurement interval for a device.
SetBluetoothRange
Set the Bluetooth range for a device.
Fields
SetSmartHome
Set Smart Home integration mode for a device.
RefreshServiceStatus
Refresh the aranet-service status.
StartServiceCollector
Start the aranet-service collector.
StopServiceCollector
Stop the aranet-service collector.
SetAlias
Set a friendly alias/name for a device.
Fields
ForgetDevice
Forget (remove) a device from the known devices list and store.
Shutdown
Shut down the worker thread.