src.bluetooth_sig.gatt.characteristics.sleep_activity_instantaneous_data¶
Sleep Activity Instantaneous Data characteristic (0x2B41).
Classes¶
Name | Description |
|---|---|
Parsed data from Sleep Activity Instantaneous Data. |
|
Sleep Activity Instantaneous Data characteristic (0x2B41). |
|
Flags for Sleep Activity Instantaneous Data (Table 3.17). |
|
Sleep stage bitfield (Table 3.18). |
Module Contents¶
- class src.bluetooth_sig.gatt.characteristics.sleep_activity_instantaneous_data.SleepActivityInstantaneousData¶
Bases:
msgspec.StructParsed data from Sleep Activity Instantaneous Data.
Contains flags, sleep state, and any additional optional field data as raw bytes.
- sleep_stage: SleepStage¶
- class src.bluetooth_sig.gatt.characteristics.sleep_activity_instantaneous_data.SleepActivityInstantaneousDataCharacteristic¶
Bases:
src.bluetooth_sig.gatt.characteristics.base.BaseCharacteristic[SleepActivityInstantaneousData]Sleep Activity Instantaneous Data characteristic (0x2B41).
org.bluetooth.characteristic.sleep_activity_instantaneous_data
Instantaneous sleep activity data from the Physical Activity Monitor service. Contains the current sleep state and optional additional fields indicated by flags.
- allow_variable_length = True¶
- min_length = 5¶
- class src.bluetooth_sig.gatt.characteristics.sleep_activity_instantaneous_data.SleepActivityInstantaneousFlags¶
Bases:
enum.IntFlagFlags for Sleep Activity Instantaneous Data (Table 3.17).
- DEVICE_WORN = 32768¶
- IR_LIGHT_LEVEL_PRESENT = 4¶
- SLEEPING_HEART_RATE_PRESENT = 16¶
- SLEEP_STAGE_PRESENT = 8¶
- UV_LIGHT_LEVEL_PRESENT = 2¶
- VISIBLE_LIGHT_LEVEL_PRESENT = 1¶
- class src.bluetooth_sig.gatt.characteristics.sleep_activity_instantaneous_data.SleepStage¶
Bases:
enum.IntFlagSleep stage bitfield (Table 3.18).
- ACTIVE_SLEEP = 1024¶
- AROUSAL = 8192¶
- DEEP_SLEEP = 32¶
- INTERMEDIATE_SLEEP = 4096¶
- LIGHT_SLEEP = 16¶
- N1 = 64¶
- N2 = 128¶
- N3 = 256¶
- N4 = 512¶
- NON_REM = 8¶
- QUIET_SLEEP = 2048¶
- REM = 4¶
- SLEEP = 2¶
- UNKNOWN = 8388608¶
- WAKE = 1¶