src.bluetooth_sig.gatt.characteristics.csc_measurement

CSC Measurement characteristic implementation.

Classes

Name

Description

CSCMeasurementCharacteristic

CSC (Cycling Speed and Cadence) Measurement characteristic (0x2A5B).

CSCMeasurementData

Parsed data from CSC Measurement characteristic.

CSCMeasurementFlags

CSC Measurement flags as per Bluetooth SIG specification.

Module Contents

class src.bluetooth_sig.gatt.characteristics.csc_measurement.CSCMeasurementCharacteristic

Bases: src.bluetooth_sig.gatt.characteristics.base.BaseCharacteristic[CSCMeasurementData]

CSC (Cycling Speed and Cadence) Measurement characteristic (0x2A5B).

Used to transmit cycling speed and cadence data.

CSC_TIME_RESOLUTION = 1024.0
allow_variable_length = True
max_length = 11
min_length = 1
class src.bluetooth_sig.gatt.characteristics.csc_measurement.CSCMeasurementData

Bases: msgspec.Struct

Parsed data from CSC Measurement characteristic.

cumulative_crank_revolutions: int | None = None
cumulative_wheel_revolutions: int | None = None
flags: CSCMeasurementFlags
last_crank_event_time: float | None = None
last_wheel_event_time: float | None = None
class src.bluetooth_sig.gatt.characteristics.csc_measurement.CSCMeasurementFlags

Bases: enum.IntFlag

CSC Measurement flags as per Bluetooth SIG specification.

CRANK_REVOLUTION_DATA_PRESENT = 2
WHEEL_REVOLUTION_DATA_PRESENT = 1