Coverage for src/bluetooth_sig/gatt/characteristics/https_security.py: 100%

10 statements  

« prev     ^ index     » next       coverage.py v7.14.3, created at 2026-06-28 01:26 +0000

1"""HTTPS Security characteristic.""" 

2 

3from __future__ import annotations 

4 

5from enum import IntEnum 

6 

7from .base import BaseCharacteristic 

8from .templates import EnumTemplate 

9 

10 

11class HttpsSecurityState(IntEnum): 

12 """HTTPS security protocol state.""" 

13 

14 HTTP = 0 

15 HTTPS = 1 

16 

17 

18class HttpsSecurityCharacteristic(BaseCharacteristic[HttpsSecurityState]): 

19 """HTTPS Security characteristic (0x2ABB). 

20 

21 org.bluetooth.characteristic.https_security 

22 

23 Indicates whether HTTPS (1) or HTTP (0) is used for the connection. 

24 """ 

25 

26 expected_length: int = 1 

27 _template = EnumTemplate.uint8(HttpsSecurityState)