Coverage for src/bluetooth_sig/gatt/services/generic_attribute.py: 100%

7 statements  

« prev     ^ index     » next       coverage.py v7.11.0, created at 2025-10-30 00:10 +0000

1"""Generic Attribute 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 GenericAttributeService(BaseGattService): 

12 """Generic Attribute Service implementation. 

13 

14 The GATT Service contains information about the GATT database and is 

15 primarily used for service discovery and attribute access. 

16 

17 This service typically contains: 

18 - Service Changed characteristic (optional) 

19 """ 

20 

21 _service_name: str = "GATT" 

22 

23 # This service has no standard characteristics defined yet 

24 service_characteristics: ClassVar[dict[CharacteristicName, bool]] = { 

25 CharacteristicName.SERVICE_CHANGED: False, 

26 }