Coverage for src/bluetooth_sig/gatt/services/cycling_power.py: 100%

6 statements  

« prev     ^ index     » next       coverage.py v7.11.0, created at 2025-10-30 00:10 +0000

1"""Cycling Power Service implementation.""" 

2 

3from __future__ import annotations 

4 

5from typing import ClassVar 

6 

7from ..characteristics.registry import CharacteristicName 

8from .base import BaseGattService 

9 

10 

11class CyclingPowerService(BaseGattService): 

12 """Cycling Power Service implementation (0x1818). 

13 

14 Used for cycling power meters that measure power output in watts. 

15 Supports instantaneous power, force/torque vectors, and control 

16 functions. 

17 """ 

18 

19 service_characteristics: ClassVar[dict[CharacteristicName, bool]] = { 

20 CharacteristicName.CYCLING_POWER_MEASUREMENT: True, # required 

21 CharacteristicName.CYCLING_POWER_FEATURE: True, # required 

22 CharacteristicName.CYCLING_POWER_VECTOR: False, # optional 

23 CharacteristicName.CYCLING_POWER_CONTROL_POINT: False, # optional 

24 }