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

1"""Alert Notification Service implementation.""" 

2 

3from __future__ import annotations 

4 

5from typing import ClassVar 

6 

7from ..characteristics.registry import CharacteristicName 

8from .base import BaseGattService 

9 

10 

11class AlertNotificationService(BaseGattService): 

12 """Alert Notification Service implementation. 

13 

14 Exposes alert information from a device to a peer device. 

15 

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 """ 

23 

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 }