Coverage for src / bluetooth_sig / gatt / services / current_time_service.py: 100%
6 statements
« prev ^ index » next coverage.py v7.13.1, created at 2026-01-11 20:14 +0000
« prev ^ index » next coverage.py v7.13.1, created at 2026-01-11 20:14 +0000
1"""Current Time Service implementation."""
3from __future__ import annotations
5from typing import ClassVar
7from ..characteristics.registry import CharacteristicName
8from .base import BaseGattService
11class CurrentTimeService(BaseGattService):
12 """Current Time Service implementation.
14 Exposes the current date and time with additional information.
16 Contains characteristics related to time:
17 - Current Time - Required
18 - Local Time Information - Optional
19 - Reference Time Information - Optional
20 """
22 service_characteristics: ClassVar[dict[CharacteristicName, bool]] = {
23 CharacteristicName.CURRENT_TIME: True, # required
24 CharacteristicName.LOCAL_TIME_INFORMATION: False, # optional
25 CharacteristicName.REFERENCE_TIME_INFORMATION: False, # optional
26 }