import { type DataViewReader } from "./data-view-reader.js"; /**
The Glucose Measurement Context characteristic is a variable length structure containing a Flags field, a Sequence Number field and, based upon the contents of the Flags field, may contain a Carbohydrate ID field, Carbohydrate field, Meal field, Tester-Health field, Exercise Duration field, Exercise Intensity field, Medication ID field, Medication field and a HbA1c field.
*/ export interface GlucoseMeasurementContext { /** *Format: `uint8`
*C2: Field exists if the key of bit 0 of the Flags field is set to 1
* | Key | Description | * | --- | ----------------------- | * | 0 | Reserved for future use | * | 1 | Breakfast | * | 2 | Lunch | * | 3 | Dinner | * | 4 | Snack | * | 5 | Drink | * | 6 | Supper | * | 7 | Brunch | * *Reserved for future use: 8 to 255
*/ carbohydrateID?: number | undefined; /** *Format: `SFLOAT`
*Unit: `org.bluetooth.unit.mass.kilogram`
*C2: Field exists if the key of bit 0 of the Flags field is set to 1
*/ carbohydrateUnitsOfKilograms?: number | undefined; /** *Format: `uint16`
*Unit: `org.bluetooth.unit.time.second`
*C5: Field exists if the key of bit 3 of the Flags field is set to 1
* | Key | Description | * | ----- | ----------- | * | 65535 | Overrun | * */ exerciseDuration?: number | undefined; /** *Format: `uint8`
*Unit: `org.bluetooth.unit.percentage`
*C5: Field exists if the key of bit 3 of the Flags field is set to 1
*/ exerciseIntensity?: number | undefined; /** *Format: `8bit`
*C1: Field exists if the key of bit 7 of the Flags field is set to 1
* * Bit field: * * | index | size | name | * | ----- | ---- | ----------------------- | * | 0 | 8 | Reserved for future use | * */ extendedFlags?: number | undefined; /** *Format: `8bit`
*These flags define which data fields are present in the Characteristic value
* * Bit field: * * | index | size | req | name | * | ----- | ---- | ------ | ------------------------------------------------ | * | 0 | 1 | C2 | Carbohydrate ID And Carbohydrate Present | * | 1 | 1 | C3 | Meal Present | * | 2 | 1 | C4 | Tester-Health Present | * | 3 | 1 | C5 | Exercise Duration And Exercise Intensity Present | * | 4 | 1 | C6 | Medication ID And Medication Present | * | 5 | 1 | C8, C9 | Medication Value Units | * | 6 | 1 | C7 | HbA1c Present | * | 7 | 1 | C1 | Extended Flags Present | * */ flags: number; /** *Format: `SFLOAT`
*Unit: `org.bluetooth.unit.percentage`
*C7: Field exists if the key of bit 6 of the Flags field is set to 1
*/ hba1c?: number | undefined; /** *Format: `nibble`
*C4: Field exists if the key of bit 2 of the Flags field is set to 1
* | Key | Description | * | --- | -------------------------- | * | 0 | Reserved for future use | * | 1 | Minor health issues | * | 2 | Major health issues | * | 3 | During menses | * | 4 | Under stress | * | 5 | No health issues | * | 15 | Health value not available | * *Reserved for future use: 6 to 14
*/ health?: number | undefined; /** *Format: `uint8`
*C3: Field exists if the key of bit 1 of the Flags field is set to 1
* | Key | Description | * | --- | ----------------------------- | * | 0 | Reserved for future use | * | 1 | Preprandial (before meal) | * | 2 | Postprandial (after meal) | * | 3 | Fasting | * | 4 | Casual (snacks, drinks, etc.) | * | 5 | Bedtime | * *Reserved for future use: 6 to 255
*/ meal?: number | undefined; /** *Format: `uint8`
*C6: Field exists if the key of bit 4 of the Flags field is set to 1
* | Key | Description | * | --- | --------------------------- | * | 0 | Reserved for future use | * | 1 | Rapid acting insulin | * | 2 | Short acting insulin | * | 3 | Intermediate acting insulin | * | 4 | Long acting insulin | * | 5 | Pre-mixed insulin | * *Reserved for future use: 6 to 255
*/ medicationID?: number | undefined; /** *Format: `SFLOAT`
*Unit: `org.bluetooth.unit.mass.kilogram`
*C6: Field exists if the key of bit 4 of the Flags field is set to 1, C8: Field exists if the key of bit 5 of the Flags field is set to 0
*/ medicationUnitsOfKilograms?: number | undefined; /** *Format: `SFLOAT`
*Unit: `org.bluetooth.unit.volume.litre`
*C6: Field exists if the key of bit 4 of the Flags field is set to 1, C9: Field exists if the key of bit 5 of the Flags field is set to 1
*/ medicationUnitsOfLiters?: number | undefined; /**Format: `uint16`
*/ sequenceNumber: number; /** *Format: `nibble`
*C4: Field exists if the key of bit 2 of the Flags field is set to 1
* | Key | Description | * | --- | -------------------------- | * | 0 | Reserved for future use | * | 1 | Self | * | 2 | Health Care Professional | * | 3 | Lab test | * | 15 | Tester value not available | * *Reserved for future use: 4 to 14
*/ tester?: number | undefined; } /** * Where fields with the format ?nibble? have been defined in the above table, the fields are shown in the order of Least Significant Nibble first, when reading the table from top to bottom. Where the characteristic definition contains two adjacent nibbles and the service specification has defined that that pair of nibbles comprise a single octet, the Least Significant Nibble means the four bits numbered 0, 1, 2 and 3 of the octet and the Most Significant Nibble means the four bits numbered 4, 5, 6 and 7 of that octet. * @see {@link https://raw.githubusercontent.com/oesmith/gatt-xml/refs/heads/master/org.bluetooth.characteristic.glucose_measurement_context.xml | Glucose Measurement Context} */ export declare class GlucoseMeasurementContextImpl implements GlucoseMeasurementContext { static readonly UUID_PREFIX = 10804; static readonly TYPE_NAME = "org.bluetooth.characteristic.glucose_measurement_context"; static readonly NAME = "Glucose Measurement Context"; /** Parse from a DataView into {@link GlucoseMeasurementContext}. */ static fromDataView(dataView: DataView | DataViewReader, indexStart?: number | undefined): GlucoseMeasurementContextImpl; readonly carbohydrateID?: number | undefined; readonly carbohydrateUnitsOfKilograms?: number | undefined; readonly exerciseDuration?: number | undefined; readonly exerciseIntensity?: number | undefined; readonly extendedFlags?: number | undefined; readonly flags: number; readonly hba1c?: number | undefined; readonly health?: number | undefined; readonly meal?: number | undefined; readonly medicationID?: number | undefined; readonly medicationUnitsOfKilograms?: number | undefined; readonly medicationUnitsOfLiters?: number | undefined; readonly sequenceNumber: number; readonly tester?: number | undefined; constructor(glucoseMeasurementContext: GlucoseMeasurementContext); } /** Parse from a DataView into {@link GlucoseMeasurementContext}. */ export declare function glucoseMeasurementContextFromDataView(dataView: DataView | DataViewReader, indexStart?: number): GlucoseMeasurementContext; //# sourceMappingURL=glucose-measurement-context.d.ts.map