Coverage for src / bluetooth_sig / gatt / characteristics / bond_management_control_point.py: 100%
18 statements
« prev ^ index » next coverage.py v7.13.5, created at 2026-04-03 16:41 +0000
« prev ^ index » next coverage.py v7.13.5, created at 2026-04-03 16:41 +0000
1"""Bond Management Control Point characteristic implementation."""
3from __future__ import annotations
5from enum import IntEnum
7from .base import BaseCharacteristic
8from .templates import EnumTemplate
11class BondManagementCommand(IntEnum):
12 """Bond Management Control Point commands as per BMS v1.0 Table 3.3."""
14 DELETE_BOND_OF_REQUESTING_DEVICE_BR_EDR_LE = 0x01
15 DELETE_BOND_OF_REQUESTING_DEVICE_BR_EDR = 0x02
16 DELETE_BOND_OF_REQUESTING_DEVICE_LE = 0x03
17 DELETE_ALL_BONDS_ON_SERVER_BR_EDR_LE = 0x04
18 DELETE_ALL_BONDS_ON_SERVER_BR_EDR = 0x05
19 DELETE_ALL_BONDS_ON_SERVER_LE = 0x06
20 DELETE_ALL_BUT_ACTIVE_BOND_ON_SERVER_BR_EDR_LE = 0x07
21 DELETE_ALL_BUT_ACTIVE_BOND_ON_SERVER_BR_EDR = 0x08
22 DELETE_ALL_BUT_ACTIVE_BOND_ON_SERVER_LE = 0x09
25class BondManagementControlPointCharacteristic(BaseCharacteristic[BondManagementCommand]):
26 """Bond Management Control Point characteristic (0x2AA4).
28 org.bluetooth.characteristic.bond_management_control_point
30 Write-only characteristic for sending bond management commands.
31 Variable length, starting with command byte.
32 """
34 min_length = 1
35 allow_variable_length = True
36 _template = EnumTemplate.uint8(BondManagementCommand)