Coverage for src / bluetooth_sig / gatt / characteristics / aggregate.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"""Aggregate characteristic (0x2A5A)."""
3from __future__ import annotations
5from ..context import CharacteristicContext
6from .base import BaseCharacteristic
9class AggregateCharacteristic(BaseCharacteristic[bytes]):
10 """Aggregate characteristic (0x2A5A).
12 org.bluetooth.characteristic.aggregate
14 Concatenation of all characteristic values referenced by the
15 Aggregate format descriptor. Treated as raw bytes passthrough.
16 """
18 min_length = 0
19 allow_variable_length = True
21 def _decode_value(
22 self, data: bytearray, ctx: CharacteristicContext | None = None, *, validate: bool = True
23 ) -> bytes:
24 return bytes(data)
26 def _encode_value(self, data: bytes) -> bytearray:
27 return bytearray(data)