Coverage for src / bluetooth_sig / gatt / characteristics / templates / data_structures.py: 100%
16 statements
« prev ^ index » next coverage.py v7.13.5, created at 2026-03-18 11:17 +0000
« prev ^ index » next coverage.py v7.13.5, created at 2026-03-18 11:17 +0000
1"""Data structures used by templates.
3Frozen msgspec.Struct types for structured template return values.
4"""
6from __future__ import annotations
8from datetime import datetime
10import msgspec
12from ....types.gatt_enums import AdjustReason, DayOfWeek
15class VectorData(msgspec.Struct, frozen=True, kw_only=True): # pylint: disable=too-few-public-methods
16 """3D vector measurement data."""
18 x_axis: float
19 y_axis: float
20 z_axis: float
23class Vector2DData(msgspec.Struct, frozen=True, kw_only=True): # pylint: disable=too-few-public-methods
24 """2D vector measurement data."""
26 x_axis: float
27 y_axis: float
30class TimeData(msgspec.Struct, frozen=True, kw_only=True): # pylint: disable=too-few-public-methods
31 """Time characteristic data structure."""
33 date_time: datetime | None
34 day_of_week: DayOfWeek
35 fractions256: int
36 adjust_reason: AdjustReason