src.bluetooth_sig.gatt.descriptors.characteristic_presentation_format¶
Characteristic Presentation Format Descriptor implementation.
Classes¶
Name | Description |
|---|---|
Characteristic Presentation Format descriptor data. |
|
Characteristic Presentation Format Descriptor (0x2904). |
|
Format namespace values for Characteristic Presentation Format. |
|
Format type values for Characteristic Presentation Format. |
Module Contents¶
- class src.bluetooth_sig.gatt.descriptors.characteristic_presentation_format.CharacteristicPresentationFormatData¶
Bases:
msgspec.StructCharacteristic Presentation Format descriptor data.
Raw integer values are preserved for protocol compatibility. Resolved names are provided when available via registry lookups.
- description_name: str | None = None¶
Resolved description name (e.g., ‘left’, ‘first’) from NamespaceDescriptionRegistry.
Only resolved when namespace=0x01 (Bluetooth SIG Assigned Numbers).
- format: FormatType¶
Format type value (e.g., FormatType.UINT16).
- format_name: str | None = None¶
Resolved format type name (e.g., ‘uint16’) from FormatTypesRegistry.
- namespace: FormatNamespace¶
Namespace for description field (e.g., FormatNamespace.BLUETOOTH_SIG_ASSIGNED_NUMBERS).
- class src.bluetooth_sig.gatt.descriptors.characteristic_presentation_format.CharacteristicPresentationFormatDescriptor¶
Bases:
src.bluetooth_sig.gatt.descriptors.base.BaseDescriptorCharacteristic Presentation Format Descriptor (0x2904).
Describes how characteristic values should be presented to users. Contains format, exponent, unit, namespace, and description information.
- get_format_type(data: bytes) FormatType¶
Get the format type.
- get_namespace(data: bytes) FormatNamespace¶
Get the namespace identifier.
- class src.bluetooth_sig.gatt.descriptors.characteristic_presentation_format.FormatNamespace¶
Bases:
enum.IntEnumFormat namespace values for Characteristic Presentation Format.
- BLUETOOTH_SIG_ASSIGNED_NUMBERS = 1¶
- RESERVED = 2¶
- UNKNOWN = 0¶
- class src.bluetooth_sig.gatt.descriptors.characteristic_presentation_format.FormatType¶
Bases:
enum.IntEnumFormat type values for Characteristic Presentation Format.
- BOOLEAN = 1¶
- DUINT16 = 24¶
- FLOAT = 23¶
- FLOAT32 = 20¶
- FLOAT64 = 21¶
- SFLOAT = 22¶
- SINT12 = 13¶
- SINT128 = 19¶
- SINT16 = 14¶
- SINT24 = 15¶
- SINT32 = 16¶
- SINT48 = 17¶
- SINT64 = 18¶
- SINT8 = 12¶
- STRUCT = 27¶
- UINT12 = 5¶
- UINT128 = 11¶
- UINT16 = 6¶
- UINT2 = 2¶
- UINT24 = 7¶
- UINT32 = 8¶
- UINT4 = 3¶
- UINT48 = 9¶
- UINT64 = 10¶
- UINT8 = 4¶
- UNKNOWN = 0¶
- UTF16S = 26¶
- UTF8S = 25¶