@ovok/native 1.6.42 → 1.6.44
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 +9 -1
- package/lib/commonjs/modules/bt-device/constants/device-instruction-pdfs.js.map +1 -1
- package/lib/commonjs/modules/bt-device/constants/supported-devices.js +61 -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 +1 -1
- package/lib/commonjs/modules/bt-management/constants/integrated-devices-map.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/device-creator.js +16 -1
- package/lib/commonjs/modules/bt-management/services/device-creator.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.device-names.js +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.device-names.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/ap20.device.js +51 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/ap20.device.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/bioland.bgm.device.js +50 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/bioland.bgm.device.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/bioland.bgm.protocol.js +115 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/bioland.bgm.protocol.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/bioland.bgm.sequencer.js +58 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/bioland.bgm.sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/pc68b.device.js +51 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/pc68b.device.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/poctor.m3102.device.js +41 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/poctor.m3102.device.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/poctor.m3102.protocol.js +61 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/poctor.m3102.protocol.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/poctor.m3102.sequencer.js +41 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/poctor.m3102.sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom-aa55.protocol.js +122 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom-aa55.protocol.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom-aa55.sequencer.js +79 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom-aa55.sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js +9 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bpm188.device.js +50 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bpm188.device.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bpm188.protocol.js +141 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bpm188.protocol.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bpm188.sequencer.js +76 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bpm188.sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc100.device.js +50 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc100.device.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc100.protocol.js +149 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc100.protocol.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc100.sequencer.js +81 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc100.sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc300.device.js +50 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc300.device.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc300.protocol.js +228 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc300.protocol.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc300.sequencer.js +122 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc300.sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.vtm20f.frame-reader.js +50 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.vtm20f.frame-reader.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.vtm20f.js +60 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.vtm20f.js.map +1 -0
- package/lib/commonjs/modules/bt-management/types/integrated-devices.js +8 -0
- package/lib/commonjs/modules/bt-management/types/integrated-devices.js.map +1 -1
- package/lib/commonjs/modules/bt-management/utils/calculate-crc-8-pc.js +22 -0
- package/lib/commonjs/modules/bt-management/utils/calculate-crc-8-pc.js.map +1 -0
- package/lib/module/modules/bt-device/constants/device-instruction-pdfs.js +9 -1
- package/lib/module/modules/bt-device/constants/device-instruction-pdfs.js.map +1 -1
- package/lib/module/modules/bt-device/constants/supported-devices.js +62 -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 +1 -1
- package/lib/module/modules/bt-management/constants/integrated-devices-map.js.map +1 -1
- package/lib/module/modules/bt-management/services/device-creator.js +16 -1
- package/lib/module/modules/bt-management/services/device-creator.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.device-names.js +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.device-names.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/ap20.device.js +46 -0
- package/lib/module/modules/bt-management/services/devices/viatom/ap20.device.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/viatom/bioland.bgm.device.js +45 -0
- package/lib/module/modules/bt-management/services/devices/viatom/bioland.bgm.device.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/viatom/bioland.bgm.protocol.js +106 -0
- package/lib/module/modules/bt-management/services/devices/viatom/bioland.bgm.protocol.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/viatom/bioland.bgm.sequencer.js +53 -0
- package/lib/module/modules/bt-management/services/devices/viatom/bioland.bgm.sequencer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/viatom/pc68b.device.js +46 -0
- package/lib/module/modules/bt-management/services/devices/viatom/pc68b.device.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/viatom/poctor.m3102.device.js +36 -0
- package/lib/module/modules/bt-management/services/devices/viatom/poctor.m3102.device.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/viatom/poctor.m3102.protocol.js +55 -0
- package/lib/module/modules/bt-management/services/devices/viatom/poctor.m3102.protocol.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/viatom/poctor.m3102.sequencer.js +36 -0
- package/lib/module/modules/bt-management/services/devices/viatom/poctor.m3102.sequencer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom-aa55.protocol.js +113 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom-aa55.protocol.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom-aa55.sequencer.js +74 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom-aa55.sequencer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js +7 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.bpm188.device.js +45 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.bpm188.device.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.bpm188.protocol.js +130 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.bpm188.protocol.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.bpm188.sequencer.js +71 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.bpm188.sequencer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.pc100.device.js +45 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.pc100.device.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.pc100.protocol.js +136 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.pc100.protocol.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.pc100.sequencer.js +76 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.pc100.sequencer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.pc300.device.js +45 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.pc300.device.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.pc300.protocol.js +209 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.pc300.protocol.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.pc300.sequencer.js +117 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.pc300.sequencer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.vtm20f.frame-reader.js +45 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.vtm20f.frame-reader.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.vtm20f.js +56 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.vtm20f.js.map +1 -0
- package/lib/module/modules/bt-management/types/device-measurement-map.js.map +1 -1
- package/lib/module/modules/bt-management/types/integrated-devices.js +8 -0
- package/lib/module/modules/bt-management/types/integrated-devices.js.map +1 -1
- package/lib/module/modules/bt-management/utils/calculate-crc-8-pc.js +17 -0
- package/lib/module/modules/bt-management/utils/calculate-crc-8-pc.js.map +1 -0
- 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-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/services/device-creator.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.device-names.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/ap20.device.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/ap20.device.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/bioland.bgm.device.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/bioland.bgm.device.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/bioland.bgm.protocol.d.ts +26 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/bioland.bgm.protocol.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/bioland.bgm.sequencer.d.ts +24 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/bioland.bgm.sequencer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/pc68b.device.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/pc68b.device.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/poctor.m3102.device.d.ts +15 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/poctor.m3102.device.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/poctor.m3102.protocol.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/poctor.m3102.protocol.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/poctor.m3102.sequencer.d.ts +17 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/poctor.m3102.sequencer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom-aa55.protocol.d.ts +33 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom-aa55.protocol.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom-aa55.sequencer.d.ts +23 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom-aa55.sequencer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts +5 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bpm188.device.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bpm188.device.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bpm188.protocol.d.ts +36 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bpm188.protocol.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bpm188.sequencer.d.ts +26 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bpm188.sequencer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pc100.device.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pc100.device.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pc100.protocol.d.ts +43 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pc100.protocol.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pc100.sequencer.d.ts +26 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pc100.sequencer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pc300.device.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pc300.device.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pc300.protocol.d.ts +73 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pc300.protocol.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pc300.sequencer.d.ts +25 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pc300.sequencer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.vtm20f.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.vtm20f.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.vtm20f.frame-reader.d.ts +7 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.vtm20f.frame-reader.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-measurement-map.d.ts +8 -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 +9 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/integrated-devices.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/utils/calculate-crc-8-pc.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/calculate-crc-8-pc.d.ts.map +1 -0
- 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-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/services/device-creator.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.device-names.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/ap20.device.d.ts +16 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/ap20.device.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/bioland.bgm.device.d.ts +16 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/bioland.bgm.device.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/bioland.bgm.protocol.d.ts +26 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/bioland.bgm.protocol.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/bioland.bgm.sequencer.d.ts +24 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/bioland.bgm.sequencer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/pc68b.device.d.ts +16 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/pc68b.device.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/poctor.m3102.device.d.ts +15 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/poctor.m3102.device.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/poctor.m3102.protocol.d.ts +16 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/poctor.m3102.protocol.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/poctor.m3102.sequencer.d.ts +17 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/poctor.m3102.sequencer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom-aa55.protocol.d.ts +33 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom-aa55.protocol.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom-aa55.sequencer.d.ts +23 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom-aa55.sequencer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts +5 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bpm188.device.d.ts +16 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bpm188.device.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bpm188.protocol.d.ts +36 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bpm188.protocol.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bpm188.sequencer.d.ts +26 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bpm188.sequencer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pc100.device.d.ts +16 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pc100.device.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pc100.protocol.d.ts +43 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pc100.protocol.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pc100.sequencer.d.ts +26 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pc100.sequencer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pc300.device.d.ts +16 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pc300.device.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pc300.protocol.d.ts +73 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pc300.protocol.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pc300.sequencer.d.ts +25 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pc300.sequencer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.vtm20f.d.ts +8 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.vtm20f.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.vtm20f.frame-reader.d.ts +7 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.vtm20f.frame-reader.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/device-measurement-map.d.ts +8 -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 +9 -1
- package/lib/typescript/module/src/modules/bt-management/types/integrated-devices.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/utils/calculate-crc-8-pc.d.ts +3 -0
- package/lib/typescript/module/src/modules/bt-management/utils/calculate-crc-8-pc.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.pc300GetTemperatureResult = exports.pc300GetGlucoseResult = exports.pc300GetBloodPressureResult = exports.pc300GetBaijieUricAcidResult = exports.pc300GetBaijieGlucoseResult = exports.pc300Command = exports.parsePc300UricAcidResult = exports.parsePc300TemperatureResult = exports.parsePc300GlucoseResult = exports.parsePc300EcgWave = exports.parsePc300EcgResult = exports.parsePc300BloodPressureResult = exports.parsePc300BloodOxygenResult = exports.decodePc300Response = exports.Pc300FrameReader = exports.Pc300Command = exports.PC300_WRITE = exports.PC300_SERVICE = exports.PC300_NOTIFY = void 0;
|
|
7
|
+
var _frameReadStatus = require("../../../types/frame-read-status.js");
|
|
8
|
+
var _calculateCrc8Pc = require("../../../utils/calculate-crc-8-pc.js");
|
|
9
|
+
var _hexToByte = require("../../../utils/hex-to-byte.js");
|
|
10
|
+
/* eslint-disable import/group-exports, max-lines */
|
|
11
|
+
|
|
12
|
+
const PC300_SERVICE = exports.PC300_SERVICE = "0000fff0-0000-1000-8000-00805f9b34fb";
|
|
13
|
+
const PC300_WRITE = exports.PC300_WRITE = "0000fff2-0000-1000-8000-00805f9b34fb";
|
|
14
|
+
const PC300_NOTIFY = exports.PC300_NOTIFY = "0000fff1-0000-1000-8000-00805f9b34fb";
|
|
15
|
+
const Pc300Command = exports.Pc300Command = {
|
|
16
|
+
bloodPressureResult: 0x43,
|
|
17
|
+
temperatureResult: 0x72,
|
|
18
|
+
glucoseResult: 0x73,
|
|
19
|
+
baijieResult: 0xe2,
|
|
20
|
+
oxygenParameters: 0x53,
|
|
21
|
+
ecgWave: 0x32,
|
|
22
|
+
ecgResult: 0x33
|
|
23
|
+
};
|
|
24
|
+
const byte = value => (value & 0xff).toString(16).padStart(2, "0");
|
|
25
|
+
|
|
26
|
+
/** Builds the AA55 frame used by the ViHealth PC-300 family. */
|
|
27
|
+
const pc300Command = (command, type, payload = []) => {
|
|
28
|
+
const frame = ["aa", "55", byte(command), byte(payload.length + 2), byte(type), ...payload, "00"];
|
|
29
|
+
frame[frame.length - 1] = byte((0, _calculateCrc8Pc.calculateCrc8Pc)(frame));
|
|
30
|
+
return frame;
|
|
31
|
+
};
|
|
32
|
+
exports.pc300Command = pc300Command;
|
|
33
|
+
const pc300GetBloodPressureResult = () => pc300Command(Pc300Command.bloodPressureResult, 1);
|
|
34
|
+
exports.pc300GetBloodPressureResult = pc300GetBloodPressureResult;
|
|
35
|
+
const pc300GetTemperatureResult = () => pc300Command(Pc300Command.temperatureResult, 1);
|
|
36
|
+
exports.pc300GetTemperatureResult = pc300GetTemperatureResult;
|
|
37
|
+
const pc300GetGlucoseResult = () => pc300Command(Pc300Command.glucoseResult, 1);
|
|
38
|
+
exports.pc300GetGlucoseResult = pc300GetGlucoseResult;
|
|
39
|
+
const pc300GetBaijieGlucoseResult = () => pc300Command(Pc300Command.baijieResult, 1);
|
|
40
|
+
exports.pc300GetBaijieGlucoseResult = pc300GetBaijieGlucoseResult;
|
|
41
|
+
const pc300GetBaijieUricAcidResult = () => pc300Command(Pc300Command.baijieResult, 2);
|
|
42
|
+
exports.pc300GetBaijieUricAcidResult = pc300GetBaijieUricAcidResult;
|
|
43
|
+
const decodePc300Response = bytes => {
|
|
44
|
+
if ((0, _hexToByte.hexToByte)(bytes[0] ?? "00") !== 0xaa || (0, _hexToByte.hexToByte)(bytes[1] ?? "00") !== 0x55) {
|
|
45
|
+
return undefined;
|
|
46
|
+
}
|
|
47
|
+
const payloadLength = (0, _hexToByte.hexToByte)(bytes[3] ?? "00");
|
|
48
|
+
const expectedLength = payloadLength + 4;
|
|
49
|
+
if (payloadLength < 2 || bytes.length < expectedLength) {
|
|
50
|
+
return undefined;
|
|
51
|
+
}
|
|
52
|
+
const frame = bytes.slice(0, expectedLength);
|
|
53
|
+
if ((0, _hexToByte.hexToByte)(frame.at(-1) ?? "00") !== (0, _calculateCrc8Pc.calculateCrc8Pc)(frame)) {
|
|
54
|
+
return undefined;
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
command: (0, _hexToByte.hexToByte)(frame[2] ?? "00"),
|
|
58
|
+
type: (0, _hexToByte.hexToByte)(frame[4] ?? "00"),
|
|
59
|
+
content: frame.slice(5, -1)
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
exports.decodePc300Response = decodePc300Response;
|
|
63
|
+
const parsePc300BloodPressureResult = content => {
|
|
64
|
+
if (content.length < 5) {
|
|
65
|
+
return undefined;
|
|
66
|
+
}
|
|
67
|
+
const first = (0, _hexToByte.hexToByte)(content[0] ?? "00");
|
|
68
|
+
const systolic = (first & 0x7f) << 8 | (0, _hexToByte.hexToByte)(content[1] ?? "00");
|
|
69
|
+
const meanArterialPressure = (0, _hexToByte.hexToByte)(content[2] ?? "00");
|
|
70
|
+
const diastolic = (0, _hexToByte.hexToByte)(content[3] ?? "00");
|
|
71
|
+
const heartRate = (0, _hexToByte.hexToByte)(content[4] ?? "00");
|
|
72
|
+
if (systolic < 20 || systolic > 300 || meanArterialPressure < 10 || meanArterialPressure > 250 || diastolic < 10 || diastolic > 200 || heartRate < 20 || heartRate > 300) {
|
|
73
|
+
return undefined;
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
systolic,
|
|
77
|
+
diastolic,
|
|
78
|
+
meanArterialPressure,
|
|
79
|
+
heartRate,
|
|
80
|
+
irregularHeartbeat: (first & 0x80) !== 0
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
exports.parsePc300BloodPressureResult = parsePc300BloodPressureResult;
|
|
84
|
+
const parsePc300TemperatureResult = content => {
|
|
85
|
+
if (content.length < 3) {
|
|
86
|
+
return undefined;
|
|
87
|
+
}
|
|
88
|
+
const first = (0, _hexToByte.hexToByte)(content[0] ?? "00");
|
|
89
|
+
const bodyTemp = ((0, _hexToByte.hexToByte)(content[1] ?? "00") << 8 | (0, _hexToByte.hexToByte)(content[2] ?? "00")) / 100 + 30;
|
|
90
|
+
if (bodyTemp < 20 || bodyTemp > 50) {
|
|
91
|
+
return undefined;
|
|
92
|
+
}
|
|
93
|
+
return {
|
|
94
|
+
bodyTemp,
|
|
95
|
+
probeOff: (first & 0x10) !== 0
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
exports.parsePc300TemperatureResult = parsePc300TemperatureResult;
|
|
99
|
+
const parsePc300GlucoseResult = content => {
|
|
100
|
+
if (content.length < 3) {
|
|
101
|
+
return undefined;
|
|
102
|
+
}
|
|
103
|
+
const unit = ((0, _hexToByte.hexToByte)(content[0] ?? "00") & 0x01) === 1;
|
|
104
|
+
const raw = (0, _hexToByte.hexToByte)(content[1] ?? "00") << 8 | (0, _hexToByte.hexToByte)(content[2] ?? "00");
|
|
105
|
+
const bloodGlucose = unit ? raw : Number((raw / 10 * 18).toFixed(2));
|
|
106
|
+
if (bloodGlucose < 1 || bloodGlucose > 1_000) {
|
|
107
|
+
return undefined;
|
|
108
|
+
}
|
|
109
|
+
return {
|
|
110
|
+
bloodGlucose,
|
|
111
|
+
unit: unit ? "mg/dL" : "mmol/L"
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
exports.parsePc300GlucoseResult = parsePc300GlucoseResult;
|
|
115
|
+
const parsePc300UricAcidResult = content => {
|
|
116
|
+
if (content.length < 3) {
|
|
117
|
+
return undefined;
|
|
118
|
+
}
|
|
119
|
+
const value = ((0, _hexToByte.hexToByte)(content[1] ?? "00") << 8 | (0, _hexToByte.hexToByte)(content[2] ?? "00")) / 10;
|
|
120
|
+
return value > 0 && value < 2_000 ? {
|
|
121
|
+
uricAcid: value
|
|
122
|
+
} : undefined;
|
|
123
|
+
};
|
|
124
|
+
exports.parsePc300UricAcidResult = parsePc300UricAcidResult;
|
|
125
|
+
const parsePc300BloodOxygenResult = content => {
|
|
126
|
+
if (content.length < 5) {
|
|
127
|
+
return undefined;
|
|
128
|
+
}
|
|
129
|
+
const bloodOxygen = (0, _hexToByte.hexToByte)(content[0] ?? "00");
|
|
130
|
+
const pulseRate = (0, _hexToByte.hexToByte)(content[1] ?? "00") | (0, _hexToByte.hexToByte)(content[2] ?? "00") << 8;
|
|
131
|
+
const perfusionIndex = (0, _hexToByte.hexToByte)(content[3] ?? "00") / 10;
|
|
132
|
+
const state = (0, _hexToByte.hexToByte)(content[4] ?? "00");
|
|
133
|
+
if (bloodOxygen < 50 || bloodOxygen > 100 || pulseRate < 20 || pulseRate > 300) {
|
|
134
|
+
return undefined;
|
|
135
|
+
}
|
|
136
|
+
return {
|
|
137
|
+
bloodOxygen,
|
|
138
|
+
pulseRate,
|
|
139
|
+
perfusionIndex,
|
|
140
|
+
probeOff: (state & 0x02) !== 0
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
exports.parsePc300BloodOxygenResult = parsePc300BloodOxygenResult;
|
|
144
|
+
const parsePc300EcgWave = content => {
|
|
145
|
+
if (content.length < 53) {
|
|
146
|
+
return undefined;
|
|
147
|
+
}
|
|
148
|
+
const digit = ((0, _hexToByte.hexToByte)(content[1] ?? "00") & 0x80) !== 0;
|
|
149
|
+
const diagramPoints = Array.from({
|
|
150
|
+
length: 25
|
|
151
|
+
}, (_, index) => {
|
|
152
|
+
const high = (0, _hexToByte.hexToByte)(content[index * 2 + 1] ?? "00");
|
|
153
|
+
const low = (0, _hexToByte.hexToByte)(content[index * 2 + 2] ?? "00");
|
|
154
|
+
const raw = low | (high & 0x0f) << 8;
|
|
155
|
+
return digit ? (raw - 2_048) * 0.002538071 : (raw - 128) * 0.03508772;
|
|
156
|
+
});
|
|
157
|
+
return {
|
|
158
|
+
sequence: (0, _hexToByte.hexToByte)(content[0] ?? "00"),
|
|
159
|
+
diagramPoints,
|
|
160
|
+
probeOff: ((0, _hexToByte.hexToByte)(content[52] ?? "00") & 0x80) !== 0
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
exports.parsePc300EcgWave = parsePc300EcgWave;
|
|
164
|
+
const parsePc300EcgResult = content => {
|
|
165
|
+
if (content.length < 3) {
|
|
166
|
+
return undefined;
|
|
167
|
+
}
|
|
168
|
+
const heartRate = (0, _hexToByte.hexToByte)(content[2] ?? "00");
|
|
169
|
+
return heartRate > 0 && heartRate <= 300 ? {
|
|
170
|
+
heartRate,
|
|
171
|
+
status: (0, _hexToByte.hexToByte)(content[0] ?? "00")
|
|
172
|
+
} : undefined;
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
/** Reads split and concatenated PC-300 AA55 frames. */
|
|
176
|
+
exports.parsePc300EcgResult = parsePc300EcgResult;
|
|
177
|
+
class Pc300FrameReader {
|
|
178
|
+
readFrame(buffer) {
|
|
179
|
+
const start = this.findStart(buffer);
|
|
180
|
+
if (start < 0) {
|
|
181
|
+
return {
|
|
182
|
+
status: _frameReadStatus.FrameReadStatus.INCOMPLETE,
|
|
183
|
+
consumedBytes: Math.max(0, buffer.length - 1)
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
if (start + 4 > buffer.length) {
|
|
187
|
+
return {
|
|
188
|
+
status: _frameReadStatus.FrameReadStatus.INCOMPLETE,
|
|
189
|
+
consumedBytes: start
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
const length = (0, _hexToByte.hexToByte)(buffer[start + 3] ?? "00") + 4;
|
|
193
|
+
if (length < 6) {
|
|
194
|
+
return {
|
|
195
|
+
status: _frameReadStatus.FrameReadStatus.CORRUPT,
|
|
196
|
+
consumedBytes: start + 1
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
if (start + length > buffer.length) {
|
|
200
|
+
return {
|
|
201
|
+
status: _frameReadStatus.FrameReadStatus.INCOMPLETE,
|
|
202
|
+
consumedBytes: start
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
const frame = buffer.slice(start, start + length);
|
|
206
|
+
if ((0, _hexToByte.hexToByte)(frame.at(-1) ?? "00") !== (0, _calculateCrc8Pc.calculateCrc8Pc)(frame)) {
|
|
207
|
+
return {
|
|
208
|
+
status: _frameReadStatus.FrameReadStatus.CORRUPT,
|
|
209
|
+
consumedBytes: start + 1
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
return {
|
|
213
|
+
status: _frameReadStatus.FrameReadStatus.COMPLETE,
|
|
214
|
+
consumedBytes: start + length,
|
|
215
|
+
frame
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
findStart = buffer => {
|
|
219
|
+
for (let index = 0; index + 1 < buffer.length; index += 1) {
|
|
220
|
+
if ((0, _hexToByte.hexToByte)(buffer[index] ?? "00") === 0xaa && (0, _hexToByte.hexToByte)(buffer[index + 1] ?? "00") === 0x55) {
|
|
221
|
+
return index;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
return -1;
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
exports.Pc300FrameReader = Pc300FrameReader;
|
|
228
|
+
//# sourceMappingURL=viatom.pc300.protocol.js.map
|
package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc300.protocol.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_frameReadStatus","require","_calculateCrc8Pc","_hexToByte","PC300_SERVICE","exports","PC300_WRITE","PC300_NOTIFY","Pc300Command","bloodPressureResult","temperatureResult","glucoseResult","baijieResult","oxygenParameters","ecgWave","ecgResult","byte","value","toString","padStart","pc300Command","command","type","payload","frame","length","calculateCrc8Pc","pc300GetBloodPressureResult","pc300GetTemperatureResult","pc300GetGlucoseResult","pc300GetBaijieGlucoseResult","pc300GetBaijieUricAcidResult","decodePc300Response","bytes","hexToByte","undefined","payloadLength","expectedLength","slice","at","content","parsePc300BloodPressureResult","first","systolic","meanArterialPressure","diastolic","heartRate","irregularHeartbeat","parsePc300TemperatureResult","bodyTemp","probeOff","parsePc300GlucoseResult","unit","raw","bloodGlucose","Number","toFixed","parsePc300UricAcidResult","uricAcid","parsePc300BloodOxygenResult","bloodOxygen","pulseRate","perfusionIndex","state","parsePc300EcgWave","digit","diagramPoints","Array","from","_","index","high","low","sequence","parsePc300EcgResult","status","Pc300FrameReader","readFrame","buffer","start","findStart","FrameReadStatus","INCOMPLETE","consumedBytes","Math","max","CORRUPT","COMPLETE"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.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CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,IAAI,EAC7C;QACA,OAAOA,KAAK;MACd;IACF;IAEA,OAAO,CAAC,CAAC;EACX,CAAC;AACH;AAACjE,OAAA,CAAAuE,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Pc300Sequencer = void 0;
|
|
7
|
+
var _core = require("@ovok/core");
|
|
8
|
+
var _caseType = require("../../../types/case-type.js");
|
|
9
|
+
var _viatomPc300Protocol = require("./viatom.pc300.protocol.js");
|
|
10
|
+
const command = (write, frame) => ({
|
|
11
|
+
...write,
|
|
12
|
+
frame,
|
|
13
|
+
withoutResponse: true
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
/** Reads the last PC-300 family readings and accepts live oxygen/ECG frames. */
|
|
17
|
+
class Pc300Sequencer {
|
|
18
|
+
phase = "blood-pressure";
|
|
19
|
+
ecgPoints = [];
|
|
20
|
+
constructor(params) {
|
|
21
|
+
this.params = params;
|
|
22
|
+
}
|
|
23
|
+
initialCommands = () => [this.write((0, _viatomPc300Protocol.pc300GetBloodPressureResult)())];
|
|
24
|
+
isNormalDisconnect = () => this.phase === "done";
|
|
25
|
+
commandTimeoutMs = () => this.phase === "done" ? undefined : 5_000;
|
|
26
|
+
onCommandTimeout = () => {
|
|
27
|
+
this.phase = "done";
|
|
28
|
+
return {
|
|
29
|
+
terminal: true
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
nextCommand = frame => {
|
|
33
|
+
const response = (0, _viatomPc300Protocol.decodePc300Response)(frame);
|
|
34
|
+
if (!response) {
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
37
|
+
const recordedAt = this.params.now?.() ?? new Date();
|
|
38
|
+
if (response.command === _viatomPc300Protocol.Pc300Command.oxygenParameters) {
|
|
39
|
+
const result = (0, _viatomPc300Protocol.parsePc300BloodOxygenResult)(response.content);
|
|
40
|
+
if (result) {
|
|
41
|
+
this.params.onResult({
|
|
42
|
+
caseType: _caseType.CaseType.RESULT,
|
|
43
|
+
measurementTypeKey: _core.MeasurementTypeKey.bloodOxygenPulseRate,
|
|
44
|
+
bloodOxygen: result.bloodOxygen,
|
|
45
|
+
pulseRate: result.pulseRate,
|
|
46
|
+
perfusionIndex: result.perfusionIndex,
|
|
47
|
+
recordedAt
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
return undefined;
|
|
51
|
+
}
|
|
52
|
+
if (response.command === _viatomPc300Protocol.Pc300Command.ecgWave) {
|
|
53
|
+
const result = (0, _viatomPc300Protocol.parsePc300EcgWave)(response.content);
|
|
54
|
+
if (result) {
|
|
55
|
+
this.ecgPoints.push(...result.diagramPoints);
|
|
56
|
+
}
|
|
57
|
+
return undefined;
|
|
58
|
+
}
|
|
59
|
+
if (response.command === _viatomPc300Protocol.Pc300Command.ecgResult) {
|
|
60
|
+
const result = (0, _viatomPc300Protocol.parsePc300EcgResult)(response.content);
|
|
61
|
+
if (result && this.ecgPoints.length > 0) {
|
|
62
|
+
this.params.onResult({
|
|
63
|
+
caseType: _caseType.CaseType.RESULT,
|
|
64
|
+
measurementTypeKey: _core.MeasurementTypeKey.ecg,
|
|
65
|
+
heartRate: result.heartRate,
|
|
66
|
+
diagramPoints: [...this.ecgPoints],
|
|
67
|
+
duration: this.ecgPoints.length / 250,
|
|
68
|
+
diagnosticResult: result.status === 0 ? _core.EcgDiagnosticFlag.REGULAR : result.status === 0xff ? _core.EcgDiagnosticFlag.POOR_WAVEFORM : _core.EcgDiagnosticFlag.ERROR,
|
|
69
|
+
recordedAt
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
this.ecgPoints = [];
|
|
73
|
+
return undefined;
|
|
74
|
+
}
|
|
75
|
+
if (this.phase === "blood-pressure" && response.command === _viatomPc300Protocol.Pc300Command.bloodPressureResult && response.type === 1) {
|
|
76
|
+
const result = (0, _viatomPc300Protocol.parsePc300BloodPressureResult)(response.content);
|
|
77
|
+
if (result) {
|
|
78
|
+
this.params.onResult({
|
|
79
|
+
caseType: _caseType.CaseType.RESULT,
|
|
80
|
+
measurementTypeKey: _core.MeasurementTypeKey.bloodPressure,
|
|
81
|
+
systolic: result.systolic,
|
|
82
|
+
diastolic: result.diastolic,
|
|
83
|
+
meanArterialPressure: result.meanArterialPressure,
|
|
84
|
+
heartRate: result.heartRate,
|
|
85
|
+
irregularHeartbeat: result.irregularHeartbeat,
|
|
86
|
+
recordedAt
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
this.phase = "temperature";
|
|
90
|
+
return [this.write((0, _viatomPc300Protocol.pc300GetTemperatureResult)())];
|
|
91
|
+
}
|
|
92
|
+
if (this.phase === "temperature" && response.command === _viatomPc300Protocol.Pc300Command.temperatureResult && response.type === 1) {
|
|
93
|
+
const result = (0, _viatomPc300Protocol.parsePc300TemperatureResult)(response.content);
|
|
94
|
+
if (result && !result.probeOff) {
|
|
95
|
+
this.params.onResult({
|
|
96
|
+
caseType: _caseType.CaseType.RESULT,
|
|
97
|
+
measurementTypeKey: _core.MeasurementTypeKey.temperature,
|
|
98
|
+
bodyTemp: result.bodyTemp,
|
|
99
|
+
recordedAt
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
this.phase = "glucose";
|
|
103
|
+
return [this.write((0, _viatomPc300Protocol.pc300GetGlucoseResult)())];
|
|
104
|
+
}
|
|
105
|
+
if (this.phase === "glucose" && response.command === _viatomPc300Protocol.Pc300Command.glucoseResult && response.type === 1) {
|
|
106
|
+
const result = (0, _viatomPc300Protocol.parsePc300GlucoseResult)(response.content);
|
|
107
|
+
if (result) {
|
|
108
|
+
this.params.onResult({
|
|
109
|
+
caseType: _caseType.CaseType.RESULT,
|
|
110
|
+
measurementTypeKey: _core.MeasurementTypeKey.bloodGlucose,
|
|
111
|
+
bloodGlucose: result.bloodGlucose,
|
|
112
|
+
recordedAt
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
this.phase = "done";
|
|
116
|
+
}
|
|
117
|
+
return undefined;
|
|
118
|
+
};
|
|
119
|
+
write = frame => command(this.params.write, frame);
|
|
120
|
+
}
|
|
121
|
+
exports.Pc300Sequencer = Pc300Sequencer;
|
|
122
|
+
//# sourceMappingURL=viatom.pc300.sequencer.js.map
|
package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc300.sequencer.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_core","require","_caseType","_viatomPc300Protocol","command","write","frame","withoutResponse","Pc300Sequencer","phase","ecgPoints","constructor","params","initialCommands","pc300GetBloodPressureResult","isNormalDisconnect","commandTimeoutMs","undefined","onCommandTimeout","terminal","nextCommand","response","decodePc300Response","recordedAt","now","Date","Pc300Command","oxygenParameters","result","parsePc300BloodOxygenResult","content","onResult","caseType","CaseType","RESULT","measurementTypeKey","MeasurementTypeKey","bloodOxygenPulseRate","bloodOxygen","pulseRate","perfusionIndex","ecgWave","parsePc300EcgWave","push","diagramPoints","ecgResult","parsePc300EcgResult","length","ecg","heartRate","duration","diagnosticResult","status","EcgDiagnosticFlag","REGULAR","POOR_WAVEFORM","ERROR","bloodPressureResult","type","parsePc300BloodPressureResult","bloodPressure","systolic","diastolic","meanArterialPressure","irregularHeartbeat","pc300GetTemperatureResult","temperatureResult","parsePc300TemperatureResult","probeOff","temperature","bodyTemp","pc300GetGlucoseResult","glucoseResult","parsePc300GlucoseResult","bloodGlucose","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.pc300.sequencer.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAUA,IAAAC,SAAA,GAAAD,OAAA;AAQA,IAAAE,oBAAA,GAAAF,OAAA;AA6BA,MAAMG,OAAO,GAAGA,CACdC,KAAmC,EACnCC,KAAwB,MACL;EAAE,GAAGD,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AG,SAAS;MAEtB,OAAO,CAAC,IAAI,CAACJ,KAAK,CAAC,IAAAkE,0CAAqB,EAAC,CAAC,CAAC,CAAC;IAC9C;IAEA,IACE,IAAI,CAAC9D,KAAK,KAAK,SAAS,IACxBY,QAAQ,CAACjB,OAAO,KAAKsB,iCAAY,CAAC8C,aAAa,IAC/CnD,QAAQ,CAACqC,IAAI,KAAK,CAAC,EACnB;MACA,MAAM9B,MAAM,GAAG,IAAA6C,4CAAuB,EAACpD,QAAQ,CAACS,OAAO,CAAC;MAExD,IAAIF,MAAM,EAAE;QACV,IAAI,CAAChB,MAAM,CAACmB,QAAQ,CAAC;UACnBC,QAAQ,EAAEC,kBAAQ,CAACC,MAAM;UACzBC,kBAAkB,EAAEC,wBAAkB,CAACsC,YAAY;UACnDA,YAAY,EAAE9C,MAAM,CAAC8C,YAAY;UACjCnD;QACF,CAAC,CAAC;MACJ;MAEA,IAAI,CAACd,KAAK,GAAG,MAAM;IACrB;IAEA,OAAOQ,SAAS;EAClB,CAAC;EAEOZ,KAAK,GAAIC,KAAwB,IACvCF,OAAO,CAAC,IAAI,CAACQ,MAAM,CAACP,KAAK,EAAEC,KAAK,CAAC;AACrC;AAACqE,OAAA,CAAAnE,cAAA,GAAAA,cAAA","ignoreList":[]}
|
package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.vtm20f.frame-reader.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Vtm20fFrameReader = void 0;
|
|
7
|
+
var _frameReadStatus = require("../../../types/frame-read-status.js");
|
|
8
|
+
var _hexToByte = require("../../../utils/hex-to-byte.js");
|
|
9
|
+
const HEADER = "fe";
|
|
10
|
+
const LENGTH_INDEX = 1;
|
|
11
|
+
const MIN_FRAME_BYTES = 10;
|
|
12
|
+
|
|
13
|
+
/** Reads the length-prefixed VTM 20F notifications from ViHealth. */
|
|
14
|
+
class Vtm20fFrameReader {
|
|
15
|
+
readFrame(buffer) {
|
|
16
|
+
const start = buffer.findIndex(byte => byte.toLowerCase() === HEADER);
|
|
17
|
+
if (start === -1) {
|
|
18
|
+
return {
|
|
19
|
+
status: _frameReadStatus.FrameReadStatus.INCOMPLETE,
|
|
20
|
+
consumedBytes: Math.max(0, buffer.length - 1)
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
if (start + LENGTH_INDEX >= buffer.length) {
|
|
24
|
+
return {
|
|
25
|
+
status: _frameReadStatus.FrameReadStatus.INCOMPLETE,
|
|
26
|
+
consumedBytes: start
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
const frameLength = (0, _hexToByte.hexToByte)(buffer[start + LENGTH_INDEX] ?? "00");
|
|
30
|
+
if (frameLength < MIN_FRAME_BYTES) {
|
|
31
|
+
return {
|
|
32
|
+
status: _frameReadStatus.FrameReadStatus.CORRUPT,
|
|
33
|
+
consumedBytes: start + 1
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
if (start + frameLength > buffer.length) {
|
|
37
|
+
return {
|
|
38
|
+
status: _frameReadStatus.FrameReadStatus.INCOMPLETE,
|
|
39
|
+
consumedBytes: start
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
status: _frameReadStatus.FrameReadStatus.COMPLETE,
|
|
44
|
+
consumedBytes: start + frameLength,
|
|
45
|
+
frame: buffer.slice(start, start + frameLength)
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.Vtm20fFrameReader = Vtm20fFrameReader;
|
|
50
|
+
//# sourceMappingURL=viatom.vtm20f.frame-reader.js.map
|
package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.vtm20f.frame-reader.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_frameReadStatus","require","_hexToByte","HEADER","LENGTH_INDEX","MIN_FRAME_BYTES","Vtm20fFrameReader","readFrame","buffer","start","findIndex","byte","toLowerCase","status","FrameReadStatus","INCOMPLETE","consumedBytes","Math","max","length","frameLength","hexToByte","CORRUPT","COMPLETE","frame","slice","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.vtm20f.frame-reader.ts"],"mappings":";;;;;;AACA,IAAAA,gBAAA,GAAAC,OAAA;AAEA,IAAAC,UAAA,GAAAD,OAAA;AAEA,MAAME,MAAM,GAAG,IAAI;AACnB,MAAMC,YAAY,GAAG,CAAC;AACtB,MAAMC,eAAe,GAAG,EAAE;;AAE1B;AACO,MAAMC,iBAAiB,CAAwB;EAC7CC,SAASA,CAACC,MAAyB,EAAmB;IAC3D,MAAMC,KAAK,GAAGD,MAAM,CAACE,SAAS,CAAEC,IAAI,IAAKA,IAAI,CAACC,WAAW,CAAC,CAAC,KAAKT,MAAM,CAAC;IAEvE,IAAIM,KAAK,KAAK,CAAC,CAAC,EAAE;MAChB,OAAO;QACLI,MAAM,EAAEC,gCAAe,CAACC,UAAU;QAClCC,aAAa,EAAEC,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEV,MAAM,CAACW,MAAM,GAAG,CAAC;MAC9C,CAAC;IACH;IAEA,IAAIV,KAAK,GAAGL,YAAY,IAAII,MAAM,CAACW,MAAM,EAAE;MACzC,OAAO;QAAEN,MAAM,EAAEC,gCAAe,CAACC,UAAU;QAAEC,aAAa,EAAEP;MAAM,CAAC;IACrE;IAEA,MAAMW,WAAW,GAAG,IAAAC,oBAAS,EAC3Bb,MAAM,CAACC,KAAK,GAAGL,YAAY,CAAC,IAAI,IAClC,CAAC;IAED,IAAIgB,WAAW,GAAGf,eAAe,EAAE;MACjC,OAAO;QACLQ,MAAM,EAAEC,gCAAe,CAACQ,OAAO;QAC/BN,aAAa,EAAEP,KAAK,GAAG;MACzB,CAAC;IACH;IAEA,IAAIA,KAAK,GAAGW,WAAW,GAAGZ,MAAM,CAACW,MAAM,EAAE;MACvC,OAAO;QAAEN,MAAM,EAAEC,gCAAe,CAACC,UAAU;QAAEC,aAAa,EAAEP;MAAM,CAAC;IACrE;IAEA,OAAO;MACLI,MAAM,EAAEC,gCAAe,CAACS,QAAQ;MAChCP,aAAa,EAAEP,KAAK,GAAGW,WAAW;MAClCI,KAAK,EAAEhB,MAAM,CAACiB,KAAK,CAAChB,KAAK,EAAEA,KAAK,GAAGW,WAAW;IAChD,CAAC;EACH;AACF;AAACM,OAAA,CAAApB,iBAAA,GAAAA,iBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.viatomVtm20fMonitor = void 0;
|
|
7
|
+
var _core = require("@ovok/core");
|
|
8
|
+
var _defineCustomDevice = require("../../custom/define-custom-device.js");
|
|
9
|
+
var _lepuNameMatch = require("../lepu/lepu.name-match.js");
|
|
10
|
+
var _viatomVtm20fFrameReader = require("./viatom.vtm20f.frame-reader.js");
|
|
11
|
+
const SERVICE_UUID = "0000ffe0-0000-1000-8000-00805f9b34fb";
|
|
12
|
+
const NOTIFY_UUID = "0000ffe4-0000-1000-8000-00805f9b34fb";
|
|
13
|
+
|
|
14
|
+
/** Declares the FS20F/VTM 20F realtime oxygen parameters from ViHealth. */
|
|
15
|
+
const viatomVtm20fMonitor = (params = {}) => (0, _defineCustomDevice.defineCustomDevice)({
|
|
16
|
+
id: params.id ?? "viatom-vtm-20f",
|
|
17
|
+
nameMatch: params.nameMatch ?? (0, _lepuNameMatch.lepuNameMatch)("VTM 20F"),
|
|
18
|
+
stuckDataTimeoutMs: 30_000,
|
|
19
|
+
services: [{
|
|
20
|
+
uuid: SERVICE_UUID,
|
|
21
|
+
monitor: [{
|
|
22
|
+
uuid: NOTIFY_UUID,
|
|
23
|
+
frame: {
|
|
24
|
+
header: ["fe"],
|
|
25
|
+
minLengthBytes: 10,
|
|
26
|
+
length: {
|
|
27
|
+
index: 1,
|
|
28
|
+
widthBytes: 1,
|
|
29
|
+
byteOrder: "big",
|
|
30
|
+
overheadBytes: 0
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
caseSelectorBytes: [0, 2],
|
|
34
|
+
cases: [{
|
|
35
|
+
selector: "fe55",
|
|
36
|
+
kind: "result",
|
|
37
|
+
measurementTypeKey: _core.MeasurementTypeKey.bloodOxygenPulseRate,
|
|
38
|
+
fields: [{
|
|
39
|
+
name: "pulseRate",
|
|
40
|
+
byteIndexes: [3, 4],
|
|
41
|
+
unit: "bpm"
|
|
42
|
+
}, {
|
|
43
|
+
name: "bloodOxygen",
|
|
44
|
+
byteIndexes: [5],
|
|
45
|
+
unit: "%"
|
|
46
|
+
}, {
|
|
47
|
+
name: "perfusionIndex",
|
|
48
|
+
byteIndexes: [6, 7],
|
|
49
|
+
scale: 0.001,
|
|
50
|
+
decimals: 3,
|
|
51
|
+
unit: "%"
|
|
52
|
+
}]
|
|
53
|
+
}]
|
|
54
|
+
}]
|
|
55
|
+
}]
|
|
56
|
+
}, {
|
|
57
|
+
frameReader: new _viatomVtm20fFrameReader.Vtm20fFrameReader()
|
|
58
|
+
});
|
|
59
|
+
exports.viatomVtm20fMonitor = viatomVtm20fMonitor;
|
|
60
|
+
//# sourceMappingURL=viatom.vtm20f.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_core","require","_defineCustomDevice","_lepuNameMatch","_viatomVtm20fFrameReader","SERVICE_UUID","NOTIFY_UUID","viatomVtm20fMonitor","params","defineCustomDevice","id","nameMatch","lepuNameMatch","stuckDataTimeoutMs","services","uuid","monitor","frame","header","minLengthBytes","length","index","widthBytes","byteOrder","overheadBytes","caseSelectorBytes","cases","selector","kind","measurementTypeKey","MeasurementTypeKey","bloodOxygenPulseRate","fields","name","byteIndexes","unit","scale","decimals","frameReader","Vtm20fFrameReader","exports"],"sourceRoot":"../../../../../../../src","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E,gBAAgB;UACtBC,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;UACnBE,KAAK,EAAE,KAAK;UACZC,QAAQ,EAAE,CAAC;UACXF,IAAI,EAAE;QACR,CAAC;MAEL,CAAC;IAEL,CAAC;EAEL,CAAC;AAEL,CAAC,EACD;EAAEG,WAAW,EAAE,IAAIC,0CAAiB,CAAC;AAAE,CACzC,CAAC;AAACC,OAAA,CAAAjC,mBAAA,GAAAA,mBAAA","ignoreList":[]}
|
|
@@ -34,6 +34,14 @@ let IntegratedDevices = exports.IntegratedDevices = /*#__PURE__*/function (Integ
|
|
|
34
34
|
IntegratedDevices["CHECKME"] = "Checkme";
|
|
35
35
|
IntegratedDevices["CHECKME_POD"] = "Checkme Pod";
|
|
36
36
|
IntegratedDevices["CHECKME_POD_WPS"] = "Checkme Pod-WPS";
|
|
37
|
+
IntegratedDevices["AP20"] = "AP-20";
|
|
38
|
+
IntegratedDevices["AP20_WPS"] = "AP-20-WPS";
|
|
39
|
+
IntegratedDevices["PC68B"] = "PC-68B";
|
|
40
|
+
IntegratedDevices["PC100"] = "PC-100";
|
|
41
|
+
IntegratedDevices["BPM188"] = "BPM-188";
|
|
42
|
+
IntegratedDevices["PC300"] = "PC300";
|
|
43
|
+
IntegratedDevices["POCTOR_M3102"] = "PoctorM3102";
|
|
44
|
+
IntegratedDevices["BIOLAND_BGM"] = "Bioland-BGM";
|
|
37
45
|
return IntegratedDevices;
|
|
38
46
|
}({});
|
|
39
47
|
//# sourceMappingURL=integrated-devices.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["IntegratedDevices","exports"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/types/integrated-devices.ts"],"mappings":";;;;;;IAAYA,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,0BAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBA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A,iBAAiB;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.calculateCrc8Pc = void 0;
|
|
7
|
+
var _hexToByte = require("./hex-to-byte.js");
|
|
8
|
+
const POLYNOMIAL = 0x5e;
|
|
9
|
+
|
|
10
|
+
/** CRC-8/PC used by Viatom's AA55 interfaces, with an initial remainder of zero. */
|
|
11
|
+
const calculateCrc8Pc = hex => {
|
|
12
|
+
let remainder = 0;
|
|
13
|
+
for (let index = 0; index < hex.length - 1; index += 1) {
|
|
14
|
+
remainder ^= (0, _hexToByte.hexToByte)(hex[index] ?? "00");
|
|
15
|
+
for (let bit = 0; bit < 8; bit += 1) {
|
|
16
|
+
remainder = remainder & 0x80 ? (remainder << 1 ^ POLYNOMIAL) & 0xff : remainder << 1 & 0xff;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return remainder;
|
|
20
|
+
};
|
|
21
|
+
exports.calculateCrc8Pc = calculateCrc8Pc;
|
|
22
|
+
//# sourceMappingURL=calculate-crc-8-pc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_hexToByte","require","POLYNOMIAL","calculateCrc8Pc","hex","remainder","index","length","hexToByte","bit","exports"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/utils/calculate-crc-8-pc.ts"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAEA,MAAMC,UAAU,GAAG,IAAI;;AAEvB;AACO,MAAMC,eAAe,GAAIC,GAAsB,IAAa;EACjE,IAAIC,SAAS,GAAG,CAAC;EAEjB,KAAK,IAAIC,KAAK,GAAG,CAAC,EAAEA,KAAK,GAAGF,GAAG,CAACG,MAAM,GAAG,CAAC,EAAED,KAAK,IAAI,CAAC,EAAE;IACtDD,SAAS,IAAI,IAAAG,oBAAS,EAACJ,GAAG,CAACE,KAAK,CAAC,IAAI,IAAI,CAAC;IAE1C,KAAK,IAAIG,GAAG,GAAG,CAAC,EAAEA,GAAG,GAAG,CAAC,EAAEA,GAAG,IAAI,CAAC,EAAE;MACnCJ,SAAS,GACPA,SAAS,GAAG,IAAI,GACZ,CAAEA,SAAS,IAAI,CAAC,GAAIH,UAAU,IAAI,IAAI,GACrCG,SAAS,IAAI,CAAC,GAAI,IAAI;IAC/B;EACF;EAEA,OAAOA,SAAS;AAClB,CAAC;AAACK,OAAA,CAAAP,eAAA,GAAAA,eAAA","ignoreList":[]}
|
|
@@ -34,6 +34,14 @@ export const DEVICE_INSTRUCTION_PDFS = {
|
|
|
34
34
|
[IntegratedDevices.BPW1]: "",
|
|
35
35
|
[IntegratedDevices.CHECKME]: "",
|
|
36
36
|
[IntegratedDevices.CHECKME_POD]: "",
|
|
37
|
-
[IntegratedDevices.CHECKME_POD_WPS]: ""
|
|
37
|
+
[IntegratedDevices.CHECKME_POD_WPS]: "",
|
|
38
|
+
[IntegratedDevices.AP20]: "",
|
|
39
|
+
[IntegratedDevices.AP20_WPS]: "",
|
|
40
|
+
[IntegratedDevices.PC68B]: "",
|
|
41
|
+
[IntegratedDevices.PC100]: "",
|
|
42
|
+
[IntegratedDevices.BPM188]: "",
|
|
43
|
+
[IntegratedDevices.PC300]: "",
|
|
44
|
+
[IntegratedDevices.POCTOR_M3102]: "",
|
|
45
|
+
[IntegratedDevices.BIOLAND_BGM]: ""
|
|
38
46
|
};
|
|
39
47
|
//# sourceMappingURL=device-instruction-pdfs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["IntegratedDevices","pdfBaseUrl","DEVICE_INSTRUCTION_PDFS","BP2","F4","SPO2","PC60WF","ALIVE_COR","COSINUSS","AOJ20A","TAIDOC_GLUCOSE","GLUCOCHECK","CLEVERTEMP","FORATEMP","ANDESFITTEMP","FORA_SCALE","BC01","RPM_SCALE","CMED","SP80B","S5","BGM","VEROVAL_DUO_CONTROL","VEROVAL_ECG","VEROVAL_ACTIVITY","MYSENSE","GENIAL_T31","ZH_SG_A606","BPW1","CHECKME","CHECKME_POD","CHECKME_POD_WPS"],"sourceRoot":"../../../../../src","sources":["modules/bt-device/constants/device-instruction-pdfs.ts"],"mappings":";;AAAA,SAASA,iBAAiB,QAAQ,iDAA8C;;AAEhF;AACA;AACA,MAAMC,UAAU,GACd,2EAA2E;AAE7E,OAAO,MAAMC,uBAA0D,GAAG;EACxE,CAACF,iBAAiB,CAACG,GAAG,GAAG,GAAGF,UAAU,yBAAyB;EAC/D,CAACD,iBAAiB,CAACI,EAAE,GAAG,GAAGH,UAAU,yBAAyB;EAC9D,CAACD,iBAAiB,CAACK,IAAI,GAAG,GAAGJ,UAAU,yBAAyB;EAChE,CAACD,iBAAiB,CAACM,MAAM,GAAG,GAAGL,UAAU,2BAA2B;EACpE,CAACD,iBAAiB,CAACO,SAAS,GAAG,GAAGN,UAAU,sBAAsB;EAClE,CAACD,iBAAiB,CAACQ,QAAQ,GAAG,GAAGP,UAAU,sBAAsB;EACjE,CAACD,iBAAiB,CAACS,MAAM,GAAG,GAAGR,UAAU,oBAAoB;EAC7D,CAACD,iBAAiB,CAACU,cAAc,GAAG,GAAGT,UAAU,oBAAoB;EACrE,CAACD,iBAAiB,CAACW,UAAU,GAAG,GAAGV,UAAU,iBAAiB;EAC9D,CAACD,iBAAiB,CAACY,UAAU,GAAG,GAAGX,UAAU,oBAAoB;EACjE,CAACD,iBAAiB,CAACa,QAAQ,GAAG,GAAGZ,UAAU,gBAAgB;EAC3D,CAACD,iBAAiB,CAACc,YAAY,GAAG,GAAGb,UAAU,oBAAoB;EACnE,CAACD,iBAAiB,CAACe,UAAU,GAAG,GAAGd,UAAU,gBAAgB;EAC7D,CAACD,iBAAiB,CAACgB,IAAI,GAAG,GAAGf,UAAU,YAAY;EACnD,CAACD,iBAAiB,CAACiB,SAAS,GAAG,GAAGhB,UAAU,wBAAwB;EACpE,CAACD,iBAAiB,CAACkB,IAAI,GAAG,EAAE;EAC5B,CAAClB,iBAAiB,CAACmB,KAAK,GAAG,EAAE;EAC7B,CAACnB,iBAAiB,CAACoB,EAAE,GAAG,EAAE;EAC1B,CAACpB,iBAAiB,CAACqB,GAAG,GAAG,EAAE;EAC3B,CAACrB,iBAAiB,CAACsB,mBAAmB,GAAG,EAAE;EAC3C,CAACtB,iBAAiB,CAACuB,WAAW,GAAG,EAAE;EACnC,CAACvB,iBAAiB,CAACwB,gBAAgB,GAAG,EAAE;EACxC,CAACxB,iBAAiB,CAACyB,OAAO,GAAG,EAAE;EAC/B,CAACzB,iBAAiB,CAAC0B,UAAU,GAAG,EAAE;EAClC,CAAC1B,iBAAiB,CAAC2B,UAAU,GAAG,EAAE;EAClC,CAAC3B,iBAAiB,CAAC4B,IAAI,GAAG,EAAE;EAC5B,CAAC5B,iBAAiB,CAAC6B,OAAO,GAAG,EAAE;EAC/B,CAAC7B,iBAAiB,CAAC8B,WAAW,GAAG,EAAE;EACnC,CAAC9B,iBAAiB,CAAC+B,eAAe,GAAG;
|
|
1
|
+
{"version":3,"names":["IntegratedDevices","pdfBaseUrl","DEVICE_INSTRUCTION_PDFS","BP2","F4","SPO2","PC60WF","ALIVE_COR","COSINUSS","AOJ20A","TAIDOC_GLUCOSE","GLUCOCHECK","CLEVERTEMP","FORATEMP","ANDESFITTEMP","FORA_SCALE","BC01","RPM_SCALE","CMED","SP80B","S5","BGM","VEROVAL_DUO_CONTROL","VEROVAL_ECG","VEROVAL_ACTIVITY","MYSENSE","GENIAL_T31","ZH_SG_A606","BPW1","CHECKME","CHECKME_POD","CHECKME_POD_WPS","AP20","AP20_WPS","PC68B","PC100","BPM188","PC300","POCTOR_M3102","BIOLAND_BGM"],"sourceRoot":"../../../../../src","sources":["modules/bt-device/constants/device-instruction-pdfs.ts"],"mappings":";;AAAA,SAASA,iBAAiB,QAAQ,iDAA8C;;AAEhF;AACA;AACA,MAAMC,UAAU,GACd,2EAA2E;AAE7E,OAAO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