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

11 statements  

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

1"""GMAP Role characteristic (0x2C00).""" 

2 

3from __future__ import annotations 

4 

5from enum import IntFlag 

6 

7from .base import BaseCharacteristic 

8from .templates import FlagTemplate 

9 

10 

11class GMAPRole(IntFlag): 

12 """Gaming Audio Profile role flags.""" 

13 

14 UNICAST_GAME_GATEWAY = 0x01 

15 UNICAST_GAME_TERMINAL = 0x02 

16 BROADCAST_GAME_SENDER = 0x04 

17 BROADCAST_GAME_RECEIVER = 0x08 

18 

19 

20class GMAPRoleCharacteristic(BaseCharacteristic[GMAPRole]): 

21 """GMAP Role characteristic (0x2C00). 

22 

23 org.bluetooth.characteristic.gmap_role 

24 

25 Bitfield indicating the supported Gaming Audio Profile roles. 

26 """ 

27 

28 _template = FlagTemplate.uint8(GMAPRole)