Coverage for src / bluetooth_sig / gatt / characteristics / ras_features.py: 100%

11 statements  

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

1"""RAS Features characteristic (0x2C14). 

2 

3Bitfield indicating the supported Ranging Service features. 

4 

5References: 

6 Bluetooth SIG Ranging Service 

7""" 

8 

9from __future__ import annotations 

10 

11from enum import IntFlag 

12 

13from .base import BaseCharacteristic 

14from .templates import FlagTemplate 

15 

16 

17class RASFeatures(IntFlag): 

18 """Ranging Service feature flags (uint32, per RAS v1.0 Table 3.3).""" 

19 

20 REAL_TIME_RANGING_DATA_SUPPORTED = 0x00000001 

21 RETRIEVE_LOST_RANGING_DATA_SEGMENTS_SUPPORTED = 0x00000002 

22 ABORT_OPERATION_SUPPORTED = 0x00000004 

23 FILTER_RANGING_DATA_SUPPORTED = 0x00000008 

24 

25 

26class RASFeaturesCharacteristic(BaseCharacteristic[RASFeatures]): 

27 """RAS Features characteristic (0x2C14). 

28 

29 org.bluetooth.characteristic.ras_features 

30 

31 Bitfield indicating the supported Ranging Service features. 

32 Per RAS v1.0 Table 3.2: Boolean[32] = uint32 (4 bytes). 

33 """ 

34 

35 _template = FlagTemplate.uint32(RASFeatures)