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

12 statements  

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

1"""Handedness characteristic (0x2B4A).""" 

2 

3from __future__ import annotations 

4 

5from enum import IntEnum 

6 

7from .base import BaseCharacteristic 

8from .templates import EnumTemplate 

9 

10 

11class Handedness(IntEnum): 

12 """Handedness enumeration.""" 

13 

14 LEFT_HANDED = 0x00 

15 RIGHT_HANDED = 0x01 

16 AMBIDEXTROUS = 0x02 

17 UNSPECIFIED = 0x03 

18 

19 

20class HandednessCharacteristic(BaseCharacteristic[int]): 

21 """Handedness characteristic (0x2B4A). 

22 

23 org.bluetooth.characteristic.handedness 

24 

25 The Handedness characteristic is used to represent the handedness of a user. 

26 """ 

27 

28 expected_length: int | None = 1 

29 _template = EnumTemplate.uint8(Handedness)