src.bluetooth_sig.gatt.characteristics.characteristic_meta¶
Helper classes for GATT characteristic infrastructure.
Contains the SIG resolver, validation configuration, and metaclass used by
BaseCharacteristic. Extracted to keep the base module focused on
the characteristic API itself.
Classes¶
Name | Description |
|---|---|
Metaclass to automatically handle template flags for characteristics. |
|
Resolves SIG characteristic information from YAML and registry. |
|
Configuration for characteristic validation constraints. |
Module Contents¶
- class src.bluetooth_sig.gatt.characteristics.characteristic_meta.CharacteristicMeta¶
Bases:
abc.ABCMetaMetaclass to automatically handle template flags for characteristics.
- class src.bluetooth_sig.gatt.characteristics.characteristic_meta.SIGCharacteristicResolver¶
Resolves SIG characteristic information from YAML and registry.
This class handles all SIG characteristic resolution logic, separating concerns from the BaseCharacteristic constructor. Uses shared utilities from the resolver module to avoid code duplication.
- static resolve_for_class(char_class: type) src.bluetooth_sig.types.CharacteristicInfo¶
Resolve CharacteristicInfo for a SIG characteristic class.
- Parameters:
char_class – The characteristic class to resolve info for.
- Returns:
CharacteristicInfo with resolved UUID, name, value_type, unit.
- Raises:
UUIDResolutionError – If no UUID can be resolved for the class.
- static resolve_from_registry(char_class: type) src.bluetooth_sig.types.CharacteristicInfo | None¶
Fallback to registry resolution using shared search strategy.
- static resolve_yaml_spec_for_class(char_class: type) src.bluetooth_sig.types.registry.CharacteristicSpec | None¶
Resolve YAML spec for a characteristic class using shared name variant logic.
- camel_case_to_display_name¶
- class src.bluetooth_sig.gatt.characteristics.characteristic_meta.ValidationConfig¶
Bases:
msgspec.StructConfiguration for characteristic validation constraints.
Groups validation parameters into a single, optional configuration object to simplify BaseCharacteristic constructor signatures.