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

11 statements  

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

1"""BR-EDR Handover Data characteristic (0x2B38). 

2 

3Variable-length raw bytes for BR/EDR handover information. 

4 

5References: 

6 Bluetooth SIG Handover Profile specification 

7""" 

8 

9from __future__ import annotations 

10 

11from ..context import CharacteristicContext 

12from .base import BaseCharacteristic 

13 

14 

15class BREDRHandoverDataCharacteristic(BaseCharacteristic[bytes]): 

16 """BR-EDR Handover Data characteristic (0x2B38). 

17 

18 org.bluetooth.characteristic.br_edr_handover_data 

19 

20 Variable-length opaque data used during BR/EDR handover procedures. 

21 """ 

22 

23 _characteristic_name = "BR-EDR Handover Data" 

24 min_length = 1 

25 allow_variable_length = True 

26 

27 def _decode_value( 

28 self, data: bytearray, ctx: CharacteristicContext | None = None, *, validate: bool = True 

29 ) -> bytes: 

30 return bytes(data) 

31 

32 def _encode_value(self, data: bytes) -> bytearray: 

33 return bytearray(data)