src.bluetooth_sig.gatt.characteristics.step_climber_data¶
Step Climber Data characteristic implementation.
Implements the Step Climber Data characteristic (0x2ACF) from the Fitness Machine Service. A 16-bit flags field controls the presence of optional data fields.
Bit 0 (“More Data”) uses inverted logic: when bit 0 is 0 both Floors and Step Count are present; when bit 0 is 1 they are absent. All other bits use normal logic (1 = present).
References
Bluetooth SIG Fitness Machine Service 1.0 org.bluetooth.characteristic.step_climber_data (GSS YAML)
Classes¶
Name | Description |
|---|---|
Parsed data from Step Climber Data characteristic. |
|
Step Climber Data characteristic (0x2ACF). |
|
Step Climber Data flags as per Bluetooth SIG specification. |
Module Contents¶
- class src.bluetooth_sig.gatt.characteristics.step_climber_data.StepClimberData¶
Bases:
msgspec.StructParsed data from Step Climber Data characteristic.
- flags¶
Raw 16-bit flags field.
- floors¶
Total floors counted (present when bit 0 is 0).
- step_count¶
Total steps counted (present when bit 0 is 0).
- steps_per_minute¶
Step rate in steps/min.
- average_step_rate¶
Average step rate in steps/min.
- positive_elevation_gain¶
Positive elevation gain in metres.
- total_energy¶
Total expended energy in kcal.
- energy_per_hour¶
Expended energy per hour in kcal.
- energy_per_minute¶
Expended energy per minute in kcal.
- heart_rate¶
Heart rate in bpm.
- metabolic_equivalent¶
MET value (0.1 resolution).
- elapsed_time¶
Elapsed time in seconds.
- remaining_time¶
Remaining time in seconds.
- flags: StepClimberDataFlags¶
- class src.bluetooth_sig.gatt.characteristics.step_climber_data.StepClimberDataCharacteristic(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[StepClimberData]Step Climber Data characteristic (0x2ACF).
Used in the Fitness Machine Service to transmit step climber workout data. A 16-bit flags field controls which optional fields are present.
- Flag-bit assignments (from GSS YAML):
Bit 0: More Data – inverted: 0 -> Floors + Step Count present Bit 1: Steps Per Minute present Bit 2: Average Step Rate present Bit 3: Positive Elevation Gain present Bit 4: Expended Energy present (gates triplet: total + /hr + /min) Bit 5: Heart Rate present Bit 6: Metabolic Equivalent present Bit 7: Elapsed Time present Bit 8: Remaining Time present Bits 9-15: Reserved for Future Use
- expected_type¶
- class src.bluetooth_sig.gatt.characteristics.step_climber_data.StepClimberDataFlags¶
Bases:
enum.IntFlagStep Climber Data flags as per Bluetooth SIG specification.
Bit 0 uses inverted logic: 0 -> Floors + Step Count present, 1 -> absent.
- AVERAGE_STEP_RATE_PRESENT = 4¶
- ELAPSED_TIME_PRESENT = 128¶
- EXPENDED_ENERGY_PRESENT = 16¶
- HEART_RATE_PRESENT = 32¶
- METABOLIC_EQUIVALENT_PRESENT = 64¶
- MORE_DATA = 1¶
- POSITIVE_ELEVATION_GAIN_PRESENT = 8¶
- REMAINING_TIME_PRESENT = 256¶
- STEPS_PER_MINUTE_PRESENT = 2¶