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

6 statements  

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

1"""Glucose 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 GlucoseService(BaseGattService): 

12 """Glucose Service implementation (0x1808). 

13 

14 Used for glucose monitoring devices including continuous glucose 

15 monitors (CGMs) and traditional glucose meters. Provides 

16 comprehensive glucose measurement data with context and device 

17 capabilities. 

18 """ 

19 

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

21 CharacteristicName.GLUCOSE_MEASUREMENT: True, # required 

22 CharacteristicName.GLUCOSE_FEATURE: True, # required 

23 CharacteristicName.GLUCOSE_MEASUREMENT_CONTEXT: False, # optional 

24 }