Coverage for src / bluetooth_sig / gatt / characteristics / life_cycle_data.py: 100%
12 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"""Life Cycle Data characteristic (0x2C0F).
3Variable-length lifecycle data record from an Industrial Monitoring Device.
5References:
6 Bluetooth SIG Industrial Monitoring Device Service
7"""
9from __future__ import annotations
11from ...types.gatt_enums import CharacteristicRole
12from ..context import CharacteristicContext
13from .base import BaseCharacteristic
16class LifeCycleDataCharacteristic(BaseCharacteristic[bytes]):
17 """Life Cycle Data characteristic (0x2C0F).
19 org.bluetooth.characteristic.life_cycle_data
21 Contains variable-length lifecycle data from an Industrial Monitoring Device.
22 """
24 _manual_role = CharacteristicRole.INFO
25 min_length = 1
26 allow_variable_length = True
28 def _decode_value(
29 self, data: bytearray, ctx: CharacteristicContext | None = None, *, validate: bool = True
30 ) -> bytes:
31 return bytes(data)
33 def _encode_value(self, data: bytes) -> bytearray:
34 return bytearray(data)