Coverage for src / bluetooth_sig / gatt / characteristics / time_change_log_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"""Time Change Log Data characteristic (0x2B92).
3Variable-length time change records.
5References:
6 Bluetooth SIG Device Time Service specification
7"""
9from __future__ import annotations
11from ..context import CharacteristicContext
12from .base import BaseCharacteristic
15class TimeChangeLogDataCharacteristic(BaseCharacteristic[bytes]):
16 """Time Change Log Data characteristic (0x2B92).
18 org.bluetooth.characteristic.time_change_log_data
20 Variable-length records documenting time changes on the device.
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)