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

9 statements  

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

1"""Time Update Control Point characteristic (0x2A16) implementation.""" 

2 

3from __future__ import annotations 

4 

5from enum import IntEnum 

6 

7from .base import BaseCharacteristic 

8from .templates import EnumTemplate 

9 

10 

11class TimeUpdateControlPointCommand(IntEnum): 

12 """Time Update Control Point commands.""" 

13 

14 GET_REFERENCE_UPDATE = 0x01 

15 CANCEL_REFERENCE_UPDATE = 0x02 

16 

17 

18class TimeUpdateControlPointCharacteristic(BaseCharacteristic[TimeUpdateControlPointCommand]): 

19 """Time Update Control Point characteristic. 

20 

21 Allows a client to request or cancel reference time updates. 

22 

23 Value: uint8 command 

24 - 0x01: Get Reference Time Update 

25 - 0x02: Cancel Reference Time Update 

26 """ 

27 

28 _template = EnumTemplate.uint8(TimeUpdateControlPointCommand)