@ovok/native 1.6.31 → 1.6.33
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/bt-device/constants/device-instruction-pdfs.js +5 -1
- package/lib/commonjs/modules/bt-device/constants/device-instruction-pdfs.js.map +1 -1
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-assets.js +3 -1
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-assets.js.map +1 -1
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-entries.js +1 -1
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-entries.js.map +1 -1
- package/lib/commonjs/modules/bt-device/constants/supported-devices.js +31 -0
- package/lib/commonjs/modules/bt-device/constants/supported-devices.js.map +1 -1
- package/lib/commonjs/modules/bt-management/constants/integrated-devices-map.js +2 -1
- package/lib/commonjs/modules/bt-management/constants/integrated-devices-map.js.map +1 -1
- package/lib/commonjs/modules/bt-management/index.js +110 -0
- package/lib/commonjs/modules/bt-management/index.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/background-sync/background-service-uuids.js +4 -0
- package/lib/commonjs/modules/bt-management/services/background-sync/background-service-uuids.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/device-creator.js +9 -1
- package/lib/commonjs/modules/bt-management/services/device-creator.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/a606/a606.command-sequencer.js +68 -0
- package/lib/commonjs/modules/bt-management/services/devices/a606/a606.command-sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/a606/a606.device.js +55 -0
- package/lib/commonjs/modules/bt-management/services/devices/a606/a606.device.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/a606/a606.frame-parser.js +36 -0
- package/lib/commonjs/modules/bt-management/services/devices/a606/a606.frame-parser.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/a606/a606.frame-reader.js +68 -0
- package/lib/commonjs/modules/bt-management/services/devices/a606/a606.frame-reader.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/a606/a606.main-services.js +31 -0
- package/lib/commonjs/modules/bt-management/services/devices/a606/a606.main-services.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/bpw1/bpw1.command-sequencer.js +73 -0
- package/lib/commonjs/modules/bt-management/services/devices/bpw1/bpw1.command-sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/bpw1/bpw1.device.js +55 -0
- package/lib/commonjs/modules/bt-management/services/devices/bpw1/bpw1.device.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/bpw1/bpw1.frame-parser.js +53 -0
- package/lib/commonjs/modules/bt-management/services/devices/bpw1/bpw1.frame-parser.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/bpw1/bpw1.frame-reader.js +55 -0
- package/lib/commonjs/modules/bt-management/services/devices/bpw1/bpw1.frame-reader.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/bpw1/bpw1.main-services.js +30 -0
- package/lib/commonjs/modules/bt-management/services/devices/bpw1/bpw1.main-services.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/checkme/checkme.device.js +57 -0
- package/lib/commonjs/modules/bt-management/services/devices/checkme/checkme.device.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/checkme/checkme.protocol.js +263 -0
- package/lib/commonjs/modules/bt-management/services/devices/checkme/checkme.protocol.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/checkme/checkme.sequencer.js +255 -0
- package/lib/commonjs/modules/bt-management/services/devices/checkme/checkme.sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/genial-t31/genial-t31.command-sequencer.js +53 -0
- package/lib/commonjs/modules/bt-management/services/devices/genial-t31/genial-t31.command-sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/genial-t31/genial-t31.device.js +86 -0
- package/lib/commonjs/modules/bt-management/services/devices/genial-t31/genial-t31.device.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/genial-t31/genial-t31.frame-reader.js +53 -0
- package/lib/commonjs/modules/bt-management/services/devices/genial-t31/genial-t31.frame-reader.js.map +1 -0
- package/lib/commonjs/modules/bt-management/types/clock-sync.js +3 -0
- package/lib/commonjs/modules/bt-management/types/clock-sync.js.map +1 -1
- package/lib/commonjs/modules/bt-management/types/integrated-devices.js +4 -0
- package/lib/commonjs/modules/bt-management/types/integrated-devices.js.map +1 -1
- package/lib/module/modules/bt-device/constants/device-instruction-pdfs.js +5 -1
- package/lib/module/modules/bt-device/constants/device-instruction-pdfs.js.map +1 -1
- package/lib/module/modules/bt-device/constants/supported-device-catalog-assets.js +3 -1
- package/lib/module/modules/bt-device/constants/supported-device-catalog-assets.js.map +1 -1
- package/lib/module/modules/bt-device/constants/supported-device-catalog-entries.js +1 -1
- package/lib/module/modules/bt-device/constants/supported-device-catalog-entries.js.map +1 -1
- package/lib/module/modules/bt-device/constants/supported-devices.js +32 -1
- package/lib/module/modules/bt-device/constants/supported-devices.js.map +1 -1
- package/lib/module/modules/bt-management/constants/integrated-devices-map.js +2 -1
- package/lib/module/modules/bt-management/constants/integrated-devices-map.js.map +1 -1
- package/lib/module/modules/bt-management/index.js +10 -0
- package/lib/module/modules/bt-management/index.js.map +1 -1
- package/lib/module/modules/bt-management/services/background-sync/background-service-uuids.js +4 -0
- package/lib/module/modules/bt-management/services/background-sync/background-service-uuids.js.map +1 -1
- package/lib/module/modules/bt-management/services/device-creator.js +9 -1
- package/lib/module/modules/bt-management/services/device-creator.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/a606/a606.command-sequencer.js +61 -0
- package/lib/module/modules/bt-management/services/devices/a606/a606.command-sequencer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/a606/a606.device.js +45 -0
- package/lib/module/modules/bt-management/services/devices/a606/a606.device.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/a606/a606.frame-parser.js +32 -0
- package/lib/module/modules/bt-management/services/devices/a606/a606.frame-parser.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/a606/a606.frame-reader.js +63 -0
- package/lib/module/modules/bt-management/services/devices/a606/a606.frame-reader.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/a606/a606.main-services.js +28 -0
- package/lib/module/modules/bt-management/services/devices/a606/a606.main-services.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/bpw1/bpw1.command-sequencer.js +66 -0
- package/lib/module/modules/bt-management/services/devices/bpw1/bpw1.command-sequencer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/bpw1/bpw1.device.js +45 -0
- package/lib/module/modules/bt-management/services/devices/bpw1/bpw1.device.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/bpw1/bpw1.frame-parser.js +48 -0
- package/lib/module/modules/bt-management/services/devices/bpw1/bpw1.frame-parser.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/bpw1/bpw1.frame-reader.js +50 -0
- package/lib/module/modules/bt-management/services/devices/bpw1/bpw1.frame-reader.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/bpw1/bpw1.main-services.js +26 -0
- package/lib/module/modules/bt-management/services/devices/bpw1/bpw1.main-services.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/checkme/checkme.device.js +53 -0
- package/lib/module/modules/bt-management/services/devices/checkme/checkme.device.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/checkme/checkme.protocol.js +247 -0
- package/lib/module/modules/bt-management/services/devices/checkme/checkme.protocol.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/checkme/checkme.sequencer.js +245 -0
- package/lib/module/modules/bt-management/services/devices/checkme/checkme.sequencer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/genial-t31/genial-t31.command-sequencer.js +48 -0
- package/lib/module/modules/bt-management/services/devices/genial-t31/genial-t31.command-sequencer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/genial-t31/genial-t31.device.js +81 -0
- package/lib/module/modules/bt-management/services/devices/genial-t31/genial-t31.device.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/genial-t31/genial-t31.frame-reader.js +48 -0
- package/lib/module/modules/bt-management/services/devices/genial-t31/genial-t31.frame-reader.js.map +1 -0
- package/lib/module/modules/bt-management/types/clock-sync.js +3 -0
- package/lib/module/modules/bt-management/types/clock-sync.js.map +1 -1
- package/lib/module/modules/bt-management/types/device-measurement-map.js.map +1 -1
- package/lib/module/modules/bt-management/types/integrated-devices.js +4 -0
- package/lib/module/modules/bt-management/types/integrated-devices.js.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-device/constants/device-instruction-pdfs.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-assets.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-assets.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-entries.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-devices.d.ts +7 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-devices.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/constants/integrated-devices-map.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts +10 -0
- package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/background-sync/background-service-uuids.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/device-creator.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/a606/a606.command-sequencer.d.ts +22 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/a606/a606.command-sequencer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/a606/a606.device.d.ts +24 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/a606/a606.device.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/a606/a606.frame-parser.d.ts +10 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/a606/a606.frame-parser.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/a606/a606.frame-reader.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/a606/a606.frame-reader.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/a606/a606.main-services.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/a606/a606.main-services.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bpw1/bpw1.command-sequencer.d.ts +21 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bpw1/bpw1.command-sequencer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bpw1/bpw1.device.d.ts +22 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bpw1/bpw1.device.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bpw1/bpw1.frame-parser.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bpw1/bpw1.frame-parser.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bpw1/bpw1.frame-reader.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bpw1/bpw1.frame-reader.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bpw1/bpw1.main-services.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bpw1/bpw1.main-services.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/checkme/checkme.device.d.ts +18 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/checkme/checkme.device.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/checkme/checkme.protocol.d.ts +79 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/checkme/checkme.protocol.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/checkme/checkme.sequencer.d.ts +52 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/checkme/checkme.sequencer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/genial-t31/genial-t31.command-sequencer.d.ts +15 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/genial-t31/genial-t31.command-sequencer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/genial-t31/genial-t31.device.d.ts +28 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/genial-t31/genial-t31.device.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/genial-t31/genial-t31.frame-reader.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/genial-t31/genial-t31.frame-reader.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/clock-sync.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-measurement-map.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-measurement-map.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/integrated-devices.d.ts +5 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/integrated-devices.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-device/constants/device-instruction-pdfs.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-assets.d.ts +3 -1
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-assets.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-entries.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-device/constants/supported-devices.d.ts +7 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-devices.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/constants/integrated-devices-map.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/index.d.ts +10 -0
- package/lib/typescript/module/src/modules/bt-management/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/background-sync/background-service-uuids.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/device-creator.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/a606/a606.command-sequencer.d.ts +22 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/a606/a606.command-sequencer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/a606/a606.device.d.ts +24 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/a606/a606.device.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/a606/a606.frame-parser.d.ts +10 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/a606/a606.frame-parser.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/a606/a606.frame-reader.d.ts +9 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/a606/a606.frame-reader.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/a606/a606.main-services.d.ts +4 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/a606/a606.main-services.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bpw1/bpw1.command-sequencer.d.ts +21 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bpw1/bpw1.command-sequencer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bpw1/bpw1.device.d.ts +22 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bpw1/bpw1.device.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bpw1/bpw1.frame-parser.d.ts +9 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bpw1/bpw1.frame-parser.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bpw1/bpw1.frame-reader.d.ts +8 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bpw1/bpw1.frame-reader.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bpw1/bpw1.main-services.d.ts +4 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bpw1/bpw1.main-services.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/checkme/checkme.device.d.ts +18 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/checkme/checkme.device.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/checkme/checkme.protocol.d.ts +79 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/checkme/checkme.protocol.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/checkme/checkme.sequencer.d.ts +52 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/checkme/checkme.sequencer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/genial-t31/genial-t31.command-sequencer.d.ts +15 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/genial-t31/genial-t31.command-sequencer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/genial-t31/genial-t31.device.d.ts +28 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/genial-t31/genial-t31.device.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/genial-t31/genial-t31.frame-reader.d.ts +9 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/genial-t31/genial-t31.frame-reader.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/clock-sync.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/device-measurement-map.d.ts +9 -0
- package/lib/typescript/module/src/modules/bt-management/types/device-measurement-map.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/integrated-devices.d.ts +5 -1
- package/lib/typescript/module/src/modules/bt-management/types/integrated-devices.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["modules/bt-management/index.ts"],"mappings":";;AAAA,cAAc,gCAA6B;AAC3C,cAAc,4BAAyB;AACvC,cAAc,kCAA+B;AAC7C,cAAc,8BAA2B;AACzC,cAAc,6BAA0B;AACxC,cAAc,6BAA0B;AACxC,cAAc,qCAAkC;AAChD,cAAc,6BAA0B;AACxC,cAAc,+BAA4B;AAC1C,cAAc,kCAA+B;AAC7C,cAAc,8BAA2B;AACzC,cAAc,8BAA2B;AACzC,cAAc,6BAA0B;AACxC,cAAc,+BAA4B;AAC1C,cAAc,gCAA6B;AAC3C,cAAc,gCAA6B;AAC3C,cAAc,8BAA2B;AACzC,cAAc,2BAAwB;AACtC,cAAc,uBAAoB;AAClC,cAAc,0BAAuB;AACrC,cAAc,wBAAqB;AACnC,cAAc,0BAAuB;AACrC,cAAc,+BAA4B;AAC1C,cAAc,6BAA0B;AACxC,cAAc,yBAAsB;AACpC,cAAc,0BAAuB;AACrC,cAAc,6BAA0B;AACxC,cAAc,sCAAmC;AACjD,cAAc,4BAAyB;AACvC,cAAc,4BAAyB;AACvC,cAAc,2BAAwB;AACtC,cAAc,4BAAyB;AACvC,cAAc,0CAAuC;AACrD,cAAc,oCAAiC;AAC/C,cAAc,0BAAuB;AACrC,cAAc,uBAAoB;AAElC,cAAc,yCAAsC;AACpD,cAAc,0DAAuD;AACrE,cAAc,4CAAyC;AACvD,cAAc,0BAAuB;AACrC,cAAc,sDAAmD;AACjE,cAAc,2DAAwD;AACtE,cAAc,kDAA+C;AAC7D,cAAc,wDAAqD;AACnE,cAAc,4BAAyB;AACvC,cAAc,yBAAsB;AACpC,cAAc,oBAAW;AACzB,cAAc,2CAAwC;AACtD,cAAc,2DAAwD;AACtE,cAAc,yCAAsC;AACpD,cAAc,oDAAiD;AAC/D,cAAc,mDAAgD;AAC9D,cAAc,8CAA2C;AACzD,cAAc,0DAAuD;AACrE,cAAc,kDAA+C;AAC7D,cAAc,uDAAoD;AAClE,cAAc,0DAAuD;AACrE,cAAc,mDAAgD;AAC9D,cAAc,4CAAyC;AACvD,cAAc,4CAAyC;AACvD,cAAc,sCAAmC;AACjD,cAAc,iDAA8C;AAC5D,cAAc,4CAAyC;AACvD,cAAc,iDAA8C;AAC5D,cAAc,+CAA4C;AAC1D,cAAc,mDAAgD;AAC9D,cAAc,+CAA4C;AAC1D,cAAc,2CAAwC;AACtD,cAAc,8CAA2C;AACzD,cAAc,4CAAyC;AACvD,cAAc,0CAAuC;AACrD,cAAc,6CAA0C;AACxD,cAAc,+CAA4C;AAC1D,cAAc,+CAA4C;AAE1D,cAAc,0CAAuC;AAErD,cAAc,6BAA0B;AACxC,cAAc,yCAAsC;AACpD,cAAc,6CAA0C;AACxD,cAAc,oCAAiC;AAC/C,cAAc,4BAAyB;AACvC,cAAc,gCAA6B;AAC3C,cAAc,+BAA4B;AAC1C,cAAc,+BAA4B;AAC1C,cAAc,kCAA+B;AAC7C,cAAc,6BAA0B;AACxC,cAAc,gCAA6B;AAC3C,cAAc,8BAA2B;AACzC,cAAc,6BAA0B","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["modules/bt-management/index.ts"],"mappings":";;AAAA,cAAc,gCAA6B;AAC3C,cAAc,4BAAyB;AACvC,cAAc,kCAA+B;AAC7C,cAAc,8BAA2B;AACzC,cAAc,6BAA0B;AACxC,cAAc,6BAA0B;AACxC,cAAc,qCAAkC;AAChD,cAAc,6BAA0B;AACxC,cAAc,+BAA4B;AAC1C,cAAc,kCAA+B;AAC7C,cAAc,8BAA2B;AACzC,cAAc,8BAA2B;AACzC,cAAc,6BAA0B;AACxC,cAAc,+BAA4B;AAC1C,cAAc,gCAA6B;AAC3C,cAAc,gCAA6B;AAC3C,cAAc,8BAA2B;AACzC,cAAc,2BAAwB;AACtC,cAAc,uBAAoB;AAClC,cAAc,0BAAuB;AACrC,cAAc,wBAAqB;AACn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c,0CAAuC;AACrD,cAAc,6CAA0C;AACxD,cAAc,+CAA4C;AAC1D,cAAc,+CAA4C;AAE1D,cAAc,0CAAuC;AAErD,cAAc,6BAA0B;AACxC,cAAc,yCAAsC;AACpD,cAAc,6CAA0C;AACxD,cAAc,oCAAiC;AAC/C,cAAc,4BAAyB;AACvC,cAAc,gCAA6B;AAC3C,cAAc,+BAA4B;AAC1C,cAAc,+BAA4B;AAC1C,cAAc,kCAA+B;AAC7C,cAAc,6BAA0B;AACxC,cAAc,gCAA6B;AAC3C,cAAc,8BAA2B;AACzC,cAAc,6BAA0B","ignoreList":[]}
|
package/lib/module/modules/bt-management/services/background-sync/background-service-uuids.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { IntegratedDevices } from "../../types/integrated-devices.js";
|
|
4
|
+
import { a606MainServices } from "../devices/a606/a606.main-services.js";
|
|
4
5
|
import { bc01MainServices } from "../devices/bc01/bc01.main-services.js";
|
|
5
6
|
import { bp2MainServices } from "../devices/bp2/bp2.main-services.js";
|
|
7
|
+
import { bpw1MainServices } from "../devices/bpw1/bpw1.main-services.js";
|
|
6
8
|
import { f4MainServices } from "../devices/f4/f4.main-services.js";
|
|
7
9
|
import { spo2MainServices } from "../devices/spo/spo2.main-services.js";
|
|
8
10
|
const normalize = uuid => uuid.toLowerCase();
|
|
@@ -12,6 +14,8 @@ const BUILT_IN_SERVICE_UUIDS = {
|
|
|
12
14
|
[IntegratedDevices.F4]: serviceUUIDs(f4MainServices),
|
|
13
15
|
[IntegratedDevices.PC60WF]: serviceUUIDs(spo2MainServices),
|
|
14
16
|
[IntegratedDevices.BC01]: serviceUUIDs(bc01MainServices),
|
|
17
|
+
[IntegratedDevices.ZH_SG_A606]: serviceUUIDs(a606MainServices),
|
|
18
|
+
[IntegratedDevices.BPW1]: serviceUUIDs(bpw1MainServices),
|
|
15
19
|
[IntegratedDevices.VEROVAL_DUO_CONTROL]: ["5d4b8aa6-a26a-4a1b-99f5-cd4473c786e3"],
|
|
16
20
|
[IntegratedDevices.VEROVAL_ECG]: ["0000a000-0000-1000-8000-00805f9b34fb"]
|
|
17
21
|
};
|
package/lib/module/modules/bt-management/services/background-sync/background-service-uuids.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["IntegratedDevices","bc01MainServices","bp2MainServices","f4MainServices","spo2MainServices","normalize","uuid","toLowerCase","serviceUUIDs","services","map","service","BUILT_IN_SERVICE_UUIDS","BP2","F4","PC60WF","BC01","VEROVAL_DUO_CONTROL","VEROVAL_ECG","getBackgroundServiceUUIDs","acceptedDevices","additionalServiceUUIDs","uuids","Set","forEach","acceptedDevice","deviceUUIDs","mainServices","add"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/background-sync/background-service-uuids.ts"],"mappings":";;AAEA,SAASA,iBAAiB,QAAQ,mCAAgC;AAElE,SAASC,gBAAgB,QAAQ,uCAAoC;AACrE,SAASC,eAAe,QAAQ,qCAAkC;AAClE,SAASC,cAAc,QAAQ,mCAAgC;AAC/D,SAASC,gBAAgB,QAAQ,sCAAmC;AAEpE,MAAMC,SAAS,GAAIC,IAAY,IAAaA,IAAI,CAACC,WAAW,CAAC,CAAC;AAE9D,MAAMC,YAAY,GAAIC,QAA6B,IACjDA,QAAQ,CAACC,GAAG,CAAEC,OAAO,IAAKN,SAAS,CAACM,OAAO,CAACL,IAAI,CAAC,CAAC;AAEpD,MAAMM,sBAAoE,GAAG;EAC3E,
|
|
1
|
+
{"version":3,"names":["IntegratedDevices","a606MainServices","bc01MainServices","bp2MainServices","bpw1MainServices","f4MainServices","spo2MainServices","normalize","uuid","toLowerCase","serviceUUIDs","services","map","service","BUILT_IN_SERVICE_UUIDS","BP2","F4","PC60WF","BC01","ZH_SG_A606","BPW1","VEROVAL_DUO_CONTROL","VEROVAL_ECG","getBackgroundServiceUUIDs","acceptedDevices","additionalServiceUUIDs","uuids","Set","forEach","acceptedDevice","deviceUUIDs","mainServices","add"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/background-sync/background-service-uuids.ts"],"mappings":";;AAEA,SAASA,iBAAiB,QAAQ,mCAAgC;AAElE,SAASC,gBAAgB,QAAQ,uCAAoC;AACrE,SAASC,gBAAgB,QAAQ,uCAAoC;AACrE,SAASC,eAAe,QAAQ,qCAAkC;AAClE,SAASC,gBAAgB,QAAQ,uCAAoC;AACrE,SAASC,cAAc,QAAQ,mCAAgC;AAC/D,SAASC,gBAAgB,QAAQ,sCAAmC;AAEpE,MAAMC,SAAS,GAAIC,IAAY,IAAaA,IAAI,CAACC,WAAW,CAAC,CAAC;AAE9D,MAAMC,YAAY,GAAIC,QAA6B,IACjDA,QAAQ,CAACC,GAAG,CAAEC,OAAO,IAAKN,SAAS,CAACM,OAAO,CAACL,IAAI,CAAC,CAAC;AAEpD,MAAMM,sBAAoE,GAAG;EAC3E,CAACd,iBAAiB,CAACe,GAAG,GAAGL,YAAY,CAACP,eAAe,CAAC;EACtD,CAACH,iBAAiB,CAACgB,EAAE,GAAGN,YAAY,CAACL,cAAc,CAAC;EACpD,CAACL,iBAAiB,CAACiB,MAAM,GAAGP,YAAY,CAACJ,gBAAgB,CAAC;EAC1D,CAACN,iBAAiB,CAACkB,IAAI,GAAGR,YAAY,CAACR,gBAAgB,CAAC;EACxD,CAACF,iBAAiB,CAACmB,UAAU,GAAGT,YAAY,CAACT,gBAAgB,CAAC;EAC9D,CAACD,iBAAiB,CAACoB,IAAI,GAAGV,YAAY,CAACN,gBAAgB,CAAC;EACxD,CAACJ,iBAAiB,CAACqB,mBAAmB,GAAG,CACvC,sCAAsC,CACvC;EACD,CAACrB,iBAAiB,CAACsB,WAAW,GAAG,CAC/B,sCAAsC;AAE1C,CAAC;AAED,OAAO,MAAMC,yBAAyB,GAAGA,CACvCC,eAA0C,EAC1CC,sBAAyC,GAAG,EAAE,KACjC;EACb,MAAMC,KAAK,GAAG,IAAIC,GAAG,CAACF,sBAAsB,CAACb,GAAG,CAACL,SAAS,CAAC,CAAC;EAE5DiB,eAAe,CAACI,OAAO,CAAEC,cAAc,IAAK;IAC1C,MAAMC,WAAW,GACf,OAAOD,cAAc,KAAK,QAAQ,GAC9Bf,sBAAsB,CAACe,cAAc,CAAC,GACtCnB,YAAY,CAAEmB,cAAc,CAA4BE,YAAY,CAAC;IAE3ED,WAAW,EAAEF,OAAO,CAAEpB,IAAI,IAAKkB,KAAK,CAACM,GAAG,CAACzB,SAAS,CAACC,IAAI,CAAC,CAAC,CAAC;EAC5D,CAAC,CAAC;EAEF,OAAO,CAAC,GAAGkB,KAAK,CAAC;AACnB,CAAC","ignoreList":[]}
|
|
@@ -3,12 +3,16 @@
|
|
|
3
3
|
import { resolveDeviceKey } from "../core/resolve-device-key.js";
|
|
4
4
|
import { IntegratedDevices } from "../types/integrated-devices.js";
|
|
5
5
|
import { isCustomDeviceDefinition } from "../utils/is-custom-device-definition.js";
|
|
6
|
+
import { A606Device } from "./devices/a606/a606.device.js";
|
|
6
7
|
import { Aoj20aDevice } from "./devices/aoj/aoj.device.js";
|
|
7
8
|
import { BC01Device } from "./devices/bc01/bc01.device.js";
|
|
8
9
|
import { BloodGlucoseDevice } from "./devices/blood-glucose/blood-glucose.device.js";
|
|
9
10
|
import { BP2Device } from "./devices/bp2/bp2.device.js";
|
|
11
|
+
import { Bpw1Device } from "./devices/bpw1/bpw1.device.js";
|
|
12
|
+
import { CheckmeProDevice } from "./devices/checkme/checkme.device.js";
|
|
10
13
|
import { CustomDevice } from "./devices/custom/custom.device.js";
|
|
11
14
|
import { F4Device } from "./devices/f4/f4.device.js";
|
|
15
|
+
import { GenialT31Device } from "./devices/genial-t31/genial-t31.device.js";
|
|
12
16
|
import { OxyfitDevice } from "./devices/spo/oxyfit.device.js";
|
|
13
17
|
import { SPO2Device } from "./devices/spo/spo2.device.js";
|
|
14
18
|
import { MySenseDevice } from "./devices/uebe/mysense.device.js";
|
|
@@ -36,7 +40,11 @@ const DEVICE_CLASSES = {
|
|
|
36
40
|
[IntegratedDevices.BGM]: BloodGlucoseDevice,
|
|
37
41
|
[IntegratedDevices.VEROVAL_DUO_CONTROL]: VerovalDuoControlDevice,
|
|
38
42
|
[IntegratedDevices.VEROVAL_ECG]: VerovalEcgDevice,
|
|
39
|
-
[IntegratedDevices.VEROVAL_ACTIVITY]: VerovalActivityDevice
|
|
43
|
+
[IntegratedDevices.VEROVAL_ACTIVITY]: VerovalActivityDevice,
|
|
44
|
+
[IntegratedDevices.GENIAL_T31]: GenialT31Device,
|
|
45
|
+
[IntegratedDevices.ZH_SG_A606]: A606Device,
|
|
46
|
+
[IntegratedDevices.BPW1]: Bpw1Device,
|
|
47
|
+
[IntegratedDevices.CHECKME]: CheckmeProDevice
|
|
40
48
|
};
|
|
41
49
|
const collectCustomDevices = acceptedDevices => {
|
|
42
50
|
const customDevices = new Map();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["resolveDeviceKey","IntegratedDevices","isCustomDeviceDefinition","Aoj20aDevice","BC01Device","BloodGlucoseDevice","BP2Device","CustomDevice","F4Device","OxyfitDevice","SPO2Device","MySenseDevice","VerovalActivityDevice","VerovalDuoControlDevice","VerovalEcgDevice","DEVICE_CLASSES","BP2","F4","PC60WF","SPO2","MYSENSE","BC01","AOJ20A","TAIDOC_GLUCOSE","GLUCOCHECK","BGM","VEROVAL_DUO_CONTROL","VEROVAL_ECG","VEROVAL_ACTIVITY","collectCustomDevices","acceptedDevices","customDevices","Map","matchers","Set","forEach","entry","index","Error","has","id","matchByService","nameMatch","source","set","add","DeviceCreator","deviceNameCache","CACHE_MAX_SIZE","constructor","acceptedDeviceNames","getDeviceName","foundName","serviceUUIDs","normalizedServices","map","uuid","toLowerCase","size","undefined","matchDeviceName","get","matched","cacheDeviceName","createDevice","params","String","deviceName","trim","device","name","localName","custom","deviceClass","Object","keys","join","destroy","clear","deviceType","firstKey","next","value","delete"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/services/device-creator.ts"],"mappings":";;AAAA,SAASA,gBAAgB,QAAQ,+BAA4B;AAM7D,SAASC,iBAAiB,QAAQ,gCAA6B;AAC/D,SAASC,wBAAwB,QAAQ,yCAAsC;AAE/E,SAASC,YAAY,QAAQ,6BAA0B;AACvD,SAASC,UAAU,QAAQ,+BAA4B;AACvD,SAASC,kBAAkB,QAAQ,iDAA8C;AACjF,SAASC,SAAS,QAAQ,6BAA0B;
|
|
1
|
+
{"version":3,"names":["resolveDeviceKey","IntegratedDevices","isCustomDeviceDefinition","A606Device","Aoj20aDevice","BC01Device","BloodGlucoseDevice","BP2Device","Bpw1Device","CheckmeProDevice","CustomDevice","F4Device","GenialT31Device","OxyfitDevice","SPO2Device","MySenseDevice","VerovalActivityDevice","VerovalDuoControlDevice","VerovalEcgDevice","DEVICE_CLASSES","BP2","F4","PC60WF","SPO2","MYSENSE","BC01","AOJ20A","TAIDOC_GLUCOSE","GLUCOCHECK","BGM","VEROVAL_DUO_CONTROL","VEROVAL_ECG","VEROVAL_ACTIVITY","GENIAL_T31","ZH_SG_A606","BPW1","CHECKME","collectCustomDevices","acceptedDevices","customDevices","Map","matchers","Set","forEach","entry","index","Error","has","id","matchByService","nameMatch","source","set","add","DeviceCreator","deviceNameCache","CACHE_MAX_SIZE","constructor","acceptedDeviceNames","getDeviceName","foundName","serviceUUIDs","normalizedServices","map","uuid","toLowerCase","size","undefined","matchDeviceName","get","matched","cacheDeviceName","createDevice","params","String","deviceName","trim","device","name","localName","custom","deviceClass","Object","keys","join","destroy","clear","deviceType","firstKey","next","value","delete"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/services/device-creator.ts"],"mappings":";;AAAA,SAASA,gBAAgB,QAAQ,+BAA4B;AAM7D,SAASC,iBAAiB,QAAQ,gCAA6B;AAC/D,SAASC,wBAAwB,QAAQ,yCAAsC;AAE/E,SAASC,UAAU,QAAQ,+BAA4B;AACvD,SAASC,YAAY,QAAQ,6BAA0B;AACvD,SAASC,UAAU,QAAQ,+BAA4B;AACvD,SAASC,k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U,eAAeA,CACrBI,UAAkB,EAClBY,UAA4B,EACtB;IACN;IACA,IAAI,IAAI,CAAChC,eAAe,CAACW,IAAI,IAAI,IAAI,CAACV,cAAc,EAAE;MACpD,MAAMgC,QAAQ,GAAG,IAAI,CAACjC,eAAe,CAAC4B,IAAI,CAAC,CAAC,CAACM,IAAI,CAAC,CAAC,CAACC,KAAK;MAEzD,IAAIF,QAAQ,KAAKrB,SAAS,EAAE;QAC1B,IAAI,CAACZ,eAAe,CAACoC,MAAM,CAACH,QAAQ,CAAC;MACvC;IACF;IAEA,IAAI,CAACjC,eAAe,CAACH,GAAG,CAACuB,UAAU,EAAEY,UAAU,CAAC;EAClD;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { getClockParts, isClockSyncEnabled } from "../../../types/clock-sync.js";
|
|
4
|
+
import { hexToByte } from "../../../utils/hex-to-byte.js";
|
|
5
|
+
const SERVICE = "0000ff00-0000-1000-8000-00805f9b34fb";
|
|
6
|
+
const WRITE = "0000ff01-0000-1000-8000-00805f9b34fb";
|
|
7
|
+
const NOTIFY = "0000ff02-0000-1000-8000-00805f9b34fb";
|
|
8
|
+
const TYPE_GET = 0x43;
|
|
9
|
+
const TYPE_UPLOAD = 0x44;
|
|
10
|
+
const CMD_UPDATE_TIME = 0x54;
|
|
11
|
+
const CMD_UPLOAD_DATA = 0x45;
|
|
12
|
+
const byte = value => (value & 0xff).toString(16).padStart(2, "0");
|
|
13
|
+
const frameFor = values => {
|
|
14
|
+
const frame = values.map(byte);
|
|
15
|
+
const checksum = frame.reduce((sum, value) => sum + hexToByte(value) & 0xff, 0);
|
|
16
|
+
return [...frame, byte(checksum)];
|
|
17
|
+
};
|
|
18
|
+
const commandFor = frame => ({
|
|
19
|
+
serviceUuid: SERVICE,
|
|
20
|
+
characteristicUuid: WRITE,
|
|
21
|
+
frame
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
/** The vendor's post-connect command for the ZH-SG family. */
|
|
25
|
+
const buildA606ConnectedCommand = () => frameFor([0x26, TYPE_UPLOAD, 0x03, 0x46, 0x20, 0x01, 0x20]);
|
|
26
|
+
|
|
27
|
+
/** Writes the local clock in the six-byte YY MM DD hh mm ss payload. */
|
|
28
|
+
const buildA606TimeCommand = now => {
|
|
29
|
+
const parts = getClockParts(now);
|
|
30
|
+
return frameFor([0x26, TYPE_GET, CMD_UPDATE_TIME, 0x20, parts.year % 100, parts.month, parts.day, parts.hours, parts.minutes, parts.seconds, 0x20]);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/** Requests the next stored record after the current one was accepted. */
|
|
34
|
+
const buildA606UploadCommand = (ack = false) => frameFor([0x26, TYPE_UPLOAD, CMD_UPLOAD_DATA, 0x20, ack ? 0x53 : 0x46, 0x20]);
|
|
35
|
+
class A606CommandSequencer {
|
|
36
|
+
phase = "connected";
|
|
37
|
+
constructor(clockSync) {
|
|
38
|
+
this.clockSync = clockSync;
|
|
39
|
+
}
|
|
40
|
+
initialCommands = () => [commandFor(buildA606ConnectedCommand())];
|
|
41
|
+
isHistoryTransfer = () => true;
|
|
42
|
+
nextCommand = frame => {
|
|
43
|
+
const type = hexToByte(frame[1] ?? "00");
|
|
44
|
+
const command = hexToByte(frame[2] ?? "00");
|
|
45
|
+
if (type === TYPE_GET && command === CMD_UPDATE_TIME) {
|
|
46
|
+
if (this.phase === "connected" && isClockSyncEnabled(this.clockSync) && hexToByte(frame[4] ?? "ff") === 0) {
|
|
47
|
+
this.phase = "clock";
|
|
48
|
+
return [commandFor(buildA606TimeCommand(this.clockSync?.now?.() ?? new Date()))];
|
|
49
|
+
}
|
|
50
|
+
this.phase = "records";
|
|
51
|
+
return undefined;
|
|
52
|
+
}
|
|
53
|
+
if (type === TYPE_UPLOAD && command === CMD_UPLOAD_DATA) {
|
|
54
|
+
this.phase = "records";
|
|
55
|
+
return [commandFor(buildA606UploadCommand(false))];
|
|
56
|
+
}
|
|
57
|
+
return undefined;
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
export { A606CommandSequencer, buildA606ConnectedCommand, buildA606TimeCommand, buildA606UploadCommand, NOTIFY as A606_NOTIFY, SERVICE as A606_SERVICE, WRITE as A606_WRITE };
|
|
61
|
+
//# sourceMappingURL=a606.command-sequencer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getClockParts","isClockSyncEnabled","hexToByte","SERVICE","WRITE","NOTIFY","TYPE_GET","TYPE_UPLOAD","CMD_UPDATE_TIME","CMD_UPLOAD_DATA","byte","value","toString","padStart","frameFor","values","frame","map","checksum","reduce","sum","commandFor","serviceUuid","characteristicUuid","buildA606ConnectedCommand","buildA606TimeCommand","now","parts","year","month","day","hours","minutes","seconds","buildA606UploadCommand","ack","A606CommandSequencer","phase","constructor","clockSync","initialCommands","isHistoryTransfer","nextCommand","type","command","Date","undefined","A606_NOTIFY","A606_SERVICE","A606_WRITE"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/a606/a606.command-sequencer.ts"],"mappings":";;AAAA,SAEEA,aAAa,EACbC,kBAAkB,QACb,8BAA2B;AAGlC,SAASC,SAAS,QAAQ,+BAA4B;AAEtD,MAAMC,OAAO,GAAG,sCAAsC;AACtD,MAAMC,KAAK,GAAG,sCAAsC;AACpD,MAAMC,MAAM,GAAG,sCAAsC;AAErD,MAAMC,QAAQ,GAAG,IAAI;AACrB,MAAMC,WAAW,GAAG,IAAI;AACxB,MAAMC,eAAe,GAAG,IAAI;AAC5B,MAAMC,eAAe,GAAG,IAAI;AAE5B,MAAMC,IAAI,GAAIC,KAAa,IACzB,CAACA,KAAK,GAAG,IAAI,EAAEC,QAAQ,CAAC,EAAE,CAAC,CAACC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC;AAE9C,MAAMC,QAAQ,GAAIC,MAAyB,IAAe;EACxD,MAAMC,KAAK,GAAGD,MAAM,CAACE,GAAG,CAACP,IAAI,CAAC;EAE9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
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { MeasurementTypeKey } from "@ovok/core";
|
|
4
|
+
import { CaseType } from "../../../types/case-type.js";
|
|
5
|
+
import { BTManagedDevice } from "../bt-managed-device.js";
|
|
6
|
+
import { A606CommandSequencer } from "./a606.command-sequencer.js";
|
|
7
|
+
import { parseA606Record } from "./a606.frame-parser.js";
|
|
8
|
+
import { A606FrameReader } from "./a606.frame-reader.js";
|
|
9
|
+
import { a606MainServices } from "./a606.main-services.js";
|
|
10
|
+
/** Viatom/Lepu ZH-SG-A606 meter, which uploads stored records after connection. */
|
|
11
|
+
class A606Device extends BTManagedDevice {
|
|
12
|
+
mainServices = a606MainServices;
|
|
13
|
+
stuckDataTimeout = 120_000;
|
|
14
|
+
onStreamStart = undefined;
|
|
15
|
+
frameReader = new A606FrameReader();
|
|
16
|
+
constructor(device, params) {
|
|
17
|
+
super(device, params);
|
|
18
|
+
this.createCommandSequencer = () => new A606CommandSequencer(params.clockSync);
|
|
19
|
+
}
|
|
20
|
+
handleDependentResult = data => {
|
|
21
|
+
if (data.frame) {
|
|
22
|
+
const record = parseA606Record(data.frame);
|
|
23
|
+
if (record) {
|
|
24
|
+
this.onResult?.({
|
|
25
|
+
caseType: CaseType.RESULT,
|
|
26
|
+
measurementTypeKey: MeasurementTypeKey.bloodGlucose,
|
|
27
|
+
bloodGlucose: record.bloodGlucose,
|
|
28
|
+
recordedAt: record.recordedAt
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
...data,
|
|
34
|
+
parsingCase: {
|
|
35
|
+
...data.parsingCase,
|
|
36
|
+
caseType: CaseType.OTHER
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
handleSuccessResult() {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
export { A606Device, a606MainServices };
|
|
45
|
+
//# sourceMappingURL=a606.device.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["MeasurementTypeKey","CaseType","BTManagedDevice","A606CommandSequencer","parseA606Record","A606FrameReader","a606MainServices","A606Device","mainServices","stuckDataTimeout","onStreamStart","undefined","frameReader","constructor","device","params","createCommandSequencer","clockSync","handleDependentResult","data","frame","record","onResult","caseType","RESULT","measurementTypeKey","bloodGlucose","recordedAt","parsingCase","OTHER","handleSuccessResult"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/a606/a606.device.ts"],"mappings":";;AAAA,SAAkCA,kBAAkB,QAAQ,YAAY;AAGxE,SAASC,QAAQ,QAAQ,6BAA0B;AAQnD,SAASC,eAAe,QAAQ,yBAAsB;AAEtD,SAASC,oBAAoB,QAAQ,6BAA0B;AAC/D,SAASC,eAAe,QAAQ,wBAAqB;AACrD,SAASC,eAAe,QAAQ,wBAAqB;AACrD,SAASC,gBAAgB,QAAQ,yBAAsB;AAMvD;AACA,MAAMC,UAAU,SAASL,eAAe,CAA+B;EAC3DM,YAAY,GAAeF,gBAAgB;EAC3CG,gBAAgB,GAAG,OAAO;EAC1BC,aAAa,GAAGC,SAAS;EACzBC,WAAW,GAAG,IAAIP,eAAe,CAAC,CAAC;EAEtCQ,WAAWA,CAChBC,MAAc,EACdC,MAAwD,EACxD;IACA,KAAK,CAACD,MAAM,EAAEC,MAAM,CAAC;IACrB,IAAI,CAACC,sBAAsB,GAAG,MAC5B,IAAIb,oBAAoB,CAACY,MAAM,CAACE,SAAS,CAAC;EAC9C;EAEUC,qBAAqB,GAC7BC,IAAmD,IACD;IAClD,IAAIA,IAAI,CAACC,KAAK,EAAE;MACd,MAAMC,MAAM,GAAGjB,eAAe,CAACe,IAAI,CAACC,KAAK,CAAC;MAE1C,IAAIC,MAAM,EAAE;QACV,IAAI,CAACC,QAAQ,GAAG;UACdC,QAAQ,EAAEtB,QAAQ,CAACuB,MAAM;UACzBC,kBAAkB,EAAEzB,kBAAkB,CAAC0B,YAAY;UACnDA,YAAY,EAAEL,MAAM,CAACK,YAAY;UACjCC,UAAU,EAAEN,MAAM,CAACM;QACrB,CAAwE,CAAC;MAC3E;IACF;IAEA,OAAO;MACL,GAAGR,IAAI;MACPS,WAAW,EAAE;QAAE,GAAGT,IAAI,CAACS,WAAW;QAAEL,QAAQ,EAAEtB,QAAQ,CAAC4B;MAAM;IAC/D,CAAC;EACH,CAAC;EAESC,mBAAmBA,CAAA,EAAmB;IAC9C;EACF;AACF;AAEA,SAASvB,UAAU,EAAED,gBAAgB","ignoreList":[]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { hexToByte } from "../../../utils/hex-to-byte.js";
|
|
4
|
+
const bigEndian = (frame, from) => (hexToByte(frame[from] ?? "00") << 8) + hexToByte(frame[from + 1] ?? "00");
|
|
5
|
+
|
|
6
|
+
/** Decodes the 12-byte glucose payload inside a verified 16-byte ZH-SG record. */
|
|
7
|
+
const parseA606Record = frame => {
|
|
8
|
+
if (frame.length < 16 || hexToByte(frame[0] ?? "00") !== 0x26 || hexToByte(frame[1] ?? "00") !== 0x44 || hexToByte(frame[2] ?? "00") !== 0x45) {
|
|
9
|
+
return undefined;
|
|
10
|
+
}
|
|
11
|
+
const year = 2000 + hexToByte(frame[8] ?? "00");
|
|
12
|
+
const month = hexToByte(frame[9] ?? "00");
|
|
13
|
+
const day = hexToByte(frame[10] ?? "00");
|
|
14
|
+
const hour = hexToByte(frame[11] ?? "00");
|
|
15
|
+
const minute = hexToByte(frame[12] ?? "00");
|
|
16
|
+
const second = hexToByte(frame[13] ?? "00");
|
|
17
|
+
const recordedAt = new Date(year, month - 1, day, hour, minute, second, 0);
|
|
18
|
+
if (month < 1 || month > 12 || day < 1 || day > 31 || hour > 23 || minute > 59 || second > 59 || recordedAt.getFullYear() !== year || recordedAt.getMonth() !== month - 1 || recordedAt.getDate() !== day || recordedAt.getHours() !== hour || recordedAt.getMinutes() !== minute || recordedAt.getSeconds() !== second) {
|
|
19
|
+
return undefined;
|
|
20
|
+
}
|
|
21
|
+
const bloodGlucose = bigEndian(frame, 6);
|
|
22
|
+
if (bloodGlucose === 0) {
|
|
23
|
+
return undefined;
|
|
24
|
+
}
|
|
25
|
+
return {
|
|
26
|
+
bloodGlucose,
|
|
27
|
+
recordedAt,
|
|
28
|
+
dataPosition: bigEndian(frame, 4)
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export { parseA606Record };
|
|
32
|
+
//# sourceMappingURL=a606.frame-parser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["hexToByte","bigEndian","frame","from","parseA606Record","length","undefined","year","month","day","hour","minute","second","recordedAt","Date","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","bloodGlucose","dataPosition"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/a606/a606.frame-parser.ts"],"mappings":";;AAAA,SAASA,SAAS,QAAQ,+BAA4B;AAQtD,MAAMC,SAAS,GAAGA,CAACC,KAAwB,EAAEC,IAAY,KACvD,CAACH,SAAS,CAACE,KAAK,CAACC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAIH,SAAS,CAACE,KAAK,CAACC,IAAI,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC;;AAE5E;AACA,MAAMC,eAAe,GAAIF,KAAwB,IAA6B;EAC5E,IACEA,KAAK,CAACG,MAAM,GAAG,EAAE,IACjBL,SAAS,CAACE,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,IAAI,IACpCF,SAAS,CAACE,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,IAAI,IACpCF,SAAS,CAACE,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,IAAI,EACpC;IACA,OAAOI,SAAS;EAClB;EAEA,MAAMC,IAAI,GAAG,IAAI,GAAGP,SAAS,CAACE,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;EAC/C,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AU;IACVS,YAAY,EAAErB,SAAS,CAACC,KAAK,EAAE,CAAC;EAClC,CAAC;AACH,CAAC;AAED,SAASE,eAAe","ignoreList":[]}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { FrameReadStatus } from "../../../types/frame-read-status.js";
|
|
4
|
+
import { hexToByte } from "../../../utils/hex-to-byte.js";
|
|
5
|
+
const START = 0x26;
|
|
6
|
+
const TYPE_GET = 0x43;
|
|
7
|
+
const TYPE_UPLOAD = 0x44;
|
|
8
|
+
const TYPE_INDEX = 1;
|
|
9
|
+
const CHECKSUM_BYTES = 1;
|
|
10
|
+
|
|
11
|
+
/** Reads the `& C/D ... checksum` frames used by Viatom's ZH-SG glucose protocol. */
|
|
12
|
+
export class A606FrameReader {
|
|
13
|
+
readFrame(buffer) {
|
|
14
|
+
const start = this.findStart(buffer);
|
|
15
|
+
if (start < 0) {
|
|
16
|
+
return {
|
|
17
|
+
status: FrameReadStatus.INCOMPLETE,
|
|
18
|
+
consumedBytes: Math.max(0, buffer.length - 1)
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
const type = hexToByte(buffer[start + TYPE_INDEX] ?? "00");
|
|
22
|
+
const frameLength = type === TYPE_UPLOAD ? 16 : type === TYPE_GET ? 7 : 0;
|
|
23
|
+
if (frameLength === 0) {
|
|
24
|
+
return {
|
|
25
|
+
status: FrameReadStatus.CORRUPT,
|
|
26
|
+
consumedBytes: start + 1
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
if (start + frameLength > buffer.length) {
|
|
30
|
+
return {
|
|
31
|
+
status: FrameReadStatus.INCOMPLETE,
|
|
32
|
+
consumedBytes: start
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
const frame = buffer.slice(start, start + frameLength);
|
|
36
|
+
if (!this.hasValidChecksum(frame)) {
|
|
37
|
+
return {
|
|
38
|
+
status: FrameReadStatus.CORRUPT,
|
|
39
|
+
consumedBytes: start + 1
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
status: FrameReadStatus.COMPLETE,
|
|
44
|
+
consumedBytes: start + frameLength,
|
|
45
|
+
frame
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
findStart(buffer) {
|
|
49
|
+
for (let index = 0; index + 2 < buffer.length; index++) {
|
|
50
|
+
const type = hexToByte(buffer[index + TYPE_INDEX] ?? "00");
|
|
51
|
+
if (hexToByte(buffer[index] ?? "00") === START && (type === TYPE_GET || type === TYPE_UPLOAD)) {
|
|
52
|
+
return index;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return -1;
|
|
56
|
+
}
|
|
57
|
+
hasValidChecksum(frame) {
|
|
58
|
+
const checksumIndex = frame.length - CHECKSUM_BYTES;
|
|
59
|
+
const checksum = frame.slice(0, checksumIndex).reduce((sum, byte) => sum + hexToByte(byte) & 0xff, 0);
|
|
60
|
+
return checksum === hexToByte(frame[checksumIndex] ?? "00");
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=a606.frame-reader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["FrameReadStatus","hexToByte","START","TYPE_GET","TYPE_UPLOAD","TYPE_INDEX","CHECKSUM_BYTES","A606FrameReader","readFrame","buffer","start","findStart","status","INCOMPLETE","consumedBytes","Math","max","length","type","frameLength","CORRUPT","frame","slice","hasValidChecksum","COMPLETE","index","checksumIndex","checksum","reduce","sum","byte"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/a606/a606.frame-reader.ts"],"mappings":";;AACA,SAASA,eAAe,QAAQ,qCAAkC;AAElE,SAASC,SAAS,QAAQ,+BAA4B;AAEtD,MAAMC,KAAK,GAAG,IAAI;AAClB,MAAMC,QAAQ,GAAG,IAAI;AACrB,MAAMC,WAAW,GAAG,IAAI;AACxB,MAAMC,UAAU,GAAG,CAAC;AACpB,MAAMC,cAAc,GAAG,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CAACF,MAAyB,EAAU;IACnD,KAAK,IAAIgB,KAAK,GAAG,CAAC,EAAEA,KAAK,GAAG,CAAC,GAAGhB,MAAM,CAACQ,MAAM,EAAEQ,KAAK,EAAE,EAAE;MACtD,MAAMP,IAAI,GAAGjB,SAAS,CAACQ,MAAM,CAACgB,KAAK,GAAGpB,UAAU,CAAC,IAAI,IAAI,CAAC;MAE1D,IAAIJ,SAAS,CAACQ,MAAM,CAACgB,KAAK,CAAC,IAAI,IAAI,CAAC,KAAKvB,KAAK,KAAKgB,IAAI,KAAKf,QAAQ,IAAIe,IAAI,KAAKd,WAAW,CAAC,EAAE;QAC7F,OAAOqB,KAAK;MACd;IACF;IAEA,OAAO,CAAC,CAAC;EACX;EAEQF,gBAAgBA,CAACF,KAAwB,EAAW;IAC1D,MAAMK,aAAa,GAAGL,KAAK,CAACJ,MAAM,GAAGX,cAAc;IAEnD,MAAMqB,QAAQ,GAAGN,KAAK,CACnBC,KAAK,CAAC,CAAC,EAAEI,aAAa,CAAC,CACvBE,MAAM,CAAC,CAACC,GAAG,EAAEC,IAAI,KAAMD,GAAG,GAAG5B,SAAS,CAAC6B,IAAI,CAAC,GAAI,IAAI,EAAE,CAAC,CAAC;IAE3D,OAAOH,QAAQ,KAAK1B,SAAS,CAACoB,KAAK,CAACK,aAAa,CAAC,IAAI,IAAI,CAAC;EAC7D;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { MeasurementTypeKey } from "@ovok/core";
|
|
4
|
+
import { CaseType } from "../../../types/case-type.js";
|
|
5
|
+
import { A606_NOTIFY, A606_SERVICE, A606_WRITE } from "./a606.command-sequencer.js";
|
|
6
|
+
|
|
7
|
+
/** ZH-SG's fixed GATT profile and its 16-byte stored glucose record. */
|
|
8
|
+
export const a606MainServices = [{
|
|
9
|
+
uuid: A606_SERVICE,
|
|
10
|
+
writeUuid: {
|
|
11
|
+
uuid: A606_WRITE,
|
|
12
|
+
mainCommandUuid: "26440346200120"
|
|
13
|
+
},
|
|
14
|
+
monitorUuids: [{
|
|
15
|
+
uuid: A606_NOTIFY,
|
|
16
|
+
parsingModel: {
|
|
17
|
+
caseValuePosition: [1, 2],
|
|
18
|
+
cases: [{
|
|
19
|
+
caseValue: "4445",
|
|
20
|
+
caseType: CaseType.DEPENDENT,
|
|
21
|
+
measurementTypeKey: MeasurementTypeKey.bloodGlucose,
|
|
22
|
+
minLengthBytes: 16,
|
|
23
|
+
parseDefinitions: []
|
|
24
|
+
}]
|
|
25
|
+
}
|
|
26
|
+
}]
|
|
27
|
+
}];
|
|
28
|
+
//# sourceMappingURL=a606.main-services.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["MeasurementTypeKey","CaseType","A606_NOTIFY","A606_SERVICE","A606_WRITE","a606MainServices","uuid","writeUuid","mainCommandUuid","monitorUuids","parsingModel","caseValuePosition","cases","caseValue","caseType","DEPENDENT","measurementTypeKey","bloodGlucose","minLengthBytes","parseDefinitions"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/a606/a606.main-services.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,YAAY;AAE/C,SAASC,QAAQ,QAAQ,6BAA0B;AAGnD,SAASC,WAAW,EAAEC,YAAY,EAAEC,UAAU,QAAQ,6BAA0B;;AAEhF;AACA,OAAO,MAAMC,gBAA4B,GAAG,CAC1C;EACEC,IAAI,EAAEH,YAAY;EAClBI,SAAS,EAAE;IACTD,IAAI,EAAEF,UAAU;IAChBI,eAAe,EAAE;EACnB,CAAC;EACDC,YAAY,EAAE,CACZ;IACEH,IAAI,EAAEJ,WAAW;IACjBQ,YAAY,EAAE;MACZC,iBAAiB,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;MACzBC,KAAK,EAAE,CACL;QACEC,SAAS,EAAE,MAAM;QACjBC,QAAQ,EAAEb,QAAQ,CAACc,SAAS;QAC5BC,kBAAkB,EAAEhB,kBAAkB,CAACiB,YAAY;QACnDC,cAAc,EAAE,EAAE;QAClBC,gBAAgB,EAAE;MACpB,CAAC;IAEL;EACF,CAAC;AAEL,CAAC,CACF","ignoreList":[]}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { hexToByte } from "../../../utils/hex-to-byte.js";
|
|
4
|
+
const SERVICE = "81eea003-e735-49ec-8a11-7e32cae1e14e";
|
|
5
|
+
const WRITE = "81eea002-e735-49ec-8a11-7e32cae1e14e";
|
|
6
|
+
const FEATURE_TYPE = 0x00;
|
|
7
|
+
const SYNC_TYPE = 0x01;
|
|
8
|
+
const HISTORY_TYPE = 0x03;
|
|
9
|
+
const FRAME_START = "e0";
|
|
10
|
+
const byte = value => (value & 0xff).toString(16).padStart(2, "0");
|
|
11
|
+
const withChecksum = frame => {
|
|
12
|
+
const checksum = frame.reduce((sum, value, index) => index === 3 ? sum : sum + hexToByte(value) & 0xff, 0);
|
|
13
|
+
return [...frame.slice(0, 3), byte(checksum), ...frame.slice(3)];
|
|
14
|
+
};
|
|
15
|
+
const commandFor = (frame, delayBeforeWriteMs) => ({
|
|
16
|
+
serviceUuid: SERVICE,
|
|
17
|
+
characteristicUuid: WRITE,
|
|
18
|
+
frame,
|
|
19
|
+
...(delayBeforeWriteMs === undefined ? {} : {
|
|
20
|
+
delayBeforeWriteMs
|
|
21
|
+
})
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
/** Builds an LHZL command after applying the checksum inserted by the vendor BLE writer. */
|
|
25
|
+
const buildBpw1Command = (type, protocolVersion, key, payload) => {
|
|
26
|
+
const payloadLength = payload.length;
|
|
27
|
+
const frame = [FRAME_START, byte(payloadLength + 5 >> 8), byte(payloadLength + 5), byte(type), byte(protocolVersion), byte(key), byte(payloadLength >> 8), byte(payloadLength), ...payload.map(byte)];
|
|
28
|
+
return withChecksum(frame);
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/** Builds the vendor's acknowledgement for one accepted LHZL frame. */
|
|
32
|
+
const buildBpw1Ack = frame => {
|
|
33
|
+
const type = hexToByte(frame[4] ?? "00");
|
|
34
|
+
const protocolVersion = hexToByte(frame[5] ?? "00");
|
|
35
|
+
const key = hexToByte(frame[6] ?? "00");
|
|
36
|
+
return withChecksum(["0e", "00", "06", byte(type), byte(protocolVersion), byte(key), "00", "01", "00"]);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** ViHealth's initial feature probe for the BPW1 LHZL profile. */
|
|
40
|
+
const buildBpw1FeatureCommand = () => buildBpw1Command(FEATURE_TYPE, 0, 0, [1]);
|
|
41
|
+
|
|
42
|
+
/** Requests all stored health-history packets after the feature reply. */
|
|
43
|
+
const buildBpw1HistoryCommand = protocolVersion => buildBpw1Command(SYNC_TYPE, protocolVersion, 0, [1]);
|
|
44
|
+
|
|
45
|
+
/** Answers the feature probe, then starts the vendor's all-history transfer. */
|
|
46
|
+
class Bpw1CommandSequencer {
|
|
47
|
+
protocolVersion = 0;
|
|
48
|
+
historyRequested = false;
|
|
49
|
+
initialCommands = () => [commandFor(buildBpw1FeatureCommand(), 300)];
|
|
50
|
+
nextCommand = frame => {
|
|
51
|
+
if (frame.length < 7) {
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
const type = hexToByte(frame[4] ?? "00");
|
|
55
|
+
const acknowledgement = commandFor(buildBpw1Ack(frame));
|
|
56
|
+
if (type === FEATURE_TYPE && !this.historyRequested) {
|
|
57
|
+
this.protocolVersion = hexToByte(frame[5] ?? "00");
|
|
58
|
+
this.historyRequested = true;
|
|
59
|
+
return [acknowledgement, commandFor(buildBpw1HistoryCommand(this.protocolVersion))];
|
|
60
|
+
}
|
|
61
|
+
return [acknowledgement];
|
|
62
|
+
};
|
|
63
|
+
isHistoryTransfer = () => true;
|
|
64
|
+
}
|
|
65
|
+
export { Bpw1CommandSequencer, buildBpw1Ack, buildBpw1FeatureCommand, buildBpw1HistoryCommand, SERVICE as BPW1_SERVICE, WRITE as BPW1_WRITE, HISTORY_TYPE as BPW1_HISTORY_TYPE };
|
|
66
|
+
//# sourceMappingURL=bpw1.command-sequencer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["hexToByte","SERVICE","WRITE","FEATURE_TYPE","SYNC_TYPE","HISTORY_TYPE","FRAME_START","byte","value","toString","padStart","withChecksum","frame","checksum","reduce","sum","index","slice","commandFor","delayBeforeWriteMs","serviceUuid","characteristicUuid","undefined","buildBpw1Command","type","protocolVersion","key","payload","payloadLength","length","map","buildBpw1Ack","buildBpw1FeatureCommand","buildBpw1HistoryCommand","Bpw1CommandSequencer","historyRequested","initialCommands","nextCommand","acknowledgement","isHistoryTransfer","BPW1_SERVICE","BPW1_WRITE","BPW1_HISTORY_TYPE"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/bpw1/bpw1.command-sequencer.ts"],"mappings":";;AAEA,SAASA,SAAS,QAAQ,+BAA4B;AAEtD,MAAMC,OAAO,GAAG,sCAAsC;AACtD,MAAMC,KAAK,GAAG,sCAAsC;AACpD,MAAMC,YAAY,GAAG,IAAI;AACzB,MAAMC,SAAS,GAAG,IAAI;AACtB,MAAMC,YAAY,GAAG,IAAI;AACzB,MAAMC,WAAW,GAAG,IAAI;AAExB,MAAMC,IAAI,GAAIC,KAAa,IACzB,CAACA,KAAK,GAAG,IAAI,EAAEC,QAAQ,CAAC,EAAE,CAAC,CAACC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC;AAE9C,MAAMC,YAAY,GAAIC,KAAwB,IAAe;EAC3D,MAAMC,QAAQ,GAAGD,KAAK,CAACE,MAAM,CAC3B,CAACC,GAAG,EAAEP,KAAK,EAAEQ,KAAK,KAChBA,KAAK,KAAK,CAAC,GAAGD,GAAG,GAAIA,GAAG,GAAGf,SAAS,CAACQ,KAAK,CAAC,GAAI,IAAI,EACrD,CACF,CAAC;EAED,OAAO,CAAC,GAAGI,KAAK,CAACK,KAAK,CAAC,CA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;EAC1B,CAAC;EAEMC,iBAAiB,GAAGA,CAAA,KAAe,IAAI;AAChD;AAEA,SACEL,oBAAoB,EACpBH,YAAY,EACZC,uBAAuB,EACvBC,uBAAuB,EACvBhC,OAAO,IAAIuC,YAAY,EACvBtC,KAAK,IAAIuC,UAAU,EACnBpC,YAAY,IAAIqC,iBAAiB","ignoreList":[]}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { MeasurementTypeKey } from "@ovok/core";
|
|
4
|
+
import { CaseType } from "../../../types/case-type.js";
|
|
5
|
+
import { BTManagedDevice } from "../bt-managed-device.js";
|
|
6
|
+
import { Bpw1CommandSequencer } from "./bpw1.command-sequencer.js";
|
|
7
|
+
import { parseBpw1BloodPressureRecords } from "./bpw1.frame-parser.js";
|
|
8
|
+
import { Bpw1FrameReader } from "./bpw1.frame-reader.js";
|
|
9
|
+
import { bpw1MainServices } from "./bpw1.main-services.js";
|
|
10
|
+
/** Viatom BPW1 watch, including stored blood-pressure history. */
|
|
11
|
+
class Bpw1Device extends BTManagedDevice {
|
|
12
|
+
mainServices = bpw1MainServices;
|
|
13
|
+
stuckDataTimeout = 120_000;
|
|
14
|
+
onStreamStart = undefined;
|
|
15
|
+
frameReader = new Bpw1FrameReader();
|
|
16
|
+
constructor(device, params) {
|
|
17
|
+
super(device, params);
|
|
18
|
+
this.createCommandSequencer = () => new Bpw1CommandSequencer();
|
|
19
|
+
}
|
|
20
|
+
handleDependentResult = data => {
|
|
21
|
+
if (data.frame) {
|
|
22
|
+
for (const record of parseBpw1BloodPressureRecords(data.frame)) {
|
|
23
|
+
this.onResult?.({
|
|
24
|
+
caseType: CaseType.RESULT,
|
|
25
|
+
measurementTypeKey: MeasurementTypeKey.bloodPressure,
|
|
26
|
+
systolic: record.systolic,
|
|
27
|
+
diastolic: record.diastolic,
|
|
28
|
+
recordedAt: record.recordedAt
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
...data,
|
|
34
|
+
parsingCase: {
|
|
35
|
+
...data.parsingCase,
|
|
36
|
+
caseType: CaseType.OTHER
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
handleSuccessResult() {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
export { Bpw1Device, bpw1MainServices };
|
|
45
|
+
//# sourceMappingURL=bpw1.device.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["MeasurementTypeKey","CaseType","BTManagedDevice","Bpw1CommandSequencer","parseBpw1BloodPressureRecords","Bpw1FrameReader","bpw1MainServices","Bpw1Device","mainServices","stuckDataTimeout","onStreamStart","undefined","frameReader","constructor","device","params","createCommandSequencer","handleDependentResult","data","frame","record","onResult","caseType","RESULT","measurementTypeKey","bloodPressure","systolic","diastolic","recordedAt","parsingCase","OTHER","handleSuccessResult"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/bpw1/bpw1.device.ts"],"mappings":";;AAAA,SAAmCA,kBAAkB,QAAQ,YAAY;AAGzE,SAASC,QAAQ,QAAQ,6BAA0B;AAQnD,SAASC,eAAe,QAAQ,yBAAsB;AAEtD,SAASC,oBAAoB,QAAQ,6BAA0B;AAC/D,SAASC,6BAA6B,QAAQ,wBAAqB;AACnE,SAASC,eAAe,QAAQ,wBAAqB;AACrD,SAASC,gBAAgB,QAAQ,yBAAsB;AAIvD;AACA,MAAMC,UAAU,SAASL,eAAe,CAAyB;EACrDM,YAAY,GAAeF,gBAAgB;EAC3CG,gBAAgB,GAAG,OAAO;EAC1BC,aAAa,GAAGC,SAAS;EACzBC,WAAW,GAAG,IAAIP,eAAe,CAAC,CAAC;EAEtCQ,WAAWA,CAChBC,MAAc,EACdC,MAAkD,EAClD;IACA,KAAK,CAACD,MAAM,EAAEC,MAAM,CAAC;IACrB,IAAI,CAACC,sBAAsB,GAAG,MAC5B,IAAIb,oBAAoB,CAAC,CAAC;EAC9B;EAEUc,qBAAqB,GAC7BC,IAAmD,IACD;IAClD,IAAIA,IAAI,CAACC,KAAK,EAAE;MACd,KAAK,MAAMC,MAAM,IAAIhB,6BAA6B,CAACc,IAAI,CAACC,KAAK,CAAC,EAAE;QAC9D,IAAI,CAACE,QAAQ,GAAG;UACdC,QAAQ,EAAErB,QAAQ,CAACsB,MAAM;UACzBC,kBAAkB,EAAExB,kBAAkB,CAACyB,aAAa;UACpDC,QAAQ,EAAEN,MAAM,CAACM,QAAQ;UACzBC,SAAS,EAAEP,MAAM,CAACO,SAAS;UAC3BC,UAAU,EAAER,MAAM,CAACQ;QACrB,CAAyE,CAAC;MAC5E;IACF;IAEA,OAAO;MACL,GAAGV,IAAI;MACPW,WAAW,EAAE;QAAE,GAAGX,IAAI,CAACW,WAAW;QAAEP,QAAQ,EAAErB,QAAQ,CAAC6B;MAAM;IAC/D,CAAC;EACH,CAAC;EAESC,mBAAmBA,CAAA,EAAmB;IAC9C;EACF;AACF;AAEA,SAASxB,UAAU,EAAED,gBAAgB","ignoreList":[]}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { hexToByte } from "../../../utils/hex-to-byte.js";
|
|
4
|
+
const bigEndian = (frame, from) => hexToByte(frame[from] ?? "00") << 24 | hexToByte(frame[from + 1] ?? "00") << 16 | hexToByte(frame[from + 2] ?? "00") << 8 | hexToByte(frame[from + 3] ?? "00");
|
|
5
|
+
const validDate = (year, month, day) => {
|
|
6
|
+
if (month < 1 || month > 12 || day < 1 || day > 31) {
|
|
7
|
+
return undefined;
|
|
8
|
+
}
|
|
9
|
+
const date = new Date(year, month - 1, day);
|
|
10
|
+
return date.getFullYear() === year && date.getMonth() === month - 1 && date.getDate() === day ? date : undefined;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
/** Decodes BP records from ViHealth's generic LHZL health-history packet. */
|
|
14
|
+
export const parseBpw1BloodPressureRecords = frame => {
|
|
15
|
+
if (frame.length < 21 || hexToByte(frame[0] ?? "00") !== 0xe0 || hexToByte(frame[4] ?? "00") !== 0x03 || hexToByte(frame[6] ?? "00") !== 0x01) {
|
|
16
|
+
return [];
|
|
17
|
+
}
|
|
18
|
+
const year = 2000 + ((hexToByte(frame[9] ?? "00") & 0x7f) >> 1);
|
|
19
|
+
const month = (hexToByte(frame[9] ?? "00") & 0x01) << 3 | (hexToByte(frame[10] ?? "00") & 0xe0) >> 5;
|
|
20
|
+
const day = hexToByte(frame[10] ?? "00") & 0x1f;
|
|
21
|
+
const date = validDate(year, month, day);
|
|
22
|
+
const count = hexToByte(frame[11] ?? "00") << 8 | hexToByte(frame[12] ?? "00");
|
|
23
|
+
if (!date || count === 0) {
|
|
24
|
+
return [];
|
|
25
|
+
}
|
|
26
|
+
const records = [];
|
|
27
|
+
for (let index = 0; index < count; index++) {
|
|
28
|
+
const offset = 13 + index * 8;
|
|
29
|
+
if (offset + 7 >= frame.length) {
|
|
30
|
+
break;
|
|
31
|
+
}
|
|
32
|
+
const secondsSinceMidnight = bigEndian(frame, offset);
|
|
33
|
+
const systolic = hexToByte(frame[offset + 6] ?? "00");
|
|
34
|
+
const diastolic = hexToByte(frame[offset + 7] ?? "00");
|
|
35
|
+
if (secondsSinceMidnight < 0 || secondsSinceMidnight >= 24 * 60 * 60 || systolic < 50 || systolic > 300 || diastolic < 30 || diastolic > 200) {
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
const recordedAt = new Date(date);
|
|
39
|
+
recordedAt.setSeconds(secondsSinceMidnight);
|
|
40
|
+
records.push({
|
|
41
|
+
systolic,
|
|
42
|
+
diastolic,
|
|
43
|
+
recordedAt
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
return records;
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=bpw1.frame-parser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["hexToByte","bigEndian","frame","from","validDate","year","month","day","undefined","date","Date","getFullYear","getMonth","getDate","parseBpw1BloodPressureRecords","length","count","records","index","offset","secondsSinceMidnight","systolic","diastolic","recordedAt","setSeconds","push"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/bpw1/bpw1.frame-parser.ts"],"mappings":";;AAAA,SAASA,SAAS,QAAQ,+BAA4B;AAQtD,MAAMC,SAAS,GAAGA,CAACC,KAAwB,EAAEC,IAAY,KACtDH,SAAS,CAACE,KAAK,CAACC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,GACpCH,SAAS,CAACE,KAAK,CAACC,IAAI,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,EAAG,GACzCH,SAAS,CAACE,KAAK,CAACC,IAAI,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,CAAE,GACzCH,SAAS,CAACE,KAAK,CAACC,IAAI,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC;AAEpC,MAAMC,SAAS,GAAGA,CAChBC,IAAY,EACZC,KAAa,EACbC,GAAW,KACU;EACrB,IAAID,KAAK,GAAG,CAAC,IAAIA,KAAK,GAAG,EAAE,IAAIC,GAAG,GAAG,CAAC,IAAIA,GAAG,GAAG,EAAE,EAAE;IAClD,OAAOC,SAAS;EAClB;EAEA,MAAMC,IAAI,GAAG,IAAIC,IAAI,CAACL,IAAI,EAAEC,KAAK,GAAG,CAAC,EAAEC,GAAG,CAAC;EAE3C,OAAOE,IAAI,CAACE,WAAW,CAAC,CAAC,KAAKN,IAAI,IAChCI,IAAI,CAACG,QAAQ,CAAC,CAAC,KAAKN,KAAK,GAAG,CAAC,IAC7BG,IAAI,CAACI,OAAO,CAAC,CAAC,KAAKN,GAAG,GACpBE,IAAI,GACJD,SAAS;AACf,CAAC;;AAED;AACA,OAAO,MAAMM,6BAA6B,GACxCZ,KAAwB,IACM;EAC9B,IACEA,KAAK,CAACa,MAAM,GAAG,EAAE,IACjBf,SAAS,CAACE,KAAK,CAAC,CAAC,CA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S,CAACC,KAAK,EAAEiB,MAAM,CAAC;IACrD,MAAME,QAAQ,GAAGrB,SAAS,CAACE,KAAK,CAACiB,MAAM,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC;IACrD,MAAMG,SAAS,GAAGtB,SAAS,CAACE,KAAK,CAACiB,MAAM,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC;IAEtD,IACEC,oBAAoB,GAAG,CAAC,IACxBA,oBAAoB,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,IACpCC,QAAQ,GAAG,EAAE,IACbA,QAAQ,GAAG,GAAG,IACdC,SAAS,GAAG,EAAE,IACdA,SAAS,GAAG,GAAG,EACf;MACA;IACF;IAEA,MAAMC,UAAU,GAAG,IAAIb,IAAI,CAACD,IAAI,CAAC;IAEjCc,UAAU,CAACC,UAAU,CAACJ,oBAAoB,CAAC;IAC3CH,OAAO,CAACQ,IAAI,CAAC;MAAEJ,QAAQ;MAAEC,SAAS;MAAEC;IAAW,CAAC,CAAC;EACnD;EAEA,OAAON,OAAO;AAChB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { FrameReadStatus } from "../../../types/frame-read-status.js";
|
|
4
|
+
import { hexToByte } from "../../../utils/hex-to-byte.js";
|
|
5
|
+
const START = 0xe0;
|
|
6
|
+
const HEADER_BYTES = 4;
|
|
7
|
+
|
|
8
|
+
/** Reads the length-prefixed, checksummed LHZL history frames used by BPW1. */
|
|
9
|
+
export class Bpw1FrameReader {
|
|
10
|
+
readFrame(buffer) {
|
|
11
|
+
const start = buffer.findIndex((byte, index) => hexToByte(byte) === START && index + 2 < buffer.length);
|
|
12
|
+
if (start < 0) {
|
|
13
|
+
return {
|
|
14
|
+
status: FrameReadStatus.INCOMPLETE,
|
|
15
|
+
consumedBytes: Math.max(0, buffer.length - 1)
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
const payloadLength = hexToByte(buffer[start + 1] ?? "00") << 8 | hexToByte(buffer[start + 2] ?? "00");
|
|
19
|
+
const frameLength = payloadLength + HEADER_BYTES;
|
|
20
|
+
if (frameLength < 9) {
|
|
21
|
+
return {
|
|
22
|
+
status: FrameReadStatus.CORRUPT,
|
|
23
|
+
consumedBytes: start + 1
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
if (start + frameLength > buffer.length) {
|
|
27
|
+
return {
|
|
28
|
+
status: FrameReadStatus.INCOMPLETE,
|
|
29
|
+
consumedBytes: start
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
const frame = buffer.slice(start, start + frameLength);
|
|
33
|
+
if (!this.hasValidChecksum(frame)) {
|
|
34
|
+
return {
|
|
35
|
+
status: FrameReadStatus.CORRUPT,
|
|
36
|
+
consumedBytes: start + 1
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
status: FrameReadStatus.COMPLETE,
|
|
41
|
+
consumedBytes: start + frameLength,
|
|
42
|
+
frame
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
hasValidChecksum(frame) {
|
|
46
|
+
const checksum = frame.reduce((sum, byte, index) => index === 3 ? sum : sum + hexToByte(byte) & 0xff, 0);
|
|
47
|
+
return checksum === hexToByte(frame[3] ?? "00");
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=bpw1.frame-reader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["FrameReadStatus","hexToByte","START","HEADER_BYTES","Bpw1FrameReader","readFrame","buffer","start","findIndex","byte","index","length","status","INCOMPLETE","consumedBytes","Math","max","payloadLength","frameLength","CORRUPT","frame","slice","hasValidChecksum","COMPLETE","checksum","reduce","sum"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/bpw1/bpw1.frame-reader.ts"],"mappings":";;AACA,SAASA,eAAe,QAAQ,qCAAkC;AAElE,SAASC,SAAS,QAAQ,+BAA4B;AAEtD,M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