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

6 statements  

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

1"""Human Interface Device 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 HumanInterfaceDeviceService(BaseGattService): 

12 """Human Interface Device Service implementation. 

13 

14 Contains characteristics related to HID: 

15 - HID Information - Required 

16 - HID Control Point - Required 

17 - Report Map - Required 

18 - Report - Conditional/Optional (device profile dependent) 

19 - Protocol Mode - Conditional/Optional (required for boot protocol support) 

20 """ 

21 

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

23 CharacteristicName.HID_INFORMATION: True, 

24 CharacteristicName.HID_CONTROL_POINT: True, 

25 CharacteristicName.REPORT_MAP: True, 

26 CharacteristicName.REPORT: False, 

27 CharacteristicName.PROTOCOL_MODE: False, 

28 CharacteristicName.BOOT_KEYBOARD_INPUT_REPORT: False, 

29 CharacteristicName.BOOT_KEYBOARD_OUTPUT_REPORT: False, 

30 CharacteristicName.BOOT_MOUSE_INPUT_REPORT: False, 

31 }