blatann.services.glucose.data_types module
- class blatann.services.glucose.data_types.GlucoseConcentrationUnits(value)
Bases:
IntEnumThe concentration units available for reporting glucose levels
- kg_per_liter = 0
- mol_per_liter = 1
- class blatann.services.glucose.data_types.GlucoseType(value)
Bases:
IntEnumThe glucose types available
- capillary_whole_blood = 1
- capillary_plasma = 2
- venous_whole_blood = 3
- venous_plasma = 4
- arterial_whole_blood = 5
- arterial_plasma = 6
- undetermined_whole_blood = 7
- undetermined_plasma = 8
- interstitial_fluid = 9
- control_solution = 10
- class blatann.services.glucose.data_types.SampleLocation(value)
Bases:
IntEnumLocation which the blood sample was taken
- finger = 1
- alternate_test_site = 2
- earlobe = 3
- control_solution = 4
- unknown = 15
- class blatann.services.glucose.data_types.MedicationUnits(value)
Bases:
IntEnumAvailable units to report medication values in
- milligrams = 0
- milliliters = 1
- class blatann.services.glucose.data_types.CarbohydrateType(value)
Bases:
IntEnumThe type of carbohydrate consumed by the user
- breakfast = 1
- lunch = 2
- dinner = 3
- snack = 4
- drink = 5
- supper = 6
- brunch = 7
- class blatann.services.glucose.data_types.MealType(value)
Bases:
IntEnumThe type of meal consumed
- preprandial = 1
- postprandial = 2
- fasting = 3
- casual = 4
- bedtime = 5
- class blatann.services.glucose.data_types.TesterType(value)
Bases:
IntEnumInformation about who tested the glucose levels
- self = 1
- health_care_professional = 2
- lab_test = 3
- not_available = 15
- class blatann.services.glucose.data_types.HealthStatus(value)
Bases:
IntEnumCurrent health status of the user
- minor_issues = 1
- major_issues = 2
- during_menses = 3
- under_stress = 4
- normal = 5
- not_available = 15
- class blatann.services.glucose.data_types.MedicationType(value)
Bases:
IntEnumMedication type consumed
- rapid_acting_insulin = 1
- short_acting_insulin = 2
- intermediate_acting_insulin = 3
- long_acting_insulin = 4
- premixed_insulin = 5
- class blatann.services.glucose.data_types.SensorStatusType(value)
Bases:
IntEnumThe types of sensor statuses that can be communicated
- battery_low = 0
- sensor_malfunction = 1
- sample_size_insufficient = 2
- strip_insertion_error = 3
- incorrect_strip_type = 4
- result_above_range = 5
- result_below_range = 6
- sensor_temp_high = 7
- sensor_temp_low = 8
- sensor_read_interrupted = 9
- general_device_fault = 10
- time_fault = 11
- class blatann.services.glucose.data_types.SensorStatus(*sensor_statuses)
Bases:
BitfieldClass which holds the current sensor status information
- bitfield_width = 16
- bitfield_enum
alias of
SensorStatusType
- class blatann.services.glucose.data_types.GlucoseFeatureType(value)
Bases:
IntEnumEnumeration of the supported feature types to be reported using the Feature characteristic
- low_battery_detection = 0
- sensor_malfunction_detection = 1
- sensor_sample_size = 2
- strip_insertion_error_detection = 3
- strip_type_error_detection = 4
- sensor_result_high_low_detection = 5
- sensor_temp_high_low_detection = 6
- sensor_read_interrupt_detection = 7
- general_device_fault = 8
- time_fault = 9
- multiple_bond = 10
- class blatann.services.glucose.data_types.GlucoseFeatures(*supported_features)
Bases:
BitfieldClass which holds the features of the glucose sensor and is reported to over bluetooth. This is the class used for the Feature characteristic.
- bitfield_width = 16
- bitfield_enum
alias of
GlucoseFeatureType
- class blatann.services.glucose.data_types.GlucoseSample(glucose_type, sample_location, value, units=GlucoseConcentrationUnits.kg_per_liter)
Bases:
BleCompoundDataTypeHolds the info about a glucose sample to be reported through the Glucose Measurement characteristic
- encode()
- Return type:
- class blatann.services.glucose.data_types.GlucoseMeasurement(sequence_number, measurement_time, time_offset_minutes=None, sample=None, sensor_status=None, context=None)
Bases:
BleCompoundDataTypeRepresents a single measurement taken and can be reported over BLE
- encode()
- Return type:
- class blatann.services.glucose.data_types.CarbsInfo(carbs_grams, carb_type)
Bases:
BleCompoundDataTypeHolds information about the carbs consumed
- encode()
- Return type:
- class blatann.services.glucose.data_types.ExerciseInfo(duration_seconds, intensity_percent)
Bases:
BleCompoundDataTypeHolds information about the exercise performed with the glucose sample
- EXERCISE_DURATION_OVERRUN = 65535
- encode()
- Return type:
- class blatann.services.glucose.data_types.MedicationInfo(med_type, med_value, med_units=MedicationUnits.milligrams)
Bases:
BleCompoundDataTypeHolds information about the medication administered
- encode()
- Return type:
- class blatann.services.glucose.data_types.GlucoseContext(sequence_number, carbs=None, meal_type=None, tester=None, health_status=None, exercise=None, medication=None, hba1c_percent=None, extra_flags=None)
Bases:
BleCompoundDataTypeClass which holds the extra glucose context data associated with the glucose measurement
- encode()
- Return type:
- classmethod decode(stream)