src.bluetooth_sig.gatt.characteristics.cycling_power_control_point

Cycling Power Control Point characteristic implementation.

Attributes

Name

Description

MIN_OP_CODE_LENGTH

Classes

Name

Description

CyclingPowerControlPointCharacteristic

Cycling Power Control Point characteristic (0x2A66).

CyclingPowerControlPointData

Parsed data from Cycling Power Control Point characteristic.

CyclingPowerOpCode

Cycling Power Control Point operation codes as per Bluetooth SIG specification.

CyclingPowerResponseValue

Cycling Power Control Point response values as per Bluetooth SIG specification.

OpCodeParameters

Parsed operation code parameters.

Module Contents

class src.bluetooth_sig.gatt.characteristics.cycling_power_control_point.CyclingPowerControlPointCharacteristic

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

Cycling Power Control Point characteristic (0x2A66).

Used for control and configuration of cycling power sensors. Provides commands for calibration, configuration, and sensor control.

CHAIN_LENGTH_RESOLUTION = 10.0
CHAIN_WEIGHT_RESOLUTION = 10.0
CRANK_LENGTH_RESOLUTION = 2.0
CUMULATIVE_VALUE_LENGTH = 5
MIN_OP_CODE_LENGTH = 1
RESPONSE_CODE_LENGTH = 3
SENSOR_LOCATION_LENGTH = 2
TWO_BYTE_PARAM_LENGTH = 3
allow_variable_length = True
min_length = 1
class src.bluetooth_sig.gatt.characteristics.cycling_power_control_point.CyclingPowerControlPointData

Bases: msgspec.Struct

Parsed data from Cycling Power Control Point characteristic.

chain_length: float | None = None
chain_weight: float | None = None
crank_length: float | None = None
cumulative_value: int | None = None
measurement_mask: int | None = None
op_code: CyclingPowerOpCode
request_op_code: CyclingPowerOpCode | None = None
response_value: CyclingPowerResponseValue | None = None
sensor_location: int | None = None
span_length: int | None = None
class src.bluetooth_sig.gatt.characteristics.cycling_power_control_point.CyclingPowerOpCode

Bases: enum.IntEnum

Cycling Power Control Point operation codes as per Bluetooth SIG specification.

MASK_CYCLING_POWER_MEASUREMENT = 13
REQUEST_CHAIN_LENGTH = 7
REQUEST_CHAIN_WEIGHT = 9
REQUEST_CRANK_LENGTH = 5
REQUEST_FACTORY_CALIBRATION_DATE = 15
REQUEST_SAMPLING_RATE = 14
REQUEST_SPAN_LENGTH = 11
REQUEST_SUPPORTED_SENSOR_LOCATIONS = 3
RESPONSE_CODE = 32
SET_CHAIN_LENGTH = 6
SET_CHAIN_WEIGHT = 8
SET_CRANK_LENGTH = 4
SET_CUMULATIVE_VALUE = 1
SET_SPAN_LENGTH = 10
START_OFFSET_COMPENSATION = 12
UPDATE_SENSOR_LOCATION = 2
class src.bluetooth_sig.gatt.characteristics.cycling_power_control_point.CyclingPowerResponseValue

Bases: enum.IntEnum

Cycling Power Control Point response values as per Bluetooth SIG specification.

INVALID_PARAMETER = 3
OPERATION_FAILED = 4
OP_CODE_NOT_SUPPORTED = 2
SUCCESS = 1
class src.bluetooth_sig.gatt.characteristics.cycling_power_control_point.OpCodeParameters

Bases: msgspec.Struct

Parsed operation code parameters.

chain_length: float | None
chain_weight: float | None
crank_length: float | None
cumulative_value: int | None
measurement_mask: int | None
request_op_code: CyclingPowerOpCode | None
response_value: CyclingPowerResponseValue | None
sensor_location: int | None
span_length: int | None
src.bluetooth_sig.gatt.characteristics.cycling_power_control_point.MIN_OP_CODE_LENGTH = 1