Coverage for src / bluetooth_sig / gatt / services / alert_notification.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"""Alert Notification Service implementation."""
3from __future__ import annotations
5from typing import ClassVar
7from ..characteristics.registry import CharacteristicName
8from .base import BaseGattService
11class AlertNotificationService(BaseGattService):
12 """Alert Notification Service implementation.
14 Exposes alert information from a device to a peer device.
16 Contains characteristics related to alert notifications:
17 - Supported New Alert Category - Required
18 - New Alert - Optional
19 - Supported Unread Alert Category - Required
20 - Unread Alert Status - Optional
21 - Alert Notification Control Point - Required
22 """
24 service_characteristics: ClassVar[dict[CharacteristicName, bool]] = {
25 CharacteristicName.SUPPORTED_NEW_ALERT_CATEGORY: True, # required
26 CharacteristicName.NEW_ALERT: False, # optional
27 CharacteristicName.SUPPORTED_UNREAD_ALERT_CATEGORY: True, # required
28 CharacteristicName.UNREAD_ALERT_STATUS: False, # optional
29 CharacteristicName.ALERT_NOTIFICATION_CONTROL_POINT: True, # required
30 }