import { type DataViewReader } from "./data-view-reader.js"; import { type DateTime } from "./date-time.js"; import { type TemperatureType } from "./temperature-type.js"; /** *
The Temperature Measurement characteristic is a variable length structure containing a Flags field, a Temperature Measurement Value field and, based upon the contents of the Flags field, optionally a Time Stamp field and/or a Temperature Type field.
*If the value of bit 1 of the Flags field is 0 and bit 2 is 0, the structure of the Temperature Measurement characteristic consists of two fields in this order; Flags and Temperature Measurement Value.
*If the value of bit 1 of the Flags field is 1 (Time Stamp) and bit 2 is 0, the structure of the Temperature Measurement characteristic consists of three fields in this order: Flags, Temperature Measurement Value and Time Stamp.
*If the value of bit 1 of the Flags field is 1 and bit 2 is 1 (Time Stamp and Temperature Type), the structure of the Temperature Measurement characteristic consists of four fields in this order: Flags, Temperature Measurement Value, Time Stamp and Temperature Type.
*If the value of bit 1 of the Flags field is 0 and bit 2 is 1 (Temperature Type), the structure of the Temperature Measurement characteristic consists of three fields in this order: Flags, Temperature Measurement Value and Temperature Type.
*The flags is the first field sent followed by the Temperature Measurement Value.
*The fields in the above table are in the order of LSO to MSO. Where LSO = Least Significant Octet and MSO = Most Significant Octet.
*/ export interface TemperatureMeasurement { /** *Format: `8bit`
* * Bit field: * * | index | size | req | name | * | ----- | ---- | ------ | ----------------------- | * | 0 | 1 | C1, C2 | Temperature Units Flag | * | 1 | 1 | C3 | Time Stamp Flag | * | 2 | 1 | C4 | Temperature Type Flag | * | 0 | 0 | | Reserved for future use | * */ flags: number; /** *Format: `FLOAT`
*Unit: `org.bluetooth.unit.thermodynamic_temperature.degree_celsius`
*This field is only included if the flags bit 0 is 0.
*/ temperatureMeasurementValueCelsius?: number | undefined; /** *Format: `FLOAT`
*Unit: `org.bluetooth.unit.thermodynamic_temperature.degree_fahrenheit`
*This field is only included if the flags bit 0 is 1.
*/ temperatureMeasurementValueFahrenheit?: number | undefined; /**If the flags bit 2 is set to 1 this field is included. If it is 0, this field is not included
*/ temperatureType?: TemperatureType | undefined; /**If the flags bit 1 is 1 this field is included. If it is 0, this field is not included
*/ timeStamp?: DateTime | undefined; } /** @see {@link https://raw.githubusercontent.com/oesmith/gatt-xml/refs/heads/master/org.bluetooth.characteristic.temperature_measurement.xml | Temperature Measurement} */ export declare class TemperatureMeasurementImpl implements TemperatureMeasurement { static readonly UUID_PREFIX = 10780; static readonly TYPE_NAME = "org.bluetooth.characteristic.temperature_measurement"; static readonly NAME = "Temperature Measurement"; /** Parse from a DataView into {@link TemperatureMeasurement}. */ static fromDataView(dataView: DataView | DataViewReader, indexStart?: number | undefined): TemperatureMeasurementImpl; readonly flags: number; readonly temperatureMeasurementValueCelsius?: number | undefined; readonly temperatureMeasurementValueFahrenheit?: number | undefined; readonly temperatureType?: TemperatureType | undefined; readonly timeStamp?: DateTime | undefined; constructor(temperatureMeasurement: TemperatureMeasurement); } /** Parse from a DataView into {@link TemperatureMeasurement}. */ export declare function temperatureMeasurementFromDataView(dataView: DataView | DataViewReader, indexStart?: number): TemperatureMeasurement; //# sourceMappingURL=temperature-measurement.d.ts.map