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

12 statements  

« prev     ^ index     » next       coverage.py v7.13.1, created at 2026-01-11 20:14 +0000

1"""Bond Management Control Point characteristic implementation.""" 

2 

3from __future__ import annotations 

4 

5from enum import IntEnum 

6 

7from .base import BaseCharacteristic 

8from .templates import EnumTemplate 

9 

10 

11class BondManagementCommand(IntEnum): 

12 """Bond Management Control Point commands.""" 

13 

14 DELETE_BOND_OF_REQUESTING_DEVICE = 0x01 

15 DELETE_ALL_BONDS_ON_SERVER = 0x02 

16 DELETE_ALL_BUT_ACTIVE_BOND_ON_SERVER = 0x03 

17 

18 

19class BondManagementControlPointCharacteristic(BaseCharacteristic[int]): 

20 """Bond Management Control Point characteristic (0x2AA4). 

21 

22 org.bluetooth.characteristic.bond_management_control_point 

23 

24 Write-only characteristic for sending bond management commands. 

25 Variable length, starting with command byte. 

26 """ 

27 

28 min_length = 1 

29 allow_variable_length = True 

30 _template = EnumTemplate.uint8(BondManagementCommand)