Coverage for src / bluetooth_sig / gatt / characteristics / stored_health_observations.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"""Stored Health Observations characteristic (0x2BDD).
3Variable-length stored ACOM observation format (IEEE 11073-10101).
5References:
6 Bluetooth SIG Generic Health Sensor Service specification
7"""
9from __future__ import annotations
11from ..context import CharacteristicContext
12from .base import BaseCharacteristic
15class StoredHealthObservationsCharacteristic(BaseCharacteristic[bytes]):
16 """Stored Health Observations characteristic (0x2BDD).
18 org.bluetooth.characteristic.stored_health_observations
20 Variable-length stored health observation data using the ACOM
21 encoding based on IEEE 11073-10101 nomenclature.
22 """
24 min_length = 1
25 allow_variable_length = True
27 def _decode_value(
28 self, data: bytearray, ctx: CharacteristicContext | None = None, *, validate: bool = True
29 ) -> bytes:
30 return bytes(data)
32 def _encode_value(self, data: bytes) -> bytearray:
33 return bytearray(data)