Coverage for src / bluetooth_sig / gatt / characteristics / bluetooth_sig_data.py: 100%
10 statements
« prev ^ index » next coverage.py v7.13.5, created at 2026-04-03 16:41 +0000
« prev ^ index » next coverage.py v7.13.5, created at 2026-04-03 16:41 +0000
1"""Bluetooth SIG Data characteristic (0x2B39).
3Variable-length opaque data defined by Bluetooth SIG.
5References:
6 Bluetooth SIG Handover Profile specification
7"""
9from __future__ import annotations
11from ..context import CharacteristicContext
12from .base import BaseCharacteristic
15class BluetoothSIGDataCharacteristic(BaseCharacteristic[bytes]):
16 """Bluetooth SIG Data characteristic (0x2B39).
18 org.bluetooth.characteristic.bluetooth_sig_data
20 Variable-length opaque data block defined by Bluetooth SIG.
21 """
23 min_length = 1
24 allow_variable_length = True
26 def _decode_value(
27 self, data: bytearray, ctx: CharacteristicContext | None = None, *, validate: bool = True
28 ) -> bytes:
29 return bytes(data)
31 def _encode_value(self, data: bytes) -> bytearray:
32 return bytearray(data)