Coverage for src / bluetooth_sig / gatt / characteristics / protocol_mode.py: 100%
12 statements
« prev ^ index » next coverage.py v7.13.1, created at 2026-01-11 20:14 +0000
« prev ^ index » next coverage.py v7.13.1, created at 2026-01-11 20:14 +0000
1"""Protocol Mode characteristic implementation."""
3from __future__ import annotations
5from enum import IntEnum
7from .base import BaseCharacteristic
8from .templates import EnumTemplate
11class ProtocolMode(IntEnum):
12 """Protocol Mode values."""
14 BOOT_PROTOCOL = 0
15 REPORT_PROTOCOL = 1
18class ProtocolModeCharacteristic(BaseCharacteristic[int]):
19 """Protocol Mode characteristic (0x2A4E).
21 org.bluetooth.characteristic.protocol_mode
23 Protocol Mode characteristic.
24 """
26 _template = EnumTemplate.uint8(ProtocolMode)
28 # SIG spec: uint8 enumerated mode value → fixed 1-byte payload; no GSS YAML
29 expected_length = 1
30 min_length = 1
31 max_length = 1