Coverage for src / bluetooth_sig / gatt / characteristics / contact_status_8.py: 100%
15 statements
« prev ^ index » next coverage.py v7.13.5, created at 2026-03-18 11:17 +0000
« prev ^ index » next coverage.py v7.13.5, created at 2026-03-18 11:17 +0000
1"""Contact Status 8 characteristic (0x2C10)."""
3from __future__ import annotations
5from enum import IntFlag
7from .base import BaseCharacteristic
8from .templates import FlagTemplate
11class ContactStatus(IntFlag):
12 """Individual contact status flags for Contact Status 8.
14 Each flag represents one contact input:
15 0 = no contact, 1 = contact detected.
16 """
18 CONTACT_0 = 0x01
19 CONTACT_1 = 0x02
20 CONTACT_2 = 0x04
21 CONTACT_3 = 0x08
22 CONTACT_4 = 0x10
23 CONTACT_5 = 0x20
24 CONTACT_6 = 0x40
25 CONTACT_7 = 0x80
28class ContactStatus8Characteristic(BaseCharacteristic[ContactStatus]):
29 """Contact Status 8 characteristic (0x2C10).
31 org.bluetooth.characteristic.contact_status_8
33 Eight independent contact status bits packed in a single byte.
34 Each bit represents one contact: 0 = no contact, 1 = contact detected.
35 """
37 _template = FlagTemplate.uint8(ContactStatus)