src.bluetooth_sig.gatt.characteristics.glucose_feature

Glucose Feature characteristic implementation.

Classes

Name

Description

GlucoseFeatureCharacteristic

Glucose Feature characteristic (0x2A51).

GlucoseFeatureData

Parsed data from Glucose Feature characteristic.

GlucoseFeatures

Glucose Feature flags according to Bluetooth SIG specification.

Module Contents

class src.bluetooth_sig.gatt.characteristics.glucose_feature.GlucoseFeatureCharacteristic

Bases: src.bluetooth_sig.gatt.characteristics.base.BaseCharacteristic[GlucoseFeatureData]

Glucose Feature characteristic (0x2A51).

Used to expose the supported features of a glucose monitoring device. Indicates which optional fields and capabilities are available.

get_feature_description(feature_bit: int) str

Get description for a specific feature bit.

Parameters:

feature_bit – Bit position (0-15)

Returns:

Human-readable description of the feature

allow_variable_length: bool = False
expected_length: int = 2
max_length: int = 2
min_length: int = 2
class src.bluetooth_sig.gatt.characteristics.glucose_feature.GlucoseFeatureData

Bases: msgspec.Struct

Parsed data from Glucose Feature characteristic.

enabled_features: tuple[GlucoseFeatures, Ellipsis]
feature_count: int
features_bitmap: GlucoseFeatures
general_device_fault: bool
low_battery_detection: bool
multiple_bond_support: bool
sensor_malfunction_detection: bool
sensor_read_interrupt: bool
sensor_result_high_low: bool
sensor_sample_size: bool
sensor_strip_insertion_error: bool
sensor_strip_type_error: bool
sensor_temperature_high_low: bool
time_fault: bool
class src.bluetooth_sig.gatt.characteristics.glucose_feature.GlucoseFeatures

Bases: enum.IntFlag

Glucose Feature flags according to Bluetooth SIG specification.

get_enabled_features() list[GlucoseFeatures]

Get list of human-readable enabled features.

GENERAL_DEVICE_FAULT = 256
LOW_BATTERY_DETECTION = 1
MULTIPLE_BOND_SUPPORT = 1024
SENSOR_MALFUNCTION_DETECTION = 2
SENSOR_READ_INTERRUPT = 128
SENSOR_RESULT_HIGH_LOW = 32
SENSOR_SAMPLE_SIZE = 4
SENSOR_STRIP_INSERTION_ERROR = 8
SENSOR_STRIP_TYPE_ERROR = 16
SENSOR_TEMPERATURE_HIGH_LOW = 64
TIME_FAULT = 512