Coverage for src/bluetooth_sig/gatt/characteristics/peripheral_privacy_flag.py: 100%
10 statements
« prev ^ index » next coverage.py v7.14.3, created at 2026-06-28 01:26 +0000
« prev ^ index » next coverage.py v7.14.3, created at 2026-06-28 01:26 +0000
1"""Peripheral Privacy Flag characteristic implementation."""
3from __future__ import annotations
5from enum import IntEnum
7from .base import BaseCharacteristic
8from .templates import EnumTemplate
11class PeripheralPrivacyState(IntEnum):
12 """Peripheral privacy state."""
14 DISABLED = 0
15 ENABLED = 1
18class PeripheralPrivacyFlagCharacteristic(BaseCharacteristic[PeripheralPrivacyState]):
19 """Peripheral Privacy Flag characteristic (0x2A02).
21 org.bluetooth.characteristic.gap.peripheral_privacy_flag
23 Indicates whether privacy is enabled (1) or disabled (0).
24 """
26 expected_length: int = 1
27 _template = EnumTemplate.uint8(PeripheralPrivacyState)