@rickosborne/bluetools 2025.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2624 -0
- package/assigned.cjs +577 -0
- package/assigned.cjs.map +6 -0
- package/assigned.d.ts +552 -0
- package/assigned.d.ts.map +1 -0
- package/assigned.mjs +557 -0
- package/assigned.mjs.map +6 -0
- package/battery-level.cjs +50 -0
- package/battery-level.cjs.map +6 -0
- package/battery-level.d.ts +25 -0
- package/battery-level.d.ts.map +1 -0
- package/battery-level.mjs +31 -0
- package/battery-level.mjs.map +6 -0
- package/cross-trainer-data.cjs +188 -0
- package/cross-trainer-data.cjs.map +6 -0
- package/cross-trainer-data.d.ts +192 -0
- package/cross-trainer-data.d.ts.map +1 -0
- package/cross-trainer-data.mjs +169 -0
- package/cross-trainer-data.mjs.map +6 -0
- package/csc-feature.cjs +59 -0
- package/csc-feature.cjs.map +6 -0
- package/csc-feature.d.ts +55 -0
- package/csc-feature.d.ts.map +1 -0
- package/csc-feature.mjs +40 -0
- package/csc-feature.mjs.map +6 -0
- package/csc-measurement.cjs +76 -0
- package/csc-measurement.cjs.map +6 -0
- package/csc-measurement.d.ts +57 -0
- package/csc-measurement.d.ts.map +1 -0
- package/csc-measurement.mjs +57 -0
- package/csc-measurement.mjs.map +6 -0
- package/current-time.cjs +66 -0
- package/current-time.cjs.map +6 -0
- package/current-time.d.ts +65 -0
- package/current-time.d.ts.map +1 -0
- package/current-time.mjs +47 -0
- package/current-time.mjs.map +6 -0
- package/data-view-from-hex.cjs +34 -0
- package/data-view-from-hex.cjs.map +6 -0
- package/data-view-from-hex.d.ts +6 -0
- package/data-view-from-hex.d.ts.map +1 -0
- package/data-view-from-hex.mjs +15 -0
- package/data-view-from-hex.mjs.map +6 -0
- package/data-view-reader.cjs +115 -0
- package/data-view-reader.cjs.map +6 -0
- package/data-view-reader.d.ts +21 -0
- package/data-view-reader.d.ts.map +1 -0
- package/data-view-reader.mjs +96 -0
- package/data-view-reader.mjs.map +6 -0
- package/date-time.cjs +65 -0
- package/date-time.cjs.map +6 -0
- package/date-time.d.ts +89 -0
- package/date-time.d.ts.map +1 -0
- package/date-time.mjs +46 -0
- package/date-time.mjs.map +6 -0
- package/day-date-time.cjs +55 -0
- package/day-date-time.cjs.map +6 -0
- package/day-date-time.d.ts +21 -0
- package/day-date-time.d.ts.map +1 -0
- package/day-date-time.mjs +36 -0
- package/day-date-time.mjs.map +6 -0
- package/day-of-week.cjs +50 -0
- package/day-of-week.cjs.map +6 -0
- package/day-of-week.d.ts +33 -0
- package/day-of-week.d.ts.map +1 -0
- package/day-of-week.mjs +31 -0
- package/day-of-week.mjs.map +6 -0
- package/dst-offset.cjs +50 -0
- package/dst-offset.cjs.map +6 -0
- package/dst-offset.d.ts +30 -0
- package/dst-offset.d.ts.map +1 -0
- package/dst-offset.mjs +31 -0
- package/dst-offset.mjs.map +6 -0
- package/elevation.cjs +50 -0
- package/elevation.cjs.map +6 -0
- package/elevation.d.ts +22 -0
- package/elevation.d.ts.map +1 -0
- package/elevation.mjs +31 -0
- package/elevation.mjs.map +6 -0
- package/exact-time-256.cjs +54 -0
- package/exact-time-256.cjs.map +6 -0
- package/exact-time-256.d.ts +27 -0
- package/exact-time-256.d.ts.map +1 -0
- package/exact-time-256.mjs +35 -0
- package/exact-time-256.mjs.map +6 -0
- package/firmware-revision-string.cjs +50 -0
- package/firmware-revision-string.cjs.map +6 -0
- package/firmware-revision-string.d.ts +19 -0
- package/firmware-revision-string.d.ts.map +1 -0
- package/firmware-revision-string.mjs +31 -0
- package/firmware-revision-string.mjs.map +6 -0
- package/five-zone-heart-rate-limits.cjs +59 -0
- package/five-zone-heart-rate-limits.cjs.map +6 -0
- package/five-zone-heart-rate-limits.d.ts +47 -0
- package/five-zone-heart-rate-limits.d.ts.map +1 -0
- package/five-zone-heart-rate-limits.mjs +40 -0
- package/five-zone-heart-rate-limits.mjs.map +6 -0
- package/gatt-characteristic-presentation-format.cjs +62 -0
- package/gatt-characteristic-presentation-format.cjs.map +6 -0
- package/gatt-characteristic-presentation-format.d.ts +91 -0
- package/gatt-characteristic-presentation-format.d.ts.map +1 -0
- package/gatt-characteristic-presentation-format.mjs +43 -0
- package/gatt-characteristic-presentation-format.mjs.map +6 -0
- package/gatt.cjs +57 -0
- package/gatt.cjs.map +6 -0
- package/gatt.d.ts +4 -0
- package/gatt.d.ts.map +1 -0
- package/gatt.mjs +38 -0
- package/gatt.mjs.map +6 -0
- package/glucose-feature.cjs +83 -0
- package/glucose-feature.cjs.map +6 -0
- package/glucose-feature.d.ts +127 -0
- package/glucose-feature.d.ts.map +1 -0
- package/glucose-feature.mjs +64 -0
- package/glucose-feature.mjs.map +6 -0
- package/glucose-measurement-context.cjs +133 -0
- package/glucose-measurement-context.cjs.map +6 -0
- package/glucose-measurement-context.d.ts +183 -0
- package/glucose-measurement-context.d.ts.map +1 -0
- package/glucose-measurement-context.mjs +114 -0
- package/glucose-measurement-context.mjs.map +6 -0
- package/glucose-measurement.cjs +136 -0
- package/glucose-measurement.cjs.map +6 -0
- package/glucose-measurement.d.ts +230 -0
- package/glucose-measurement.d.ts.map +1 -0
- package/glucose-measurement.mjs +117 -0
- package/glucose-measurement.mjs.map +6 -0
- package/hardware-revision-string.cjs +50 -0
- package/hardware-revision-string.cjs.map +6 -0
- package/hardware-revision-string.d.ts +19 -0
- package/hardware-revision-string.d.ts.map +1 -0
- package/hardware-revision-string.mjs +31 -0
- package/hardware-revision-string.mjs.map +6 -0
- package/heart-rate-control-point.cjs +50 -0
- package/heart-rate-control-point.cjs.map +6 -0
- package/heart-rate-control-point.d.ts +26 -0
- package/heart-rate-control-point.d.ts.map +1 -0
- package/heart-rate-control-point.mjs +31 -0
- package/heart-rate-control-point.mjs.map +6 -0
- package/heart-rate-max.cjs +50 -0
- package/heart-rate-max.cjs.map +6 -0
- package/heart-rate-max.d.ts +23 -0
- package/heart-rate-max.d.ts.map +1 -0
- package/heart-rate-max.mjs +31 -0
- package/heart-rate-max.mjs.map +6 -0
- package/heart-rate-measurement.cjs +79 -0
- package/heart-rate-measurement.cjs.map +6 -0
- package/heart-rate-measurement.d.ts +65 -0
- package/heart-rate-measurement.d.ts.map +1 -0
- package/heart-rate-measurement.mjs +60 -0
- package/heart-rate-measurement.mjs.map +6 -0
- package/heart-rate.cjs +58 -0
- package/heart-rate.cjs.map +6 -0
- package/heart-rate.d.ts +7 -0
- package/heart-rate.d.ts.map +1 -0
- package/heart-rate.mjs +39 -0
- package/heart-rate.mjs.map +6 -0
- package/index.cjs +84 -0
- package/index.cjs.map +6 -0
- package/index.d.ts +67 -0
- package/index.d.ts.map +1 -0
- package/index.mjs +67 -0
- package/index.mjs.map +6 -0
- package/indoor-bike-data.cjs +153 -0
- package/indoor-bike-data.cjs.map +6 -0
- package/indoor-bike-data.d.ts +146 -0
- package/indoor-bike-data.d.ts.map +1 -0
- package/indoor-bike-data.mjs +134 -0
- package/indoor-bike-data.mjs.map +6 -0
- package/language.cjs +50 -0
- package/language.cjs.map +6 -0
- package/language.d.ts +22 -0
- package/language.d.ts.map +1 -0
- package/language.mjs +31 -0
- package/language.mjs.map +6 -0
- package/latitude.cjs +50 -0
- package/latitude.cjs.map +6 -0
- package/latitude.d.ts +19 -0
- package/latitude.d.ts.map +1 -0
- package/latitude.mjs +31 -0
- package/latitude.mjs.map +6 -0
- package/local-time-information.cjs +55 -0
- package/local-time-information.cjs.map +6 -0
- package/local-time-information.d.ts +21 -0
- package/local-time-information.d.ts.map +1 -0
- package/local-time-information.mjs +36 -0
- package/local-time-information.mjs.map +6 -0
- package/location-and-speed.cjs +114 -0
- package/location-and-speed.cjs.map +6 -0
- package/location-and-speed.d.ts +182 -0
- package/location-and-speed.d.ts.map +1 -0
- package/location-and-speed.mjs +95 -0
- package/location-and-speed.mjs.map +6 -0
- package/location-name.cjs +50 -0
- package/location-name.cjs.map +6 -0
- package/location-name.d.ts +19 -0
- package/location-name.d.ts.map +1 -0
- package/location-name.mjs +31 -0
- package/location-name.mjs.map +6 -0
- package/longitude.cjs +50 -0
- package/longitude.cjs.map +6 -0
- package/longitude.d.ts +19 -0
- package/longitude.d.ts.map +1 -0
- package/longitude.mjs +31 -0
- package/longitude.mjs.map +6 -0
- package/manufacturer-name-string.cjs +50 -0
- package/manufacturer-name-string.cjs.map +6 -0
- package/manufacturer-name-string.d.ts +19 -0
- package/manufacturer-name-string.d.ts.map +1 -0
- package/manufacturer-name-string.mjs +31 -0
- package/manufacturer-name-string.mjs.map +6 -0
- package/maximum-recommended-heart-rate.cjs +50 -0
- package/maximum-recommended-heart-rate.cjs.map +6 -0
- package/maximum-recommended-heart-rate.d.ts +23 -0
- package/maximum-recommended-heart-rate.d.ts.map +1 -0
- package/maximum-recommended-heart-rate.mjs +31 -0
- package/maximum-recommended-heart-rate.mjs.map +6 -0
- package/measurement-interval.cjs +50 -0
- package/measurement-interval.cjs.map +6 -0
- package/measurement-interval.d.ts +27 -0
- package/measurement-interval.d.ts.map +1 -0
- package/measurement-interval.mjs +31 -0
- package/measurement-interval.mjs.map +6 -0
- package/model-number-string.cjs +50 -0
- package/model-number-string.cjs.map +6 -0
- package/model-number-string.d.ts +19 -0
- package/model-number-string.d.ts.map +1 -0
- package/model-number-string.mjs +31 -0
- package/model-number-string.mjs.map +6 -0
- package/navigation.cjs +90 -0
- package/navigation.cjs.map +6 -0
- package/navigation.d.ts +134 -0
- package/navigation.d.ts.map +1 -0
- package/navigation.mjs +71 -0
- package/navigation.mjs.map +6 -0
- package/number-of-digitals.cjs +50 -0
- package/number-of-digitals.cjs.map +6 -0
- package/number-of-digitals.d.ts +19 -0
- package/number-of-digitals.d.ts.map +1 -0
- package/number-of-digitals.mjs +31 -0
- package/number-of-digitals.mjs.map +6 -0
- package/package.json +456 -0
- package/plx-continuous-measurement.cjs +184 -0
- package/plx-continuous-measurement.cjs.map +6 -0
- package/plx-continuous-measurement.d.ts +352 -0
- package/plx-continuous-measurement.d.ts.map +1 -0
- package/plx-continuous-measurement.mjs +165 -0
- package/plx-continuous-measurement.mjs.map +6 -0
- package/plx-features.cjs +163 -0
- package/plx-features.cjs.map +6 -0
- package/plx-features.d.ts +354 -0
- package/plx-features.d.ts.map +1 -0
- package/plx-features.mjs +144 -0
- package/plx-features.mjs.map +6 -0
- package/plx-spot-check-measurement.cjs +169 -0
- package/plx-spot-check-measurement.cjs.map +6 -0
- package/plx-spot-check-measurement.d.ts +334 -0
- package/plx-spot-check-measurement.d.ts.map +1 -0
- package/plx-spot-check-measurement.mjs +150 -0
- package/plx-spot-check-measurement.mjs.map +6 -0
- package/reference-time-information.cjs +61 -0
- package/reference-time-information.cjs.map +6 -0
- package/reference-time-information.d.ts +38 -0
- package/reference-time-information.d.ts.map +1 -0
- package/reference-time-information.mjs +42 -0
- package/reference-time-information.mjs.map +6 -0
- package/resting-heart-rate.cjs +50 -0
- package/resting-heart-rate.cjs.map +6 -0
- package/resting-heart-rate.d.ts +23 -0
- package/resting-heart-rate.d.ts.map +1 -0
- package/resting-heart-rate.mjs +31 -0
- package/resting-heart-rate.mjs.map +6 -0
- package/rsc-feature.cjs +65 -0
- package/rsc-feature.cjs.map +6 -0
- package/rsc-feature.d.ts +73 -0
- package/rsc-feature.d.ts.map +1 -0
- package/rsc-feature.mjs +46 -0
- package/rsc-feature.mjs.map +6 -0
- package/rsc-measurement.cjs +73 -0
- package/rsc-measurement.cjs.map +6 -0
- package/rsc-measurement.d.ts +70 -0
- package/rsc-measurement.d.ts.map +1 -0
- package/rsc-measurement.mjs +54 -0
- package/rsc-measurement.mjs.map +6 -0
- package/scripts/fetch-and-cache-text.d.ts +2 -0
- package/scripts/fetch-and-cache-text.d.ts.map +1 -0
- package/scripts/from-xml.d.ts +2 -0
- package/scripts/from-xml.d.ts.map +1 -0
- package/scripts/gatt-assigned.d.ts +2 -0
- package/scripts/gatt-assigned.d.ts.map +1 -0
- package/sensor-location.cjs +50 -0
- package/sensor-location.cjs.map +6 -0
- package/sensor-location.d.ts +42 -0
- package/sensor-location.d.ts.map +1 -0
- package/sensor-location.mjs +31 -0
- package/sensor-location.mjs.map +6 -0
- package/serial-number-string.cjs +50 -0
- package/serial-number-string.cjs.map +6 -0
- package/serial-number-string.d.ts +19 -0
- package/serial-number-string.d.ts.map +1 -0
- package/serial-number-string.mjs +31 -0
- package/serial-number-string.mjs.map +6 -0
- package/software-revision-string.cjs +50 -0
- package/software-revision-string.cjs.map +6 -0
- package/software-revision-string.d.ts +19 -0
- package/software-revision-string.d.ts.map +1 -0
- package/software-revision-string.mjs +31 -0
- package/software-revision-string.mjs.map +6 -0
- package/supported-heart-rate-range.cjs +56 -0
- package/supported-heart-rate-range.cjs.map +6 -0
- package/supported-heart-rate-range.d.ts +37 -0
- package/supported-heart-rate-range.d.ts.map +1 -0
- package/supported-heart-rate-range.mjs +37 -0
- package/supported-heart-rate-range.mjs.map +6 -0
- package/supported-inclination-range.cjs +56 -0
- package/supported-inclination-range.cjs.map +6 -0
- package/supported-inclination-range.d.ts +37 -0
- package/supported-inclination-range.d.ts.map +1 -0
- package/supported-inclination-range.mjs +37 -0
- package/supported-inclination-range.mjs.map +6 -0
- package/supported-speed-range.cjs +56 -0
- package/supported-speed-range.cjs.map +6 -0
- package/supported-speed-range.d.ts +37 -0
- package/supported-speed-range.d.ts.map +1 -0
- package/supported-speed-range.mjs +37 -0
- package/supported-speed-range.mjs.map +6 -0
- package/system-id.cjs +53 -0
- package/system-id.cjs.map +6 -0
- package/system-id.d.ts +34 -0
- package/system-id.d.ts.map +1 -0
- package/system-id.mjs +34 -0
- package/system-id.mjs.map +6 -0
- package/temperature-measurement.cjs +79 -0
- package/temperature-measurement.cjs.map +6 -0
- package/temperature-measurement.d.ts +61 -0
- package/temperature-measurement.d.ts.map +1 -0
- package/temperature-measurement.mjs +60 -0
- package/temperature-measurement.mjs.map +6 -0
- package/temperature-type.cjs +50 -0
- package/temperature-type.cjs.map +6 -0
- package/temperature-type.d.ts +37 -0
- package/temperature-type.d.ts.map +1 -0
- package/temperature-type.mjs +31 -0
- package/temperature-type.mjs.map +6 -0
- package/temperature.cjs +50 -0
- package/temperature.cjs.map +6 -0
- package/temperature.d.ts +22 -0
- package/temperature.d.ts.map +1 -0
- package/temperature.mjs +31 -0
- package/temperature.mjs.map +6 -0
- package/three-zone-heart-rate-limits.cjs +53 -0
- package/three-zone-heart-rate-limits.cjs.map +6 -0
- package/three-zone-heart-rate-limits.d.ts +33 -0
- package/three-zone-heart-rate-limits.d.ts.map +1 -0
- package/three-zone-heart-rate-limits.mjs +34 -0
- package/three-zone-heart-rate-limits.mjs.map +6 -0
- package/time-accuracy.cjs +50 -0
- package/time-accuracy.cjs.map +6 -0
- package/time-accuracy.d.ts +23 -0
- package/time-accuracy.d.ts.map +1 -0
- package/time-accuracy.mjs +31 -0
- package/time-accuracy.mjs.map +6 -0
- package/time-source.cjs +50 -0
- package/time-source.cjs.map +6 -0
- package/time-source.d.ts +33 -0
- package/time-source.d.ts.map +1 -0
- package/time-source.mjs +31 -0
- package/time-source.mjs.map +6 -0
- package/time-update-control-point.cjs +50 -0
- package/time-update-control-point.cjs.map +6 -0
- package/time-update-control-point.d.ts +29 -0
- package/time-update-control-point.d.ts.map +1 -0
- package/time-update-control-point.mjs +31 -0
- package/time-update-control-point.mjs.map +6 -0
- package/time-update-state.cjs +53 -0
- package/time-update-state.cjs.map +6 -0
- package/time-update-state.d.ts +45 -0
- package/time-update-state.d.ts.map +1 -0
- package/time-update-state.mjs +34 -0
- package/time-update-state.mjs.map +6 -0
- package/time-with-dst.cjs +55 -0
- package/time-with-dst.cjs.map +6 -0
- package/time-with-dst.d.ts +21 -0
- package/time-with-dst.d.ts.map +1 -0
- package/time-with-dst.mjs +36 -0
- package/time-with-dst.mjs.map +6 -0
- package/time-zone.cjs +50 -0
- package/time-zone.cjs.map +6 -0
- package/time-zone.d.ts +23 -0
- package/time-zone.d.ts.map +1 -0
- package/time-zone.mjs +31 -0
- package/time-zone.mjs.map +6 -0
- package/treadmill-data.cjs +171 -0
- package/treadmill-data.cjs.map +6 -0
- package/treadmill-data.d.ts +167 -0
- package/treadmill-data.d.ts.map +1 -0
- package/treadmill-data.mjs +152 -0
- package/treadmill-data.mjs.map +6 -0
- package/two-zone-heart-rate-limit.cjs +50 -0
- package/two-zone-heart-rate-limit.cjs.map +6 -0
- package/two-zone-heart-rate-limit.d.ts +23 -0
- package/two-zone-heart-rate-limit.d.ts.map +1 -0
- package/two-zone-heart-rate-limit.mjs +31 -0
- package/two-zone-heart-rate-limit.mjs.map +6 -0
- package/vo2-max.cjs +50 -0
- package/vo2-max.cjs.map +6 -0
- package/vo2-max.d.ts +22 -0
- package/vo2-max.d.ts.map +1 -0
- package/vo2-max.mjs +31 -0
- package/vo2-max.mjs.map +6 -0
package/navigation.cjs
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22
|
+
var navigation_exports = {};
|
|
23
|
+
__export(navigation_exports, {
|
|
24
|
+
NavigationImpl: () => NavigationImpl,
|
|
25
|
+
navigationFromDataView: () => navigationFromDataView
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(navigation_exports);
|
|
28
|
+
var import_data_view_reader = require("./data-view-reader.cjs");
|
|
29
|
+
var import_date_time = require("./date-time.cjs");
|
|
30
|
+
const _NavigationImpl = class _NavigationImpl {
|
|
31
|
+
/** Parse from a DataView into {@link Navigation}. */
|
|
32
|
+
static fromDataView(dataView, indexStart) {
|
|
33
|
+
return new _NavigationImpl(navigationFromDataView(dataView, indexStart));
|
|
34
|
+
}
|
|
35
|
+
bearing;
|
|
36
|
+
destinationReached;
|
|
37
|
+
estimatedTimeOfArrival;
|
|
38
|
+
estimatedTimeOfArrivalPresent;
|
|
39
|
+
flags;
|
|
40
|
+
heading;
|
|
41
|
+
headingSource;
|
|
42
|
+
navigationIndicatorType;
|
|
43
|
+
positionStatus;
|
|
44
|
+
remainingDistance;
|
|
45
|
+
remainingDistancePresent;
|
|
46
|
+
remainingVerticalDistance;
|
|
47
|
+
remainingVerticalDistancePresent;
|
|
48
|
+
waypointReached;
|
|
49
|
+
constructor(navigation) {
|
|
50
|
+
this.bearing = navigation.bearing;
|
|
51
|
+
this.destinationReached = navigation.destinationReached;
|
|
52
|
+
this.estimatedTimeOfArrival = navigation.estimatedTimeOfArrival;
|
|
53
|
+
this.estimatedTimeOfArrivalPresent = navigation.estimatedTimeOfArrivalPresent;
|
|
54
|
+
this.flags = navigation.flags;
|
|
55
|
+
this.heading = navigation.heading;
|
|
56
|
+
this.headingSource = navigation.headingSource;
|
|
57
|
+
this.navigationIndicatorType = navigation.navigationIndicatorType;
|
|
58
|
+
this.positionStatus = navigation.positionStatus;
|
|
59
|
+
this.remainingDistance = navigation.remainingDistance;
|
|
60
|
+
this.remainingDistancePresent = navigation.remainingDistancePresent;
|
|
61
|
+
this.remainingVerticalDistance = navigation.remainingVerticalDistance;
|
|
62
|
+
this.remainingVerticalDistancePresent = navigation.remainingVerticalDistancePresent;
|
|
63
|
+
this.waypointReached = navigation.waypointReached;
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
__name(_NavigationImpl, "NavigationImpl");
|
|
67
|
+
__publicField(_NavigationImpl, "UUID_PREFIX", 10856);
|
|
68
|
+
__publicField(_NavigationImpl, "TYPE_NAME", "org.bluetooth.characteristic.navigation");
|
|
69
|
+
__publicField(_NavigationImpl, "NAME", "Navigation");
|
|
70
|
+
let NavigationImpl = _NavigationImpl;
|
|
71
|
+
function navigationFromDataView(dataView, indexStart = 0) {
|
|
72
|
+
const $dvr = (0, import_data_view_reader.dataViewReader)(dataView, indexStart);
|
|
73
|
+
const flags = $dvr.uint16();
|
|
74
|
+
const remainingDistancePresent = flags & 1;
|
|
75
|
+
const remainingVerticalDistancePresent = (flags & 2) >> 1;
|
|
76
|
+
const estimatedTimeOfArrivalPresent = (flags & 4) >> 2;
|
|
77
|
+
const positionStatus = (flags & 24) >> 3;
|
|
78
|
+
const headingSource = (flags & 32) >> 5;
|
|
79
|
+
const navigationIndicatorType = (flags & 64) >> 6;
|
|
80
|
+
const waypointReached = (flags & 128) >> 7;
|
|
81
|
+
const destinationReached = (flags & 256) >> 8;
|
|
82
|
+
const bearing = $dvr.uint16();
|
|
83
|
+
const heading = $dvr.uint16();
|
|
84
|
+
const remainingDistance = $dvr.uint24();
|
|
85
|
+
const remainingVerticalDistance = $dvr.int24();
|
|
86
|
+
const estimatedTimeOfArrival = import_date_time.DateTimeImpl.fromDataView($dvr);
|
|
87
|
+
return { bearing, destinationReached, estimatedTimeOfArrival, estimatedTimeOfArrivalPresent, flags, heading, headingSource, navigationIndicatorType, positionStatus, remainingDistance, remainingDistancePresent, remainingVerticalDistance, remainingVerticalDistancePresent, waypointReached };
|
|
88
|
+
}
|
|
89
|
+
__name(navigationFromDataView, "navigationFromDataView");
|
|
90
|
+
//# sourceMappingURL=navigation.cjs.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/packages/bluetools/navigation.ts"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8BAAoD;AACpD,uBAA4C;AAiHrC,MAAM,kBAAN,MAAM,gBAAqC;AAAA;AAAA,EAM9C,OAAc,aAAa,UAAqC,YAAiD;AAC7G,WAAO,IAAI,gBAAe,uBAAuB,UAAU,UAAU,CAAC;AAAA,EAC1E;AAAA,EAEgB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAET,YAAY,YAAwB;AACvC,SAAK,UAAU,WAAW;AAC1B,SAAK,qBAAqB,WAAW;AACrC,SAAK,yBAAyB,WAAW;AACzC,SAAK,gCAAgC,WAAW;AAChD,SAAK,QAAQ,WAAW;AACxB,SAAK,UAAU,WAAW;AAC1B,SAAK,gBAAgB,WAAW;AAChC,SAAK,0BAA0B,WAAW;AAC1C,SAAK,iBAAiB,WAAW;AACjC,SAAK,oBAAoB,WAAW;AACpC,SAAK,2BAA2B,WAAW;AAC3C,SAAK,4BAA4B,WAAW;AAC5C,SAAK,mCAAmC,WAAW;AACnD,SAAK,kBAAkB,WAAW;AAAA,EACtC;AACJ;AAzCkD;AAC9C,cADS,iBACc,eAAc;AACrC,cAFS,iBAEc,aAAY;AACnC,cAHS,iBAGc,QAAO;AAH3B,IAAM,iBAAN;AA4CA,SAAS,uBAAuB,UAAqC,aAAqB,GAAe;AAC5G,QAAM,WAAuB,wCAAe,UAAU,UAAU;AAChE,QAAM,QAAQ,KAAK,OAAO;AAO1B,QAAM,2BAA2B,QAAQ;AAOzC,QAAM,oCAAoC,QAAQ,MAA0B;AAO5E,QAAM,iCAAiC,QAAQ,MAA0B;AASzE,QAAM,kBAAkB,QAAQ,OAA0B;AAO1D,QAAM,iBAAiB,QAAQ,OAA0B;AAOzD,QAAM,2BAA2B,QAAQ,OAA0B;AAOnE,QAAM,mBAAmB,QAAQ,QAA0B;AAO3D,QAAM,sBAAsB,QAAQ,QAA0B;AAC9D,QAAM,UAAU,KAAK,OAAO;AAC5B,QAAM,UAAU,KAAK,OAAO;AAC5B,QAAM,oBAAoB,KAAK,OAAO;AACtC,QAAM,4BAA4B,KAAK,MAAM;AAC7C,QAAM,yBAAyB,8BAAa,aAAa,IAAI;AAC7D,SAAO,EAAE,SAAS,oBAAoB,wBAAwB,+BAA+B,OAAO,SAAS,eAAe,yBAAyB,gBAAgB,mBAAmB,0BAA0B,2BAA2B,kCAAkC,gBAAgB;AACnS;AAnEgB;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
package/navigation.d.ts
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { type DataViewReader } from "./data-view-reader.js";
|
|
2
|
+
import { type DateTime } from "./date-time.js";
|
|
3
|
+
/** <p>The Navigation characteristic is a variable length structure containing a Flags field, a Bearing field, a Heading field and, based on the contents of the Flags field, may contain a combination of data fields listed below.</p> */
|
|
4
|
+
export interface Navigation {
|
|
5
|
+
/**
|
|
6
|
+
* <p>Format: `uint16`</p>
|
|
7
|
+
* <p>Unit: `org.bluetooth.unit.plane_angle.degree`</p>
|
|
8
|
+
* <p>Unit is in degrees with a resolution of 1/100</p>
|
|
9
|
+
*/
|
|
10
|
+
bearing: number;
|
|
11
|
+
/**
|
|
12
|
+
* | value | description |
|
|
13
|
+
* | ----- | ----------- |
|
|
14
|
+
* | 0 | False |
|
|
15
|
+
* | 1 | True |
|
|
16
|
+
*/
|
|
17
|
+
destinationReached: number;
|
|
18
|
+
/** <p>Smallest units in seconds</p> */
|
|
19
|
+
estimatedTimeOfArrival?: DateTime | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* | value | description |
|
|
22
|
+
* | ----- | ----------- |
|
|
23
|
+
* | 0 | False |
|
|
24
|
+
* | 1 | True |
|
|
25
|
+
*/
|
|
26
|
+
estimatedTimeOfArrivalPresent: number;
|
|
27
|
+
/**
|
|
28
|
+
* <p>Format: `16bit`</p>
|
|
29
|
+
*
|
|
30
|
+
* Bit field:
|
|
31
|
+
*
|
|
32
|
+
* | index | size | name |
|
|
33
|
+
* | ----- | ---- | ----------------------------------- |
|
|
34
|
+
* | 0 | 1 | Remaining Distance Present |
|
|
35
|
+
* | 1 | 1 | Remaining Vertical Distance Present |
|
|
36
|
+
* | 2 | 1 | Estimated Time of Arrival Present |
|
|
37
|
+
* | 3 | 2 | Position Status |
|
|
38
|
+
* | 5 | 1 | Heading Source |
|
|
39
|
+
* | 6 | 1 | Navigation Indicator Type |
|
|
40
|
+
* | 7 | 1 | Waypoint Reached |
|
|
41
|
+
* | 8 | 1 | Destination Reached |
|
|
42
|
+
* | 9 | 7 | Reserved for future use |
|
|
43
|
+
*
|
|
44
|
+
*/
|
|
45
|
+
flags: number;
|
|
46
|
+
/**
|
|
47
|
+
* <p>Format: `uint16`</p>
|
|
48
|
+
* <p>Unit: `org.bluetooth.unit.plane_angle.degree`</p>
|
|
49
|
+
* <p>Unit is in degrees with a resolution of 1/100</p>
|
|
50
|
+
*/
|
|
51
|
+
heading: number;
|
|
52
|
+
/**
|
|
53
|
+
* | value | description |
|
|
54
|
+
* | ----- | --------------------------------- |
|
|
55
|
+
* | 0 | Heading based on movement |
|
|
56
|
+
* | 1 | Heading based on magnetic compass |
|
|
57
|
+
*/
|
|
58
|
+
headingSource: number;
|
|
59
|
+
/**
|
|
60
|
+
* | value | description |
|
|
61
|
+
* | ----- | -------------- |
|
|
62
|
+
* | 0 | To Waypoint |
|
|
63
|
+
* | 1 | To Destination |
|
|
64
|
+
*/
|
|
65
|
+
navigationIndicatorType: number;
|
|
66
|
+
/**
|
|
67
|
+
* | value | description |
|
|
68
|
+
* | ----- | ------------------- |
|
|
69
|
+
* | 0 | No Position |
|
|
70
|
+
* | 1 | Position Ok |
|
|
71
|
+
* | 2 | Estimated Position |
|
|
72
|
+
* | 3 | Last Known Position |
|
|
73
|
+
*/
|
|
74
|
+
positionStatus: number;
|
|
75
|
+
/**
|
|
76
|
+
* <p>Format: `uint24`</p>
|
|
77
|
+
* <p>Unit: `org.bluetooth.unit.length.meter`</p>
|
|
78
|
+
* <p>Unit is in meters with a resolution of 1/10</p>
|
|
79
|
+
*/
|
|
80
|
+
remainingDistance?: number | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* | value | description |
|
|
83
|
+
* | ----- | ----------- |
|
|
84
|
+
* | 0 | False |
|
|
85
|
+
* | 1 | True |
|
|
86
|
+
*/
|
|
87
|
+
remainingDistancePresent: number;
|
|
88
|
+
/**
|
|
89
|
+
* <p>Format: `sint24`</p>
|
|
90
|
+
* <p>Unit: `org.bluetooth.unit.length.meter`</p>
|
|
91
|
+
* <p>Unit is in meters with a resolution of 1/100</p>
|
|
92
|
+
*/
|
|
93
|
+
remainingVerticalDistance?: number | undefined;
|
|
94
|
+
/**
|
|
95
|
+
* | value | description |
|
|
96
|
+
* | ----- | ----------- |
|
|
97
|
+
* | 0 | False |
|
|
98
|
+
* | 1 | True |
|
|
99
|
+
*/
|
|
100
|
+
remainingVerticalDistancePresent: number;
|
|
101
|
+
/**
|
|
102
|
+
* | value | description |
|
|
103
|
+
* | ----- | ----------- |
|
|
104
|
+
* | 0 | False |
|
|
105
|
+
* | 1 | True |
|
|
106
|
+
*/
|
|
107
|
+
waypointReached: number;
|
|
108
|
+
}
|
|
109
|
+
/** @see {@link https://raw.githubusercontent.com/oesmith/gatt-xml/refs/heads/master/org.bluetooth.characteristic.navigation.xml | Navigation} */
|
|
110
|
+
export declare class NavigationImpl implements Navigation {
|
|
111
|
+
static readonly UUID_PREFIX = 10856;
|
|
112
|
+
static readonly TYPE_NAME = "org.bluetooth.characteristic.navigation";
|
|
113
|
+
static readonly NAME = "Navigation";
|
|
114
|
+
/** Parse from a DataView into {@link Navigation}. */
|
|
115
|
+
static fromDataView(dataView: DataView | DataViewReader, indexStart?: number | undefined): NavigationImpl;
|
|
116
|
+
readonly bearing: number;
|
|
117
|
+
readonly destinationReached: number;
|
|
118
|
+
readonly estimatedTimeOfArrival?: DateTime | undefined;
|
|
119
|
+
readonly estimatedTimeOfArrivalPresent: number;
|
|
120
|
+
readonly flags: number;
|
|
121
|
+
readonly heading: number;
|
|
122
|
+
readonly headingSource: number;
|
|
123
|
+
readonly navigationIndicatorType: number;
|
|
124
|
+
readonly positionStatus: number;
|
|
125
|
+
readonly remainingDistance?: number | undefined;
|
|
126
|
+
readonly remainingDistancePresent: number;
|
|
127
|
+
readonly remainingVerticalDistance?: number | undefined;
|
|
128
|
+
readonly remainingVerticalDistancePresent: number;
|
|
129
|
+
readonly waypointReached: number;
|
|
130
|
+
constructor(navigation: Navigation);
|
|
131
|
+
}
|
|
132
|
+
/** Parse from a DataView into {@link Navigation}. */
|
|
133
|
+
export declare function navigationFromDataView(dataView: DataView | DataViewReader, indexStart?: number): Navigation;
|
|
134
|
+
//# sourceMappingURL=navigation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../../src/packages/bluetools/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAkB,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAAE,KAAK,QAAQ,EAAgB,MAAM,gBAAgB,CAAC;AAK7D,2OAA2O;AAC3O,MAAM,WAAW,UAAU;IACvB;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAC3B,uCAAuC;IACvC,sBAAsB,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC9C;;;;;OAKG;IACH,6BAA6B,EAAE,MAAM,CAAC;IACtC;;;;;;;;;;;;;;;;;OAiBG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;;;;OAKG;IACH,uBAAuB,EAAE,MAAM,CAAC;IAChC;;;;;;;OAOG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC;;;;;OAKG;IACH,wBAAwB,EAAE,MAAM,CAAC;IACjC;;;;OAIG;IACH,yBAAyB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/C;;;;;OAKG;IACH,gCAAgC,EAAE,MAAM,CAAC;IACzC;;;;;OAKG;IACH,eAAe,EAAE,MAAM,CAAC;CAC3B;AAED,iJAAiJ;AACjJ,qBAAa,cAAe,YAAW,UAAU;IAC7C,gBAAuB,WAAW,SAAU;IAC5C,gBAAuB,SAAS,6CAA6C;IAC7E,gBAAuB,IAAI,gBAAgB;IAE3C,qDAAqD;WACvC,YAAY,CAAC,QAAQ,EAAE,QAAQ,GAAG,cAAc,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,cAAc;IAIhH,SAAgB,OAAO,EAAE,MAAM,CAAC;IAChC,SAAgB,kBAAkB,EAAE,MAAM,CAAC;IAC3C,SAAgB,sBAAsB,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC9D,SAAgB,6BAA6B,EAAE,MAAM,CAAC;IACtD,SAAgB,KAAK,EAAE,MAAM,CAAC;IAC9B,SAAgB,OAAO,EAAE,MAAM,CAAC;IAChC,SAAgB,aAAa,EAAE,MAAM,CAAC;IACtC,SAAgB,uBAAuB,EAAE,MAAM,CAAC;IAChD,SAAgB,cAAc,EAAE,MAAM,CAAC;IACvC,SAAgB,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACvD,SAAgB,wBAAwB,EAAE,MAAM,CAAC;IACjD,SAAgB,yBAAyB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/D,SAAgB,gCAAgC,EAAE,MAAM,CAAC;IACzD,SAAgB,eAAe,EAAE,MAAM,CAAC;gBAErB,UAAU,EAAE,UAAU;CAgB5C;AAED,qDAAqD;AACrD,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,QAAQ,GAAG,cAAc,EAAE,UAAU,GAAE,MAAU,GAAG,UAAU,CAmE9G"}
|
package/navigation.mjs
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
4
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
+
import { dataViewReader } from "./data-view-reader.mjs";
|
|
6
|
+
import { DateTimeImpl } from "./date-time.mjs";
|
|
7
|
+
const _NavigationImpl = class _NavigationImpl {
|
|
8
|
+
/** Parse from a DataView into {@link Navigation}. */
|
|
9
|
+
static fromDataView(dataView, indexStart) {
|
|
10
|
+
return new _NavigationImpl(navigationFromDataView(dataView, indexStart));
|
|
11
|
+
}
|
|
12
|
+
bearing;
|
|
13
|
+
destinationReached;
|
|
14
|
+
estimatedTimeOfArrival;
|
|
15
|
+
estimatedTimeOfArrivalPresent;
|
|
16
|
+
flags;
|
|
17
|
+
heading;
|
|
18
|
+
headingSource;
|
|
19
|
+
navigationIndicatorType;
|
|
20
|
+
positionStatus;
|
|
21
|
+
remainingDistance;
|
|
22
|
+
remainingDistancePresent;
|
|
23
|
+
remainingVerticalDistance;
|
|
24
|
+
remainingVerticalDistancePresent;
|
|
25
|
+
waypointReached;
|
|
26
|
+
constructor(navigation) {
|
|
27
|
+
this.bearing = navigation.bearing;
|
|
28
|
+
this.destinationReached = navigation.destinationReached;
|
|
29
|
+
this.estimatedTimeOfArrival = navigation.estimatedTimeOfArrival;
|
|
30
|
+
this.estimatedTimeOfArrivalPresent = navigation.estimatedTimeOfArrivalPresent;
|
|
31
|
+
this.flags = navigation.flags;
|
|
32
|
+
this.heading = navigation.heading;
|
|
33
|
+
this.headingSource = navigation.headingSource;
|
|
34
|
+
this.navigationIndicatorType = navigation.navigationIndicatorType;
|
|
35
|
+
this.positionStatus = navigation.positionStatus;
|
|
36
|
+
this.remainingDistance = navigation.remainingDistance;
|
|
37
|
+
this.remainingDistancePresent = navigation.remainingDistancePresent;
|
|
38
|
+
this.remainingVerticalDistance = navigation.remainingVerticalDistance;
|
|
39
|
+
this.remainingVerticalDistancePresent = navigation.remainingVerticalDistancePresent;
|
|
40
|
+
this.waypointReached = navigation.waypointReached;
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
__name(_NavigationImpl, "NavigationImpl");
|
|
44
|
+
__publicField(_NavigationImpl, "UUID_PREFIX", 10856);
|
|
45
|
+
__publicField(_NavigationImpl, "TYPE_NAME", "org.bluetooth.characteristic.navigation");
|
|
46
|
+
__publicField(_NavigationImpl, "NAME", "Navigation");
|
|
47
|
+
let NavigationImpl = _NavigationImpl;
|
|
48
|
+
function navigationFromDataView(dataView, indexStart = 0) {
|
|
49
|
+
const $dvr = dataViewReader(dataView, indexStart);
|
|
50
|
+
const flags = $dvr.uint16();
|
|
51
|
+
const remainingDistancePresent = flags & 1;
|
|
52
|
+
const remainingVerticalDistancePresent = (flags & 2) >> 1;
|
|
53
|
+
const estimatedTimeOfArrivalPresent = (flags & 4) >> 2;
|
|
54
|
+
const positionStatus = (flags & 24) >> 3;
|
|
55
|
+
const headingSource = (flags & 32) >> 5;
|
|
56
|
+
const navigationIndicatorType = (flags & 64) >> 6;
|
|
57
|
+
const waypointReached = (flags & 128) >> 7;
|
|
58
|
+
const destinationReached = (flags & 256) >> 8;
|
|
59
|
+
const bearing = $dvr.uint16();
|
|
60
|
+
const heading = $dvr.uint16();
|
|
61
|
+
const remainingDistance = $dvr.uint24();
|
|
62
|
+
const remainingVerticalDistance = $dvr.int24();
|
|
63
|
+
const estimatedTimeOfArrival = DateTimeImpl.fromDataView($dvr);
|
|
64
|
+
return { bearing, destinationReached, estimatedTimeOfArrival, estimatedTimeOfArrivalPresent, flags, heading, headingSource, navigationIndicatorType, positionStatus, remainingDistance, remainingDistancePresent, remainingVerticalDistance, remainingVerticalDistancePresent, waypointReached };
|
|
65
|
+
}
|
|
66
|
+
__name(navigationFromDataView, "navigationFromDataView");
|
|
67
|
+
export {
|
|
68
|
+
NavigationImpl,
|
|
69
|
+
navigationFromDataView
|
|
70
|
+
};
|
|
71
|
+
//# sourceMappingURL=navigation.mjs.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/packages/bluetools/navigation.ts"],
|
|
4
|
+
"mappings": ";;;;AAAA,SAA8B,sBAAsB;AACpD,SAAwB,oBAAoB;AAiHrC,MAAM,kBAAN,MAAM,gBAAqC;AAAA;AAAA,EAM9C,OAAc,aAAa,UAAqC,YAAiD;AAC7G,WAAO,IAAI,gBAAe,uBAAuB,UAAU,UAAU,CAAC;AAAA,EAC1E;AAAA,EAEgB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAET,YAAY,YAAwB;AACvC,SAAK,UAAU,WAAW;AAC1B,SAAK,qBAAqB,WAAW;AACrC,SAAK,yBAAyB,WAAW;AACzC,SAAK,gCAAgC,WAAW;AAChD,SAAK,QAAQ,WAAW;AACxB,SAAK,UAAU,WAAW;AAC1B,SAAK,gBAAgB,WAAW;AAChC,SAAK,0BAA0B,WAAW;AAC1C,SAAK,iBAAiB,WAAW;AACjC,SAAK,oBAAoB,WAAW;AACpC,SAAK,2BAA2B,WAAW;AAC3C,SAAK,4BAA4B,WAAW;AAC5C,SAAK,mCAAmC,WAAW;AACnD,SAAK,kBAAkB,WAAW;AAAA,EACtC;AACJ;AAzCkD;AAC9C,cADS,iBACc,eAAc;AACrC,cAFS,iBAEc,aAAY;AACnC,cAHS,iBAGc,QAAO;AAH3B,IAAM,iBAAN;AA4CA,SAAS,uBAAuB,UAAqC,aAAqB,GAAe;AAC5G,QAAM,OAAuB,eAAe,UAAU,UAAU;AAChE,QAAM,QAAQ,KAAK,OAAO;AAO1B,QAAM,2BAA2B,QAAQ;AAOzC,QAAM,oCAAoC,QAAQ,MAA0B;AAO5E,QAAM,iCAAiC,QAAQ,MAA0B;AASzE,QAAM,kBAAkB,QAAQ,OAA0B;AAO1D,QAAM,iBAAiB,QAAQ,OAA0B;AAOzD,QAAM,2BAA2B,QAAQ,OAA0B;AAOnE,QAAM,mBAAmB,QAAQ,QAA0B;AAO3D,QAAM,sBAAsB,QAAQ,QAA0B;AAC9D,QAAM,UAAU,KAAK,OAAO;AAC5B,QAAM,UAAU,KAAK,OAAO;AAC5B,QAAM,oBAAoB,KAAK,OAAO;AACtC,QAAM,4BAA4B,KAAK,MAAM;AAC7C,QAAM,yBAAyB,aAAa,aAAa,IAAI;AAC7D,SAAO,EAAE,SAAS,oBAAoB,wBAAwB,+BAA+B,OAAO,SAAS,eAAe,yBAAyB,gBAAgB,mBAAmB,0BAA0B,2BAA2B,kCAAkC,gBAAgB;AACnS;AAnEgB;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22
|
+
var number_of_digitals_exports = {};
|
|
23
|
+
__export(number_of_digitals_exports, {
|
|
24
|
+
NumberOfDigitalsImpl: () => NumberOfDigitalsImpl,
|
|
25
|
+
numberOfDigitalsFromDataView: () => numberOfDigitalsFromDataView
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(number_of_digitals_exports);
|
|
28
|
+
var import_data_view_reader = require("./data-view-reader.cjs");
|
|
29
|
+
const _NumberOfDigitalsImpl = class _NumberOfDigitalsImpl {
|
|
30
|
+
/** Parse from a DataView into {@link NumberOfDigitals}. */
|
|
31
|
+
static fromDataView(dataView, indexStart) {
|
|
32
|
+
return new _NumberOfDigitalsImpl(numberOfDigitalsFromDataView(dataView, indexStart));
|
|
33
|
+
}
|
|
34
|
+
noOfDigitals;
|
|
35
|
+
constructor(numberOfDigitals) {
|
|
36
|
+
this.noOfDigitals = numberOfDigitals.noOfDigitals;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
__name(_NumberOfDigitalsImpl, "NumberOfDigitalsImpl");
|
|
40
|
+
__publicField(_NumberOfDigitalsImpl, "UUID_PREFIX", 10505);
|
|
41
|
+
__publicField(_NumberOfDigitalsImpl, "TYPE_NAME", "org.bluetooth.descriptor.number_of_digitals");
|
|
42
|
+
__publicField(_NumberOfDigitalsImpl, "NAME", "Number of Digitals");
|
|
43
|
+
let NumberOfDigitalsImpl = _NumberOfDigitalsImpl;
|
|
44
|
+
function numberOfDigitalsFromDataView(dataView, indexStart = 0) {
|
|
45
|
+
const $dvr = (0, import_data_view_reader.dataViewReader)(dataView, indexStart);
|
|
46
|
+
const noOfDigitals = $dvr.uint8();
|
|
47
|
+
return { noOfDigitals };
|
|
48
|
+
}
|
|
49
|
+
__name(numberOfDigitalsFromDataView, "numberOfDigitalsFromDataView");
|
|
50
|
+
//# sourceMappingURL=number-of-digitals.cjs.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/packages/bluetools/number-of-digitals.ts"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8BAAoD;AAY7C,MAAM,wBAAN,MAAM,sBAAiD;AAAA;AAAA,EAM1D,OAAc,aAAa,UAAqC,YAAuD;AACnH,WAAO,IAAI,sBAAqB,6BAA6B,UAAU,UAAU,CAAC;AAAA,EACtF;AAAA,EAEgB;AAAA,EAET,YAAY,kBAAoC;AACnD,SAAK,eAAe,iBAAiB;AAAA,EACzC;AACJ;AAf8D;AAC1D,cADS,uBACc,eAAc;AACrC,cAFS,uBAEc,aAAY;AACnC,cAHS,uBAGc,QAAO;AAH3B,IAAM,uBAAN;AAkBA,SAAS,6BAA6B,UAAqC,aAAqB,GAAqB;AACxH,QAAM,WAAuB,wCAAe,UAAU,UAAU;AAChE,QAAM,eAAe,KAAK,MAAM;AAChC,SAAO,EAAE,aAAa;AAC1B;AAJgB;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type DataViewReader } from "./data-view-reader.js";
|
|
2
|
+
/** <p>The Characteristic Number of Digitals descriptor is used for defining the number of digitals in a characteristic.</p> */
|
|
3
|
+
export interface NumberOfDigitals {
|
|
4
|
+
/** <p>Format: `uint8`</p> */
|
|
5
|
+
noOfDigitals: number;
|
|
6
|
+
}
|
|
7
|
+
/** @see {@link https://raw.githubusercontent.com/oesmith/gatt-xml/refs/heads/master/org.bluetooth.descriptor.number_of_digitals.xml | Number Of Digitals} */
|
|
8
|
+
export declare class NumberOfDigitalsImpl implements NumberOfDigitals {
|
|
9
|
+
static readonly UUID_PREFIX = 10505;
|
|
10
|
+
static readonly TYPE_NAME = "org.bluetooth.descriptor.number_of_digitals";
|
|
11
|
+
static readonly NAME = "Number of Digitals";
|
|
12
|
+
/** Parse from a DataView into {@link NumberOfDigitals}. */
|
|
13
|
+
static fromDataView(dataView: DataView | DataViewReader, indexStart?: number | undefined): NumberOfDigitalsImpl;
|
|
14
|
+
readonly noOfDigitals: number;
|
|
15
|
+
constructor(numberOfDigitals: NumberOfDigitals);
|
|
16
|
+
}
|
|
17
|
+
/** Parse from a DataView into {@link NumberOfDigitals}. */
|
|
18
|
+
export declare function numberOfDigitalsFromDataView(dataView: DataView | DataViewReader, indexStart?: number): NumberOfDigitals;
|
|
19
|
+
//# sourceMappingURL=number-of-digitals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"number-of-digitals.d.ts","sourceRoot":"","sources":["../../../src/packages/bluetools/number-of-digitals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAkB,MAAM,uBAAuB,CAAC;AAK5E,+HAA+H;AAC/H,MAAM,WAAW,gBAAgB;IAC7B,6BAA6B;IAC7B,YAAY,EAAE,MAAM,CAAC;CACxB;AAED,6JAA6J;AAC7J,qBAAa,oBAAqB,YAAW,gBAAgB;IACzD,gBAAuB,WAAW,SAAU;IAC5C,gBAAuB,SAAS,iDAAiD;IACjF,gBAAuB,IAAI,wBAAwB;IAEnD,2DAA2D;WAC7C,YAAY,CAAC,QAAQ,EAAE,QAAQ,GAAG,cAAc,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,oBAAoB;IAItH,SAAgB,YAAY,EAAE,MAAM,CAAC;gBAElB,gBAAgB,EAAE,gBAAgB;CAGxD;AAED,2DAA2D;AAC3D,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,QAAQ,GAAG,cAAc,EAAE,UAAU,GAAE,MAAU,GAAG,gBAAgB,CAI1H"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
4
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
+
import { dataViewReader } from "./data-view-reader.mjs";
|
|
6
|
+
const _NumberOfDigitalsImpl = class _NumberOfDigitalsImpl {
|
|
7
|
+
/** Parse from a DataView into {@link NumberOfDigitals}. */
|
|
8
|
+
static fromDataView(dataView, indexStart) {
|
|
9
|
+
return new _NumberOfDigitalsImpl(numberOfDigitalsFromDataView(dataView, indexStart));
|
|
10
|
+
}
|
|
11
|
+
noOfDigitals;
|
|
12
|
+
constructor(numberOfDigitals) {
|
|
13
|
+
this.noOfDigitals = numberOfDigitals.noOfDigitals;
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
__name(_NumberOfDigitalsImpl, "NumberOfDigitalsImpl");
|
|
17
|
+
__publicField(_NumberOfDigitalsImpl, "UUID_PREFIX", 10505);
|
|
18
|
+
__publicField(_NumberOfDigitalsImpl, "TYPE_NAME", "org.bluetooth.descriptor.number_of_digitals");
|
|
19
|
+
__publicField(_NumberOfDigitalsImpl, "NAME", "Number of Digitals");
|
|
20
|
+
let NumberOfDigitalsImpl = _NumberOfDigitalsImpl;
|
|
21
|
+
function numberOfDigitalsFromDataView(dataView, indexStart = 0) {
|
|
22
|
+
const $dvr = dataViewReader(dataView, indexStart);
|
|
23
|
+
const noOfDigitals = $dvr.uint8();
|
|
24
|
+
return { noOfDigitals };
|
|
25
|
+
}
|
|
26
|
+
__name(numberOfDigitalsFromDataView, "numberOfDigitalsFromDataView");
|
|
27
|
+
export {
|
|
28
|
+
NumberOfDigitalsImpl,
|
|
29
|
+
numberOfDigitalsFromDataView
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=number-of-digitals.mjs.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/packages/bluetools/number-of-digitals.ts"],
|
|
4
|
+
"mappings": ";;;;AAAA,SAA8B,sBAAsB;AAY7C,MAAM,wBAAN,MAAM,sBAAiD;AAAA;AAAA,EAM1D,OAAc,aAAa,UAAqC,YAAuD;AACnH,WAAO,IAAI,sBAAqB,6BAA6B,UAAU,UAAU,CAAC;AAAA,EACtF;AAAA,EAEgB;AAAA,EAET,YAAY,kBAAoC;AACnD,SAAK,eAAe,iBAAiB;AAAA,EACzC;AACJ;AAf8D;AAC1D,cADS,uBACc,eAAc;AACrC,cAFS,uBAEc,aAAY;AACnC,cAHS,uBAGc,QAAO;AAH3B,IAAM,uBAAN;AAkBA,SAAS,6BAA6B,UAAqC,aAAqB,GAAqB;AACxH,QAAM,OAAuB,eAAe,UAAU,UAAU;AAChE,QAAM,eAAe,KAAK,MAAM;AAChC,SAAO,EAAE,aAAa;AAC1B;AAJgB;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|