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

6 statements  

« prev     ^ index     » next       coverage.py v7.13.5, created at 2026-04-03 16:41 +0000

1"""Ranging 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 RangingService(BaseGattService): 

12 """Ranging Service implementation (0x185B). 

13 

14 Provides distance measurement and ranging data between BLE 

15 devices using channel sounding. 

16 """ 

17 

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

19 CharacteristicName.RAS_FEATURES: True, 

20 CharacteristicName.RAS_CONTROL_POINT: True, 

21 CharacteristicName.ON_DEMAND_RANGING_DATA: True, 

22 CharacteristicName.REAL_TIME_RANGING_DATA: False, 

23 CharacteristicName.RANGING_DATA_READY: True, 

24 CharacteristicName.RANGING_DATA_OVERWRITTEN: True, 

25 }