DeviceState enum
Device state as advertised in BLE manufacturer data (Byte 10).
This state is available during BLE scanning before connecting to the device.
Values
- ready → const DeviceState
-
State 0: Device is ready for new measurement. No measurement in progress and no stored data. User can proceed with full measurement workflow.
const DeviceState(0, 'Ready') - busy → const DeviceState
-
State 1: Measurement in progress. Device is currently recording and CANNOT be selected. Shows error message if user attempts to connect.
const DeviceState(1, 'Busy') - dataReady → const DeviceState
-
State 2: Measurement completed and ready to download. Device has stored measurement data that can be retrieved. User can download existing data or start new measurement.
const DeviceState(2, 'Data Ready')
Properties
- displayName → String
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasStoredData → bool
-
Device has stored measurement data ready for download.
no setter
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- isAvailable → bool
-
Device is available for interaction (not busy).
no setter
- isBusy → bool
-
Device is busy recording and should be blocked.
no setter
- isReady → bool
-
Device is ready for new measurement.
no setter
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → int
-
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromByte(
int byte) → DeviceState? - Parse device state from advertisement data byte. Returns null if byte value is invalid.
Constants
-
values
→ const List<
DeviceState> - A constant List of the values in this enum, in order of their declaration.