src.bluetooth_sig.gatt.characteristics.glucose_measurement_context¶
Glucose Measurement Context characteristic implementation.
Attributes¶
Name | Description |
|---|---|
Classes¶
Name | Description |
|---|---|
Carbohydrate information parsing result. |
|
Carbohydrate type enumeration as per Bluetooth SIG specification. |
|
Exercise information parsing result. |
|
Extended flags parsing result. |
|
Glucose Measurement Context bit field constants. |
|
Glucose Measurement Context characteristic (0x2A34). |
|
Parsed data from Glucose Measurement Context characteristic. |
|
Glucose Measurement Context Extended Flags constants as per Bluetooth SIG specification. |
|
Glucose Measurement Context flags as per Bluetooth SIG specification. |
|
Glucose tester type enumeration as per Bluetooth SIG specification. |
|
Health type enumeration as per Bluetooth SIG specification. |
|
Meal information parsing result. |
|
Meal type enumeration as per Bluetooth SIG specification. |
|
Medication information parsing result. |
|
Medication type enumeration as per Bluetooth SIG specification. |
|
Tester and health information parsing result. |
Module Contents¶
- class src.bluetooth_sig.gatt.characteristics.glucose_measurement_context.CarbohydrateResult¶
Bases:
msgspec.StructCarbohydrate information parsing result.
- carbohydrate_id: CarbohydrateType | None¶
- class src.bluetooth_sig.gatt.characteristics.glucose_measurement_context.CarbohydrateType¶
Bases:
enum.IntEnumCarbohydrate type enumeration as per Bluetooth SIG specification.
- BREAKFAST = 1¶
- BRUNCH = 7¶
- DINNER = 3¶
- DRINK = 5¶
- LUNCH = 2¶
- SNACK = 4¶
- SUPPER = 6¶
- class src.bluetooth_sig.gatt.characteristics.glucose_measurement_context.ExerciseResult¶
Bases:
msgspec.StructExercise information parsing result.
- class src.bluetooth_sig.gatt.characteristics.glucose_measurement_context.ExtendedFlagsResult¶
Bases:
msgspec.StructExtended flags parsing result.
- class src.bluetooth_sig.gatt.characteristics.glucose_measurement_context.GlucoseMeasurementContextBits¶
Glucose Measurement Context bit field constants.
- HEALTH_BIT_WIDTH = 4¶
- HEALTH_START_BIT = 0¶
- TESTER_BIT_WIDTH = 4¶
- TESTER_START_BIT = 4¶
- class src.bluetooth_sig.gatt.characteristics.glucose_measurement_context.GlucoseMeasurementContextCharacteristic¶
Bases:
src.bluetooth_sig.gatt.characteristics.base.BaseCharacteristic[GlucoseMeasurementContextData]Glucose Measurement Context characteristic (0x2A34).
Used to transmit additional context for glucose measurements including carbohydrate intake, exercise, medication, and HbA1c information.
SIG Specification Pattern: This characteristic depends on Glucose Measurement (0x2A18) for sequence number matching. The sequence_number field in this context must match the sequence_number from a corresponding Glucose Measurement characteristic.
- class src.bluetooth_sig.gatt.characteristics.glucose_measurement_context.GlucoseMeasurementContextData¶
Bases:
msgspec.StructParsed data from Glucose Measurement Context characteristic.
Used for both parsing and encoding - None values represent optional fields.
- carbohydrate_id: CarbohydrateType | None = None¶
- health: HealthType | None = None¶
- medication_id: MedicationType | None = None¶
- tester: GlucoseTester | None = None¶
- class src.bluetooth_sig.gatt.characteristics.glucose_measurement_context.GlucoseMeasurementContextExtendedFlags¶
Bases:
enum.IntEnumGlucose Measurement Context Extended Flags constants as per Bluetooth SIG specification.
Currently all bits are reserved for future use.
- static get_description(flags: int) str¶
Get description of extended flags.
- Parameters:
flags – Extended flags value (0-255)
- Returns:
Description string indicating all bits are reserved
- RESERVED_BIT_0 = 1¶
- RESERVED_BIT_1 = 2¶
- RESERVED_BIT_2 = 4¶
- RESERVED_BIT_3 = 8¶
- RESERVED_BIT_4 = 16¶
- RESERVED_BIT_5 = 32¶
- RESERVED_BIT_6 = 64¶
- RESERVED_BIT_7 = 128¶
- class src.bluetooth_sig.gatt.characteristics.glucose_measurement_context.GlucoseMeasurementContextFlags¶
Bases:
enum.IntFlagGlucose Measurement Context flags as per Bluetooth SIG specification.
- CARBOHYDRATE_PRESENT = 2¶
- EXERCISE_PRESENT = 16¶
- EXTENDED_FLAGS_PRESENT = 1¶
- HBA1C_PRESENT = 64¶
- MEAL_PRESENT = 4¶
- MEDICATION_PRESENT = 32¶
- RESERVED = 128¶
- TESTER_HEALTH_PRESENT = 8¶
- class src.bluetooth_sig.gatt.characteristics.glucose_measurement_context.GlucoseTester¶
Bases:
enum.IntEnumGlucose tester type enumeration as per Bluetooth SIG specification.
- HEALTH_CARE_PROFESSIONAL = 2¶
- LAB_TEST = 3¶
- NOT_AVAILABLE = 15¶
- SELF = 1¶
- class src.bluetooth_sig.gatt.characteristics.glucose_measurement_context.HealthType¶
Bases:
enum.IntEnumHealth type enumeration as per Bluetooth SIG specification.
- DURING_MENSES = 3¶
- MAJOR_HEALTH_ISSUES = 2¶
- MINOR_HEALTH_ISSUES = 1¶
- NOT_AVAILABLE = 15¶
- NO_HEALTH_ISSUES = 5¶
- UNDER_STRESS = 4¶
- class src.bluetooth_sig.gatt.characteristics.glucose_measurement_context.MealResult¶
Bases:
msgspec.StructMeal information parsing result.
- class src.bluetooth_sig.gatt.characteristics.glucose_measurement_context.MealType¶
Bases:
enum.IntEnumMeal type enumeration as per Bluetooth SIG specification.
- BEDTIME = 5¶
- CASUAL = 4¶
- FASTING = 3¶
- POSTPRANDIAL = 2¶
- PREPRANDIAL = 1¶
- class src.bluetooth_sig.gatt.characteristics.glucose_measurement_context.MedicationResult¶
Bases:
msgspec.StructMedication information parsing result.
- medication_id: MedicationType | None¶
- class src.bluetooth_sig.gatt.characteristics.glucose_measurement_context.MedicationType¶
Bases:
enum.IntEnumMedication type enumeration as per Bluetooth SIG specification.
- INTERMEDIATE_ACTING_INSULIN = 3¶
- LONG_ACTING_INSULIN = 4¶
- PRE_MIXED_INSULIN = 5¶
- RAPID_ACTING_INSULIN = 1¶
- SHORT_ACTING_INSULIN = 2¶
- class src.bluetooth_sig.gatt.characteristics.glucose_measurement_context.TesterHealthResult¶
Bases:
msgspec.StructTester and health information parsing result.
- health: HealthType | None¶
- tester: GlucoseTester | None¶
- src.bluetooth_sig.gatt.characteristics.glucose_measurement_context.logger¶