Add definition of Client Characteristic Configuration bit

This commit is contained in:
Alan Rosenthal
2022-11-07 19:43:22 -05:00
parent 2920c3b0d1
commit d4228e3b5b
2 changed files with 15 additions and 4 deletions

View File

@@ -23,6 +23,7 @@
# Imports
# -----------------------------------------------------------------------------
import asyncio
import enum
import types
import logging
from colors import color
@@ -473,3 +474,12 @@ class Descriptor(Attribute):
def __str__(self):
return f'Descriptor(handle=0x{self.handle:04X}, type={self.type}, value={self.read_value(None).hex()})'
class ClientCharacteristicConfigurationBits(enum.IntFlag):
'''
See Vol 3, Part G - 3.3.3.3 - Table 3.11 Client Characteristic Configuration bit field definition
'''
DEFAULT = 0x0000
NOTIFICATION = 0x0001
INDICATION = 0x0002