@ovok/native 1.17.0-dev.2215 → 1.17.0-dev.2219
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/lib/commonjs/modules/next/bluetooth/adapters/android-foreground-service.js +58 -5
- package/lib/commonjs/modules/next/bluetooth/adapters/android-foreground-service.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/adapters/ecg-measurements.js +25 -0
- package/lib/commonjs/modules/next/bluetooth/adapters/ecg-measurements.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/adapters/live-supersession.js +62 -0
- package/lib/commonjs/modules/next/bluetooth/adapters/live-supersession.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/adapters/ovok-outbox-watch.js +42 -0
- package/lib/commonjs/modules/next/bluetooth/adapters/ovok-outbox-watch.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/adapters/ovok-reading-sink.js +97 -96
- package/lib/commonjs/modules/next/bluetooth/adapters/ovok-reading-sink.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/adapters/reading-source-id.js +33 -0
- package/lib/commonjs/modules/next/bluetooth/adapters/reading-source-id.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/adapters/reading-values.js +38 -0
- package/lib/commonjs/modules/next/bluetooth/adapters/reading-values.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/adapters/series-saving.js +101 -0
- package/lib/commonjs/modules/next/bluetooth/adapters/series-saving.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/adapters/sqlite-database.js +24 -0
- package/lib/commonjs/modules/next/bluetooth/adapters/sqlite-database.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/adapters/sqlite-outbox-rows.js +65 -0
- package/lib/commonjs/modules/next/bluetooth/adapters/sqlite-outbox-rows.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/adapters/sqlite-outbox-schema.js +53 -0
- package/lib/commonjs/modules/next/bluetooth/adapters/sqlite-outbox-schema.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/adapters/sqlite-outbox-store.js +82 -0
- package/lib/commonjs/modules/next/bluetooth/adapters/sqlite-outbox-store.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/adapters/storage-paired-devices.js +1 -0
- package/lib/commonjs/modules/next/bluetooth/adapters/storage-paired-devices.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/core/bluetooth.js +9 -3
- package/lib/commonjs/modules/next/bluetooth/core/bluetooth.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/core/device-deps.js +6 -0
- package/lib/commonjs/modules/next/bluetooth/core/device-deps.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/core/device-snapshot.js +3 -1
- package/lib/commonjs/modules/next/bluetooth/core/device-snapshot.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/core/device.js +19 -6
- package/lib/commonjs/modules/next/bluetooth/core/device.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/core/live-ledger.js +54 -0
- package/lib/commonjs/modules/next/bluetooth/core/live-ledger.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/core/measuring-watch.js +45 -0
- package/lib/commonjs/modules/next/bluetooth/core/measuring-watch.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/core/outbox-watch.js +17 -0
- package/lib/commonjs/modules/next/bluetooth/core/outbox-watch.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/core/paired-device.js +1 -0
- package/lib/commonjs/modules/next/bluetooth/core/paired-device.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/core/ports.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/core/reading-log.js +89 -7
- package/lib/commonjs/modules/next/bluetooth/core/reading-log.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/core/series-slots.js +94 -0
- package/lib/commonjs/modules/next/bluetooth/core/series-slots.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/core/stream-recorder.js +219 -0
- package/lib/commonjs/modules/next/bluetooth/core/stream-recorder.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/core/waveform-segments.js +110 -0
- package/lib/commonjs/modules/next/bluetooth/core/waveform-segments.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/create-bluetooth.js +19 -11
- package/lib/commonjs/modules/next/bluetooth/create-bluetooth.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/index.js +9 -1
- package/lib/commonjs/modules/next/bluetooth/index.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/shared.js +14 -0
- package/lib/commonjs/modules/next/bluetooth/shared.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/web/create-web-bluetooth.js +2 -0
- package/lib/commonjs/modules/next/bluetooth/web/create-web-bluetooth.js.map +1 -1
- package/lib/module/modules/next/bluetooth/adapters/android-foreground-service.js +59 -6
- package/lib/module/modules/next/bluetooth/adapters/android-foreground-service.js.map +1 -1
- package/lib/module/modules/next/bluetooth/adapters/ecg-measurements.js +22 -0
- package/lib/module/modules/next/bluetooth/adapters/ecg-measurements.js.map +1 -0
- package/lib/module/modules/next/bluetooth/adapters/live-supersession.js +59 -0
- package/lib/module/modules/next/bluetooth/adapters/live-supersession.js.map +1 -0
- package/lib/module/modules/next/bluetooth/adapters/ovok-outbox-watch.js +38 -0
- package/lib/module/modules/next/bluetooth/adapters/ovok-outbox-watch.js.map +1 -0
- package/lib/module/modules/next/bluetooth/adapters/ovok-reading-sink.js +76 -75
- package/lib/module/modules/next/bluetooth/adapters/ovok-reading-sink.js.map +1 -1
- package/lib/module/modules/next/bluetooth/adapters/reading-source-id.js +27 -0
- package/lib/module/modules/next/bluetooth/adapters/reading-source-id.js.map +1 -0
- package/lib/module/modules/next/bluetooth/adapters/reading-values.js +33 -0
- package/lib/module/modules/next/bluetooth/adapters/reading-values.js.map +1 -0
- package/lib/module/modules/next/bluetooth/adapters/series-saving.js +94 -0
- package/lib/module/modules/next/bluetooth/adapters/series-saving.js.map +1 -0
- package/lib/module/modules/next/bluetooth/adapters/sqlite-database.js +20 -0
- package/lib/module/modules/next/bluetooth/adapters/sqlite-database.js.map +1 -0
- package/lib/module/modules/next/bluetooth/adapters/sqlite-outbox-rows.js +59 -0
- package/lib/module/modules/next/bluetooth/adapters/sqlite-outbox-rows.js.map +1 -0
- package/lib/module/modules/next/bluetooth/adapters/sqlite-outbox-schema.js +49 -0
- package/lib/module/modules/next/bluetooth/adapters/sqlite-outbox-schema.js.map +1 -0
- package/lib/module/modules/next/bluetooth/adapters/sqlite-outbox-store.js +79 -0
- package/lib/module/modules/next/bluetooth/adapters/sqlite-outbox-store.js.map +1 -0
- package/lib/module/modules/next/bluetooth/adapters/storage-paired-devices.js +1 -0
- package/lib/module/modules/next/bluetooth/adapters/storage-paired-devices.js.map +1 -1
- package/lib/module/modules/next/bluetooth/core/bluetooth.js +9 -3
- package/lib/module/modules/next/bluetooth/core/bluetooth.js.map +1 -1
- package/lib/module/modules/next/bluetooth/core/device-deps.js +4 -0
- package/lib/module/modules/next/bluetooth/core/device-deps.js.map +1 -0
- package/lib/module/modules/next/bluetooth/core/device-snapshot.js +3 -1
- package/lib/module/modules/next/bluetooth/core/device-snapshot.js.map +1 -1
- package/lib/module/modules/next/bluetooth/core/device.js +19 -6
- package/lib/module/modules/next/bluetooth/core/device.js.map +1 -1
- package/lib/module/modules/next/bluetooth/core/live-ledger.js +50 -0
- package/lib/module/modules/next/bluetooth/core/live-ledger.js.map +1 -0
- package/lib/module/modules/next/bluetooth/core/measuring-watch.js +41 -0
- package/lib/module/modules/next/bluetooth/core/measuring-watch.js.map +1 -0
- package/lib/module/modules/next/bluetooth/core/outbox-watch.js +14 -0
- package/lib/module/modules/next/bluetooth/core/outbox-watch.js.map +1 -0
- package/lib/module/modules/next/bluetooth/core/paired-device.js +1 -0
- package/lib/module/modules/next/bluetooth/core/paired-device.js.map +1 -1
- package/lib/module/modules/next/bluetooth/core/ports.js.map +1 -1
- package/lib/module/modules/next/bluetooth/core/reading-log.js +89 -7
- package/lib/module/modules/next/bluetooth/core/reading-log.js.map +1 -1
- package/lib/module/modules/next/bluetooth/core/series-slots.js +90 -0
- package/lib/module/modules/next/bluetooth/core/series-slots.js.map +1 -0
- package/lib/module/modules/next/bluetooth/core/stream-recorder.js +215 -0
- package/lib/module/modules/next/bluetooth/core/stream-recorder.js.map +1 -0
- package/lib/module/modules/next/bluetooth/core/waveform-segments.js +106 -0
- package/lib/module/modules/next/bluetooth/core/waveform-segments.js.map +1 -0
- package/lib/module/modules/next/bluetooth/create-bluetooth.js +19 -11
- package/lib/module/modules/next/bluetooth/create-bluetooth.js.map +1 -1
- package/lib/module/modules/next/bluetooth/index.js +1 -0
- package/lib/module/modules/next/bluetooth/index.js.map +1 -1
- package/lib/module/modules/next/bluetooth/shared.js +2 -0
- package/lib/module/modules/next/bluetooth/shared.js.map +1 -1
- package/lib/module/modules/next/bluetooth/web/create-web-bluetooth.js +2 -0
- package/lib/module/modules/next/bluetooth/web/create-web-bluetooth.js.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/android-foreground-service.d.ts +17 -4
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/android-foreground-service.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/ecg-measurements.d.ts +6 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/ecg-measurements.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/live-supersession.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/live-supersession.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/ovok-outbox-watch.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/ovok-outbox-watch.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/ovok-reading-sink.d.ts +9 -3
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/ovok-reading-sink.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/reading-source-id.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/reading-source-id.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/reading-values.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/reading-values.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/series-saving.d.ts +28 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/series-saving.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/sqlite-database.d.ts +23 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/sqlite-database.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/sqlite-outbox-rows.d.ts +29 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/sqlite-outbox-rows.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/sqlite-outbox-schema.d.ts +6 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/sqlite-outbox-schema.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/sqlite-outbox-store.d.ts +38 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/sqlite-outbox-store.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/storage-paired-devices.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/bluetooth-options.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/bluetooth-options.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/bluetooth.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/device-deps.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/device-deps.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/device-snapshot.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/device-snapshot.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/device.d.ts +6 -13
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/live-ledger.d.ts +13 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/live-ledger.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/measuring-watch.d.ts +17 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/measuring-watch.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/outbox-watch.d.ts +27 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/outbox-watch.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/paired-device.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/paired-device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/ports.d.ts +3 -2
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/ports.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/reading-log.d.ts +25 -6
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/reading-log.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/reading.d.ts +16 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/reading.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/series-slots.d.ts +35 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/series-slots.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/stream-recorder.d.ts +58 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/stream-recorder.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/waveform-segments.d.ts +26 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/waveform-segments.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/create-bluetooth.d.ts +3 -2
- package/lib/typescript/commonjs/src/modules/next/bluetooth/create-bluetooth.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/index.d.ts +4 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/shared.d.ts +5 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/shared.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/create-web-bluetooth.d.ts +3 -2
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/create-web-bluetooth.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/android-foreground-service.d.ts +17 -4
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/android-foreground-service.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/ecg-measurements.d.ts +6 -0
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/ecg-measurements.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/live-supersession.d.ts +9 -0
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/live-supersession.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/ovok-outbox-watch.d.ts +8 -0
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/ovok-outbox-watch.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/ovok-reading-sink.d.ts +9 -3
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/ovok-reading-sink.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/reading-source-id.d.ts +9 -0
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/reading-source-id.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/reading-values.d.ts +9 -0
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/reading-values.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/series-saving.d.ts +28 -0
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/series-saving.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/sqlite-database.d.ts +23 -0
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/sqlite-database.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/sqlite-outbox-rows.d.ts +29 -0
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/sqlite-outbox-rows.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/sqlite-outbox-schema.d.ts +6 -0
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/sqlite-outbox-schema.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/sqlite-outbox-store.d.ts +38 -0
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/sqlite-outbox-store.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/storage-paired-devices.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/core/bluetooth-options.d.ts +3 -0
- package/lib/typescript/module/src/modules/next/bluetooth/core/bluetooth-options.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/core/bluetooth.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/core/device-deps.d.ts +16 -0
- package/lib/typescript/module/src/modules/next/bluetooth/core/device-deps.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/core/device-snapshot.d.ts +5 -0
- package/lib/typescript/module/src/modules/next/bluetooth/core/device-snapshot.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/core/device.d.ts +6 -13
- package/lib/typescript/module/src/modules/next/bluetooth/core/device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/core/live-ledger.d.ts +13 -0
- package/lib/typescript/module/src/modules/next/bluetooth/core/live-ledger.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/core/measuring-watch.d.ts +17 -0
- package/lib/typescript/module/src/modules/next/bluetooth/core/measuring-watch.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/core/outbox-watch.d.ts +27 -0
- package/lib/typescript/module/src/modules/next/bluetooth/core/outbox-watch.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/core/paired-device.d.ts +3 -1
- package/lib/typescript/module/src/modules/next/bluetooth/core/paired-device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/core/ports.d.ts +3 -2
- package/lib/typescript/module/src/modules/next/bluetooth/core/ports.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/core/reading-log.d.ts +25 -6
- package/lib/typescript/module/src/modules/next/bluetooth/core/reading-log.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/core/reading.d.ts +16 -1
- package/lib/typescript/module/src/modules/next/bluetooth/core/reading.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/core/series-slots.d.ts +35 -0
- package/lib/typescript/module/src/modules/next/bluetooth/core/series-slots.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/core/stream-recorder.d.ts +58 -0
- package/lib/typescript/module/src/modules/next/bluetooth/core/stream-recorder.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/core/waveform-segments.d.ts +26 -0
- package/lib/typescript/module/src/modules/next/bluetooth/core/waveform-segments.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/create-bluetooth.d.ts +3 -2
- package/lib/typescript/module/src/modules/next/bluetooth/create-bluetooth.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/index.d.ts +4 -1
- package/lib/typescript/module/src/modules/next/bluetooth/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/shared.d.ts +5 -1
- package/lib/typescript/module/src/modules/next/bluetooth/shared.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/web/create-web-bluetooth.d.ts +3 -2
- package/lib/typescript/module/src/modules/next/bluetooth/web/create-web-bluetooth.d.ts.map +1 -1
- package/package.json +7 -3
|
@@ -10,7 +10,9 @@ var _deviceSnapshot = require("./device-snapshot.js");
|
|
|
10
10
|
var _errors = require("./errors.js");
|
|
11
11
|
var _listeners = require("./listeners.js");
|
|
12
12
|
var _liveStream = require("./live-stream.js");
|
|
13
|
+
var _measuringWatch = require("./measuring-watch.js");
|
|
13
14
|
var _recordReads = require("./record-reads.js");
|
|
15
|
+
var _streamRecorder = require("./stream-recorder.js");
|
|
14
16
|
const unsupported = what => new _errors.DeviceError("unsupported", `This device has no ${what}`);
|
|
15
17
|
|
|
16
18
|
/** One paired device: it owns the link, queues every action on it, and reconnects when a press needs it. */
|
|
@@ -18,10 +20,15 @@ class Device {
|
|
|
18
20
|
events = new _listeners.Listeners();
|
|
19
21
|
queue = Promise.resolve();
|
|
20
22
|
unacknowledged = new Set();
|
|
23
|
+
measuring = new _measuringWatch.MeasuringWatch(measuringSince => this.patch({
|
|
24
|
+
measuringSince
|
|
25
|
+
}), () => this.deps.now());
|
|
21
26
|
liveStream = new _liveStream.LiveStream({
|
|
22
|
-
onRunning: live => this.patch({
|
|
27
|
+
onRunning: live => live ? this.patch({
|
|
23
28
|
live
|
|
24
|
-
}),
|
|
29
|
+
}) : (this.measuring.stop(), this.patch({
|
|
30
|
+
live
|
|
31
|
+
})),
|
|
25
32
|
onError: lastError => this.patch({
|
|
26
33
|
lastError
|
|
27
34
|
})
|
|
@@ -48,6 +55,8 @@ class Device {
|
|
|
48
55
|
},
|
|
49
56
|
advertisement: () => this.latestAdvertisement
|
|
50
57
|
});
|
|
58
|
+
this.recorder = deps.sink && new _streamRecorder.StreamRecorder(this, deps.sink, deps);
|
|
59
|
+
this.recorder?.follow(this.events);
|
|
51
60
|
}
|
|
52
61
|
|
|
53
62
|
/** The address its record is stored under. */
|
|
@@ -76,7 +85,7 @@ class Device {
|
|
|
76
85
|
/** Sets the device's clock to now. */
|
|
77
86
|
setClock = () => this.run("setClock", connection => this.deps.protocol.setClock?.(connection, this.deps.now()) ?? Promise.reject(unsupported("clock")));
|
|
78
87
|
|
|
79
|
-
/** Starts `live` and `waveform` events, which
|
|
88
|
+
/** Starts `live` and `waveform` events, which the device also records and saves while its `record` setting is on. */
|
|
80
89
|
startLive = () => this.run("live", async connection => this.beginLive(connection));
|
|
81
90
|
|
|
82
91
|
/** Stops the stream and waits until the device has stopped sending. */
|
|
@@ -85,6 +94,7 @@ class Device {
|
|
|
85
94
|
/** Moves the cursor past a record once the app saved it, so the next sync skips it. */
|
|
86
95
|
acknowledge = async recordId => {
|
|
87
96
|
if (this.unacknowledged.delete(recordId)) {
|
|
97
|
+
this.recorder?.acknowledged(recordId);
|
|
88
98
|
await this.addToCursor(recordId);
|
|
89
99
|
}
|
|
90
100
|
};
|
|
@@ -95,7 +105,7 @@ class Device {
|
|
|
95
105
|
this.patch({});
|
|
96
106
|
};
|
|
97
107
|
|
|
98
|
-
/** Changes and stores whether it syncs by itself
|
|
108
|
+
/** Changes and stores whether it syncs by itself, stays connected in the background, and records what it streams. */
|
|
99
109
|
configure = settings => this.updateRecord(settings);
|
|
100
110
|
|
|
101
111
|
/** Stops live, waits for queued actions, then closes the link. */
|
|
@@ -235,7 +245,7 @@ class Device {
|
|
|
235
245
|
this.events.emit({
|
|
236
246
|
kind: "record",
|
|
237
247
|
reading: {
|
|
238
|
-
...decoded,
|
|
248
|
+
...(this.recorder?.supersede(recordId, decoded) ?? decoded),
|
|
239
249
|
source: {
|
|
240
250
|
modelId: model.id,
|
|
241
251
|
protocolId: protocol.id,
|
|
@@ -246,7 +256,10 @@ class Device {
|
|
|
246
256
|
});
|
|
247
257
|
}
|
|
248
258
|
beginLive(connection) {
|
|
249
|
-
const onFrame = frame =>
|
|
259
|
+
const onFrame = frame => {
|
|
260
|
+
this.measuring.frame();
|
|
261
|
+
(0, _deviceSnapshot.liveEventsOf)(frame).forEach(event => this.events.emit(event));
|
|
262
|
+
};
|
|
250
263
|
this.liveStream.start(signal => this.deps.protocol.live?.(connection, onFrame, signal) ?? Promise.resolve());
|
|
251
264
|
}
|
|
252
265
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_advertisement","require","_deviceLink","_deviceSnapshot","_errors","_listeners","_liveStream","_recordReads","unsupported","what","DeviceError","Device","events","Listeners","queue","Promise","resolve","unacknowledged","Set","liveStream","LiveStream","onRunning","live","patch","onError","lastError","constructor","record","deps","latestAdvertisement","snap","initialSnapshot","model","protocol","link","DeviceLink","address","onState","connection","onConnected","fields","updateRecord","lastConnectedAt","now","onDropped","abort","secret","read","write","advertisement","snapshot","stored","subscribe","listener","add","sync","run","syncAll","records","reject","fetch","recordId","fetchRecord","setClock","startLive","beginLive","stopLive","stop","acknowledge","delete","addToCursor","release","configure","settings","disconnect","close","pair","broadcast","seen","ad","lastSeenAt","rssi","name","matchingName","id","cursor","at","has","deliver","reading","action","work","state","actions","includes","task","then","perform","catch","undefined","activity","progress","result","error","failure","asDeviceError","logger","code","summary","syncFiles","syncHistory","lastSyncedAt","lastSyncOutcome","onDevice","readFiles","known","done","total","filter","some","history","noRecords","readHistory","slice","HISTORY_CURSOR_IDS","decoded","lastReadingAt","emit","kind","source","modelId","protocolId","onFrame","frame","liveEventsOf","forEach","event","start","signal","change","storedFields","store","save","size","exports"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/core/device.ts"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA;AAUA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AAK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MAA6B,EAAiB;IACvE,IAAI,CAAChH,MAAM,GAAG;MAAE,GAAG,IAAI,CAACA,MAAM;MAAE,GAAGgH;IAAO,CAAC;IAC3C,IAAI,CAACpH,KAAK,CAAC,IAAAqH,4BAAY,EAAC,IAAI,CAACjH,MAAM,EAAE,IAAI,CAACC,IAAI,CAACI,KAAK,CAAC,CAAC;IACtD,MAAM,IAAI,CAACJ,IAAI,CAACiH,KAAK,CAACC,IAAI,CAAC,IAAI,CAACnH,MAAM,CAAC,CAACuE,KAAK,CAAC,MAAM,IAAI,CAACtE,IAAI,CAAC8E,MAAM,CAACH,KAAK,CAAC,wBAAwB,EAAE;MAAEtE,QAAQ,EAAE,IAAI,CAACL,IAAI,CAACK,QAAQ,CAACmD;IAAG,CAAC,CAAC,CAAC;EAC5I;EAEQ7D,KAAKA,CAACoH,MAA+B,EAAQ;IACnD,IAAI,CAAC7G,IAAI,GAAG;MAAE,GAAG,IAAI,CAACA,IAAI;MAAE,GAAG6G,MAAM;MAAE1H,cAAc,EAAE,IAAI,CAACA,cAAc,CAAC8H;IAAK,CAAC;IACjF,IAAI,CAACnI,MAAM,CAACmH,IAAI,CAAC;MAAEC,IAAI,EAAE,OAAO;MAAE9E,QAAQ,EAAE,IAAI,CAACpB;IAAK,CAAC,CAAC;EAC1D;AACF;AAACkH,OAAA,CAAArI,MAAA,GAAAA,MAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_advertisement","require","_deviceLink","_deviceSnapshot","_errors","_listeners","_liveStream","_measuringWatch","_recordReads","_streamRecorder","unsupported","what","DeviceError","Device","events","Listeners","queue","Promise","resolve","unacknowledged","Set","measuring","MeasuringWatch","measuringSince","patch","deps","now","liveStream","LiveStream","onRunning","live","stop","onError","lastError","constructor","record","latestAdvertisement","snap","initialSnapshot","model","protocol","link","DeviceLink","address","onState","connection","onConnected","fields","updateRecord","lastConnectedAt","onDropped","abort","secret","read","write","advertisement","recorder","sink","StreamRecorder","follow","snapshot","stored","subscribe","listener","add","sync","run","syncAll","records","reject","fetch","recordId","fetchRecord","setClock","startLive","beginLive","stopLive","acknowledge","delete","acknowledged","addToCursor","release","configure","settings","disconnect","close","pair","broadcast","seen","ad","lastSeenAt","rssi","name","matchingName","id","cursor","at","has","deliver","reading","action","work","state","actions","includes","task","then","perform","catch","undefined","activity","progress","result","error","failure","asDeviceError","logger","code","summary","syncFiles","syncHistory","lastSyncedAt","lastSyncOutcome","onDevice","readFiles","known","done","total","filter","some","history","noRecords","readHistory","slice","HISTORY_CURSOR_IDS","decoded","lastReadingAt","emit","kind","supersede","source","modelId","protocolId","onFrame","frame","liveEventsOf","forEach","event","start","signal","change","storedFields","store","save","size","exports"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/core/device.ts"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA;AAUA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,eAAA,GAAAN,OAAA;AAIA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAAQ,eAAA,GAAAR,OAAA;AAEA,MAAMS,WAAW,GAAIC,IAAY,IAAK,IAAIC,mBAAW,CAAC,aAAa,EAAE,sBAAsBD,IAAI,EAAE,CAAC;;AAElG;AACA,MAAME,MAAM,CAAC;EAEMC,MAAM,GAAG,IAAIC,oBAAS,CAAc,CAAC;EAE9CC,KAAK,GAAqBC,OAAO,CAACC,OAAO,CAAC,CAAC;EAClCC,cAAc,GAAG,IAAIC,GAAG,CAAS,CAAC;EAGlCC,SAAS,GAAG,IAAIC,8BAAc,CAAEC,cAAc,IAAK,IAAI,CAACC,KAAK,CAAC;IAAED;EAAe,CAAC,CAAC,EAAE,MAAM,IAAI,CAACE,IAAI,CAACC,GAAG,CAAC,CAAC,CAAC;EACzGC,UAAU,GAAG,IAAIC,s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5
|
+
});
|
|
6
|
+
exports.LiveLedger = void 0;
|
|
7
|
+
const MAX_KEPT_SPANS = 500;
|
|
8
|
+
|
|
9
|
+
/** Clocks of the phone and the device differ a little; a recording this close to the edge is still inside. */
|
|
10
|
+
const EDGE_TOLERANCE_MS = 2_000;
|
|
11
|
+
const MS_PER_SECOND = 1_000;
|
|
12
|
+
|
|
13
|
+
/** Time a stored record covers, for one metric. */
|
|
14
|
+
|
|
15
|
+
/** What a stored record covers: its series, and its waveform when the device stamped it with a time. */
|
|
16
|
+
const coveredBy = ({
|
|
17
|
+
series,
|
|
18
|
+
waveform
|
|
19
|
+
}) => [...(series ? [{
|
|
20
|
+
metric: series.metric,
|
|
21
|
+
from: series.start.getTime(),
|
|
22
|
+
to: series.start.getTime() + series.values.length * series.intervalMs
|
|
23
|
+
}] : []), ...(waveform?.firstSampleAt ? [{
|
|
24
|
+
metric: waveform.metric,
|
|
25
|
+
from: waveform.firstSampleAt.getTime(),
|
|
26
|
+
to: waveform.firstSampleAt.getTime() + (waveform.samples[0]?.length ?? 0) / waveform.sampleRateHz * MS_PER_SECOND
|
|
27
|
+
}] : [])];
|
|
28
|
+
const isInside = ({
|
|
29
|
+
from,
|
|
30
|
+
to
|
|
31
|
+
}, covered) => covered.from - EDGE_TOLERANCE_MS <= from.getTime() && to.getTime() <= covered.to + EDGE_TOLERANCE_MS;
|
|
32
|
+
|
|
33
|
+
/** The live recordings that were saved and that a stored record of the same time may still replace. */
|
|
34
|
+
class LiveLedger {
|
|
35
|
+
spans = [];
|
|
36
|
+
|
|
37
|
+
/** Remembers a recording that was saved whole. */
|
|
38
|
+
add(span) {
|
|
39
|
+
this.spans = [...this.spans, span].slice(-MAX_KEPT_SPANS);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** The recordings of the same metric that lie inside what a stored record covers. */
|
|
43
|
+
inside(record) {
|
|
44
|
+
const covers = coveredBy(record);
|
|
45
|
+
return this.spans.filter(span => covers.some(covered => covered.metric === span.metric && isInside(span, covered)));
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/** Forgets recordings a stored record has replaced. */
|
|
49
|
+
remove(replaced) {
|
|
50
|
+
this.spans = this.spans.filter(span => !replaced.includes(span));
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.LiveLedger = LiveLedger;
|
|
54
|
+
//# sourceMappingURL=live-ledger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["MAX_KEPT_SPANS","EDGE_TOLERANCE_MS","MS_PER_SECOND","coveredBy","series","waveform","metric","from","start","getTime","to","values","length","intervalMs","firstSampleAt","samples","sampleRateHz","isInside","covered","LiveLedger","spans","add","span","slice","inside","record","covers","filter","some","remove","replaced","includes","exports"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/core/live-ledger.ts"],"mappings":";;;;;;AAEA,MAAMA,cAAc,GAAG,GAAG;;AAE1B;AACA,MAAMC,iBAAiB,GAAG,KAAK;AAE/B,MAAMC,aAAa,GAAG,KAAK;;AAE3B;;AAGA;AACA,MAAMC,SAAS,GAAGA,CAAC;EAAEC,MAAM;EAAEC;AAAyB,CAAC,KAAgB,CACrE,IAAID,MAAM,GACN,CAAC;EAAEE,MAAM,EAAEF,MAAM,CAACE,MAAM;EAAEC,IAAI,EAAEH,MAAM,CAACI,KAAK,CAACC,OAAO,CAAC,CAAC;EAAEC,EAAE,EAAEN,MAAM,CAACI,KAAK,CAACC,OAAO,CAAC,CAAC,GAAGL,MAAM,CAACO,MAAM,CAACC,MAAM,GAAGR,MAAM,CAACS;AAAW,CAAC,CAAC,GAChI,EAAE,CAAC,EACP,IAAIR,QAAQ,EAAES,aAAa,GACvB,CACE;EACER,MAAM,EAAED,QAAQ,CAACC,MAAM;EACvBC,IAAI,EAAEF,QAAQ,CAACS,aAAa,CAACL,OAAO,CAAC,CAAC;EACtCC,EAAE,EAAEL,QAAQ,CAACS,aAAa,CAACL,OAAO,CAAC,CAAC,GAAI,CAACJ,QAAQ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|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.QUIET_MS = exports.MeasuringWatch = void 0;
|
|
7
|
+
/** How long a device may go without a live frame before it no longer counts as measuring. */
|
|
8
|
+
const QUIET_MS = exports.QUIET_MS = 5_000;
|
|
9
|
+
|
|
10
|
+
/** Whether live frames are arriving: the first frame starts a measurement, a quiet spell or the stream's end ends it. */
|
|
11
|
+
class MeasuringWatch {
|
|
12
|
+
since = null;
|
|
13
|
+
quiet = null;
|
|
14
|
+
constructor(changed, now) {
|
|
15
|
+
this.changed = changed;
|
|
16
|
+
this.now = now;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** A live frame arrived. */
|
|
20
|
+
frame() {
|
|
21
|
+
if (this.since === null) {
|
|
22
|
+
this.since = this.now();
|
|
23
|
+
this.changed(this.since);
|
|
24
|
+
}
|
|
25
|
+
this.clearQuiet();
|
|
26
|
+
this.quiet = setTimeout(() => this.stop(), QUIET_MS);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** Nothing is being measured any more. */
|
|
30
|
+
stop() {
|
|
31
|
+
this.clearQuiet();
|
|
32
|
+
if (this.since !== null) {
|
|
33
|
+
this.since = null;
|
|
34
|
+
this.changed(null);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
clearQuiet() {
|
|
38
|
+
if (this.quiet !== null) {
|
|
39
|
+
clearTimeout(this.quiet);
|
|
40
|
+
this.quiet = null;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.MeasuringWatch = MeasuringWatch;
|
|
45
|
+
//# sourceMappingURL=measuring-watch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["QUIET_MS","exports","MeasuringWatch","since","quiet","constructor","changed","now","frame","clearQuiet","setTimeout","stop","clearTimeout"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/core/measuring-watch.ts"],"mappings":";;;;;;AAAA;AACA,MAAMA,QAAQ,GAAAC,OAAA,CAAAD,QAAA,GAAG,KAAK;;AAEtB;AACA,MAAME,cAAc,CAAC;EACXC,KAAK,GAAgB,IAAI;EACzBC,KAAK,GAAyC,IAAI;EAEnDC,WAAWA,CACCC,OAAqC,EACrCC,GAAe,EAChC;IAAA,KAFiBD,OAAqC,GAArCA,OAAqC;IAAA,KACrCC,GAAe,GAAfA,GAAe;EAC/B;;EAEH;EACOC,KAAKA,CAAA,EAAS;IACnB,IAAI,IAAI,CAACL,KAAK,KAAK,IAAI,EAAE;MACvB,IAAI,CAACA,KAAK,GAAG,IAAI,CAACI,GAAG,CAAC,CAAC;MACvB,IAAI,CAACD,OAAO,CAAC,IAAI,CAACH,KAAK,CAAC;IAC1B;IACA,IAAI,CAACM,UAAU,CAAC,CAAC;IACjB,IAAI,CAACL,KAAK,GAAGM,UAAU,CAAC,MAAM,IAAI,CAACC,IAAI,CAAC,CAAC,EAAEX,QAAQ,CAAC;EACtD;;EAEA;EACOW,IAAIA,CAAA,EAAS;IAClB,IAAI,CAACF,UAAU,CAAC,CAAC;IACjB,IAAI,IAAI,CAACN,KAAK,KAAK,IAAI,EAAE;MACvB,IAAI,CAACA,KAAK,GAAG,IAAI;MACjB,IAAI,CAACG,OAAO,CAAC,IAAI,CAAC;IACpB;EACF;EAEQG,UAAUA,CAAA,EAAS;IACzB,IAAI,IAAI,CAACL,KAAK,KAAK,IAAI,EAAE;MACvBQ,YAAY,CAAC,IAAI,CAACR,KAAK,CAAC;MACxB,IAAI,CAACA,KAAK,GAAG,IAAI;IACnB;EACF;AACF;AAACH,OAAA,CAAAC,cAAA,GAAAA,cAAA","ignoreList":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.noOutboxWatch = void 0;
|
|
7
|
+
/** Where each outbox item stands, by id, at one moment. */
|
|
8
|
+
|
|
9
|
+
/** The offline queue behind a sink, which the reading log and the foreground notification watch; the sink side provides it. */
|
|
10
|
+
|
|
11
|
+
/** What a sink says about a save: how it went and, for a queued reading, which outbox items hold it. */
|
|
12
|
+
|
|
13
|
+
/** No offline queue: nothing is ever waiting. */
|
|
14
|
+
const noOutboxWatch = exports.noOutboxWatch = {
|
|
15
|
+
subscribe: () => () => undefined
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=outbox-watch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["noOutboxWatch","exports","subscribe","undefined"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/core/outbox-watch.ts"],"mappings":";;;;;;AAEA;;AAaA;;AAOA;;AAUA;AACA,MAAMA,aAA0B,GAAAC,OAAA,CAAAD,aAAA,GAAG;EAAEE,SAAS,EAAEA,CAAA,KAAM,MAAMC;AAAU,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["newPairedDevice","address","modelId","name","pairedAt","cursor","lastConnectedAt","lastSyncedAt","lastSyncOutcome","lastReadingAt","battery","identity","autoSync","keepInBackground","secret","exports"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/core/paired-device.ts"],"mappings":";;;;;;AAAA;;AAsBA;;AAaA;;
|
|
1
|
+
{"version":3,"names":["newPairedDevice","address","modelId","name","pairedAt","cursor","lastConnectedAt","lastSyncedAt","lastSyncOutcome","lastReadingAt","battery","identity","autoSync","keepInBackground","record","secret","exports"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/core/paired-device.ts"],"mappings":";;;;;;AAAA;;AAsBA;;AAaA;;AAiDA;;AAGA;AACA,MAAMA,eAAe,GAAGA,CAACC,OAAe,EAAEC,OAAe,EAAEC,IAAmB,EAAEC,QAAc,MAAoB;EAChHH,OAAO;EACPC,OAAO;EACPC,IAAI;EACJC,QAAQ;EACRC,MAAM,EAAE,EAAE;EACVC,eAAe,EAAE,IAAI;EACrBC,YAAY,EAAE,IAAI;EAClBC,eAAe,EAAE,IAAI;EACrBC,aAAa,EAAE,IAAI;EACnBC,OAAO,EAAE,IAAI;EACbC,QAAQ,EAAE,IAAI;EACdC,QAAQ,EAAE,IAAI;EACdC,gBAAgB,EAAE,KAAK;EACvBC,MAAM,EAAE,IAAI;EACZC,MAAM,EAAE;AACV,CAAC,CAAC;AAACC,OAAA,CAAAhB,eAAA,GAAAA,eAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["silentLogger","exports","debug","info","warn","error","alwaysForeground","watch","listener","undefined","noKeepAlive","start","stop"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/core/ports.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"names":["silentLogger","exports","debug","info","warn","error","alwaysForeground","watch","listener","undefined","noKeepAlive","start","stop"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/core/ports.ts"],"mappings":";;;;;;AAOA;;AAGA;;AAGA;;AAGA;;AAaA;;AAsBA;;AAaA;;AAaA;;AAaA;;AAaA;;AAGA;;AAOA;;AAGA;;AAOA;;AAYA;;AAgBA,MAAMA,YAAoB,GAAAC,OAAA,CAAAD,YAAA,GAAG;EAAEE,KAAK,EAAEA,CAAA,KAAM,CAAC,CAAC;EAAEC,IAAI,EAAEA,CAAA,KAAM,CAAC,CAAC;EAAEC,IAAI,EAAEA,CAAA,KAAM,CAAC,CAAC;EAAEC,KAAK,EAAEA,CAAA,KAAM,CAAC;AAAE,CAAC;;AAEjG;AACA,MAAMC,gBAA8B,GAAAL,OAAA,CAAAK,gBAAA,GAAG;EACrCC,KAAK,EAAGC,QAAQ,IAAK;IACnBA,QAAQ,CAAC,YAAY,CAAC;IAEtB,OAAO,MAAMC,SAAS;EACxB;AACF,CAAC;;AAED;AACA,MAAMC,WAAsB,GAAAT,OAAA,CAAAS,WAAA,GAAG;EAAEC,KAAK,EAAE,MAAAA,CAAA,KAAYF,SAAS;EAAEG,IAAI,EAAE,MAAAA,CAAA,KAAYH;AAAU,CAAC","ignoreList":[]}
|
|
@@ -5,18 +5,49 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.ReadingLog = void 0;
|
|
7
7
|
var _listeners = require("./listeners.js");
|
|
8
|
-
|
|
8
|
+
var _outboxWatch = require("./outbox-watch.js");
|
|
9
|
+
/**
|
|
10
|
+
* `queued` means the reading waits in the outbox, and `saved` that the server has it. `rejected` means the server
|
|
11
|
+
* refused it there; it waits for a resend or a discard. `failed` means the sink threw; a stored record is then
|
|
12
|
+
* released, so the next sync delivers it again.
|
|
13
|
+
*/
|
|
9
14
|
|
|
10
15
|
/** A reading received this session and how its save went. */
|
|
11
16
|
|
|
17
|
+
/** A sink whose save may say which outbox items hold a queued reading. */
|
|
18
|
+
|
|
19
|
+
const receiptOf = outcome => typeof outcome === "string" ? {
|
|
20
|
+
status: outcome
|
|
21
|
+
} : outcome;
|
|
22
|
+
const followsOutbox = ({
|
|
23
|
+
save,
|
|
24
|
+
queueIds
|
|
25
|
+
}) => queueIds !== undefined && queueIds.length > 0 && (save === "queued" || save === "rejected");
|
|
26
|
+
|
|
27
|
+
/** Items the view does not list keep the entry's state: they were discarded, or are another account's. */
|
|
28
|
+
const stateIn = (view, {
|
|
29
|
+
queueIds = [],
|
|
30
|
+
save
|
|
31
|
+
}) => {
|
|
32
|
+
if (queueIds.some(id => view.rejected.has(id))) {
|
|
33
|
+
return "rejected";
|
|
34
|
+
}
|
|
35
|
+
if (queueIds.some(id => view.waiting.has(id))) {
|
|
36
|
+
return "queued";
|
|
37
|
+
}
|
|
38
|
+
return queueIds.every(id => view.sent.has(id)) ? "saved" : save;
|
|
39
|
+
};
|
|
40
|
+
|
|
12
41
|
/** Saves every reading a device delivers, then acknowledges stored records so the device cursor moves on. */
|
|
13
42
|
class ReadingLog {
|
|
14
43
|
list = [];
|
|
15
44
|
changes = new _listeners.Listeners();
|
|
16
|
-
|
|
45
|
+
stopOutbox = null;
|
|
46
|
+
constructor(sink, logger, now, outbox = _outboxWatch.noOutboxWatch, kept = 100) {
|
|
17
47
|
this.sink = sink;
|
|
18
48
|
this.logger = logger;
|
|
19
49
|
this.now = now;
|
|
50
|
+
this.outbox = outbox;
|
|
20
51
|
this.kept = kept;
|
|
21
52
|
}
|
|
22
53
|
entries = () => this.list;
|
|
@@ -45,13 +76,23 @@ class ReadingLog {
|
|
|
45
76
|
};
|
|
46
77
|
this.update([...this.list, entry].slice(-this.kept));
|
|
47
78
|
try {
|
|
48
|
-
const
|
|
49
|
-
|
|
79
|
+
const {
|
|
80
|
+
status,
|
|
81
|
+
queueIds
|
|
82
|
+
} = receiptOf(await this.sink.save(reading, device.snapshot()));
|
|
83
|
+
this.patch(id, status === "queued" && queueIds !== undefined ? {
|
|
84
|
+
save: status,
|
|
85
|
+
queueIds
|
|
86
|
+
} : {
|
|
87
|
+
save: status
|
|
88
|
+
});
|
|
50
89
|
if (recordId !== null) {
|
|
51
90
|
await device.acknowledge(recordId);
|
|
52
91
|
}
|
|
53
92
|
} catch {
|
|
54
|
-
this.
|
|
93
|
+
this.patch(id, {
|
|
94
|
+
save: "failed"
|
|
95
|
+
});
|
|
55
96
|
this.logger.error("bluetooth.reading.save-failed", {
|
|
56
97
|
protocol: reading.source.protocolId,
|
|
57
98
|
type: reading.type
|
|
@@ -60,11 +101,52 @@ class ReadingLog {
|
|
|
60
101
|
device.release(recordId);
|
|
61
102
|
}
|
|
62
103
|
}
|
|
104
|
+
this.followOutbox();
|
|
105
|
+
}
|
|
106
|
+
followOutbox() {
|
|
107
|
+
if (this.stopOutbox === null && this.list.some(followsOutbox)) {
|
|
108
|
+
this.stopOutbox = this.outbox.subscribe(view => this.settle(view));
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
settle(view) {
|
|
112
|
+
const before = this.list;
|
|
113
|
+
const after = before.map(entry => {
|
|
114
|
+
const save = followsOutbox(entry) ? stateIn(view, entry) : entry.save;
|
|
115
|
+
return save === entry.save ? entry : {
|
|
116
|
+
...entry,
|
|
117
|
+
save
|
|
118
|
+
};
|
|
119
|
+
});
|
|
120
|
+
const changed = after.filter((entry, index) => entry !== before[index]);
|
|
121
|
+
if (changed.length > 0) {
|
|
122
|
+
this.update(after);
|
|
123
|
+
changed.filter(({
|
|
124
|
+
save
|
|
125
|
+
}) => save === "rejected").forEach(({
|
|
126
|
+
reading
|
|
127
|
+
}) => this.logRejected(reading));
|
|
128
|
+
}
|
|
129
|
+
this.releaseWhenIdle();
|
|
130
|
+
}
|
|
131
|
+
releaseWhenIdle() {
|
|
132
|
+
if (this.stopOutbox !== null && !this.list.some(followsOutbox)) {
|
|
133
|
+
this.stopOutbox();
|
|
134
|
+
this.stopOutbox = null;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
logRejected({
|
|
138
|
+
source,
|
|
139
|
+
type
|
|
140
|
+
}) {
|
|
141
|
+
this.logger.warn("bluetooth.reading.rejected", {
|
|
142
|
+
protocol: source.protocolId,
|
|
143
|
+
type
|
|
144
|
+
});
|
|
63
145
|
}
|
|
64
|
-
|
|
146
|
+
patch(id, change) {
|
|
65
147
|
this.update(this.list.map(entry => entry.id === id ? {
|
|
66
148
|
...entry,
|
|
67
|
-
|
|
149
|
+
...change
|
|
68
150
|
} : entry));
|
|
69
151
|
}
|
|
70
152
|
update(list) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_listeners","require","ReadingLog","list","changes","Listeners","constructor","sink","logger","now","kept","entries","subscribe","listener","add","track","device","event","kind","receive","reading","receivedAt","address","recordId","source","
|
|
1
|
+
{"version":3,"names":["_listeners","require","_outboxWatch","receiptOf","outcome","status","followsOutbox","save","queueIds","undefined","length","stateIn","view","some","id","rejected","has","waiting","every","sent","ReadingLog","list","changes","Listeners","stopOutbox","constructor","sink","logger","now","outbox","noOutboxWatch","kept","entries","subscribe","listener","add","track","device","event","kind","receive","reading","receivedAt","address","recordId","source","getTime","entry","update","slice","snapshot","patch","acknowledge","error","protocol","protocolId","type","release","followOutbox","settle","before","after","map","changed","filter","index","forEach","logRejected","releaseWhenIdle","warn","change","emit","exports"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/core/reading-log.ts"],"mappings":";;;;;;AAEA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAIA;AACA;AACA;AACA;AACA;;AAGA;;AAmBA;;AAOA,MAAME,SAAS,GAAIC,OAAkC,IACnD,OAAOA,OAAO,KAAK,QAAQ,GAAG;EAAEC,MAAM,EAAED;AAAQ,CAAC,GAAGA,OAAO;AAE7D,MAAME,aAAa,GAAGA,CAAC;EAAEC,IAAI;EAAEC;AAA0B,CAAC,KACxDA,QAAQ,KAAKC,SAAS,IAAID,QAAQ,CAACE,MAAM,GAAG,CAAC,KAAKH,IAAI,KAAK,QAAQ,IAAIA,IAAI,KAAK,UAAU,CAAC;;AAE7F;AACA,MAAMI,OAAO,GAAGA,CAACC,IAAgB,EAAE;EAAEJ,QAAQ,GAAG,EAAE;EAAED;AAAsB,CAAC,KAAgB;EACzF,IAAIC,QAAQ,CAACK,IAAI,CAAEC,EAAE,IAAKF,IAAI,CAACG,QAAQ,CAACC,GAAG,CAACF,EAAE,CAAC,CAAC,EAAE;IAChD,OAAO,UAAU;EACnB;EAEA,IAAIN,QAAQ,CAACK,IAAI,CAAEC,EAAE,IAAKF,IAAI,CAACK,OAAO,CAACD,GAAG,CAACF,EAAE,CAAC,CAAC,EAAE;IAC/C,OAAO,QAAQ;EACjB;EAEA,OAAON,QAAQ,CAACU,KAAK,CAAEJ,EAAE,IAAKF,IAAI,CAACO,IAAI,CAACH,GAAG,CAACF,EAAE,CAAC,CAAC,GAAG,OAAO,GAAGP,IAAI;AACnE,CAAC;;AAED;AACA,MAAMa,UAAU,CAAC;EACPC,IAAI,GAA+B,EAAE;EAC5BC,OAAO,GAAG,IAAIC,oBAAS,CAA6B,CAAC;EAC9DC,UAAU,GAAwB,IAAI;EAEvC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Q;IAChE,IAAI,CAACtB,MAAM,CAAC,IAAI,CAAC3B,IAAI,CAACyC,GAAG,CAAEf,KAAK,IAAMA,KAAK,CAACjC,EAAE,KAAKA,EAAE,GAAG;MAAE,GAAGiC,KAAK;MAAE,GAAGuB;IAAO,CAAC,GAAGvB,KAAM,CAAC,CAAC;EAC5F;EAEQC,MAAMA,CAAC3B,IAAgC,EAAQ;IACrD,IAAI,CAACA,IAAI,GAAGA,IAAI;IAChB,IAAI,CAACC,OAAO,CAACiD,IAAI,CAAClD,IAAI,CAAC;EACzB;AACF;AAACmD,OAAA,CAAApD,UAAA,GAAAA,UAAA","ignoreList":[]}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SlotSeries = exports.RECORDED_METRICS = void 0;
|
|
7
|
+
const SLOT_MS = 1_000;
|
|
8
|
+
const SLOTS_PER_SERIES = 3_600;
|
|
9
|
+
const IDLE_CLOSE_MS = 15 * 60_000;
|
|
10
|
+
|
|
11
|
+
/** The streamed numbers worth recording as a series, each with the measurement it belongs to. */
|
|
12
|
+
const RECORDED_METRICS = exports.RECORDED_METRICS = {
|
|
13
|
+
heart_rate: "heart_rate",
|
|
14
|
+
pulse_rate: "oxygen_saturation",
|
|
15
|
+
spo2: "oxygen_saturation",
|
|
16
|
+
perfusion_index: "oxygen_saturation",
|
|
17
|
+
respiration_rate: "respiration_rate",
|
|
18
|
+
body_temperature: "temperature"
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** What a series measures. */
|
|
22
|
+
|
|
23
|
+
/** One metric's streamed numbers, one value per second from the second the first one arrived. */
|
|
24
|
+
class SlotSeries {
|
|
25
|
+
values = [];
|
|
26
|
+
changed = true;
|
|
27
|
+
constructor(kind, firstAt) {
|
|
28
|
+
this.kind = kind;
|
|
29
|
+
this.start = Math.floor(firstAt / SLOT_MS) * SLOT_MS;
|
|
30
|
+
this.lastAt = firstAt;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** Whether a value of `unit` taken at `at` still belongs to this series. */
|
|
34
|
+
takes(unit, at) {
|
|
35
|
+
return unit === this.kind.unit && at >= this.start && at - this.lastAt < IDLE_CLOSE_MS && this.slotOf(at) < SLOTS_PER_SERIES;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** Puts a value in the second it was taken; of two values in one second the later stays. */
|
|
39
|
+
put(value, at) {
|
|
40
|
+
const slot = this.slotOf(at);
|
|
41
|
+
while (this.values.length <= slot) {
|
|
42
|
+
this.values.push(null);
|
|
43
|
+
}
|
|
44
|
+
this.values[slot] = value;
|
|
45
|
+
this.lastAt = at;
|
|
46
|
+
this.changed = true;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** Whether no value arrived for as long as a series waits before it closes. */
|
|
50
|
+
isQuiet(now) {
|
|
51
|
+
return now - this.lastAt >= IDLE_CLOSE_MS;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/** Whether values arrived since the last `markSaved`. */
|
|
55
|
+
get unsaved() {
|
|
56
|
+
return this.changed;
|
|
57
|
+
}
|
|
58
|
+
markSaved() {
|
|
59
|
+
this.changed = false;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/** The series as it is now, as a reading to save. */
|
|
63
|
+
reading(origin) {
|
|
64
|
+
const span = this.span();
|
|
65
|
+
return {
|
|
66
|
+
type: this.kind.type,
|
|
67
|
+
takenAt: span.from,
|
|
68
|
+
values: {},
|
|
69
|
+
deviceFlags: [],
|
|
70
|
+
series: {
|
|
71
|
+
metric: this.kind.metric,
|
|
72
|
+
unit: this.kind.unit,
|
|
73
|
+
start: span.from,
|
|
74
|
+
intervalMs: SLOT_MS,
|
|
75
|
+
values: [...this.values]
|
|
76
|
+
},
|
|
77
|
+
live: span,
|
|
78
|
+
source: origin
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
span() {
|
|
82
|
+
return {
|
|
83
|
+
metric: this.kind.metric,
|
|
84
|
+
channel: null,
|
|
85
|
+
from: new Date(this.start),
|
|
86
|
+
to: new Date(this.start + this.values.length * SLOT_MS)
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
slotOf(at) {
|
|
90
|
+
return Math.floor((at - this.start) / SLOT_MS);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
exports.SlotSeries = SlotSeries;
|
|
94
|
+
//# sourceMappingURL=series-slots.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["SLOT_MS","SLOTS_PER_SERIES","IDLE_CLOSE_MS","RECORDED_METRICS","exports","heart_rate","pulse_rate","spo2","perfusion_index","respiration_rate","body_temperature","SlotSeries","values","changed","constructor","kind","firstAt","start","Math","floor","lastAt","takes","unit","at","slotOf","put","value","slot","length","push","isQuiet","now","unsaved","markSaved","reading","origin","span","type","takenAt","from","deviceFlags","series","metric","intervalMs","live","source","channel","Date","to"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/core/series-slots.ts"],"mappings":";;;;;;AAGA,MAAMA,OAAO,GAAG,KAAK;AACrB,MAAMC,gBAAgB,GAAG,KAAK;AAC9B,MAAMC,aAAa,GAAG,EAAE,GAAG,MAAM;;AAEjC;AACA,MAAMC,gBAA8D,GAAAC,OAAA,CAAAD,gBAAA,GAAG;EACrEE,UAAU,EAAE,YAAY;EACxBC,UAAU,EAAE,mBAAmB;EAC/BC,IAAI,EAAE,mBAAmB;EACzBC,eAAe,EAAE,mBAAmB;EACpCC,gBAAgB,EAAE,kBAAkB;EACpCC,gBAAgB,EAAE;AACpB,CAAC;;AAED;;AAGA;AACA,MAAMC,UAAU,CAAC;EAEEC,MAAM,GAAsB,EAAE;EAEvCC,OAAO,GAAG,IAAI;EAEfC,WAAWA,CAAkBC,IAAgB,EAAEC,OAAe,EAAE;IAAA,KAAnCD,IAAgB,GAAhBA,IAAgB;IAClD,IAAI,C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