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

13 statements  

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

1"""TMAP Role characteristic (0x2B51).""" 

2 

3from __future__ import annotations 

4 

5from enum import IntFlag 

6 

7from .base import BaseCharacteristic 

8from .templates import FlagTemplate 

9 

10 

11class TMAPRole(IntFlag): 

12 """Telephony and Media Audio Profile role flags.""" 

13 

14 CALL_GATEWAY = 0x0001 

15 CALL_TERMINAL = 0x0002 

16 UNICAST_MEDIA_SENDER = 0x0004 

17 UNICAST_MEDIA_RECEIVER = 0x0008 

18 BROADCAST_MEDIA_SENDER = 0x0010 

19 BROADCAST_MEDIA_RECEIVER = 0x0020 

20 

21 

22class TMAPRoleCharacteristic(BaseCharacteristic[TMAPRole]): 

23 """TMAP Role characteristic (0x2B51). 

24 

25 org.bluetooth.characteristic.tmap_role 

26 

27 Bitfield indicating the supported Telephony and Media Audio Profile roles. 

28 """ 

29 

30 _template = FlagTemplate.uint16(TMAPRole)