src.bluetooth_sig.gatt.characteristics.current_elapsed_time¶
Current Elapsed Time characteristic implementation.
Implements the Current Elapsed Time characteristic (0x2BF2).
- Structure (from GSS YAML - org.bluetooth.characteristic.elapsed_time):
Flags (uint8, 1 byte) – interpretation flags Time Value (uint48, 6 bytes) – counter in time-resolution units Time Sync Source Type (uint8, 1 byte) – sync source enum TZ/DST Offset (sint8, 1 byte) – combined offset in 15-minute units
Note: The GSS YAML identifier is elapsed_time but the UUID registry
identifier is current_elapsed_time (0x2BF2). File is named to match
the UUID registry for auto-discovery.
- Flag bits:
0: Tick counter (0=time of day, 1=relative counter) 1: UTC (0=local time, 1=UTC) — meaningless for tick counter 2-3: Time resolution (00=1s, 01=100ms, 10=1ms, 11=100µs) 4: TZ/DST offset used (0=not used, 1=used) 5: Current timeline (0=not current, 1=current) 6-7: Reserved
References
Bluetooth SIG Generic Sensor Service org.bluetooth.characteristic.elapsed_time (GSS YAML)
Classes¶
Name | Description |
|---|---|
Current Elapsed Time characteristic (0x2BF2). |
|
Parsed data from Current Elapsed Time characteristic. |
|
Flags for the Elapsed Time characteristic. |
|
Time resolution values (bits 2-3 of flags). |
Module Contents¶
- class src.bluetooth_sig.gatt.characteristics.current_elapsed_time.CurrentElapsedTimeCharacteristic(info: src.bluetooth_sig.types.CharacteristicInfo | None = None, validation: src.bluetooth_sig.gatt.characteristics.characteristic_meta.ValidationConfig | None = None)¶
Bases:
src.bluetooth_sig.gatt.characteristics.base.BaseCharacteristic[CurrentElapsedTimeData]Current Elapsed Time characteristic (0x2BF2).
Reports the current time of a clock or tick counter. Fixed 9-byte structure.
- expected_type¶
- class src.bluetooth_sig.gatt.characteristics.current_elapsed_time.CurrentElapsedTimeData¶
Bases:
msgspec.StructParsed data from Current Elapsed Time characteristic.
- flags¶
Interpretation flags.
- time_value¶
Counter value in the resolution defined by flags.
- time_resolution¶
Resolution of the time value.
- is_tick_counter¶
True if time_value is a relative counter.
- is_utc¶
True if time_value reports UTC (only meaningful if not tick counter).
- tz_dst_used¶
True if tz_dst_offset is meaningful.
- is_current_timeline¶
True if time stamp is from the current timeline.
- sync_source_type¶
Time synchronisation source type.
- tz_dst_offset¶
Combined TZ/DST offset from UTC in 15-minute units.
- flags: ElapsedTimeFlags¶
- time_resolution: TimeResolution¶