@ovok/native 0.4.6 → 0.4.8
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 +3 -1
- package/lib/commonjs/modules/bt-device/constants/device-instruction-pdfs.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/index.js +220 -0
- package/lib/commonjs/modules/bt-management/index.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/custom/compile-case-fields.js +49 -0
- package/lib/commonjs/modules/bt-management/services/custom/compile-case-fields.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/custom/compile-case-shape.js +52 -0
- package/lib/commonjs/modules/bt-management/services/custom/compile-case-shape.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/custom/compile-custom-case.js +53 -41
- package/lib/commonjs/modules/bt-management/services/custom/compile-custom-case.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/custom/compile-custom-field.js +3 -0
- package/lib/commonjs/modules/bt-management/services/custom/compile-custom-field.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/custom/compile-custom-frame.js +48 -2
- package/lib/commonjs/modules/bt-management/services/custom/compile-custom-frame.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/custom/compile-custom-lepu.js +98 -0
- package/lib/commonjs/modules/bt-management/services/custom/compile-custom-lepu.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/custom/define-custom-device.js +24 -1
- package/lib/commonjs/modules/bt-management/services/custom/define-custom-device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/device-creator.js +19 -8
- package/lib/commonjs/modules/bt-management/services/device-creator.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj.thermometers.js +85 -0
- package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj.thermometers.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.frame-reader.js +8 -74
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.frame-reader.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-command-writer.js +155 -0
- package/lib/commonjs/modules/bt-management/services/devices/bt-command-writer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js +9 -49
- package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-data-processor.js +17 -6
- 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 +21 -14
- 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-lepu-sequencer.js +55 -0
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js +82 -29
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/frame-parser.js +2 -1
- package/lib/commonjs/modules/bt-management/services/devices/frame-parser.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.command-builder.js +48 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.command-builder.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.commands.js +37 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.commands.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.device-info.js +83 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.device-info.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.device-names.js +26 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.device-names.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-names.js +36 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-names.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-transfer.js +155 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.frame-reader.js +98 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.frame-reader.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.frame.js +29 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.frame.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.identity-gate.js +103 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.identity-gate.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.name-match.js +32 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.name-match.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.response-type.js +64 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.response-type.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.transports.js +143 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.transports.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/polling-command-sequencer.js +38 -0
- package/lib/commonjs/modules/bt-management/services/devices/polling-command-sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/sentinel-frame-reader.js +84 -0
- package/lib/commonjs/modules/bt-management/services/devices/sentinel-frame-reader.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js +130 -0
- package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js +55 -0
- package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.bp-monitors.js +43 -0
- package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.bp-monitors.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.duo-control-device.js +113 -0
- package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.duo-control-device.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.duo-control-sequencer.js +120 -0
- package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.duo-control-sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.ecg-device.js +92 -0
- package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.ecg-device.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.ecg-samples.js +64 -0
- package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.ecg-samples.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.ecg-transfer.js +94 -0
- package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.ecg-transfer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js +124 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js +113 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.lepod.js +117 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.lepod.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.oximeters.js +82 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.oximeters.js.map +1 -0
- package/lib/commonjs/modules/bt-management/types/command-sequencer.js +6 -0
- package/lib/commonjs/modules/bt-management/types/command-sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/types/custom-checksum-algorithm.js +2 -0
- package/lib/commonjs/modules/bt-management/types/custom-checksum-algorithm.js.map +1 -0
- package/lib/commonjs/modules/bt-management/types/custom-checksum-spec.js +6 -0
- package/lib/commonjs/modules/bt-management/types/custom-checksum-spec.js.map +1 -0
- package/lib/commonjs/modules/bt-management/types/custom-lepu-spec.js +2 -0
- package/lib/commonjs/modules/bt-management/types/custom-lepu-spec.js.map +1 -0
- package/lib/commonjs/modules/bt-management/types/custom-measurement-spec.js +6 -0
- package/lib/commonjs/modules/bt-management/types/custom-measurement-spec.js.map +1 -0
- package/lib/commonjs/modules/bt-management/types/device-command.js +2 -0
- package/lib/commonjs/modules/bt-management/types/device-command.js.map +1 -0
- package/lib/commonjs/modules/bt-management/types/integrated-devices.js +2 -0
- package/lib/commonjs/modules/bt-management/types/integrated-devices.js.map +1 -1
- package/lib/commonjs/modules/bt-management/types/measurement-group.js +6 -0
- package/lib/commonjs/modules/bt-management/types/measurement-group.js.map +1 -0
- package/lib/commonjs/modules/bt-management/utils/calculate-checksum.js +49 -0
- package/lib/commonjs/modules/bt-management/utils/calculate-checksum.js.map +1 -0
- package/lib/commonjs/modules/bt-management/utils/create-custom-field-parser.js +21 -0
- package/lib/commonjs/modules/bt-management/utils/create-custom-field-parser.js.map +1 -1
- package/lib/commonjs/modules/bt-management/utils/create-frame-validator.js +9 -0
- package/lib/commonjs/modules/bt-management/utils/create-frame-validator.js.map +1 -1
- package/lib/commonjs/modules/bt-management/utils/hex-to-bytes.js +19 -0
- package/lib/commonjs/modules/bt-management/utils/hex-to-bytes.js.map +1 -0
- package/lib/commonjs/modules/bt-management/utils/le-32-to-bytes.js +13 -0
- package/lib/commonjs/modules/bt-management/utils/le-32-to-bytes.js.map +1 -0
- package/lib/commonjs/modules/bt-management/utils/parse-measurement.js +10 -7
- package/lib/commonjs/modules/bt-management/utils/parse-measurement.js.map +1 -1
- package/lib/commonjs/modules/bt-management/utils/reject-custom-reading.js +34 -0
- package/lib/commonjs/modules/bt-management/utils/reject-custom-reading.js.map +1 -0
- package/lib/commonjs/modules/bt-management/utils/summarise-measurement-for-log.js +22 -0
- package/lib/commonjs/modules/bt-management/utils/summarise-measurement-for-log.js.map +1 -0
- package/lib/commonjs/modules/bt-management/utils/supported-measurement-type-keys.js +18 -0
- package/lib/commonjs/modules/bt-management/utils/supported-measurement-type-keys.js.map +1 -0
- package/lib/module/modules/bt-device/constants/device-instruction-pdfs.js +3 -1
- package/lib/module/modules/bt-device/constants/device-instruction-pdfs.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/index.js +20 -0
- package/lib/module/modules/bt-management/index.js.map +1 -1
- package/lib/module/modules/bt-management/services/custom/compile-case-fields.js +44 -0
- package/lib/module/modules/bt-management/services/custom/compile-case-fields.js.map +1 -0
- package/lib/module/modules/bt-management/services/custom/compile-case-shape.js +48 -0
- package/lib/module/modules/bt-management/services/custom/compile-case-shape.js.map +1 -0
- package/lib/module/modules/bt-management/services/custom/compile-custom-case.js +53 -41
- package/lib/module/modules/bt-management/services/custom/compile-custom-case.js.map +1 -1
- package/lib/module/modules/bt-management/services/custom/compile-custom-field.js +3 -0
- package/lib/module/modules/bt-management/services/custom/compile-custom-field.js.map +1 -1
- package/lib/module/modules/bt-management/services/custom/compile-custom-frame.js +48 -2
- package/lib/module/modules/bt-management/services/custom/compile-custom-frame.js.map +1 -1
- package/lib/module/modules/bt-management/services/custom/compile-custom-lepu.js +93 -0
- package/lib/module/modules/bt-management/services/custom/compile-custom-lepu.js.map +1 -0
- package/lib/module/modules/bt-management/services/custom/define-custom-device.js +24 -1
- package/lib/module/modules/bt-management/services/custom/define-custom-device.js.map +1 -1
- package/lib/module/modules/bt-management/services/device-creator.js +20 -8
- package/lib/module/modules/bt-management/services/device-creator.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/aoj/aoj.thermometers.js +81 -0
- package/lib/module/modules/bt-management/services/devices/aoj/aoj.thermometers.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.frame-reader.js +8 -73
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.frame-reader.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-command-writer.js +150 -0
- package/lib/module/modules/bt-management/services/devices/bt-command-writer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js +9 -49
- package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-data-processor.js +17 -6
- 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 +21 -14
- 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-lepu-sequencer.js +51 -0
- package/lib/module/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/custom/custom.device.js +82 -29
- package/lib/module/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/frame-parser.js +2 -1
- package/lib/module/modules/bt-management/services/devices/frame-parser.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.command-builder.js +43 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.command-builder.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.commands.js +33 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.commands.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.device-info.js +79 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.device-info.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.device-names.js +22 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.device-names.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-names.js +32 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-names.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.js +150 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.frame-reader.js +93 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.frame-reader.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.frame.js +24 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.frame.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.identity-gate.js +98 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.identity-gate.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.name-match.js +27 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.name-match.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.response-type.js +59 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.response-type.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.transports.js +140 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.transports.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/polling-command-sequencer.js +34 -0
- package/lib/module/modules/bt-management/services/devices/polling-command-sequencer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/sentinel-frame-reader.js +79 -0
- package/lib/module/modules/bt-management/services/devices/sentinel-frame-reader.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js +123 -0
- package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js +50 -0
- package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/veroval/veroval.bp-monitors.js +38 -0
- package/lib/module/modules/bt-management/services/devices/veroval/veroval.bp-monitors.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/veroval/veroval.duo-control-device.js +108 -0
- package/lib/module/modules/bt-management/services/devices/veroval/veroval.duo-control-device.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/veroval/veroval.duo-control-sequencer.js +116 -0
- package/lib/module/modules/bt-management/services/devices/veroval/veroval.duo-control-sequencer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/veroval/veroval.ecg-device.js +87 -0
- package/lib/module/modules/bt-management/services/devices/veroval/veroval.ecg-device.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/veroval/veroval.ecg-samples.js +60 -0
- package/lib/module/modules/bt-management/services/devices/veroval/veroval.ecg-samples.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/veroval/veroval.ecg-transfer.js +89 -0
- package/lib/module/modules/bt-management/services/devices/veroval/veroval.ecg-transfer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js +118 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js +108 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.lepod.js +114 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.lepod.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.oximeters.js +79 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.oximeters.js.map +1 -0
- package/lib/module/modules/bt-management/types/command-sequencer.js +4 -0
- package/lib/module/modules/bt-management/types/command-sequencer.js.map +1 -0
- package/lib/module/modules/bt-management/types/custom-checksum-algorithm.js +2 -0
- package/lib/module/modules/bt-management/types/custom-checksum-algorithm.js.map +1 -0
- package/lib/module/modules/bt-management/types/custom-checksum-spec.js +4 -0
- package/lib/module/modules/bt-management/types/custom-checksum-spec.js.map +1 -0
- package/lib/module/modules/bt-management/types/custom-device-definition.js.map +1 -1
- package/lib/module/modules/bt-management/types/custom-lepu-spec.js +2 -0
- package/lib/module/modules/bt-management/types/custom-lepu-spec.js.map +1 -0
- package/lib/module/modules/bt-management/types/custom-measurement-spec.js +4 -0
- package/lib/module/modules/bt-management/types/custom-measurement-spec.js.map +1 -0
- package/lib/module/modules/bt-management/types/device-command.js +2 -0
- package/lib/module/modules/bt-management/types/device-command.js.map +1 -0
- package/lib/module/modules/bt-management/types/device-measurement-map.js +3 -3
- package/lib/module/modules/bt-management/types/device-measurement-map.js.map +1 -1
- package/lib/module/modules/bt-management/types/integrated-devices.js +2 -0
- package/lib/module/modules/bt-management/types/integrated-devices.js.map +1 -1
- package/lib/module/modules/bt-management/types/measurement-group.js +4 -0
- package/lib/module/modules/bt-management/types/measurement-group.js.map +1 -0
- package/lib/module/modules/bt-management/utils/calculate-checksum.js +44 -0
- package/lib/module/modules/bt-management/utils/calculate-checksum.js.map +1 -0
- package/lib/module/modules/bt-management/utils/create-custom-field-parser.js +21 -0
- package/lib/module/modules/bt-management/utils/create-custom-field-parser.js.map +1 -1
- package/lib/module/modules/bt-management/utils/create-frame-validator.js +9 -0
- package/lib/module/modules/bt-management/utils/create-frame-validator.js.map +1 -1
- package/lib/module/modules/bt-management/utils/hex-to-bytes.js +14 -0
- package/lib/module/modules/bt-management/utils/hex-to-bytes.js.map +1 -0
- package/lib/module/modules/bt-management/utils/le-32-to-bytes.js +8 -0
- package/lib/module/modules/bt-management/utils/le-32-to-bytes.js.map +1 -0
- package/lib/module/modules/bt-management/utils/parse-measurement.js +10 -7
- package/lib/module/modules/bt-management/utils/parse-measurement.js.map +1 -1
- package/lib/module/modules/bt-management/utils/reject-custom-reading.js +29 -0
- package/lib/module/modules/bt-management/utils/reject-custom-reading.js.map +1 -0
- package/lib/module/modules/bt-management/utils/summarise-measurement-for-log.js +17 -0
- package/lib/module/modules/bt-management/utils/summarise-measurement-for-log.js.map +1 -0
- package/lib/module/modules/bt-management/utils/supported-measurement-type-keys.js +13 -0
- package/lib/module/modules/bt-management/utils/supported-measurement-type-keys.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-management/constants/integrated-devices-map.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts +20 -0
- package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-case-fields.d.ts +13 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-case-fields.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-case-shape.d.ts +19 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-case-shape.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-case.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-field.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-frame.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-lepu.d.ts +11 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-lepu.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/custom/define-custom-device.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/aoj/aoj.thermometers.d.ts +24 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj.thermometers.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts +5 -8
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-command-writer.d.ts +74 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-command-writer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-connection-handler.d.ts +6 -4
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-connection-handler.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-data-processor.d.ts +20 -1
- 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 +12 -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-lepu-sequencer.d.ts +30 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts +32 -2
- 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/frame-parser.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.command-builder.d.ts +24 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.command-builder.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.commands.d.ts +32 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.commands.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.device-info.d.ts +27 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.device-info.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.device-names.d.ts +20 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.device-names.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-names.d.ts +14 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-names.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts +75 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts +28 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.frame.d.ts +12 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.frame.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts +81 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.name-match.d.ts +17 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.name-match.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.response-type.d.ts +33 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.response-type.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts +85 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/polling-command-sequencer.d.ts +27 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/polling-command-sequencer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/sentinel-frame-reader.d.ts +52 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/sentinel-frame-reader.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts +53 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts +45 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.bp-monitors.d.ts +18 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.bp-monitors.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.duo-control-device.d.ts +19 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.duo-control-device.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.duo-control-sequencer.d.ts +45 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.duo-control-sequencer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.ecg-device.d.ts +30 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.ecg-device.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.ecg-samples.d.ts +39 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.ecg-samples.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.ecg-transfer.d.ts +35 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.ecg-transfer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts +44 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts +32 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.lepod.d.ts +25 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.lepod.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts +39 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/command-sequencer.d.ts +26 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/command-sequencer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-case-spec.d.ts +43 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-case-spec.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-checksum-algorithm.d.ts +10 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-checksum-algorithm.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-checksum-spec.d.ts +23 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-checksum-spec.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-definition.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-definition.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-spec.d.ts +12 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-spec.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-field-encoding.d.ts +7 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-field-encoding.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-frame-spec.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-frame-spec.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-lepu-spec.d.ts +44 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-lepu-spec.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-measurement-spec.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-measurement-spec.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/dependent-result-handler-params.d.ts +7 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/dependent-result-handler-params.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-command.d.ts +27 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-command.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-measurement-map.d.ts +2 -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 +3 -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/types/measurement-group.d.ts +14 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/measurement-group.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/parsing-case.d.ts +17 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/parsing-case.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/utils/calculate-checksum.d.ts +13 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/calculate-checksum.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/create-custom-field-parser.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/utils/create-frame-validator.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/utils/hex-to-bytes.d.ts +10 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/hex-to-bytes.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/le-32-to-bytes.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/le-32-to-bytes.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/parse-measurement.d.ts +4 -1
- package/lib/typescript/commonjs/src/modules/bt-management/utils/parse-measurement.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/utils/reject-custom-reading.d.ts +15 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/reject-custom-reading.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/summarise-measurement-for-log.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/summarise-measurement-for-log.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/supported-measurement-type-keys.d.ts +10 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/supported-measurement-type-keys.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-management/constants/integrated-devices-map.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/index.d.ts +20 -0
- package/lib/typescript/module/src/modules/bt-management/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/custom/compile-case-fields.d.ts +13 -0
- package/lib/typescript/module/src/modules/bt-management/services/custom/compile-case-fields.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/custom/compile-case-shape.d.ts +19 -0
- package/lib/typescript/module/src/modules/bt-management/services/custom/compile-case-shape.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-case.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-field.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-frame.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-lepu.d.ts +11 -0
- package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-lepu.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/custom/define-custom-device.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/aoj/aoj.thermometers.d.ts +24 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj.thermometers.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts +5 -8
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-command-writer.d.ts +74 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-command-writer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-connection-handler.d.ts +6 -4
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-connection-handler.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-data-processor.d.ts +20 -1
- 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 +12 -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-lepu-sequencer.d.ts +30 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts +32 -2
- 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/frame-parser.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.command-builder.d.ts +24 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.command-builder.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.commands.d.ts +32 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.commands.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.device-info.d.ts +27 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.device-info.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.device-names.d.ts +20 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.device-names.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-names.d.ts +14 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-names.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts +75 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts +28 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.frame.d.ts +12 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.frame.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts +81 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.name-match.d.ts +17 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.name-match.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.response-type.d.ts +33 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.response-type.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts +85 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/polling-command-sequencer.d.ts +27 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/polling-command-sequencer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/sentinel-frame-reader.d.ts +52 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/sentinel-frame-reader.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts +53 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts +45 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.bp-monitors.d.ts +18 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.bp-monitors.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.duo-control-device.d.ts +19 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.duo-control-device.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.duo-control-sequencer.d.ts +45 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.duo-control-sequencer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.ecg-device.d.ts +30 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.ecg-device.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.ecg-samples.d.ts +39 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.ecg-samples.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.ecg-transfer.d.ts +35 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.ecg-transfer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts +44 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts +32 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.lepod.d.ts +25 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.lepod.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts +39 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/command-sequencer.d.ts +26 -0
- package/lib/typescript/module/src/modules/bt-management/types/command-sequencer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/custom-case-spec.d.ts +43 -0
- package/lib/typescript/module/src/modules/bt-management/types/custom-case-spec.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/custom-checksum-algorithm.d.ts +10 -0
- package/lib/typescript/module/src/modules/bt-management/types/custom-checksum-algorithm.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/custom-checksum-spec.d.ts +23 -0
- package/lib/typescript/module/src/modules/bt-management/types/custom-checksum-spec.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/custom-device-definition.d.ts +5 -0
- package/lib/typescript/module/src/modules/bt-management/types/custom-device-definition.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/custom-device-spec.d.ts +12 -0
- package/lib/typescript/module/src/modules/bt-management/types/custom-device-spec.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/custom-field-encoding.d.ts +7 -1
- package/lib/typescript/module/src/modules/bt-management/types/custom-field-encoding.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/custom-frame-spec.d.ts +8 -0
- package/lib/typescript/module/src/modules/bt-management/types/custom-frame-spec.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/custom-lepu-spec.d.ts +44 -0
- package/lib/typescript/module/src/modules/bt-management/types/custom-lepu-spec.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/custom-measurement-spec.d.ts +9 -0
- package/lib/typescript/module/src/modules/bt-management/types/custom-measurement-spec.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/dependent-result-handler-params.d.ts +7 -0
- package/lib/typescript/module/src/modules/bt-management/types/dependent-result-handler-params.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/device-command.d.ts +27 -0
- package/lib/typescript/module/src/modules/bt-management/types/device-command.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/device-measurement-map.d.ts +2 -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 +3 -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/types/measurement-group.d.ts +14 -0
- package/lib/typescript/module/src/modules/bt-management/types/measurement-group.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/parsing-case.d.ts +17 -0
- package/lib/typescript/module/src/modules/bt-management/types/parsing-case.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/utils/calculate-checksum.d.ts +13 -0
- package/lib/typescript/module/src/modules/bt-management/utils/calculate-checksum.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/utils/create-custom-field-parser.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/utils/create-frame-validator.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/utils/hex-to-bytes.d.ts +10 -0
- package/lib/typescript/module/src/modules/bt-management/utils/hex-to-bytes.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/utils/le-32-to-bytes.d.ts +3 -0
- package/lib/typescript/module/src/modules/bt-management/utils/le-32-to-bytes.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/utils/parse-measurement.d.ts +4 -1
- package/lib/typescript/module/src/modules/bt-management/utils/parse-measurement.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/utils/reject-custom-reading.d.ts +15 -0
- package/lib/typescript/module/src/modules/bt-management/utils/reject-custom-reading.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/utils/summarise-measurement-for-log.d.ts +9 -0
- package/lib/typescript/module/src/modules/bt-management/utils/summarise-measurement-for-log.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/utils/supported-measurement-type-keys.d.ts +10 -0
- package/lib/typescript/module/src/modules/bt-management/utils/supported-measurement-type-keys.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { slog } from "../../../helpers/index.js";
|
|
4
3
|
import { sentryLogger } from "../../../helpers/utils/sentry-logger.js";
|
|
5
4
|
import { DeviceStatus } from "../../types/device-status.js";
|
|
6
5
|
import { base64ToHex } from "../../utils/base-64-to-hex.js";
|
|
7
|
-
import {
|
|
6
|
+
import { BTCommandWriter } from "./bt-command-writer.js";
|
|
8
7
|
export class BTConnectionHandler {
|
|
9
8
|
characteristicSubscriptions = [];
|
|
10
|
-
isSendingCommand = false;
|
|
11
|
-
retryCount = 0;
|
|
12
9
|
constructor(device, mainServices, callbacks, preferredMtu) {
|
|
13
10
|
this.device = device;
|
|
14
11
|
this.mainServices = mainServices;
|
|
15
12
|
this.callbacks = callbacks;
|
|
16
13
|
this.preferredMtu = preferredMtu;
|
|
14
|
+
this.writer = new BTCommandWriter(device, callbacks.onError);
|
|
17
15
|
}
|
|
18
16
|
connect = async () => {
|
|
19
17
|
try {
|
|
@@ -35,23 +33,12 @@ export class BTConnectionHandler {
|
|
|
35
33
|
destroy = () => {
|
|
36
34
|
this.characteristicSubscriptions.forEach(sub => sub?.remove());
|
|
37
35
|
this.characteristicSubscriptions = [];
|
|
38
|
-
this.
|
|
39
|
-
this.retryCount = 0;
|
|
36
|
+
this.writer.reset();
|
|
40
37
|
this.onDisconnectSubscription?.remove();
|
|
41
38
|
};
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
this.isSendingCommand = true;
|
|
47
|
-
for (const mainService of this.mainServices) {
|
|
48
|
-
if (mainService.writeUuid) {
|
|
49
|
-
await this.sendCommand(mainService);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
this.isSendingCommand = false;
|
|
53
|
-
this.retryCount = 0;
|
|
54
|
-
};
|
|
39
|
+
|
|
40
|
+
/** Sends commands to the device, in order, one at a time. */
|
|
41
|
+
sendCommands = commands => this.writer.send(commands);
|
|
55
42
|
|
|
56
43
|
/**
|
|
57
44
|
* Asks for a larger MTU so a frame arrives in fewer notifications.
|
|
@@ -64,7 +51,8 @@ export class BTConnectionHandler {
|
|
|
64
51
|
return;
|
|
65
52
|
}
|
|
66
53
|
try {
|
|
67
|
-
await this.device.requestMTU(this.preferredMtu);
|
|
54
|
+
const negotiated = await this.device.requestMTU(this.preferredMtu);
|
|
55
|
+
this.writer.useNegotiatedMtu(negotiated?.mtu ?? this.device.mtu);
|
|
68
56
|
} catch (error) {
|
|
69
57
|
sentryLogger("info", "DEVICE: MTU request was not granted", {
|
|
70
58
|
deviceId: this.device.id,
|
|
@@ -148,7 +136,7 @@ export class BTConnectionHandler {
|
|
|
148
136
|
this.characteristicSubscriptions.push(subscription);
|
|
149
137
|
}
|
|
150
138
|
}
|
|
151
|
-
await this.
|
|
139
|
+
await this.sendCommands(this.callbacks.initialCommands?.() ?? []);
|
|
152
140
|
} catch (error) {
|
|
153
141
|
sentryLogger("error", "DEVICE: Error subscribing to all characteristics", {
|
|
154
142
|
error: error instanceof Error ? error.message : error,
|
|
@@ -157,33 +145,5 @@ export class BTConnectionHandler {
|
|
|
157
145
|
this.callbacks.onError?.(error);
|
|
158
146
|
}
|
|
159
147
|
};
|
|
160
|
-
sendCommand = async mainService => {
|
|
161
|
-
if (!mainService.writeUuid) {
|
|
162
|
-
return;
|
|
163
|
-
}
|
|
164
|
-
while (this.retryCount < 3) {
|
|
165
|
-
try {
|
|
166
|
-
const isConnected = await this.device.isConnected();
|
|
167
|
-
if (!isConnected) {
|
|
168
|
-
return;
|
|
169
|
-
}
|
|
170
|
-
const command = hexToBase64(mainService.writeUuid.mainCommandUuid);
|
|
171
|
-
await this.device.writeCharacteristicWithResponseForService(mainService.uuid, mainService.writeUuid.uuid, command);
|
|
172
|
-
this.retryCount = 0;
|
|
173
|
-
break;
|
|
174
|
-
} catch (error) {
|
|
175
|
-
this.retryCount++;
|
|
176
|
-
sentryLogger("error", "DEVICE: Error sending command", {
|
|
177
|
-
error: error instanceof Error ? error.message : error,
|
|
178
|
-
deviceName: this.device.name
|
|
179
|
-
});
|
|
180
|
-
if (this.retryCount === 3) {
|
|
181
|
-
slog(error, "BT_CONNECTION_HANDLER: Error sending command", {
|
|
182
|
-
deviceName: this.device.name
|
|
183
|
-
});
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
};
|
|
188
148
|
}
|
|
189
149
|
//# sourceMappingURL=bt-connection-handler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["sentryLogger","DeviceStatus","base64ToHex","BTCommandWriter","BTConnectionHandler","characteristicSubscriptions","constructor","device","mainServices","callbacks","preferredMtu","writer","onError","connect","connectWithRetries","requestPreferredMtu","onStatusChanged","CONNECTED","discoverAllServicesAndCharacteristics","onDisconnectSubscription","onDisconnected","onDeviceDisconnected","subscribeToAllCharacteristics","error","Error","message","deviceName","name","DISCONNECTED","destroy","forEach","sub","remove","reset","sendCommands","commands","send","negotiated","requestMTU","useNegotiatedMtu","mtu","deviceId","id","requestedMtu","String","maxRetries","retryDelay","maxDelay","connected","retryCount","isConnected","errorCode","willRetry","Promise","resolve","setTimeout","Math","min","pow","mainService","monitorUuid","monitorUuids","subscription","monitorCharacteristicForService","uuid","result","value","hexValue","onDataReceived","push","initialCommands"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/bt-connection-handler.ts"],"mappings":";;AAEA,SAASA,YAAY,QAAQ,yCAAsC;AAEnE,SAASC,YAAY,QAAQ,8BAA2B;AAExD,SAASC,WAAW,QAAQ,+BAA4B;AAExD,SAASC,eAAe,QAAQ,wBAAqB;AAWrD,OAAO,MAAMC,mBAAmB,CAAC;EAEvBC,2BAA2B,GAAmB,EAAE;EAGxDC,WAAWA,CACQC,MAAc,EACdC,YAA2C,EAC3CC,SAAqC,EACrCC,YAAqB,EACtC;IAAA,KAJiBH,MAAc,GAAdA,MAAc;IAAA,KACdC,YAA2C,GAA3CA,YAA2C;IAAA,KAC3CC,SAAqC,GAArCA,SAAqC;IAAA,KACrCC,YAAqB,GAArBA,YAAqB;IAEtC,IAAI,CAACC,MAAM,GAAG,IAAIR,eAAe,CAACI,MAAM,EAAEE,SAAS,CAACG,OAAO,CAAC;EAC9D;EAEOC,OAAO,GAAG,MAAAA,CAAA,KAAY;IA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AACG,OAAO,GAAGW,KAAyB,CAAC;IACrD;EACF,CAAC;AAEH","ignoreList":[]}
|
|
@@ -57,14 +57,13 @@ export class BTDataProcessor {
|
|
|
57
57
|
* A frame that fails its integrity check is reported and skipped rather than parsed.
|
|
58
58
|
*/
|
|
59
59
|
readFramesFromBuffer = (reader, uuid, buffer) => {
|
|
60
|
-
let hasReadFrame = false;
|
|
61
60
|
while (buffer.length > 0) {
|
|
62
61
|
const result = reader.readFrame(buffer);
|
|
63
62
|
const hasProgressed = result.consumedBytes > 0;
|
|
64
63
|
buffer.splice(0, result.consumedBytes);
|
|
65
64
|
if (result.status === FrameReadStatus.COMPLETE) {
|
|
66
|
-
hasReadFrame = true;
|
|
67
65
|
this.handleFrame(uuid, result.frame);
|
|
66
|
+
this.answerFrame(result.frame);
|
|
68
67
|
continue;
|
|
69
68
|
}
|
|
70
69
|
if (result.status === FrameReadStatus.CORRUPT) {
|
|
@@ -74,9 +73,6 @@ export class BTDataProcessor {
|
|
|
74
73
|
break;
|
|
75
74
|
}
|
|
76
75
|
}
|
|
77
|
-
if (hasReadFrame) {
|
|
78
|
-
this.callbacks.onSendCommandToDevice?.();
|
|
79
|
-
}
|
|
80
76
|
};
|
|
81
77
|
|
|
82
78
|
/**
|
|
@@ -88,7 +84,22 @@ export class BTDataProcessor {
|
|
|
88
84
|
}
|
|
89
85
|
this.handleFrame(uuid, buffer);
|
|
90
86
|
this.buffers.set(this.currentUuid, []);
|
|
91
|
-
this.
|
|
87
|
+
this.answerFrame(buffer);
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Answers one complete frame with whatever the device's sequencer decides.
|
|
92
|
+
*
|
|
93
|
+
* Every frame is offered, including one that matched no parsing case. An identity reply
|
|
94
|
+
* and a file-transfer chunk carry no measurement, and a sequencer that never saw them
|
|
95
|
+
* could not take the step that follows - the exchange would stop dead on the first frame
|
|
96
|
+
* that was protocol rather than data.
|
|
97
|
+
*/
|
|
98
|
+
answerFrame = frame => {
|
|
99
|
+
const commands = this.callbacks.nextCommand?.(frame);
|
|
100
|
+
if (commands && commands.length > 0) {
|
|
101
|
+
this.callbacks.sendCommands?.(commands);
|
|
102
|
+
}
|
|
92
103
|
};
|
|
93
104
|
handleFrame = (uuid, frame) => {
|
|
94
105
|
const data = this.frameParser.parse(uuid, frame);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["sentryLogger","CaseType","FrameReadStatus","FrameParser","MeasurementStateMachine","BTDataProcessor","buffers","Map","constructor","device","mainServices","stuckDataTimeoutDuration","callbacks","frameReader","frameParser","measurementState","onStatusChanged","onStreamStart","onResult","currentUuid","destroy","clear","reset","clearTimeout","stuckDataTimeout","undefined","processData","uuid","hexValue","String","toLowerCase","buffer","get","push","set","startStuckTimeout","readFramesFromBuffer","readWholeBuffer","reader","
|
|
1
|
+
{"version":3,"names":["sentryLogger","CaseType","FrameReadStatus","FrameParser","MeasurementStateMachine","BTDataProcessor","buffers","Map","constructor","device","mainServices","stuckDataTimeoutDuration","callbacks","frameReader","frameParser","measurementState","onStatusChanged","onStreamStart","onResult","currentUuid","destroy","clear","reset","clearTimeout","stuckDataTimeout","undefined","processData","uuid","hexValue","String","toLowerCase","buffer","get","push","set","startStuckTimeout","readFramesFromBuffer","readWholeBuffer","reader","length","result","readFrame","hasProgressed","consumedBytes","splice","status","COMPLETE","handleFrame","frame","answerFrame","CORRUPT","reportCorruptFrame","INCOMPLETE","validatePackage","commands","nextCommand","sendCommands","data","parse","join","dependentData","parsingCase","caseType","DEPENDENT","handleDependentResult","advance","onError","Error","cause","message","setTimeout","cancelConnection"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/bt-data-processor.ts"],"mappings":";;AAGA,SAASA,YAAY,QAAQ,yCAAsC;AACnE,SAASC,QAAQ,QAAQ,0BAAuB;AAIhD,SAASC,eAAe,QAAQ,kCAA+B;AAK/D,SAASC,WAAW,QAAQ,mBAAgB;AAC5C,SAASC,uBAAuB,QAAQ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IAAIC,KAAK,CAAC,mDAAmD,EAAE;MAC7DC,KAAK,EAAE;QACLC,OAAO,EAAE;MACX;IACF,CAAC,CACH,CAAC;EACH,CAAC;;EAED;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACUlC,iBAAiB,GAAGA,CAAA,KAAM;IAChC,IAAI,IAAI,CAACX,gBAAgB,EAAE;MACzBD,YAAY,CAAC,IAAI,CAACC,gBAAgB,CAAC;IACrC;IAEA,IAAI,CAACA,gBAAgB,GAAG8C,UAAU,CAAC,MAAM;MACvC,IAAI,CAAC1D,SAAS,CAACsD,OAAO,GACpB,IAAIC,KAAK,CAAC,2CAA2C,EAAE;QACrDC,KAAK,EAAE;UACLC,OAAO,EAAE;QACX;MACF,CAAC,CACH,CAAC;MACD,IAAI,CAAC5D,MAAM,CAAC8D,gBAAgB,GAAG,CAAC;IAClC,CAAC,EAAE,IAAI,CAAC5D,wBAAwB,CAAC;EACnC,CAAC;AACH","ignoreList":[]}
|
|
@@ -2,8 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
import { sentryLogger } from "../../../helpers/utils/sentry-logger.js";
|
|
4
4
|
import { DeviceStatus } from "../../types/device-status.js";
|
|
5
|
+
import { summariseMeasurementForLog } from "../../utils/summarise-measurement-for-log.js";
|
|
6
|
+
import { supportedMeasurementTypeKeys } from "../../utils/supported-measurement-type-keys.js";
|
|
5
7
|
import { BTConnectionHandler } from "./bt-connection-handler.js";
|
|
6
8
|
import { BTDataProcessor } from "./bt-data-processor.js";
|
|
9
|
+
import { pollingSequencerFor } from "./polling-command-sequencer.js";
|
|
7
10
|
export class BTManagedDevice {
|
|
8
11
|
/**
|
|
9
12
|
* The timeout in milliseconds for the stuck data.
|
|
@@ -18,6 +21,17 @@ export class BTManagedDevice {
|
|
|
18
21
|
* @returns The handled data.
|
|
19
22
|
*/
|
|
20
23
|
|
|
24
|
+
/**
|
|
25
|
+
* Builds the policy that decides what to send this device, and when.
|
|
26
|
+
*
|
|
27
|
+
* A factory rather than an instance, because a sequencer carries the state of the
|
|
28
|
+
* exchange - whether the device has identified itself, how far a file read has got. One
|
|
29
|
+
* shared across connections would resume a conversation the device has forgotten.
|
|
30
|
+
*
|
|
31
|
+
* A device that leaves this undefined polls with the command its services declare, which
|
|
32
|
+
* is what every device did before a policy could be expressed at all.
|
|
33
|
+
*/
|
|
34
|
+
|
|
21
35
|
/**
|
|
22
36
|
* Locates frame boundaries inside the notification buffer.
|
|
23
37
|
*
|
|
@@ -91,10 +105,7 @@ export class BTManagedDevice {
|
|
|
91
105
|
...data
|
|
92
106
|
}) => {
|
|
93
107
|
sentryLogger("info", "BT_MANAGER: Calling onResult callback", {
|
|
94
|
-
data:
|
|
95
|
-
...data,
|
|
96
|
-
diagramPoints: "diagramPoints" in data ? data.diagramPoints.length : undefined
|
|
97
|
-
},
|
|
108
|
+
data: summariseMeasurementForLog(data),
|
|
98
109
|
deviceData: this.deviceData,
|
|
99
110
|
deviceName: this.deviceData.name
|
|
100
111
|
});
|
|
@@ -118,7 +129,8 @@ export class BTManagedDevice {
|
|
|
118
129
|
};
|
|
119
130
|
connect = async () => {
|
|
120
131
|
// To access the abstract property in the constructor, we need to set it here
|
|
121
|
-
this.deviceData.measurementTypes = this.
|
|
132
|
+
this.deviceData.measurementTypes = supportedMeasurementTypeKeys(this.mainServices);
|
|
133
|
+
const sequencer = this.createCommandSequencer?.() ?? pollingSequencerFor(this.mainServices);
|
|
122
134
|
this.connectionHandler = new BTConnectionHandler(this.device, this.mainServices, {
|
|
123
135
|
onStatusChanged: status => {
|
|
124
136
|
this.onDeviceStatusChanged?.bind(this)(status);
|
|
@@ -130,7 +142,8 @@ export class BTManagedDevice {
|
|
|
130
142
|
onError: error => this.onError?.bind(this)(error),
|
|
131
143
|
onDataReceived: (uuid, hexValue) => {
|
|
132
144
|
this.dataProcessor?.processData(uuid, hexValue);
|
|
133
|
-
}
|
|
145
|
+
},
|
|
146
|
+
initialCommands: () => sequencer.initialCommands()
|
|
134
147
|
}, this.preferredMtu);
|
|
135
148
|
this.dataProcessor = new BTDataProcessor(this.device, this.mainServices, this.stuckDataTimeout, {
|
|
136
149
|
onStatusChanged: this.onDeviceStatusChanged?.bind(this),
|
|
@@ -143,18 +156,12 @@ export class BTManagedDevice {
|
|
|
143
156
|
this.onError?.bind(this)(error);
|
|
144
157
|
}
|
|
145
158
|
},
|
|
146
|
-
|
|
159
|
+
nextCommand: frame => sequencer.nextCommand(frame),
|
|
160
|
+
sendCommands: commands => void this.connectionHandler?.sendCommands(commands),
|
|
147
161
|
onError: this.onError?.bind(this),
|
|
148
162
|
handleDependentResult: this.handleDependentResult?.bind(this)
|
|
149
163
|
}, this.frameReader);
|
|
150
164
|
await this.connectionHandler.connect();
|
|
151
165
|
};
|
|
152
|
-
getSupportedMeasurementTypeKeys = () => {
|
|
153
|
-
const measurementTypes = this.mainServices.flatMap(service => {
|
|
154
|
-
return service.monitorUuids.flatMap(uuid => uuid.parsingModel.cases.map(c => c.measurementTypeKey) || []);
|
|
155
|
-
}).filter(type => type !== undefined);
|
|
156
|
-
const uniqueMeasurementTypes = [...new Set(measurementTypes.flat())];
|
|
157
|
-
return uniqueMeasurementTypes;
|
|
158
|
-
};
|
|
159
166
|
}
|
|
160
167
|
//# sourceMappingURL=bt-managed-device.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["sentryLogger","DeviceStatus","BTConnectionHandler","BTDataProcessor","BTManagedDevice","constructor","device","deviceName","onError","onErrorCallback","onDeviceStatusChanged","onDeviceStatusChangedCallback","onResult","onResultCallback","onDeviceDisconnected","onDeviceDisconnectedCallback","deviceId","id","deviceData","name","localName","manufacturerData","sn","measurementTypes","status","measurementTypeKey","error","Error","message","caseType","_","data","
|
|
1
|
+
{"version":3,"names":["sentryLogger","DeviceStatus","summariseMeasurementForLog","supportedMeasurementTypeKeys","BTConnectionHandler","BTDataProcessor","pollingSequencerFor","BTManagedDevice","constructor","device","deviceName","onError","onErrorCallback","onDeviceStatusChanged","onDeviceStatusChangedCallback","onResult","onResultCallback","onDeviceDisconnected","onDeviceDisconnectedCallback","deviceId","id","deviceData","name","localName","manufacturerData","sn","measurementTypes","status","measurementTypeKey","error","Error","message","caseType","_","data","destroy","connectionHandler","dataProcessor","undefined","connect","mainServices","sequencer","createCommandSequencer","onStatusChanged","bind","DISCONNECTED","onDataReceived","uuid","hexValue","processData","initialCommands","preferredMtu","stuckDataTimeout","onStreamStart","validatePackage","parsedData","collectedValues","handleSuccessResult","nextCommand","frame","sendCommands","commands","handleDependentResult","frameReader"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/bt-managed-device.ts"],"mappings":";;AAGA,SAASA,YAAY,QAAQ,yCAAsC;AAOnE,SAASC,YAAY,QAAQ,8BAA2B;AAMxD,SAASC,0BAA0B,QAAQ,8CAA2C;AACtF,SAASC,4BAA4B,QAAQ,gDAA6C;AAE1F,SAASC,mBAAmB,QAAQ,4BAAyB;AAC7D,SAASC,eAAe,QAAQ,wBAAqB;AACrD,SAASC,mBAAmB,QAAQ,gCAA6B;AAEjE,OAAO,MAAeC,eAAe,CAErC;EASE;AACF;AACA;;EAGE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;;EAOE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;EAGE;AACF;AACA;AACA;AACA;AACA;AACA;;EAGE;AACF;AACA;AACA;AACA;AACA;;EAGE;AACF;AACA;AACA;AACA;AACA;;EAiBEC,WAAWA,CACOC,MAAc,EAE9B;IACEC,UAAU;IACVC,OAAO,EAAEC,eAAe;IACxBC,qBAAqB,EAAEC,6BAA6B;IACpDC,QAAQ,EAAEC,gBAAgB;IAC1BC,oBAAoB,EAAEC;EACD,CAAC,EACxB;IAAA,KATgBT,MAAc,GAAdA,MAAc;IAU9BT,YAAY,CAAC,MAAM,EAAE,sCAAsC,EAAE;MAC3DmB,QAAQ,EAAEV,MAAM,CAACW,EAAE;MACnBV,UAAU,EAAEA;IACd,CAAC,CAAC;IACF,IAAI,CAACW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,EAAEiC,IAAI,CAAC,IAAI,CAAC;MACjCkB,qBAAqB,EAAE,IAAI,CAACA,qBAAqB,EAAElB,IAAI,CAAC,IAAI;IAC9D,CAAC,EACD,IAAI,CAACmB,WACP,CAAC;IAED,MAAM,IAAI,CAAC3B,iBAAiB,CAACG,OAAO,CAAC,CAAC;EACxC,CAAC;AAEH","ignoreList":[]}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { sentryLogger } from "../../../../helpers/utils/sentry-logger.js";
|
|
4
|
+
import { LepuCommandBuilder } from "../lepu/lepu.command-builder.js";
|
|
5
|
+
import { LepuIdentityGate } from "../lepu/lepu.identity-gate.js";
|
|
6
|
+
|
|
7
|
+
/** Registration guarantees at least one start byte; this keeps the indexed read total. */
|
|
8
|
+
const DEFAULT_START_BYTE = "a5";
|
|
9
|
+
/**
|
|
10
|
+
* Builds the gate a Lepu declaration asks for.
|
|
11
|
+
*
|
|
12
|
+
* A fresh builder each time, because its sequence number is per connection: one shared
|
|
13
|
+
* across devices would interleave their counters, which is a defect the vendor's own global
|
|
14
|
+
* counter has.
|
|
15
|
+
*
|
|
16
|
+
* Frames are built with the first declared start byte. A device that accepts either still
|
|
17
|
+
* answers on the one it is addressed with, so the list matters for reading and its head for
|
|
18
|
+
* writing.
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* Records what the device said it was.
|
|
22
|
+
*
|
|
23
|
+
* The model number is logged because it is the only place one exists: the vendor's SDK
|
|
24
|
+
* never reads the field back, so a declaration written without it is completed by
|
|
25
|
+
* connecting once and reading this line.
|
|
26
|
+
*/
|
|
27
|
+
const recordLepuIdentity = (deviceData, info) => {
|
|
28
|
+
deviceData.sn = info.serialNumber;
|
|
29
|
+
sentryLogger("info", "BT_MANAGER: Device identified itself", {
|
|
30
|
+
deviceId: deviceData.id,
|
|
31
|
+
deviceName: deviceData.name,
|
|
32
|
+
deviceType: info.deviceType,
|
|
33
|
+
branchCode: info.branchCode,
|
|
34
|
+
protocolMaxLength: info.protocolMaxLength
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
const createLepuSequencer = (lepu, report) => new LepuIdentityGate({
|
|
38
|
+
write: {
|
|
39
|
+
serviceUuid: lepu.write.serviceUuid,
|
|
40
|
+
characteristicUuid: lepu.write.characteristicUuid
|
|
41
|
+
},
|
|
42
|
+
builder: new LepuCommandBuilder(lepu.startBytes[0] ?? DEFAULT_START_BYTE),
|
|
43
|
+
expectedDeviceTypes: lepu.expectedDeviceTypes,
|
|
44
|
+
...(lepu.pollCommand === undefined ? {} : {
|
|
45
|
+
pollCommand: lepu.pollCommand
|
|
46
|
+
}),
|
|
47
|
+
onIdentified: report.onIdentified,
|
|
48
|
+
onRefused: report.onRefused
|
|
49
|
+
});
|
|
50
|
+
export { createLepuSequencer, recordLepuIdentity };
|
|
51
|
+
//# sourceMappingURL=custom-lepu-sequencer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["sentryLogger","LepuCommandBuilder","LepuIdentityGate","DEFAULT_START_BYTE","recordLepuIdentity","deviceData","info","sn","serialNumber","deviceId","id","deviceName","name","deviceType","branchCode","protocolMaxLength","createLepuSequencer","lepu","report","write","serviceUuid","characteristicUuid","builder","startBytes","expectedDeviceTypes","pollCommand","undefined","onIdentified","onRefused"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/custom/custom-lepu-sequencer.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,4CAAyC;AAItE,SAASC,kBAAkB,QAAQ,iCAA8B;AAEjE,SAASC,gBAAgB,QAAQ,+BAA4B;;AAE7D;AACA,MAAMC,kBAAkB,GAAG,IAAI;AAO/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,kBAAkB,GAAGA,CACzBC,UAAsB,EACtBC,IAAoB,KACX;EACTD,UAAU,CAACE,EAAE,GAAGD,IAAI,CAACE,YAAY;EAEjCR,YAAY,CAAC,MAAM,EAAE,sCAAsC,EAAE;IAC3DS,QAAQ,EAAEJ,UAAU,CAACK,EAAE;IACvBC,UAAU,EAAEN,UAAU,CAACO,IAAI;IAC3BC,UAAU,EAAEP,IAAI,CAACO,UAAU;IAC3BC,UAAU,EAAER,IAAI,CAACQ,UAAU;IAC3BC,iBAAiB,EAAET,IAAI,CAACS;EAC1B,CAAC,CAAC;AACJ,CAAC;AAED,MAAMC,mBAAmB,GAAGA,CAC1BC,IAAoB,EACpBC,MAAsB,KAEtB,IAAIhB,gBAAgB,CAAC;EACnBiB,KAAK,EAAE;IACLC,WAAW,EAAEH,IAAI,CAACE,KAAK,CAACC,WAAW;IACnCC,kBAAkB,EAAEJ,IAAI,CAACE,KAAK,CAACE;EACjC,CAAC;EACDC,OAAO,EAAE,IAAIrB,kBAAkB,CAACgB,IAAI,CAACM,UAAU,CAAC,CAAC,CAAC,IAAIpB,kBAAkB,CAAC;EACzEqB,mBAAmB,EAAEP,IAAI,CAACO,mBAAmB;EAC7C,IAAIP,IAAI,CAACQ,WAAW,KAAKC,SAAS,GAAG,CAAC,CAAC,GAAG;IAAED,WAAW,EAAER,IAAI,CAACQ;EAAY,CAAC,CAAC;EAC5EE,YAAY,EAAET,MAAM,CAACS,YAAY;EACjCC,SAAS,EAAEV,MAAM,CAACU;AACpB,CAAC,CAAC;AAEJ,SAASZ,mBAAmB,EAAEZ,kBAAkB","ignoreList":[]}
|
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
import { CaseType } from "../../../types/case-type.js";
|
|
4
4
|
import { createFrameValidator } from "../../../utils/create-frame-validator.js";
|
|
5
|
+
import { parseMeasurement } from "../../../utils/parse-measurement.js";
|
|
6
|
+
import { discardedReadingError, rejectCustomReading } from "../../../utils/reject-custom-reading.js";
|
|
5
7
|
import { BTManagedDevice } from "../bt-managed-device.js";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
import { LepuFrameReader } from "../lepu/lepu.frame-reader.js";
|
|
9
|
+
import { createLepuSequencer, recordLepuIdentity } from "./custom-lepu-sequencer.js";
|
|
8
10
|
/**
|
|
9
11
|
* Runs a device registered with defineCustomDevice.
|
|
10
12
|
*
|
|
@@ -21,10 +23,37 @@ export class CustomDevice extends BTManagedDevice {
|
|
|
21
23
|
this.definition = definition;
|
|
22
24
|
this.mainServices = definition.mainServices;
|
|
23
25
|
this.stuckDataTimeout = definition.stuckDataTimeout;
|
|
26
|
+
if (definition.preferredMtu !== undefined) {
|
|
27
|
+
this.preferredMtu = definition.preferredMtu;
|
|
28
|
+
}
|
|
29
|
+
this.declareLepuProtocol(definition);
|
|
24
30
|
definition.frames.forEach((frame, uuid) => {
|
|
25
31
|
this.validators.set(uuid, createFrameValidator(frame));
|
|
26
32
|
});
|
|
27
33
|
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Gives a Lepu declaration its frame reader and its command sequence.
|
|
37
|
+
*
|
|
38
|
+
* Both or neither: the reader finds frame edges the family's own way, and the gate is
|
|
39
|
+
* what decides anything may be sent at all. A declaration that had the reader without the
|
|
40
|
+
* gate would poll hardware it had not identified, which is the case the gate exists for.
|
|
41
|
+
*/
|
|
42
|
+
declareLepuProtocol(definition) {
|
|
43
|
+
const lepu = definition.lepu;
|
|
44
|
+
if (!lepu) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
this.frameReader = new LepuFrameReader(lepu.startBytes);
|
|
48
|
+
this.createCommandSequencer = () => createLepuSequencer(lepu, {
|
|
49
|
+
onIdentified: this.onIdentified,
|
|
50
|
+
onRefused: this.onIdentityRefused
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
onIdentified = info => recordLepuIdentity(this.deviceData, info);
|
|
54
|
+
onIdentityRefused = reason => {
|
|
55
|
+
this.onError?.(new Error(`Custom device "${this.definition.id}" was not addressed: ${reason}.`));
|
|
56
|
+
};
|
|
28
57
|
validatePackage = (pkg, uuid) => {
|
|
29
58
|
const validate = this.validators.get(String(uuid ?? "").toLowerCase());
|
|
30
59
|
if (!validate) {
|
|
@@ -40,7 +69,7 @@ export class CustomDevice extends BTManagedDevice {
|
|
|
40
69
|
*/
|
|
41
70
|
handleDependentResult = data => {
|
|
42
71
|
try {
|
|
43
|
-
this.
|
|
72
|
+
this.reportFrame(data);
|
|
44
73
|
} catch (error) {
|
|
45
74
|
this.onError?.(error);
|
|
46
75
|
}
|
|
@@ -60,39 +89,63 @@ export class CustomDevice extends BTManagedDevice {
|
|
|
60
89
|
handleSuccessResult() {
|
|
61
90
|
return;
|
|
62
91
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Reports what the frame carried, which may be more than one reading.
|
|
95
|
+
*
|
|
96
|
+
* A device handing over its stored history answers one request with every record it
|
|
97
|
+
* holds, back to back. Those were taken at different times and are separate readings, so
|
|
98
|
+
* each record is decoded and reported on its own. A trailing part-record is ignored: half
|
|
99
|
+
* a record is not a reading.
|
|
100
|
+
*/
|
|
101
|
+
reportFrame(data) {
|
|
102
|
+
const repeated = data.parsingCase.repeatedRecords;
|
|
103
|
+
if (!repeated || !data.frame) {
|
|
104
|
+
this.report(data.parsedData, data.parsingCase);
|
|
67
105
|
return;
|
|
68
106
|
}
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
this.
|
|
72
|
-
return;
|
|
107
|
+
const records = Math.floor((data.frame.length - repeated.from) / repeated.recordBytes);
|
|
108
|
+
for (let record = 0; record < records; record++) {
|
|
109
|
+
this.report(parseMeasurement(data.frame, data.parsingCase, repeated.from + record * repeated.recordBytes), data.parsingCase);
|
|
73
110
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Reports every reading the frame carried.
|
|
115
|
+
*
|
|
116
|
+
* One frame is often one reading, but a multi-parameter monitor sends a heart rate, an
|
|
117
|
+
* oxygen saturation and a temperature together. Those are separate measurements, so they
|
|
118
|
+
* are reported separately rather than merged into one object whose properties came from
|
|
119
|
+
* different instruments.
|
|
120
|
+
*
|
|
121
|
+
* A reading that fails its checks is discarded on its own. A temperature the device could
|
|
122
|
+
* not take is no reason to withhold the heart rate in the same frame.
|
|
123
|
+
*/
|
|
124
|
+
report(parsedData, parsingCase) {
|
|
125
|
+
const measurements = parsingCase.measurements ?? [];
|
|
126
|
+
if (measurements.length === 0) {
|
|
127
|
+
this.discard("a result frame carries no measurement type", parsedData);
|
|
77
128
|
return;
|
|
78
129
|
}
|
|
79
|
-
this.
|
|
130
|
+
measurements.forEach(measurement => this.reportMeasurement(parsedData, measurement));
|
|
80
131
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
if (!field) {
|
|
84
|
-
return `decoded "${name}", which is not declared for ${measurementTypeKey}`;
|
|
85
|
-
}
|
|
86
|
-
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
87
|
-
return `could not decode ${name}; the frame was shorter than the declaration expects`;
|
|
88
|
-
}
|
|
89
|
-
if (value < field.min || value > field.max) {
|
|
90
|
-
return `decoded ${name} = ${value} ${field.unit}, outside the accepted range ${field.min}-${field.max} ${field.unit}`;
|
|
91
|
-
}
|
|
92
|
-
return undefined;
|
|
132
|
+
discard(reason, parsedData) {
|
|
133
|
+
this.onError?.(discardedReadingError(this.definition.id, reason, parsedData));
|
|
93
134
|
}
|
|
94
|
-
|
|
95
|
-
|
|
135
|
+
reportMeasurement(parsedData, measurement) {
|
|
136
|
+
const reading = {
|
|
137
|
+
caseType: parsedData.caseType,
|
|
138
|
+
measurementTypeKey: measurement.measurementTypeKey
|
|
139
|
+
};
|
|
140
|
+
measurement.fieldNames.forEach(name => {
|
|
141
|
+
reading[name] = parsedData[name];
|
|
142
|
+
});
|
|
143
|
+
const rejection = measurement.fieldNames.map(name => rejectCustomReading(this.definition.fields, measurement.measurementTypeKey, name, reading[name])).find(message => message !== undefined);
|
|
144
|
+
if (rejection) {
|
|
145
|
+
this.discard(rejection, reading);
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
this.onResult?.(reading);
|
|
96
149
|
}
|
|
97
150
|
}
|
|
98
151
|
//# sourceMappingURL=custom.device.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CaseType","createFrameValidator","BTManagedDevice","
|
|
1
|
+
{"version":3,"names":["CaseType","createFrameValidator","parseMeasurement","discardedReadingError","rejectCustomReading","BTManagedDevice","LepuFrameReader","createLepuSequencer","recordLepuIdentity","CustomDevice","validators","Map","constructor","device","params","definition","mainServices","stuckDataTimeout","preferredMtu","undefined","declareLepuProtocol","frames","forEach","frame","uuid","set","lepu","frameReader","startBytes","createCommandSequencer","onIdentified","onRefused","onIdentityRefused","info","deviceData","reason","onError","Error","id","validatePackage","pkg","validate","get","String","toLowerCase","handleDependentResult","data","reportFrame","error","parsingCase","caseType","OTHER","handleSuccessResult","repeated","repeatedRecords","report","parsedData","records","Math","floor","length","from","recordBytes","record","measurements","discard","measurement","reportMeasurement","reading","measurementTypeKey","fieldNames","name","rejection","map","fields","find","message","onResult"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/custom/custom.device.ts"],"mappings":";;AAEA,SAASA,QAAQ,QAAQ,6BAA0B;AAUnD,SAASC,oBAAoB,QAAQ,0CAAuC;AAC5E,SAASC,gBAAgB,QAAQ,qCAAkC;AACnE,SACEC,qBAAqB,EACrBC,mBAAmB,QACd,yCAAsC;AAC7C,SAASC,eAAe,QAAQ,yBAAsB;AAEtD,SAASC,eAAe,QAAQ,8BAA2B;AAE3D,SACEC,mBAAmB,EACnBC,kBAAkB,QACb,4BAAyB;AAKhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,YAAY,SAASJ,eAAe,CAAiB;EAM/CK,UAAU,GAAG,IAAIC,GAAG,CAAqC,CAAC;EAE3EC,WAAWA,CACTC,MA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IAAI,EACJH,OAAO,CAACG,IAAI,CACd,CACF,CAAC,CACAI,IAAI,CAAEC,OAAO,IAAKA,OAAO,KAAKzD,SAAS,CAAC;IAE3C,IAAIqD,SAAS,EAAE;MACb,IAAI,CAACP,OAAO,CAACO,SAAS,EAAEJ,OAAO,CAAC;MAEhC;IACF;IAEA,IAAI,CAACS,QAAQ,GAAGT,OAAO,CAAC;EAC1B;AAEF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["parseMeasurement","FrameParser","constructor","mainServices","parse","uuid","frame","parsingModel","findParsingModel","caseValue","readCaseValue","parsingCase","cases","find","declared","parsedData","measurementTypeKey","mainService","characteristic","monitorUuids","monitored","toLowerCase","undefined","caseValuePosition","map","index","join"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/frame-parser.ts"],"mappings":";;AAMA,SAASA,gBAAgB,QAAQ,kCAA+B;;AAEhE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,WAAW,CAAwB;EAC9CC,WAAWA,CAAkBC,YAA2C,EAAE;IAAA,KAA7CA,YAA2C,GAA3CA,YAA2C;EAAG;EAEpEC,KAAKA,CACVC,IAAY,EACZC,KAAe,EAC8B;IAC7C,MAAMC,YAAY,GAAG,IAAI,CAACC,gBAAgB,CAACH,IAAI,CAAC;IAEhD,IAAI,CAACE,YAAY,EAAE;MACjB;IACF;IAEA,MAAME,SAAS,GAAG,IAAI,CAACC,aAAa,CAACH,YAAY,EAAED,KAAK,CAAC;IAEzD,MAAMK,WAAW,GAAGJ,YAAY,CAACK,KAAK,EAAEC,IAAI,CACzCC,QAAQ,IAAKA,QAAQ,CAACL,SAAS,KAAKA,SACvC,CAAC;IAED,IAAI,CAACE,WAAW,EAAE;MAChB;IACF;IAEA,MAAMI,UAAU,GAAGf,gBAAgB,CAACM,KAAK,EAAEK,WAAW,CAAC;IAEvD,IAAI,CAACI,UAAU,EAAE;MACf;IACF;IAEA,OAAO;MACLJ,WAAW;MACXK,kBAAkB,EAAEL,WAAW,CAACK,kBAAkB;MAClDD,UAAU,EAAEA;
|
|
1
|
+
{"version":3,"names":["parseMeasurement","FrameParser","constructor","mainServices","parse","uuid","frame","parsingModel","findParsingModel","caseValue","readCaseValue","parsingCase","cases","find","declared","parsedData","measurementTypeKey","mainService","characteristic","monitorUuids","monitored","toLowerCase","undefined","caseValuePosition","map","index","join"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/frame-parser.ts"],"mappings":";;AAMA,SAASA,gBAAgB,QAAQ,kCAA+B;;AAEhE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,WAAW,CAAwB;EAC9CC,WAAWA,CAAkBC,YAA2C,EAAE;IAAA,KAA7CA,YAA2C,GAA3CA,YAA2C;EAAG;EAEpEC,KAAKA,CACVC,IAAY,EACZC,KAAe,EAC8B;IAC7C,MAAMC,YAAY,GAAG,IAAI,CAACC,gBAAgB,CAACH,IAAI,CAAC;IAEhD,IAAI,CAACE,YAAY,EAAE;MACjB;IACF;IAEA,MAAME,SAAS,GAAG,IAAI,CAACC,aAAa,CAACH,YAAY,EAAED,KAAK,CAAC;IAEzD,MAAMK,WAAW,GAAGJ,YAAY,CAACK,KAAK,EAAEC,IAAI,CACzCC,QAAQ,IAAKA,QAAQ,CAACL,SAAS,KAAKA,SACvC,CAAC;IAED,IAAI,CAACE,WAAW,EAAE;MAChB;IACF;IAEA,MAAMI,UAAU,GAAGf,gBAAgB,CAACM,KAAK,EAAEK,WAAW,CAAC;IAEvD,IAAI,CAACI,UAAU,EAAE;MACf;IACF;IAEA,OAAO;MACLJ,WAAW;MACXK,kBAAkB,EAAEL,WAAW,CAACK,kBAAkB;MAClDD,UAAU,EAAEA,UAAwC;MACpDT;IACF,CAAC;EACH;EAEQE,gBAAgBA,CAACH,IAAY,EAA4B;IAC/D,KAAK,MAAMY,WAAW,IAAI,IAAI,CAACd,YAAY,EAAE;MAC3C,MAAMe,cAA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