@ovok/native 1.6.24 → 1.6.26
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/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 +1 -1
- package/lib/commonjs/modules/bt-device/constants/supported-devices.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/custom/compile-custom-lepu.js +7 -0
- package/lib/commonjs/modules/bt-management/services/custom/compile-custom-lepu.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj.thermometers.js +8 -3
- package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj.thermometers.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.device.js +7 -1
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-data-processor.js +37 -0
- package/lib/commonjs/modules/bt-management/services/devices/bt-data-processor.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js +7 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js +7 -2
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.commands.js +2 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.commands.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.device-names.js +13 -4
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.device-names.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.js +77 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-transfer.js +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.identity-gate.js +2 -2
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.identity-gate.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.name-match.js +3 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.name-match.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.transports.js +8 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.transports.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/spo/pc60fw.frame-reader.js +71 -0
- package/lib/commonjs/modules/bt-management/services/devices/spo/pc60fw.frame-reader.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/spo/spo2.device.js +31 -5
- package/lib/commonjs/modules/bt-management/services/devices/spo/spo2.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/spo/spo2.main-services.js +5 -0
- package/lib/commonjs/modules/bt-management/services/devices/spo/spo2.main-services.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.ecg-device.js +24 -3
- package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.ecg-device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.ecg-record.js +98 -0
- package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.ecg-record.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.ecg-transfer.js +215 -55
- package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.ecg-transfer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js +16 -3
- 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.ecg-files.js +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-files.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js +8 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.lepod.js +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.lepod.js.map +1 -1
- package/lib/commonjs/modules/bt-management/types/clock-sync.js +1 -0
- package/lib/commonjs/modules/bt-management/types/clock-sync.js.map +1 -1
- package/lib/commonjs/modules/bt-management/utils/calculate-crc-8-maxim.js +24 -0
- package/lib/commonjs/modules/bt-management/utils/calculate-crc-8-maxim.js.map +1 -0
- package/lib/commonjs/modules/bt-management/utils/convert-ecg-diagnostic-flag.js +19 -27
- package/lib/commonjs/modules/bt-management/utils/convert-ecg-diagnostic-flag.js.map +1 -1
- package/lib/module/modules/bt-device/constants/supported-device-catalog-entries.js +2 -2
- 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 +1 -1
- package/lib/module/modules/bt-device/constants/supported-devices.js.map +1 -1
- package/lib/module/modules/bt-management/services/custom/compile-custom-lepu.js +7 -0
- package/lib/module/modules/bt-management/services/custom/compile-custom-lepu.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/aoj/aoj.thermometers.js +8 -3
- package/lib/module/modules/bt-management/services/devices/aoj/aoj.thermometers.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.device.js +7 -1
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-data-processor.js +37 -0
- package/lib/module/modules/bt-management/services/devices/bt-data-processor.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-managed-device.js +7 -1
- package/lib/module/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/custom/custom.device.js +7 -2
- package/lib/module/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.commands.js +2 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.commands.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.device-names.js +13 -3
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.device-names.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.js +73 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.js +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.identity-gate.js +2 -2
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.identity-gate.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.name-match.js +4 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.name-match.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.transports.js +8 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.transports.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/spo/pc60fw.frame-reader.js +66 -0
- package/lib/module/modules/bt-management/services/devices/spo/pc60fw.frame-reader.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/spo/spo2.device.js +31 -5
- package/lib/module/modules/bt-management/services/devices/spo/spo2.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/spo/spo2.main-services.js +5 -0
- package/lib/module/modules/bt-management/services/devices/spo/spo2.main-services.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/veroval/veroval.ecg-device.js +24 -3
- package/lib/module/modules/bt-management/services/devices/veroval/veroval.ecg-device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/veroval/veroval.ecg-record.js +92 -0
- package/lib/module/modules/bt-management/services/devices/veroval/veroval.ecg-record.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/veroval/veroval.ecg-transfer.js +211 -50
- package/lib/module/modules/bt-management/services/devices/veroval/veroval.ecg-transfer.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js +16 -3
- 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.ecg-files.js +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-files.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js +8 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.lepod.js +1 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.lepod.js.map +1 -1
- package/lib/module/modules/bt-management/types/clock-sync.js +1 -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/utils/calculate-crc-8-maxim.js +19 -0
- package/lib/module/modules/bt-management/utils/calculate-crc-8-maxim.js.map +1 -0
- package/lib/module/modules/bt-management/utils/convert-ecg-diagnostic-flag.js +19 -27
- package/lib/module/modules/bt-management/utils/convert-ecg-diagnostic-flag.js.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.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-lepu.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj.thermometers.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-data-processor.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-data-processor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.commands.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.commands.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.device-names.d.ts +9 -3
- 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/lepu/lepu.ecg-transfer.d.ts +41 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.name-match.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts +8 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/spo/pc60fw.frame-reader.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/spo/pc60fw.frame-reader.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/spo/spo2.device.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/spo/spo2.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/spo/spo2.main-services.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.ecg-device.d.ts +2 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.ecg-device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.ecg-record.d.ts +41 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.ecg-record.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.ecg-transfer.d.ts +50 -18
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.ecg-transfer.d.ts.map +1 -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.ecg-files.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.lepod.d.ts.map +1 -1
- 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/command-sequencer.d.ts +10 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/command-sequencer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-lepu-spec.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-lepu-spec.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-measurement-map.d.ts +4 -1
- 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/utils/calculate-crc-8-maxim.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/calculate-crc-8-maxim.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/convert-ecg-diagnostic-flag.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.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-lepu.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj.thermometers.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-data-processor.d.ts +8 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-data-processor.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.commands.d.ts +2 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.commands.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.device-names.d.ts +9 -3
- 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/lepu/lepu.ecg-transfer.d.ts +41 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts +2 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts +2 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.name-match.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts +8 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/spo/pc60fw.frame-reader.d.ts +8 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/spo/pc60fw.frame-reader.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/spo/spo2.device.d.ts +5 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/spo/spo2.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/spo/spo2.main-services.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.ecg-device.d.ts +2 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.ecg-device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.ecg-record.d.ts +41 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.ecg-record.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.ecg-transfer.d.ts +50 -18
- package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.ecg-transfer.d.ts.map +1 -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.ecg-files.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.lepod.d.ts.map +1 -1
- 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/command-sequencer.d.ts +10 -0
- package/lib/typescript/module/src/modules/bt-management/types/command-sequencer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/custom-lepu-spec.d.ts +2 -0
- package/lib/typescript/module/src/modules/bt-management/types/custom-lepu-spec.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/device-measurement-map.d.ts +4 -1
- 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/utils/calculate-crc-8-maxim.d.ts +3 -0
- package/lib/typescript/module/src/modules/bt-management/utils/calculate-crc-8-maxim.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/utils/convert-ecg-diagnostic-flag.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -24,6 +24,8 @@ const LepuCommand = exports.LepuCommand = {
|
|
|
24
24
|
* addressing it with an opcode that means something else on the wrong hardware.
|
|
25
25
|
*/
|
|
26
26
|
GET_INFO: 0xe1,
|
|
27
|
+
/** Sets the device's local wall clock before history is requested. */
|
|
28
|
+
SET_TIME: 0xec,
|
|
27
29
|
GET_BATTERY: 0xe4,
|
|
28
30
|
/** Enumerate the records stored on the device. */
|
|
29
31
|
GET_FILE_LIST: 0xf1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["LepuCommand","exports","ECHO","GET_INFO","GET_BATTERY","GET_FILE_LIST","READ_FILE_START","READ_FILE_DATA","READ_FILE_END"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.commands.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAG;EACzB;EACAE,IAAI,EAAE,IAAI;EAEV;AACF;AACA;AACA;AACA;AACA;AACA;EACEC,QAAQ,EAAE,IAAI;EAEdC,WAAW,EAAE,IAAI;EAEjB;EACAC,aAAa,EAAE,IAAI;EAEnB;EACAC,eAAe,EAAE,IAAI;EAErB;EACAC,cAAc,EAAE,IAAI;EAEpB;EACAC,aAAa,EAAE;AACjB,CAAU","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["LepuCommand","exports","ECHO","GET_INFO","SET_TIME","GET_BATTERY","GET_FILE_LIST","READ_FILE_START","READ_FILE_DATA","READ_FILE_END"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.commands.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAG;EACzB;EACAE,IAAI,EAAE,IAAI;EAEV;AACF;AACA;AACA;AACA;AACA;AACA;EACEC,QAAQ,EAAE,IAAI;EAEd;EACAC,QAAQ,EAAE,IAAI;EAEdC,WAAW,EAAE,IAAI;EAEjB;EACAC,aAAa,EAAE,IAAI;EAEnB;EACAC,eAAe,EAAE,IAAI;EAErB;EACAC,cAAc,EAAE,IAAI;EAEpB;EACAC,aAAa,EAAE;AACjB,CAAU","ignoreList":[]}
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.LEPU_DEVICE_NAMES = void 0;
|
|
6
|
+
exports.LEPU_FIRST_WORD_DEVICE_NAMES = exports.LEPU_DEVICE_NAMES = exports.LEPU_CATALOG_EXCLUDED_DEVICE_NAMES = void 0;
|
|
7
|
+
/* eslint-disable max-lines */
|
|
8
|
+
|
|
7
9
|
/**
|
|
8
10
|
* The names the Lepu/Viatom family advertises, as its own SDK matches them.
|
|
9
11
|
*
|
|
@@ -15,12 +17,19 @@ exports.LEPU_DEVICE_NAMES = void 0;
|
|
|
15
17
|
*
|
|
16
18
|
* It is that function's vocabulary, not a catalogue of everything the vendor sells: a few
|
|
17
19
|
* products - the ER3 and the M12 among them - are identified elsewhere in that app and never
|
|
18
|
-
* reach this list.
|
|
19
|
-
*
|
|
20
|
+
* reach this list. The first-word names below are compared against the complete first token of
|
|
21
|
+
* the advertisement, not as an open-ended prefix: `O2` must not claim `O2Ring`, and `BabyO2`
|
|
22
|
+
* must not claim `BabyO2N`.
|
|
20
23
|
*
|
|
21
24
|
* They are held here as a flat vocabulary rather than an ordered cascade, because
|
|
22
25
|
* `lepuNameMatch` derives the exclusions from the list itself. Adding a name automatically
|
|
23
26
|
* narrows every name it extends, which an ordered list would leave to whoever inserted it.
|
|
24
27
|
*/
|
|
25
|
-
const LEPU_DEVICE_NAMES = exports.LEPU_DEVICE_NAMES = ["AI-S100", "AITele", "AIView VS", "AP-20", "AP-20-WPS", "AirBP", "Aura_BP2", "BBSM BS1", "BBSM P1", "BBSM S1", "BBSM S2", "BBSM S3", "BM10", "BP2", "BP2A", "BP2A Nexus", "BP2B", "BP2T", "BP2V", "BP2W", "BP3", "BP3-B", "BP3-C1", "BP3-C2", "BP3A", "BP3B", "BP3C", "BP3D", "BP3E", "BP3F", "BP3G", "BP3H", "BP3K", "BP3L", "BP3Z", "BP4 Flex", "BPWATCH", "BUZUD-CML", "Band-WU", "Bioland-BGM", "CB1L-1", "CMB590611", "CMB590840", "CMB592254", "CMI_PC303", "CMRing", "CMTouch", "CPR Feedback", "CPR-01", "CPR-02", "CheckADV", "Checkme", "Checkme EX", "Checkme Pod", "Checkme Pod-WPS", "Checkme lite A", "CheckmeLE", "CheckmeLP", "DUAL-SPP", "EM-B", "EM-W", "ER1", "ER1-H", "ER1-L", "ER1-S", "ER1-SP", "ER1-W", "ER1S", "ER2", "ER2-S", "EZY-HB-01", "EZY-HBB-02", "GM_300SNT", "GM_300SNT-BLE", "Genial-T31", "HDM3D", "HDM3G", "HHM1", "HHM2", "HHM3", "HHM4", "JFK1001", "JFR1001", "KCA", "KCB", "KS-60FW", "KardiaBP", "KidsO2-WPS", "LBM-1", "LEPU AED", "LEPU ER1", "LEPU-ER2", "LP ER2", "LP-BP2W", "LPM311", "LPRE", "Le S5", "Le-F2 Pro", "Le-W", "LeRes", "Lepod", "LepodPro", "Lepu PO6", "Lescale F3", "Lescale F4L", "Lescale F4P", "Lescale P3", "M5", "MY-SS2501", "N9+BP2", "O2 Intg", "O2M-WPS", "O2R WAVE", "O2RMed S", "O2Ring", "O2Ring S", "O2Ring SC", "O2Ring SF", "O2Ring SP", "O2Ring-RE", "O2RingF", "OxyU", "OxyU SE", "Oxyfit", "Oxyfit-WPS", "PC-100", "PC-200", "PC-200-BLE", "PC-60B_SN", "PC-60F_SN", "PC-60NW", "PC-60NW-1_SN", "PC-60NW-WPS", "PC-60NW_BLE", "PC-60NW_SN", "PC-66B", "PC-68B", "PC66B-VE", "PC80B", "PC80B-BLE", "PC80B_BLE:", "PC_300SNT", "PC_300SNT-BLE", "PF-10", "PF-10AW", "PF-10AW-1", "PF-10AW1", "PF-10BW", "PF-10BW1", "PF-10BWS", "PF-20", "PF-20AW", "PF-20B", "PF10AW-ME", "PF10BW-VE", "PM10", "PO6B-WE", "POD-1W-WU", "POD-1_SN", "POD-2B_SN", "PoctorM3102", "QC-200", "R10", "R11", "R20", "R200", "R21", "S5W-VU", "S5W_SN", "S6W", "S6W1", "S7BW", "S7W", "S8-AW", "SA10AW-PU", "SHQFlex", "SHQO2Pro", "SI PO2", "SI PO4", "SI PO6", "SP-20", "SP-20-BLE", "SP-20-WPS", "T-201", "TMB-2288", "TMB_2088", "VCOMIN", "VTM AD5", "W12c", "WBP-02", "ZH-SG", "ZH-SG-A606", "aed_box", "iGate", "int-ER2", "le B1", "le S1"];
|
|
28
|
+
const LEPU_DEVICE_NAMES = exports.LEPU_DEVICE_NAMES = ["AI-S100", "AITele", "AIView VS", "AP-20", "AP-20-WPS", "AirBP", "Aura_BP2", "BBSM BS1", "BBSM P1", "BBSM S1", "BBSM S2", "BBSM S3", "BM10", "BP2", "BP2A", "BP2A Nexus", "BP2B", "BP2T", "BP2V", "BP2W", "BP3", "BP3-B", "BP3-C1", "BP3-C2", "BP3A", "BP3B", "BP3C", "BP3D", "BP3E", "BP3F", "BP3G", "BP3H", "BP3K", "BP3L", "BP3Z", "BP4 Flex", "BPWATCH", "BUZUD-CML", "Band-WU", "Bioland-BGM", "CB1L-1", "CMB590611", "CMB590840", "CMB592254", "CMI_PC303", "CMRing", "CMTouch", "CPR Feedback", "CPR-01", "CPR-02", "CheckADV", "Checkme", "Checkme EX", "Checkme Pod", "Checkme Pod-WPS", "Checkme lite A", "CheckmeLE", "CheckmeLP", "DUAL-SPP", "EM-B", "EM-W", "ER1", "ER1-H", "ER1-L", "ER1-S", "ER1-SP", "ER1-W", "ER1S", "ER2", "ER2-S", "EZY-HB-01", "EZY-HBB-02", "GM_300SNT", "GM_300SNT-BLE", "Genial-T31", "HDM3D", "HDM3G", "HHM1", "HHM2", "HHM3", "HHM4", "JFK1001", "JFR1001", "KCA", "KCB", "KS-60FW", "KardiaBP", "KidsO2-WPS", "LBM-1", "LEPU AED", "LEPU ER1", "LEPU-ER2", "LP ER2", "LP-BP2W", "LPM311", "LPRE", "Le S5", "Le-F2 Pro", "Le-W", "LeRes", "Lepod", "LepodPro", "Lepu PO6", "Lescale F3", "Lescale F4L", "Lescale F4P", "Lescale P3", "M5", "MY-SS2501", "N9+BP2", "O2 Intg", "O2M-WPS", "O2R WAVE", "O2RMed S", "O2Ring", "O2Ring S", "O2Ring SC", "O2Ring SF", "O2Ring SP", "O2Ring-RE", "O2RingF", "OxyU", "OxyU SE", "Oxyfit", "Oxyfit-WPS", "PC-100", "PC-200", "PC-200-BLE", "PC-60B_SN", "PC-60F_SN", "PC-60NW", "PC-60NW-1_SN", "PC-60NW-WPS", "PC-60NW_BLE", "PC-60NW_SN", "PC-66B", "PC-68B", "PC66B-VE", "PC80B", "PC80B-BLE", "PC80B_BLE:", "PC_300SNT", "PC_300SNT-BLE", "PF-10", "PF-10AW", "PF-10AW-1", "PF-10AW1", "PF-10BW", "PF-10BW1", "PF-10BWS", "PF-20", "PF-20AW", "PF-20B", "PF10AW-ME", "PF10BW-VE", "PM10", "PO6B-WE", "POD-1W-WU", "POD-1_SN", "POD-2B_SN", "PoctorM3102", "QC-200", "R10", "R11", "R20", "R200", "R21", "S5W-VU", "S5W_SN", "S6W", "S6W1", "S7BW", "S7W", "S8-AW", "SA10AW-PU", "SHQFlex", "SHQO2Pro", "SI PO2", "SI PO4", "SI PO6", "SP-20", "SP-20-BLE", "SP-20-WPS", "T-201", "TMB-2288", "TMB_2088", "VCOMIN", "VTM AD5", "W12c", "WBP-02", "ZH-SG", "ZH-SG-A606", "aed_box", "iGate", "int-ER2", "le B1", "le S1", "KidsO2", "O2BAND", "SleepU", "WearO2", "OxySmart", "FHR-666(BLE)", "SleepO2", "Station", "F4", "F5", "F8", "O2", "BTP", "ECN", "ER3", "LDT", "M12", "O2M", "O2S", "OMP", "BPW1", "LEM1", "O2MP", "DuoEK", "O2NCI", "VBeat", "VTM01", "OxyRing", "Oxylink", "LD-TECK", "BPM-188", "MY_SCALE", "BabyO2N", "Pulsebit", "Vetcorder", "BabyO2"];
|
|
29
|
+
|
|
30
|
+
/** Names the vendor matches by the complete first word of the advertisement. */
|
|
31
|
+
const LEPU_FIRST_WORD_DEVICE_NAMES = exports.LEPU_FIRST_WORD_DEVICE_NAMES = ["KidsO2", "O2BAND", "SleepU", "WearO2", "OxySmart", "FHR-666(BLE)", "SleepO2", "Station", "F4", "F5", "F8", "O2", "BTP", "ECN", "ER3", "LDT", "M12", "O2M", "O2S", "OMP", "BPW1", "LEM1", "O2MP", "DuoEK", "O2NCI", "VBeat", "VTM01", "OxyRing", "Oxylink", "LD-TECK", "BPM-188", "MY_SCALE", "BabyO2N", "Pulsebit", "Vetcorder", "BabyO2"];
|
|
32
|
+
|
|
33
|
+
/** Fetal-doppler and massager names from the vendor vocabulary, kept out of the SDK catalog. */
|
|
34
|
+
const LEPU_CATALOG_EXCLUDED_DEVICE_NAMES = exports.LEPU_CATALOG_EXCLUDED_DEVICE_NAMES = ["FHR-666(BLE)", "LEM1"];
|
|
26
35
|
//# sourceMappingURL=lepu.device-names.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["LEPU_DEVICE_NAMES","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.device-names.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"names":["LEPU_DEVICE_NAMES","exports","LEPU_FIRST_WORD_DEVICE_NAMES","LEPU_CATALOG_EXCLUDED_DEVICE_NAMES"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.device-names.ts"],"mappings":";;;;;;AAAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,iBAAoC,GAAAC,OAAA,CAAAD,iBAAA,GAAG,CAC3C,SAAS,EACT,QAAQ,EACR,WAAW,EACX,OAAO,EACP,WAAW,EACX,OAAO,EACP,UAAU,EACV,UAAU,EACV,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,MAAM,EACN,KAAK,EACL,MAAM,EACN,YAAY,EACZ,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,KAAK,EACL,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,UAAU,EACV,SAAS,EACT,WAAW,EACX,SAAS,EACT,aAAa,EACb,QAAQ,EACR,WAAW,EACX,WAAW,EACX,WAAW,EACX,WAAW,EACX,QAAQ,EACR,SAAS,EACT,cAAc,EACd,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,SAAS,EACT,YAAY,EACZ,aAA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;;AAED;AACA,MAAMC,kCAAqD,GAAAF,OAAA,CAAAE,kCAAA,GAAG,CAC5D,cAAc,EACd,MAAM,CACP","ignoreList":[]}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.LepuEcgTransferSequencer = void 0;
|
|
7
|
+
var _clockSync = require("../../../types/clock-sync.js");
|
|
8
|
+
var _lepuCommands = require("./lepu.commands.js");
|
|
9
|
+
var _lepuFileTransfer = require("./lepu.file-transfer.js");
|
|
10
|
+
var _lepuFrame = require("./lepu.frame.js");
|
|
11
|
+
var _lepuIdentityGate = require("./lepu.identity-gate.js");
|
|
12
|
+
var _lepuResponseType = require("./lepu.response-type.js");
|
|
13
|
+
/** Identifies a recorder, sets its local clock, then downloads its stored files. */
|
|
14
|
+
class LepuEcgTransferSequencer {
|
|
15
|
+
phase = "identity";
|
|
16
|
+
constructor(params) {
|
|
17
|
+
this.params = params;
|
|
18
|
+
this.identity = new _lepuIdentityGate.LepuIdentityGate({
|
|
19
|
+
write: params.write,
|
|
20
|
+
builder: params.builder,
|
|
21
|
+
expectedDeviceTypes: params.expectedDeviceTypes,
|
|
22
|
+
onIdentified: params.onIdentified,
|
|
23
|
+
onRefused: params.onRefused,
|
|
24
|
+
onAdmitted: this.startClockOrTransfer
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
initialCommands = () => this.identity.initialCommands();
|
|
28
|
+
isHistoryTransfer = () => true;
|
|
29
|
+
nextCommand = frame => {
|
|
30
|
+
if (this.phase === "identity") {
|
|
31
|
+
return this.identity.nextCommand(frame);
|
|
32
|
+
}
|
|
33
|
+
if (this.phase === "clock") {
|
|
34
|
+
return this.finishClock(frame);
|
|
35
|
+
}
|
|
36
|
+
return this.transfer?.nextCommand(frame);
|
|
37
|
+
};
|
|
38
|
+
startClockOrTransfer = () => {
|
|
39
|
+
if ((0, _clockSync.isClockSyncEnabled)(this.params.clockSync)) {
|
|
40
|
+
this.phase = "clock";
|
|
41
|
+
return [{
|
|
42
|
+
...this.params.write,
|
|
43
|
+
frame: this.params.builder.build(_lepuCommands.LepuCommand.SET_TIME, clockPayload(this.params.clockSync))
|
|
44
|
+
}];
|
|
45
|
+
}
|
|
46
|
+
return this.startTransfer();
|
|
47
|
+
};
|
|
48
|
+
finishClock = frame => {
|
|
49
|
+
if ((0, _lepuFrame.lepuCommandOf)(frame) !== _lepuCommands.LepuCommand.SET_TIME) {
|
|
50
|
+
return undefined;
|
|
51
|
+
}
|
|
52
|
+
if (!(0, _lepuResponseType.isLepuSuccess)(frame)) {
|
|
53
|
+
this.params.onError(`the device refused SET_TIME: ${(0, _lepuResponseType.describeLepuResponseType)(frame)}`);
|
|
54
|
+
}
|
|
55
|
+
return this.startTransfer();
|
|
56
|
+
};
|
|
57
|
+
startTransfer = () => {
|
|
58
|
+
this.phase = "files";
|
|
59
|
+
this.transfer = new _lepuFileTransfer.LepuFileTransfer({
|
|
60
|
+
write: this.params.write,
|
|
61
|
+
builder: this.params.builder,
|
|
62
|
+
onFile: this.params.onFile,
|
|
63
|
+
onError: this.params.onError,
|
|
64
|
+
skipFiles: this.params.skipFiles,
|
|
65
|
+
acceptFile: this.params.acceptFile,
|
|
66
|
+
afterTransfer: this.params.afterTransfer,
|
|
67
|
+
onProgress: this.params.onProgress
|
|
68
|
+
});
|
|
69
|
+
return this.transfer.initialCommands();
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
exports.LepuEcgTransferSequencer = LepuEcgTransferSequencer;
|
|
73
|
+
const clockPayload = clockSync => {
|
|
74
|
+
const parts = (0, _clockSync.getClockParts)(clockSync?.now?.() ?? new Date(), clockSync?.timezone);
|
|
75
|
+
return [parts.year & 0xff, parts.year >> 8 & 0xff, parts.month, parts.day, parts.hours, parts.minutes, parts.seconds];
|
|
76
|
+
};
|
|
77
|
+
//# sourceMappingURL=lepu.ecg-transfer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_clockSync","require","_lepuCommands","_lepuFileTransfer","_lepuFrame","_lepuIdentityGate","_lepuResponseType","LepuEcgTransferSequencer","phase","constructor","params","identity","LepuIdentityGate","write","builder","expectedDeviceTypes","onIdentified","onRefused","onAdmitted","startClockOrTransfer","initialCommands","isHistoryTransfer","nextCommand","frame","finishClock","transfer","isClockSyncEnabled","clockSync","build","LepuCommand","SET_TIME","clockPayload","startTransfer","lepuCommandOf","undefined","isLepuSuccess","onError","describeLepuResponseType","LepuFileTransfer","onFile","skipFiles","acceptFile","afterTransfer","onProgress","exports","parts","getClockParts","now","Date","timezone","year","month","day","hours","minutes","seconds"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.ecg-transfer.ts"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AASA,IAAAC,aAAA,GAAAD,OAAA;AAEA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAJ,OAAA;AACA,IAAAK,iBAAA,GAAAL,OAAA;AAuBA;AACA,MAAMM,wBAAwB,CAA6B;EACjDC,KAAK,GAAyB,UAAU;EAIzCC,WAAWA,CAAkBC,MAA6B,EAAE;IAAA,KAA/BA,MAA6B,GAA7BA,MAA6B;IAC/D,IAAI,CAACC,QAAQ,GAAG,IAAIC,kCAAgB,CAAC;MACnCC,KAAK,EAAEH,MAAM,CAACG,KAAK;MACnBC,OAAO,EAAEJ,MAAM,CAACI,OAAO;MACvBC,mBAAmB,EAAEL,MAAM,CAACK,mBAAmB;MAC/CC,YAAY,EAAEN,MAAM,CAACM,YAAY;MACjCC,SAAS,EAAEP,MAAM,CAACO,SAAS;MAC3BC,UAAU,EAAE,IAAI,CAACC;IACnB,CAAC,CAAC;EACJ;EAEOC,eAAe,GAAGA,CAAA,KACvB,IAAI,CAACT,QAAQ,CAACS,eAAe,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AAK,GAAG,OAAO;IACpB,IAAI,CAACiB,QAAQ,GAAG,IAAIa,kCAAgB,CAAC;MACnCzB,KAAK,EAAE,IAAI,CAACH,MAAM,CAACG,KAAK;MACxBC,OAAO,EAAE,IAAI,CAACJ,MAAM,CAACI,OAAO;MAC5ByB,MAAM,EAAE,IAAI,CAAC7B,MAAM,CAAC6B,MAAM;MAC1BH,OAAO,EAAE,IAAI,CAAC1B,MAAM,CAAC0B,OAAO;MAC5BI,SAAS,EAAE,IAAI,CAAC9B,MAAM,CAAC8B,SAAS;MAChCC,UAAU,EAAE,IAAI,CAAC/B,MAAM,CAAC+B,UAAU;MAClCC,aAAa,EAAE,IAAI,CAAChC,MAAM,CAACgC,aAAa;MACxCC,UAAU,EAAE,IAAI,CAACjC,MAAM,CAACiC;IAC1B,CAAC,CAAC;IAEF,OAAO,IAAI,CAAClB,QAAQ,CAACL,eAAe,CAAC,CAAC;EACxC,CAAC;AACH;AAACwB,OAAA,CAAArC,wBAAA,GAAAA,wBAAA;AAED,MAAMwB,YAAY,GAAIJ,SAA4B,IAAe;EAC/D,MAAMkB,KAAK,GAAG,IAAAC,wBAAa,EACzBnB,SAAS,EAAEoB,GAAG,GAAG,CAAC,IAAI,IAAIC,IAAI,CAAC,CAAC,EAChCrB,SAAS,EAAEsB,QACb,CAAC;EAED,OAAO,CACLJ,KAAK,CAACK,IAAI,GAAG,IAAI,EAChBL,KAAK,CAACK,IAAI,IAAI,CAAC,GAAI,IAAI,EACxBL,KAAK,CAACM,KAAK,EACXN,KAAK,CAACO,GAAG,EACTP,KAAK,CAACQ,KAAK,EACXR,KAAK,CAACS,OAAO,EACbT,KAAK,CAACU,OAAO,CACd;AACH,CAAC","ignoreList":[]}
|
|
@@ -77,7 +77,7 @@ class LepuFileTransfer {
|
|
|
77
77
|
};
|
|
78
78
|
openNextFile = () => {
|
|
79
79
|
let name = this.files[this.fileIndex];
|
|
80
|
-
while (name !== undefined && this.params.skipFiles?.has(name)) {
|
|
80
|
+
while (name !== undefined && (this.params.skipFiles?.has(name) || this.params.acceptFile?.(name) === false)) {
|
|
81
81
|
this.fileIndex++;
|
|
82
82
|
name = this.files[this.fileIndex];
|
|
83
83
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_le32FromHex","require","_le32ToBytes","_lepuCommands","_lepuFileNames","_lepuFrame","_lepuResponseType","FILE_SIZE_OFFSET","MAX_FILE_BYTES","TRANSFER_COMMANDS","LepuCommand","GET_FILE_LIST","READ_FILE_START","READ_FILE_DATA","READ_FILE_END","LepuFileTransfer","files","fileIndex","name","totalBytes","content","isSessionOpen","isDone","constructor","params","isHistoryTransfer","initialCommands","commandFor","nextCommand","frame","command","lepuCommandOf","afterTransfer","includes","undefined","isLepuSuccess","fail","describeLepuResponseType","lepuNamesFrom","lepuPayloadOf","openNextFile","openedFile","appendChunk","closedFile","skipFiles","has","lepuNameBytes","le32ToBytes","payload","le32FromHex","limit","maxFileBytes","closeFile","length","push","onProgress","receivedBytes","onFile","reason","onError","write","builder","build","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.file-transfer.ts"],"mappings":";;;;;;AAIA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAGA,IAAAE,aAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,iBAAA,GAAAL,OAAA;AAXA;;AAaA,MAAMM,gBAAgB,GAAG,CAAC;;AAE1B;AACA;AACA;AACA;AACA;AACA,MAAMC,cAAc,GAAG,OAAO;AAE9B,MAAMC,iBAAoC,GAAG,CAC3CC,yBAAW,CAACC,aAAa,EACzBD,yBAAW,CAACE,eAAe,EAC3BF,yBAAW,CAACG,cAAc,EAC1BH,yBAAW,CAACI,aAAa,CAC1B;
|
|
1
|
+
{"version":3,"names":["_le32FromHex","require","_le32ToBytes","_lepuCommands","_lepuFileNames","_lepuFrame","_lepuResponseType","FILE_SIZE_OFFSET","MAX_FILE_BYTES","TRANSFER_COMMANDS","LepuCommand","GET_FILE_LIST","READ_FILE_START","READ_FILE_DATA","READ_FILE_END","LepuFileTransfer","files","fileIndex","name","totalBytes","content","isSessionOpen","isDone","constructor","params","isHistoryTransfer","initialCommands","commandFor","nextCommand","frame","command","lepuCommandOf","afterTransfer","includes","undefined","isLepuSuccess","fail","describeLepuResponseType","lepuNamesFrom","lepuPayloadOf","openNextFile","openedFile","appendChunk","closedFile","skipFiles","has","acceptFile","lepuNameBytes","le32ToBytes","payload","le32FromHex","limit","maxFileBytes","closeFile","length","push","onProgress","receivedBytes","onFile","reason","onError","write","builder","build","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.file-transfer.ts"],"mappings":";;;;;;AAIA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAGA,IAAAE,aAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,iBAAA,GAAAL,OAAA;AAXA;;AAaA,MAAMM,gBAAgB,GAAG,CAAC;;AAE1B;AACA;AACA;AACA;AACA;AACA,MAAMC,cAAc,GAAG,OAAO;AAE9B,MAAMC,iBAAoC,GAAG,CAC3CC,yBAAW,CAACC,aAAa,EACzBD,yBAAW,CAACE,eAAe,EAC3BF,yBAAW,CAACG,cAAc,EAC1BH,yBAAW,CAACI,aAAa,CAC1B;AAwCD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,gBAAgB,CAA6B;EACzCC,KAAK,GAAa,EAAE;EACpBC,SAAS,GAAG,CAAC;EACbC,IAAI,GAAG,EAAE;EACTC,UAAU,GAAG,CAAC;EACdC,OAAO,GAAa,EAAE;EACtBC,aAAa,GAAG,KAAK;EACrBC,MAAM,GAAG,KAAK;E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I,CACd,IAAI,IAAI,CAAClB,IAAI,cAAc,IAAI,CAACE,OAAO,CAACkC,MAAM,OAAO,IAAI,CAACnC,UAAU,QACtE,CAAC;IACH;IAEA,IAAI,IAAI,CAACA,UAAU,GAAG,CAAC,EAAE;MACvB,IAAI,CAACK,MAAM,CAACkC,MAAM,CAAC;QAAExC,IAAI,EAAE,IAAI,CAACA,IAAI;QAAEE,OAAO,EAAE,IAAI,CAACA;MAAQ,CAAC,CAAC;IAChE;IAEA,IAAI,CAACH,SAAS,EAAE;IAEhB,OAAO,IAAI,CAACuB,YAAY,CAAC,CAAC;EAC5B,CAAC;EAEOa,SAAS,GAAGA,CAAA,KAAgC,CAClD,IAAI,CAAC1B,UAAU,CAACjB,yBAAW,CAACI,aAAa,CAAC,CAC3C;;EAED;AACF;AACA;AACA;AACA;AACA;EACUsB,IAAI,GAAIuB,MAAc,IAA2C;IACvE,IAAI,CAACnC,MAAM,CAACoC,OAAO,CAACD,MAAM,CAAC;IAC3B,IAAI,CAACrC,MAAM,GAAG,IAAI;IAElB,IAAI,CAAC,IAAI,CAACD,aAAa,EAAE;MACvB,OAAO,IAAI,CAACG,MAAM,CAACQ,aAAa,GAAG,CAAC;IACtC;IAEA,IAAI,CAACX,aAAa,GAAG,KAAK;IAE1B,OAAO,IAAI,CAACgC,SAAS,CAAC,CAAC;EACzB,CAAC;EAEO1B,UAAU,GAAGA,CACnBG,OAAe,EACfmB,OAA0B,GAAG,EAAE,MACZ;IACnB,GAAG,IAAI,CAACzB,MAAM,CAACqC,KAAK;IACpBhC,KAAK,EAAE,IAAI,CAACL,MAAM,CAACsC,OAAO,CAACC,KAAK,CAACjC,OAAO,EAAEmB,OAAO;EACnD,CAAC,CAAC;AACJ;AAACe,OAAA,CAAAjD,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
|
@@ -57,7 +57,7 @@ class LepuIdentityGate {
|
|
|
57
57
|
return this.refuse("the device answered with a frame too short to hold its own model number");
|
|
58
58
|
}
|
|
59
59
|
this.params.onIdentified?.(info);
|
|
60
|
-
if (this.params.pollCommand === undefined) {
|
|
60
|
+
if (this.params.pollCommand === undefined && this.params.onAdmitted === undefined) {
|
|
61
61
|
return undefined;
|
|
62
62
|
}
|
|
63
63
|
const isNarrowed = this.params.expectedDeviceTypes.length > 0;
|
|
@@ -65,7 +65,7 @@ class LepuIdentityGate {
|
|
|
65
65
|
return this.refuse(`the hardware reported model ${info.deviceType} (branch "${info.branchCode}"), which this declaration was not written for`);
|
|
66
66
|
}
|
|
67
67
|
this.isIdentified = true;
|
|
68
|
-
return this.poll();
|
|
68
|
+
return this.params.onAdmitted?.() ?? this.poll();
|
|
69
69
|
};
|
|
70
70
|
|
|
71
71
|
/** Closes the gate for good. There is no state a refused device can be talked back from. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_clockSync","require","_hexToByte","_lepuCommands","_lepuDeviceInfo","_lepuResponseType","COMMAND_INDEX","VIATOM_OXYGEN_INFO","LepuIdentityGate","isIdentified","isRefused","constructor","params","initialCommands","protocol","setClock","setClockBeforeInfo","isClockSyncEnabled","clockSync","command","commandFor","oxyClockPayload","pendingCommand","LepuCommand","GET_INFO","nextCommand","frame","nextViatomOxygenCommand","undefined","poll","admit","hexToByte","isLepuSuccess","refuse","describeLepuResponseType","info","parseLepuDeviceInfo","onIdentified","pollCommand","isNarrowed","expectedDeviceTypes","length","includes","deviceType","branchCode","reason","onRefused","payload","delayBeforeWriteMs","write","builder","build","writeWithoutResponse","withoutResponse","status","toString","padStart","parseViatomOxygenDeviceInfo","exports","parts","getClockParts","now","Date","timezone","pad","value","String","JSON","stringify","SetTIME","year","month","day","hours","minutes","seconds","Array","from","TextEncoder","encode","text","slice","map","byte","fromCharCode","join","replace","parse","Number","Model","isInteger","protocolMaxLength","Branch","serialNumber","SN","SerialNumber"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.identity-gate.ts"],"mappings":";;;;;;AAEA,IAAAA,UAAA,GAAAC,OAAA;AAOA,IAAAC,UAAA,GAAAD,OAAA;AAGA,IAAAE,aAAA,GAAAF,OAAA;AACA,IAAAG,eAAA,GAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAJ,OAAA;AAdA;;
|
|
1
|
+
{"version":3,"names":["_clockSync","require","_hexToByte","_lepuCommands","_lepuDeviceInfo","_lepuResponseType","COMMAND_INDEX","VIATOM_OXYGEN_INFO","LepuIdentityGate","isIdentified","isRefused","constructor","params","initialCommands","protocol","setClock","setClockBeforeInfo","isClockSyncEnabled","clockSync","command","commandFor","oxyClockPayload","pendingCommand","LepuCommand","GET_INFO","nextCommand","frame","nextViatomOxygenCommand","undefined","poll","admit","hexToByte","isLepuSuccess","refuse","describeLepuResponseType","info","parseLepuDeviceInfo","onIdentified","pollCommand","onAdmitted","isNarrowed","expectedDeviceTypes","length","includes","deviceType","branchCode","reason","onRefused","payload","delayBeforeWriteMs","write","builder","build","writeWithoutResponse","withoutResponse","status","toString","padStart","parseViatomOxygenDeviceInfo","exports","parts","getClockParts","now","Date","timezone","pad","value","String","JSON","stringify","SetTIME","year","month","day","hours","minutes","seconds","Array","from","TextEncoder","encode","text","slice","map","byte","fromCharCode","join","replace","parse","Number","Model","isInteger","protocolMaxLength","Branch","serialNumber","SN","SerialNumber"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.identity-gate.ts"],"mappings":";;;;;;AAEA,IAAAA,UAAA,GAAAC,OAAA;AAOA,IAAAC,UAAA,GAAAD,OAAA;AAGA,IAAAE,aAAA,GAAAF,OAAA;AACA,IAAAG,eAAA,GAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAJ,OAAA;AAdA;;AAiDA,MAAMK,aAAa,GAAG,CAAC;AACvB,MAAMC,kBAAkB,GAAG,IAAI;;AAE/B;AACO,MAAMC,gBAAgB,CAA6B;EAChDC,YAAY,GAAG,KAAK;EACpBC,SAAS,GAAG,KAAK;EAGlBC,WAAWA,CAAkBC,MAA8B,EAAE;I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M;IACN,OAAOpE,SAAS;EAClB;AACF,CAAC","ignoreList":[]}
|
|
@@ -24,6 +24,9 @@ const escapeRegExp = value => value.replace(REGEXP_SPECIAL, "\\$&");
|
|
|
24
24
|
* the model - `BP2 1234` - and the serial's shape varies across the family.
|
|
25
25
|
*/
|
|
26
26
|
const lepuNameMatch = (name, vocabulary = _lepuDeviceNames.LEPU_DEVICE_NAMES) => {
|
|
27
|
+
if (_lepuDeviceNames.LEPU_FIRST_WORD_DEVICE_NAMES.includes(name)) {
|
|
28
|
+
return new RegExp(`^${escapeRegExp(name)}(?: |$)`);
|
|
29
|
+
}
|
|
27
30
|
const extensions = vocabulary.filter(other => other !== name && other.startsWith(name)).map(other => escapeRegExp(other.slice(name.length)));
|
|
28
31
|
const exclusion = extensions.length > 0 ? `(?!${extensions.join("|")})` : "";
|
|
29
32
|
return new RegExp(`^${escapeRegExp(name)}${exclusion}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_lepuDeviceNames","require","REGEXP_SPECIAL","escapeRegExp","value","replace","lepuNameMatch","name","vocabulary","LEPU_DEVICE_NAMES","extensions","filter","other","startsWith","map","slice","length","exclusion","join","
|
|
1
|
+
{"version":3,"names":["_lepuDeviceNames","require","REGEXP_SPECIAL","escapeRegExp","value","replace","lepuNameMatch","name","vocabulary","LEPU_DEVICE_NAMES","LEPU_FIRST_WORD_DEVICE_NAMES","includes","RegExp","extensions","filter","other","startsWith","map","slice","length","exclusion","join","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.name-match.ts"],"mappings":";;;;;;AAAA,IAAAA,gBAAA,GAAAC,OAAA;AAKA,MAAMC,cAAc,GAAG,qBAAqB;AAE5C,MAAMC,YAAY,GAAIC,KAAa,IACjCA,KAAK,CAACC,OAAO,CAACH,cAAc,EAAE,MAAM,CAAC;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMI,aAAa,GAAGA,CAC3BC,IAAY,EACZC,UAA6B,GAAGC,kCAAiB,KACtC;EACX,IAAIC,6CAA4B,CAACC,QAAQ,CAACJ,IAAI,CAAC,EAAE;IAC/C,OAAO,IAAIK,MAAM,CAAC,IAAIT,YAAY,CAACI,IAAI,CAAC,SAAS,CAAC;EACpD;EAEA,MAAMM,UAAU,GAAGL,UAAU,CAC1BM,MAAM,CAAEC,KAAK,IAAKA,KAAK,KAAKR,IAAI,IAAIQ,KAAK,CAACC,UAAU,CAACT,IAAI,CAAC,CAAC,CAC3DU,GAAG,CAAEF,KAAK,IAAKZ,YAAY,CAACY,KAAK,CAACG,KAAK,CAACX,IAAI,CAACY,MAAM,CAAC,CAAC,CAAC;EAEzD,MAAMC,SAAS,GACbP,UAAU,CAACM,MAAM,GAAG,CAAC,GAAG,MAAMN,UAAU,CAACQ,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,EAAE;EAE5D,OAAO,IAAIT,MAAM,CAAC,IAAIT,YAAY,CAACI,IAAI,CAAC,GAAGa,SAAS,EAAE,CAAC;AACzD,CAAC;AAACE,OAAA,CAAAhB,aAAA,GAAAA,aAAA","ignoreList":[]}
|
|
@@ -117,6 +117,9 @@ const lepuDevice = params => {
|
|
|
117
117
|
matchByService: params.nameMatch === undefined,
|
|
118
118
|
stuckDataTimeoutMs: params.stuckDataTimeoutMs ?? DEFAULT_STUCK_TIMEOUT_MS,
|
|
119
119
|
preferredMtu: transport.preferredMtu,
|
|
120
|
+
...(params.clockSync === undefined ? {} : {
|
|
121
|
+
clockSync: params.clockSync
|
|
122
|
+
}),
|
|
120
123
|
lepu: {
|
|
121
124
|
protocol: params.protocol,
|
|
122
125
|
startBytes: [viatomOxygen ? "55" : START_BYTE],
|
|
@@ -129,6 +132,9 @@ const lepuDevice = params => {
|
|
|
129
132
|
...(params.fileTransfer === undefined ? {} : {
|
|
130
133
|
fileTransfer: params.fileTransfer
|
|
131
134
|
}),
|
|
135
|
+
...(params.ecgFileDecoder === undefined ? {} : {
|
|
136
|
+
ecgFileDecoder: params.ecgFileDecoder
|
|
137
|
+
}),
|
|
132
138
|
...(params.pollCommand === undefined ? {} : {
|
|
133
139
|
pollCommand: params.pollCommand
|
|
134
140
|
}),
|
|
@@ -150,6 +156,8 @@ const lepuDevice = params => {
|
|
|
150
156
|
cases: params.cases
|
|
151
157
|
}]
|
|
152
158
|
}]
|
|
159
|
+
}, params.decorateReading === undefined ? {} : {
|
|
160
|
+
decorateReading: params.decorateReading
|
|
153
161
|
});
|
|
154
162
|
};
|
|
155
163
|
exports.lepuDevice = lepuDevice;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_defineCustomDevice","require","STANDARD_SERVICE","STANDARD_WRITE","STANDARD_NOTIFY","AW1_SERVICE","AW1_WRITE","AW1_NOTIFY","DING_SERVICE","DING_WRITE","DING_NOTIFY","AI_TELE_SERVICE","AI_TELE_WRITE","AI_TELE_NOTIFY","PREFERRED_MTU","MINIMUM_MTU","DEFAULT_STUCK_TIMEOUT_MS","START_BYTE","lepuTransports","exports","standard","serviceUuid","notifyUuid","writeUuid","preferredMtu","standardSmallMtu","aw1","ding","aiTele","COMMAND_BYTE","lepuDevice","params","transport","viatomOxygen","protocol","defineCustomDevice","id","nameMatch","matchByService","undefined","stuckDataTimeoutMs","lepu","startBytes","requestStartByte","write","characteristicUuid","expectedDeviceTypes","fileTransfer","pollCommand","writeWithoutResponse","setClockBeforeInfo","services","uuid","monitor","frame","minLengthBytes","caseSelectorBytes","cases"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.transports.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"names":["_defineCustomDevice","require","STANDARD_SERVICE","STANDARD_WRITE","STANDARD_NOTIFY","AW1_SERVICE","AW1_WRITE","AW1_NOTIFY","DING_SERVICE","DING_WRITE","DING_NOTIFY","AI_TELE_SERVICE","AI_TELE_WRITE","AI_TELE_NOTIFY","PREFERRED_MTU","MINIMUM_MTU","DEFAULT_STUCK_TIMEOUT_MS","START_BYTE","lepuTransports","exports","standard","serviceUuid","notifyUuid","writeUuid","preferredMtu","standardSmallMtu","aw1","ding","aiTele","COMMAND_BYTE","lepuDevice","params","transport","viatomOxygen","protocol","defineCustomDevice","id","nameMatch","matchByService","undefined","stuckDataTimeoutMs","clockSync","lepu","startBytes","requestStartByte","write","characteristicUuid","expectedDeviceTypes","fileTransfer","ecgFileDecoder","pollCommand","writeWithoutResponse","setClockBeforeInfo","services","uuid","monitor","frame","minLengthBytes","caseSelectorBytes","cases","decorateReading"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.transports.ts"],"mappings":";;;;;;AAMA,IAAAA,mBAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,gBAAgB,GAAG,sCAAsC;AAC/D,MAAMC,cAAc,GAAG,sCAAsC;AAC7D,MAAMC,eAAe,GAAG,sCAAsC;;AAE9D;AACA,MAAMC,WAAW,GAAG,sCAAsC;AAC1D,MAAMC,SAAS,GAAG,sCAAsC;AACxD,MAAMC,UAAU,GAAG,sCAAsC;;AAEzD;AACA;AACA;AACA;AACA,MAAMC,YAAY,GAAG,sCAAsC;AAC3D,MAAMC,UAAU,GAAG,sCAAsC;AACzD,MAAMC,WAAW,GAAG,sCAAsC;;AAE1D;AACA,MAAMC,eAAe,GAAG,sCAAsC;AAC9D,MAAMC,aAAa,GAAG,sCAAsC;AAC5D,MAAMC,cAAc,GAAG,sCAAsC;;AAE7D;AACA,MAAMC,aAAa,GAAG,GAAG;;AAEzB;AACA,MAAMC,WAAW,GAAG,EAAE;;AAEtB;AACA,MAAMC,wBAAwB,GAAG,MAAM;AAEvC,MAAMC,UAAU,GAAG,IAAI;AASvB;AACA;AACA;AACA;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,IAAI,EAAEtB,SAAS,CAACV,UAAU;QAC1BkC,KAAK,EAAE;UAAEC,cAAc,EAAE1B,MAAM,CAAC0B;QAAe,CAAC;QAChDC,iBAAiB,EAAE3B,MAAM,CAAC2B,iBAAiB,IAAI,CAAC7B,YAAY,CAAC;QAC7D8B,KAAK,EAAE5B,MAAM,CAAC4B;MAChB,CAAC;IAEL,CAAC;EAEL,CAAC,EAAE5B,MAAM,CAAC6B,eAAe,KAAKrB,SAAS,GACnC,CAAC,CAAC,GACF;IAAEqB,eAAe,EAAE7B,MAAM,CAAC6B;EAAgB,CAAC,CAAC;AAClD,CAAC;AAACzC,OAAA,CAAAW,UAAA,GAAAA,UAAA","ignoreList":[]}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Pc60FwFrameReader = void 0;
|
|
7
|
+
var _frameReadStatus = require("../../../types/frame-read-status.js");
|
|
8
|
+
var _calculateCrc8Maxim = require("../../../utils/calculate-crc-8-maxim.js");
|
|
9
|
+
var _hexToByte = require("../../../utils/hex-to-byte.js");
|
|
10
|
+
const HEADER = ["aa", "55"];
|
|
11
|
+
const LENGTH_INDEX = 3;
|
|
12
|
+
const HEADER_BYTES = 4;
|
|
13
|
+
const CHECKSUM_BYTES = 1;
|
|
14
|
+
const byteAt = (buffer, index) => (0, _hexToByte.hexToByte)(buffer[index] ?? "0");
|
|
15
|
+
|
|
16
|
+
/** Reads the length-prefixed, CRC-8/MAXIM frames used by PC-60FW. */
|
|
17
|
+
class Pc60FwFrameReader {
|
|
18
|
+
readFrame(buffer) {
|
|
19
|
+
const start = this.findHeader(buffer);
|
|
20
|
+
if (start === -1) {
|
|
21
|
+
return {
|
|
22
|
+
status: _frameReadStatus.FrameReadStatus.INCOMPLETE,
|
|
23
|
+
consumedBytes: Math.max(0, buffer.length - 1)
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
if (start + HEADER_BYTES > buffer.length) {
|
|
27
|
+
return {
|
|
28
|
+
status: _frameReadStatus.FrameReadStatus.INCOMPLETE,
|
|
29
|
+
consumedBytes: start
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
const payloadLength = byteAt(buffer, start + LENGTH_INDEX);
|
|
33
|
+
const frameLength = HEADER_BYTES + payloadLength;
|
|
34
|
+
if (payloadLength < CHECKSUM_BYTES) {
|
|
35
|
+
return {
|
|
36
|
+
status: _frameReadStatus.FrameReadStatus.CORRUPT,
|
|
37
|
+
consumedBytes: start + HEADER.length
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
if (start + frameLength > buffer.length) {
|
|
41
|
+
return {
|
|
42
|
+
status: _frameReadStatus.FrameReadStatus.INCOMPLETE,
|
|
43
|
+
consumedBytes: start
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
const frame = buffer.slice(start, start + frameLength);
|
|
47
|
+
const declared = byteAt(frame, frame.length - CHECKSUM_BYTES);
|
|
48
|
+
const actual = (0, _calculateCrc8Maxim.calculateCrc8Maxim)(frame, frame.length - CHECKSUM_BYTES);
|
|
49
|
+
if (declared !== actual) {
|
|
50
|
+
return {
|
|
51
|
+
status: _frameReadStatus.FrameReadStatus.CORRUPT,
|
|
52
|
+
consumedBytes: start + HEADER.length
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
status: _frameReadStatus.FrameReadStatus.COMPLETE,
|
|
57
|
+
consumedBytes: start + frameLength,
|
|
58
|
+
frame
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
findHeader(buffer) {
|
|
62
|
+
for (let index = 0; index < buffer.length - 1; index++) {
|
|
63
|
+
if (buffer[index]?.toLowerCase() === HEADER[0] && buffer[index + 1]?.toLowerCase() === HEADER[1]) {
|
|
64
|
+
return index;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return -1;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
exports.Pc60FwFrameReader = Pc60FwFrameReader;
|
|
71
|
+
//# sourceMappingURL=pc60fw.frame-reader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_frameReadStatus","require","_calculateCrc8Maxim","_hexToByte","HEADER","LENGTH_INDEX","HEADER_BYTES","CHECKSUM_BYTES","byteAt","buffer","index","hexToByte","Pc60FwFrameReader","readFrame","start","findHeader","status","FrameReadStatus","INCOMPLETE","consumedBytes","Math","max","length","payloadLength","frameLength","CORRUPT","frame","slice","declared","actual","calculateCrc8Maxim","COMPLETE","toLowerCase","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/spo/pc60fw.frame-reader.ts"],"mappings":";;;;;;AACA,IAAAA,gBAAA,GAAAC,OAAA;AAEA,IAAAC,mBAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AAEA,MAAMG,MAAM,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC;AAC3B,MAAMC,YAAY,GAAG,CAAC;AACtB,MAAMC,YAAY,GAAG,CAAC;AACtB,MAAMC,cAAc,GAAG,CAAC;AAExB,MAAMC,MAAM,GAAGA,CAACC,MAAyB,EAAEC,KAAa,KACtD,IAAAC,oBAAS,EAACF,MAAM,CAACC,KAAK,CAAC,IAAI,GAAG,CAAC;;AAEjC;AACO,MAAME,iBAAiB,CAAwB;EAC7CC,SAASA,CAACJ,MAAyB,EAAmB;IAC3D,MAAMK,KAAK,GAAG,IAAI,CAACC,UAAU,CAACN,MAAM,CAAC;IAErC,IAAIK,KAAK,KAAK,CAAC,CAAC,EAAE;MAChB,OAAO;QACLE,MAAM,EAAEC,gCAAe,CAACC,UAAU;QAClCC,aAAa,EAAEC,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEZ,MAAM,CAACa,MAAM,GAAG,CAAC;MAC9C,CAAC;IACH;IAEA,IAAIR,KAAK,GAAGR,YAAY,GAAGG,MAAM,C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AEZ,KAAK,EAAE,EAAE;MACtD,IACED,MAAM,CAACC,KAAK,CAAC,EAAEsB,WAAW,CAAC,CAAC,KAAK5B,MAAM,CAAC,CAAC,CAAC,IAC1CK,MAAM,CAACC,KAAK,GAAG,CAAC,CAAC,EAAEsB,WAAW,CAAC,CAAC,KAAK5B,MAAM,CAAC,CAAC,CAAC,EAC9C;QACA,OAAOM,KAAK;MACd;IACF;IAEA,OAAO,CAAC,CAAC;EACX;AACF;AAACuB,OAAA,CAAArB,iBAAA,GAAAA,iBAAA","ignoreList":[]}
|
|
@@ -6,11 +6,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.SPO2Device = void 0;
|
|
7
7
|
var _caseType = require("../../../types/case-type.js");
|
|
8
8
|
var _btManagedDevice = require("../bt-managed-device.js");
|
|
9
|
+
var _pc60fwFrameReader = require("./pc60fw.frame-reader.js");
|
|
9
10
|
var _spo2MainServices = require("./spo2.main-services.js");
|
|
10
11
|
class SPO2Device extends _btManagedDevice.BTManagedDevice {
|
|
11
12
|
onStreamStart = () => {};
|
|
12
13
|
mainServices = _spo2MainServices.spo2MainServices;
|
|
13
14
|
stuckDataTimeout = 30_000;
|
|
15
|
+
frameReader = new _pc60fwFrameReader.Pc60FwFrameReader();
|
|
14
16
|
validatePackage = pkg => {
|
|
15
17
|
pkg = pkg.map(b => b.toLowerCase());
|
|
16
18
|
let headIndex = -1;
|
|
@@ -41,14 +43,24 @@ class SPO2Device extends _btManagedDevice.BTManagedDevice {
|
|
|
41
43
|
if (successResult.caseType === _caseType.CaseType.STREAM || successResult.caseType === _caseType.CaseType.OTHER) {
|
|
42
44
|
return;
|
|
43
45
|
}
|
|
44
|
-
|
|
46
|
+
const status = Number.parseInt(collectedValues[9] ?? "0", 16);
|
|
47
|
+
if ((status & 0x02) === 0) {
|
|
48
|
+
if ((status & 0x04) === 0 && this.isValidParameterResult(successResult)) {
|
|
49
|
+
this.lastValidResult = this.withoutPerfusionMarker(successResult);
|
|
50
|
+
}
|
|
51
|
+
return true;
|
|
52
|
+
}
|
|
53
|
+
const lastValidResult = this.lastValidResult ?? (successResult.perfusionIndex === undefined ? successResult : undefined);
|
|
54
|
+
this.lastValidResult = undefined;
|
|
55
|
+
if (!lastValidResult) {
|
|
45
56
|
return true;
|
|
46
57
|
}
|
|
47
|
-
if (!
|
|
48
|
-
this.onError?.(new Error(`Measurement type is undefined for case ${
|
|
58
|
+
if (!lastValidResult.measurementTypeKey) {
|
|
59
|
+
this.onError?.(new Error(`Measurement type is undefined for case ${lastValidResult.caseType}`));
|
|
49
60
|
return;
|
|
50
61
|
}
|
|
51
|
-
this.handlePulseOximeterResult(
|
|
62
|
+
this.handlePulseOximeterResult(lastValidResult);
|
|
63
|
+
return;
|
|
52
64
|
}
|
|
53
65
|
handlePulseOximeterResult(successResult) {
|
|
54
66
|
const error = this.checkIfHasError(successResult);
|
|
@@ -59,11 +71,25 @@ class SPO2Device extends _btManagedDevice.BTManagedDevice {
|
|
|
59
71
|
this.onResult?.(successResult);
|
|
60
72
|
}
|
|
61
73
|
checkIfHasError(successResult) {
|
|
62
|
-
if (!successResult
|
|
74
|
+
if (!this.isValidParameterResult(successResult)) {
|
|
63
75
|
return "feedback-messages.measurement.disturb-detected-error";
|
|
64
76
|
}
|
|
65
77
|
return undefined;
|
|
66
78
|
}
|
|
79
|
+
isValidParameterResult(successResult) {
|
|
80
|
+
const bloodOxygen = successResult.bloodOxygen;
|
|
81
|
+
const pulseRate = successResult.pulseRate;
|
|
82
|
+
return typeof bloodOxygen === "number" && bloodOxygen >= 50 && bloodOxygen <= 100 && ![0, 127, 255].includes(bloodOxygen) && typeof pulseRate === "number" && pulseRate >= 20 && pulseRate <= 300 && ![0, 255, 511, 65535].includes(pulseRate);
|
|
83
|
+
}
|
|
84
|
+
withoutPerfusionMarker(successResult) {
|
|
85
|
+
if (successResult.perfusionIndex !== 0 && successResult.perfusionIndex !== 255) {
|
|
86
|
+
return successResult;
|
|
87
|
+
}
|
|
88
|
+
return {
|
|
89
|
+
...successResult,
|
|
90
|
+
perfusionIndex: undefined
|
|
91
|
+
};
|
|
92
|
+
}
|
|
67
93
|
}
|
|
68
94
|
exports.SPO2Device = SPO2Device;
|
|
69
95
|
//# sourceMappingURL=spo2.device.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_caseType","require","_btManagedDevice","_spo2MainServices","SPO2Device","BTManagedDevice","onStreamStart","mainServices","spo2MainServices","stuckDataTimeout","validatePackage","pkg","map","b","toLowerCase","headIndex","i","length","slice","toNum","hex","parseInt","lengthByte","totalLen","handleSuccessResult","successResult","collectedValues","caseType","CaseType","STREAM","OTHER","measurementTypeKey","onError","Error","handlePulseOximeterResult","error","checkIfHasError","onResult","bloodOxygen","
|
|
1
|
+
{"version":3,"names":["_caseType","require","_btManagedDevice","_pc60fwFrameReader","_spo2MainServices","SPO2Device","BTManagedDevice","onStreamStart","mainServices","spo2MainServices","stuckDataTimeout","frameReader","Pc60FwFrameReader","validatePackage","pkg","map","b","toLowerCase","headIndex","i","length","slice","toNum","hex","parseInt","lengthByte","totalLen","handleSuccessResult","successResult","collectedValues","caseType","CaseType","STREAM","OTHER","status","Number","isValidParameterResult","lastValidResult","withoutPerfusionMarker","perfusionIndex","undefined","measurementTypeKey","onError","Error","handlePulseOximeterResult","error","checkIfHasError","onResult","bloodOxygen","pulseRate","includes","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/spo/spo2.device.ts"],"mappings":";;;;;;AAEA,IAAAA,SAAA,GAAAC,OAAA;AAKA,IAAAC,gBAAA,GAAAD,OAAA;AAEA,IAAAE,kBAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AAEO,MAAMI,UAAU,SAASC,gCAAe,CAA2B;EAC9DC,aAAa,GAAeA,CAAA,KAAM,CAAC,CAAC;EAEpCC,YAAY,GAAeC,kCAAgB;EAC3CC,gBAAgB,GAAG,MAAM;EACzBC,WAAW,GAAsB,IAAIC,o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rB,aAAa,CAACqB,SAAS;IAEzC,OACE,OAAOD,WAAW,KAAK,QAAQ,IAC/BA,WAAW,IAAI,EAAE,IACjBA,WAAW,IAAI,GAAG,IAClB,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAACE,QAAQ,CAACF,WAAW,CAAC,IACpC,OAAOC,SAAS,KAAK,QAAQ,IAC7BA,SAAS,IAAI,EAAE,IACfA,SAAS,IAAI,GAAG,IAChB,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC,CAACC,QAAQ,CAACD,SAAS,CAAC;EAE7C;EAEQX,sBAAsBA,CAC5BV,aAAgE,EACb;IACnD,IACEA,aAAa,CAACW,cAAc,KAAK,CAAC,IAClCX,aAAa,CAACW,cAAc,KAAK,GAAG,EACpC;MACA,OAAOX,aAAa;IACtB;IAEA,OAAO;MAAE,GAAGA,aAAa;MAAEW,cAAc,EAAEC;IAAU,CAAC;EACxD;AACF;AAACW,OAAA,CAAA9C,UAAA,GAAAA,UAAA","ignoreList":[]}
|
|
@@ -43,6 +43,11 @@ const spo2MainServices = exports.spo2MainServices = [{
|
|
|
43
43
|
parseType: "number",
|
|
44
44
|
byteIndexes: [7, 6],
|
|
45
45
|
parseReference: 16
|
|
46
|
+
}, {
|
|
47
|
+
name: "perfusionIndex",
|
|
48
|
+
parseType: "number",
|
|
49
|
+
byteIndexes: [8],
|
|
50
|
+
customParserDefinition: value => parseInt(value, 16) / 10
|
|
46
51
|
}]
|
|
47
52
|
}]
|
|
48
53
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_core","require","_caseType","spo2MainServices","exports","uuid","monitorUuids","parsingModel","caseValuePosition","cases","measurementTypeKey","MeasurementTypeKey","bloodOxygenPulseRate","caseType","CaseType","STREAM","caseValue","parseDefinitions","description","RESULT","name","parseType","byteIndexes","parseReference"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/spo/spo2.main-services.ts"],"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;MAEL,CAAC;IAEL;EACF,CAAC;AAEL,CAAC,CACF","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_core","require","_caseType","spo2MainServices","exports","uuid","monitorUuids","parsingModel","caseValuePosition","cases","measurementTypeKey","MeasurementTypeKey","bloodOxygenPulseRate","caseType","CaseType","STREAM","caseValue","parseDefinitions","description","RESULT","name","parseType","byteIndexes","parseReference","customParserDefinition","value","parseInt"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/spo/spo2.main-services.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AAGO,MAAME,gBAA4B,GAAAC,OAAA,CAAAD,gBAAA,GAAG,CAC1C;EACEE,IAAI,EAAE,sCAAsC;EAC5CC,YAAY,EAAE,CACZ;IACED,IAAI,EAAE,sCAAsC;IAC5CE,YAAY,EAAE;MACZC,iBAAiB,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;MAC/BC,KAAK,EAAE,CACL;QACEC,kBAAkB,EAAEC,wBAAkB,CAACC,oBAAoB;QAC3DC,QAAQ,EAAEC,kBAAQ,CAACC,MAAM;QACzBC,SAAS,EAAE,UAAU;QACrBC,gBAAgB,EAAE,EAAE;QACpBC,WAAW,EAAE;MACf,CAAC,EAED;QACER,kBAAkB,EAAEC,wBAAkB,CAACC,oBAAoB;QAC3DC,QAAQ,EAAEC,kBAAQ,CAACC,MAAM;QACzBC,SAAS,EAAE,UAAU;QACrBC,gBAAgB,EAAE,EAAE;QACpBC,WAAW,EAAE;MACf,CAAC,EAED;QACER,kBAAkB,EAAEC,wBAAkB,CAACC,oBAAoB;QAC3DC,QAAQ,EAAEC,kBAAQ,CAACC,MAAM;QACzBC,SAAS,EAAE,UAAU;QACrBC,gBAAgB,EAAE;MACpB,CAAC,EAED;QACEP,kBAAkB,EAAEC,wBAAkB,CAACC,oBAAoB;QAC3DC,QAAQ,EAAEC,kBAAQ,CAACK,MAAM;QACzBH,SAAS,EAAE,UAAU;QACrBC,gBAAgB,EAAE,CAChB;UACEG,IAAI,EAAE,aAAa;UACnBC,SAAS,EAAE,QAAQ;UACnBC,WAAW,EAAE,CAAC,CAAC,CAAC;UAChBC,cAAc,EAAE;QAClB,CAAC,EACD;UACEH,IAAI,EAAE,WAAW;UACjBC,SAAS,EAAE,QAAQ;UACnBC,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;UACnBC,cAAc,EAAE;QAClB,CAAC,EACD;UACEH,IAAI,EAAE,gBAAgB;UACtBC,SAAS,EAAE,QAAQ;UACnBC,WAAW,EAAE,CAAC,CAAC,CAAC;UAChBE,sBAAsB,EAAGC,KAAa,IACpCC,QAAQ,CAACD,KAAK,EAAE,EAAE,CAAC,GAAG;QAC1B,CAAC;MAEL,CAAC;IAEL;EACF,CAAC;AAEL,CAAC,CACF","ignoreList":[]}
|
|
@@ -7,6 +7,7 @@ exports.VerovalEcgDevice = void 0;
|
|
|
7
7
|
var _core = require("@ovok/core");
|
|
8
8
|
var _caseType = require("../../../types/case-type.js");
|
|
9
9
|
var _btManagedDevice = require("../bt-managed-device.js");
|
|
10
|
+
var _verovalEcgRecord = require("./veroval.ecg-record.js");
|
|
10
11
|
var _verovalEcgSamples = require("./veroval.ecg-samples.js");
|
|
11
12
|
var _verovalEcgTransfer = require("./veroval.ecg-transfer.js");
|
|
12
13
|
const SERVICE = "0000a000-0000-1000-8000-00805f9b34fb";
|
|
@@ -64,18 +65,33 @@ class VerovalEcgDevice extends _btManagedDevice.BTManagedDevice {
|
|
|
64
65
|
serviceUuid: SERVICE,
|
|
65
66
|
characteristicUuid: CONTROL_POINT
|
|
66
67
|
},
|
|
67
|
-
|
|
68
|
+
onRecord: this.reportRecord,
|
|
69
|
+
clockSync: this.clockSync
|
|
68
70
|
});
|
|
69
71
|
constructor(device, params) {
|
|
70
72
|
super(device, params);
|
|
73
|
+
this.clockSync = params.clockSync;
|
|
71
74
|
}
|
|
72
75
|
|
|
73
76
|
/** Nothing is reported per packet; the transfer reports the recording when it is whole. */
|
|
74
77
|
handleSuccessResult() {
|
|
75
78
|
return;
|
|
76
79
|
}
|
|
77
|
-
|
|
78
|
-
|
|
80
|
+
reportRecord = record => {
|
|
81
|
+
if (!record.header.isEcg) {
|
|
82
|
+
const bloodPressure = (0, _verovalEcgRecord.parseVerovalBloodPressureRecord)(record.header);
|
|
83
|
+
if (bloodPressure) {
|
|
84
|
+
this.onResult?.({
|
|
85
|
+
caseType: _caseType.CaseType.RESULT,
|
|
86
|
+
...bloodPressure
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
if (!record.raw || record.header.heartRate === 0) {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
const diagramPoints = (0, _verovalEcgSamples.decodeVerovalEcgSamples)(record.raw, record.header.calibration);
|
|
79
95
|
if (diagramPoints.length === 0) {
|
|
80
96
|
this.onError?.(new Error("Veroval ECG: the recording held no samples."));
|
|
81
97
|
return;
|
|
@@ -83,6 +99,11 @@ class VerovalEcgDevice extends _btManagedDevice.BTManagedDevice {
|
|
|
83
99
|
this.onResult?.({
|
|
84
100
|
measurementTypeKey: _core.MeasurementTypeKey.ecg,
|
|
85
101
|
caseType: _caseType.CaseType.RESULT,
|
|
102
|
+
id: `veroval-${record.header.memorySlot}-${record.header.sequence}-${record.header.recordedAt?.getTime() ?? "unknown"}`,
|
|
103
|
+
memorySlot: record.header.memorySlot,
|
|
104
|
+
recordedAt: record.header.recordedAt,
|
|
105
|
+
heartRate: record.header.heartRate,
|
|
106
|
+
diagnosticResult: record.header.diagnosticResult,
|
|
86
107
|
diagramPoints,
|
|
87
108
|
duration: diagramPoints.length / _verovalEcgSamples.VEROVAL_ECG_SAMPLE_RATE_HZ
|
|
88
109
|
});
|