src.bluetooth_sig.gatt.characteristics.body_composition_measurement¶
Body Composition Measurement characteristic implementation.
Attributes¶
Classes¶
Name | Description |
|---|---|
Basic optional fields: timestamp, user ID, and basal metabolism. |
|
Body Composition Measurement flags as per Bluetooth SIG specification. |
|
Body Composition Measurement characteristic (0x2A9C). |
|
Parsed data from Body Composition Measurement characteristic. |
|
Flags and body fat percentage with parsing offset. |
|
Mass-related optional fields. |
|
Single mass field with unit. |
|
Impedance, weight, and height measurements. |
Module Contents¶
- class src.bluetooth_sig.gatt.characteristics.body_composition_measurement.BasicOptionalFields¶
Bases:
msgspec.StructBasic optional fields: timestamp, user ID, and basal metabolism.
- timestamp: datetime.datetime | None¶
- class src.bluetooth_sig.gatt.characteristics.body_composition_measurement.BodyCompositionFlags¶
Bases:
enum.IntFlagBody Composition Measurement flags as per Bluetooth SIG specification.
- BASAL_METABOLISM_PRESENT = 8¶
- BODY_WATER_MASS_PRESENT = 256¶
- FAT_FREE_MASS_PRESENT = 64¶
- HEIGHT_PRESENT = 2048¶
- IMPEDANCE_PRESENT = 512¶
- IMPERIAL_UNITS = 1¶
- MUSCLE_MASS_PRESENT = 16¶
- MUSCLE_PERCENTAGE_PRESENT = 32¶
- SOFT_LEAN_MASS_PRESENT = 128¶
- TIMESTAMP_PRESENT = 2¶
- USER_ID_PRESENT = 4¶
- WEIGHT_PRESENT = 1024¶
- class src.bluetooth_sig.gatt.characteristics.body_composition_measurement.BodyCompositionMeasurementCharacteristic¶
Bases:
src.bluetooth_sig.gatt.characteristics.base.BaseCharacteristic[BodyCompositionMeasurementData]Body Composition Measurement characteristic (0x2A9C).
Used to transmit body composition measurement data including body fat percentage, muscle mass, bone mass, water percentage, and other body metrics.
- class src.bluetooth_sig.gatt.characteristics.body_composition_measurement.BodyCompositionMeasurementData¶
Bases:
msgspec.StructParsed data from Body Composition Measurement characteristic.
- flags: BodyCompositionFlags¶
- measurement_units: bluetooth_sig.types.units.MeasurementSystem¶
- muscle_mass_unit: bluetooth_sig.types.units.WeightUnit | None = None¶
- timestamp: datetime.datetime | None = None¶
- class src.bluetooth_sig.gatt.characteristics.body_composition_measurement.FlagsAndBodyFat¶
Bases:
msgspec.StructFlags and body fat percentage with parsing offset.
- flags: BodyCompositionFlags¶
- class src.bluetooth_sig.gatt.characteristics.body_composition_measurement.MassFields¶
Bases:
msgspec.StructMass-related optional fields.
- muscle_mass_unit: bluetooth_sig.types.units.WeightUnit | None¶
- class src.bluetooth_sig.gatt.characteristics.body_composition_measurement.MassValue¶
Bases:
msgspec.StructSingle mass field with unit.
- class src.bluetooth_sig.gatt.characteristics.body_composition_measurement.OtherMeasurements¶
Bases:
msgspec.StructImpedance, weight, and height measurements.
- src.bluetooth_sig.gatt.characteristics.body_composition_measurement.BODY_FAT_PERCENTAGE_RESOLUTION = 0.1¶
- src.bluetooth_sig.gatt.characteristics.body_composition_measurement.HEIGHT_RESOLUTION_IMPERIAL = 0.1¶
- src.bluetooth_sig.gatt.characteristics.body_composition_measurement.HEIGHT_RESOLUTION_METRIC = 0.001¶
- src.bluetooth_sig.gatt.characteristics.body_composition_measurement.IMPEDANCE_RESOLUTION = 0.1¶
- src.bluetooth_sig.gatt.characteristics.body_composition_measurement.MASS_RESOLUTION_KG = 0.005¶
- src.bluetooth_sig.gatt.characteristics.body_composition_measurement.MASS_RESOLUTION_LB = 0.01¶
- src.bluetooth_sig.gatt.characteristics.body_composition_measurement.MUSCLE_PERCENTAGE_RESOLUTION = 0.1¶