@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
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { MeasurementTypeKey } from "@ovok/core";
|
|
4
|
+
import { lepuNameMatch } from "../lepu/lepu.name-match.js";
|
|
5
|
+
import { lepuDevice } from "../lepu/lepu.transports.js";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* The Viatom ECG recorders - ER1, ER2 and ER3.
|
|
9
|
+
*
|
|
10
|
+
* **What a declaration gets from these is the heart rate, not the waveform.** The ECG itself
|
|
11
|
+
* arrives as a stream of samples assembled across many notifications and belongs to a device
|
|
12
|
+
* class; the recorders also report a heart rate in the same realtime frame, at a fixed
|
|
13
|
+
* offset, and that is a reading a declaration can carry on its own.
|
|
14
|
+
*
|
|
15
|
+
* Their stored recordings are a separate matter and are reachable: these devices use the
|
|
16
|
+
* family's generic file opcodes, so `LepuFileTransfer` downloads their records unchanged.
|
|
17
|
+
* Turning a downloaded recording into a measurement still needs a device class.
|
|
18
|
+
*
|
|
19
|
+
* ## A note on the opcodes
|
|
20
|
+
*
|
|
21
|
+
* This range numbers its commands low, in the space where the family's meanings diverge
|
|
22
|
+
* most, so the poll is chosen deliberately rather than taken from whatever the vendor's SDK
|
|
23
|
+
* calls first:
|
|
24
|
+
*
|
|
25
|
+
* - `RT_PARAM` is `0x02` here and **`CALIBRATION_SLOPE` on a BP2**, a factory command that
|
|
26
|
+
* silently biases every subsequent blood-pressure reading. It is never sent, even though
|
|
27
|
+
* it would be the cheaper poll - it returns the parameters without the waveform.
|
|
28
|
+
* - `START_ECG` is `0x08` on a Lepod and `RT_DATA` on a BP2. It is never sent either.
|
|
29
|
+
*
|
|
30
|
+
* `RT_DATA` is a read on every one of them, which is why it is the poll here. The advertised
|
|
31
|
+
* name is what keeps these opcodes pointed at the right hardware, so a matcher for one of
|
|
32
|
+
* these devices should be narrowed, never widened.
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
/** Reads the realtime parameters and waveform. A read on every device in this range. */
|
|
36
|
+
const RT_DATA = 0x03;
|
|
37
|
+
|
|
38
|
+
/** The ER3 answers its realtime data on a different opcode from the rest of the range. */
|
|
39
|
+
const ER3_RT_DATA = 0x06;
|
|
40
|
+
const HEART_RATE_UNIT = "bpm";
|
|
41
|
+
/** ER1, ER2 and ER3 share one parameter block: the heart rate opens it. */
|
|
42
|
+
const ER_HEART_RATE_BYTES = [7, 8];
|
|
43
|
+
/**
|
|
44
|
+
* Declares one recorder, reporting the heart rate from its realtime frame.
|
|
45
|
+
*
|
|
46
|
+
* A recorder that is not against the skin reports a rate outside what a heart can beat at,
|
|
47
|
+
* so it is discarded rather than reported. The device marks that condition in bits of a
|
|
48
|
+
* status byte, which a declaration cannot select on, so a recorder left connected and unworn
|
|
49
|
+
* reports a decoding failure on each poll. Reading those bits quietly needs a device class.
|
|
50
|
+
*/
|
|
51
|
+
const declareRecorder = (advertisedName, profile, params) => lepuDevice({
|
|
52
|
+
id: params.id,
|
|
53
|
+
nameMatch: params.nameMatch ?? lepuNameMatch(advertisedName),
|
|
54
|
+
transport: profile.transport,
|
|
55
|
+
pollCommand: profile.pollCommand,
|
|
56
|
+
minLengthBytes: profile.heartRateBytes[1] + 1,
|
|
57
|
+
caseSelectorBytes: [1],
|
|
58
|
+
cases: [{
|
|
59
|
+
selector: profile.pollCommand.toString(16).padStart(2, "0"),
|
|
60
|
+
kind: "result",
|
|
61
|
+
measurementTypeKey: MeasurementTypeKey.heartRate,
|
|
62
|
+
description: "Realtime parameters and waveform",
|
|
63
|
+
fields: [{
|
|
64
|
+
name: "heartRate",
|
|
65
|
+
byteIndexes: [...profile.heartRateBytes],
|
|
66
|
+
byteOrder: "little",
|
|
67
|
+
encoding: "uint",
|
|
68
|
+
unit: HEART_RATE_UNIT
|
|
69
|
+
}]
|
|
70
|
+
}],
|
|
71
|
+
...(params.expectedDeviceTypes ? {
|
|
72
|
+
expectedDeviceTypes: params.expectedDeviceTypes
|
|
73
|
+
} : {})
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
/** The ER1, and the handheld recorders sold under other names on the same protocol. */
|
|
77
|
+
const er1Recorder = (advertisedName, params) => declareRecorder(advertisedName, {
|
|
78
|
+
pollCommand: RT_DATA,
|
|
79
|
+
heartRateBytes: ER_HEART_RATE_BYTES,
|
|
80
|
+
transport: "standard"
|
|
81
|
+
}, params);
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* The ER2, which reads the same block but over a link that grants nothing beyond the
|
|
85
|
+
* minimum. Asking it for the MTU the rest of the family grants is what the vendor's own SDK
|
|
86
|
+
* declines to do, and a command longer than the link carries is truncated rather than
|
|
87
|
+
* refused.
|
|
88
|
+
*/
|
|
89
|
+
const er2Recorder = (advertisedName, params) => declareRecorder(advertisedName, {
|
|
90
|
+
pollCommand: RT_DATA,
|
|
91
|
+
heartRateBytes: ER_HEART_RATE_BYTES,
|
|
92
|
+
transport: "standardSmallMtu"
|
|
93
|
+
}, params);
|
|
94
|
+
|
|
95
|
+
/** The ER3, which reads the same parameter block from a different opcode. */
|
|
96
|
+
const er3Recorder = (advertisedName, params) => declareRecorder(advertisedName, {
|
|
97
|
+
pollCommand: ER3_RT_DATA,
|
|
98
|
+
heartRateBytes: ER_HEART_RATE_BYTES,
|
|
99
|
+
transport: "standard"
|
|
100
|
+
}, params);
|
|
101
|
+
|
|
102
|
+
/** The names the ER1 recorders advertise. */
|
|
103
|
+
const ER1_MODEL_NAMES = ["ER1", "ER1-H", "ER1-L", "ER1-S", "ER1-SP", "ER1-W", "ER1S", "HHM1"];
|
|
104
|
+
|
|
105
|
+
/** The names the ER2 recorders advertise, all of them on the small-MTU link. */
|
|
106
|
+
const ER2_MODEL_NAMES = ["ER2", "ER2-S", "HHM2", "HHM3", "LP ER2"];
|
|
107
|
+
export { er1Recorder, ER1_MODEL_NAMES, er2Recorder, ER2_MODEL_NAMES, er3Recorder };
|
|
108
|
+
//# sourceMappingURL=viatom.ecg-recorders.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["MeasurementTypeKey","lepuNameMatch","lepuDevice","RT_DATA","ER3_RT_DATA","HEART_RATE_UNIT","ER_HEART_RATE_BYTES","declareRecorder","advertisedName","profile","params","id","nameMatch","transport","pollCommand","minLengthBytes","heartRateBytes","caseSelectorBytes","cases","selector","toString","padStart","kind","measurementTypeKey","heartRate","description","fields","name","byteIndexes","byteOrder","encoding","unit","expectedDeviceTypes","er1Recorder","er2Recorder","er3Recorder","ER1_MODEL_NAMES","ER2_MODEL_NAMES"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.ecg-recorders.ts"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { MeasurementTypeKey } from "@ovok/core";
|
|
4
|
+
import { lepuNameMatch } from "../lepu/lepu.name-match.js";
|
|
5
|
+
import { lepuDevice } from "../lepu/lepu.transports.js";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* The Lepod, a multi-parameter patient monitor.
|
|
9
|
+
*
|
|
10
|
+
* One realtime frame carries a heart rate, an oxygen saturation with its pulse rate, a
|
|
11
|
+
* respiration rate and a body temperature. They are four measurements taken by four
|
|
12
|
+
* instruments that happen to share a frame, so they are declared and reported separately: a
|
|
13
|
+
* temperature probe that is not attached is no reason to withhold the heart rate beside it.
|
|
14
|
+
*
|
|
15
|
+
* The ECG waveform in the same frame is not declared. It is a sample stream assembled across
|
|
16
|
+
* notifications and needs a device class; the recordings the device stores are reachable
|
|
17
|
+
* through the family's generic file opcodes.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Reads the realtime frame. A read - unlike `START_ECG`, which is `0x08` here and `RT_DATA`
|
|
22
|
+
* on a BP2, and `RT_PARAM`, which is `0x02` here and `CALIBRATION_SLOPE` on a BP2.
|
|
23
|
+
*/
|
|
24
|
+
const RT_DATA = 0x03;
|
|
25
|
+
|
|
26
|
+
/** Header plus the parameter block through the temperature, which ends it. */
|
|
27
|
+
const MIN_LENGTH_BYTES = 46;
|
|
28
|
+
|
|
29
|
+
/** Frame offsets: the vendor's parameter block starts at the seven-byte header. */
|
|
30
|
+
const HEART_RATE = [31, 32];
|
|
31
|
+
const RESPIRATION_RATE = 34;
|
|
32
|
+
const BLOOD_OXYGEN = 36;
|
|
33
|
+
const PULSE_RATE = [37, 38];
|
|
34
|
+
const PERFUSION_INDEX = 39;
|
|
35
|
+
const TEMPERATURE = [44, 45];
|
|
36
|
+
|
|
37
|
+
/** The device counts perfusion in tenths of a percent and temperature in hundredths. */
|
|
38
|
+
const PERFUSION_SCALE = 0.1;
|
|
39
|
+
const TEMPERATURE_SCALE = 0.01;
|
|
40
|
+
const littleEndian = (name, byteIndexes, unit) => ({
|
|
41
|
+
name,
|
|
42
|
+
byteIndexes,
|
|
43
|
+
byteOrder: "little",
|
|
44
|
+
encoding: "uint",
|
|
45
|
+
unit
|
|
46
|
+
});
|
|
47
|
+
const LEPOD_MEASUREMENTS = [{
|
|
48
|
+
measurementTypeKey: MeasurementTypeKey.bloodOxygenPulseRate,
|
|
49
|
+
fields: [{
|
|
50
|
+
name: "bloodOxygen",
|
|
51
|
+
byteIndexes: [BLOOD_OXYGEN],
|
|
52
|
+
encoding: "uint",
|
|
53
|
+
unit: "%"
|
|
54
|
+
}, littleEndian("pulseRate", PULSE_RATE, "bpm"), {
|
|
55
|
+
name: "perfusionIndex",
|
|
56
|
+
byteIndexes: [PERFUSION_INDEX],
|
|
57
|
+
encoding: "uint",
|
|
58
|
+
unit: "%",
|
|
59
|
+
scale: PERFUSION_SCALE,
|
|
60
|
+
decimals: 1
|
|
61
|
+
}]
|
|
62
|
+
}, {
|
|
63
|
+
measurementTypeKey: MeasurementTypeKey.respiratoryRate,
|
|
64
|
+
fields: [{
|
|
65
|
+
name: "respiratoryRate",
|
|
66
|
+
byteIndexes: [RESPIRATION_RATE],
|
|
67
|
+
encoding: "uint",
|
|
68
|
+
unit: "/min"
|
|
69
|
+
}]
|
|
70
|
+
}, {
|
|
71
|
+
measurementTypeKey: MeasurementTypeKey.temperature,
|
|
72
|
+
fields: [{
|
|
73
|
+
name: "bodyTemp",
|
|
74
|
+
byteIndexes: TEMPERATURE,
|
|
75
|
+
byteOrder: "little",
|
|
76
|
+
encoding: "uint",
|
|
77
|
+
unit: "Cel",
|
|
78
|
+
scale: TEMPERATURE_SCALE,
|
|
79
|
+
decimals: 2
|
|
80
|
+
}]
|
|
81
|
+
}];
|
|
82
|
+
/**
|
|
83
|
+
* Declares a Lepod, reporting every reading its realtime frame carries.
|
|
84
|
+
*
|
|
85
|
+
* An instrument that is not attached reports a value outside the physiological range for
|
|
86
|
+
* what it measures, so that reading is discarded and reported while the others in the same
|
|
87
|
+
* frame are still delivered. The device also marks those conditions in bits of a lead-off
|
|
88
|
+
* byte, which a declaration cannot select on - reading them quietly needs a device class.
|
|
89
|
+
*/
|
|
90
|
+
const lepodMonitor = (advertisedName, params) => lepuDevice({
|
|
91
|
+
id: params.id,
|
|
92
|
+
nameMatch: params.nameMatch ?? lepuNameMatch(advertisedName),
|
|
93
|
+
pollCommand: RT_DATA,
|
|
94
|
+
minLengthBytes: MIN_LENGTH_BYTES,
|
|
95
|
+
caseSelectorBytes: [1],
|
|
96
|
+
cases: [{
|
|
97
|
+
selector: "03",
|
|
98
|
+
kind: "result",
|
|
99
|
+
measurementTypeKey: MeasurementTypeKey.heartRate,
|
|
100
|
+
description: "Realtime parameters, waveform and lead state",
|
|
101
|
+
fields: [littleEndian("heartRate", HEART_RATE, "bpm")],
|
|
102
|
+
additionalMeasurements: LEPOD_MEASUREMENTS.map(each => ({
|
|
103
|
+
...each
|
|
104
|
+
}))
|
|
105
|
+
}],
|
|
106
|
+
...(params.expectedDeviceTypes ? {
|
|
107
|
+
expectedDeviceTypes: params.expectedDeviceTypes
|
|
108
|
+
} : {})
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
/** The names the Lepod range advertises. */
|
|
112
|
+
const LEPOD_MODEL_NAMES = ["Lepod", "LepodPro"];
|
|
113
|
+
export { LEPOD_MODEL_NAMES, lepodMonitor };
|
|
114
|
+
//# sourceMappingURL=viatom.lepod.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["MeasurementTypeKey","lepuNameMatch","lepuDevice","RT_DATA","MIN_LENGTH_BYTES","HEART_RATE","RESPIRATION_RATE","BLOOD_OXYGEN","PULSE_RATE","PERFUSION_INDEX","TEMPERATURE","PERFUSION_SCALE","TEMPERATURE_SCALE","littleEndian","name","byteIndexes","unit","byteOrder","encoding","LEPOD_MEASUREMENTS","measurementTypeKey","bloodOxygenPulseRate","fields","scale","decimals","respiratoryRate","temperature","lepodMonitor","advertisedName","params","id","nameMatch","pollCommand","minLengthBytes","caseSelectorBytes","cases","selector","kind","heartRate","description","additionalMeasurements","map","each","expectedDeviceTypes","LEPOD_MODEL_NAMES"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.lepod.ts"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { MeasurementTypeKey } from "@ovok/core";
|
|
4
|
+
import { lepuNameMatch } from "../lepu/lepu.name-match.js";
|
|
5
|
+
import { lepuDevice } from "../lepu/lepu.transports.js";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* The Viatom pulse oximeters - the O2Ring, Oxyfit, KidsO2 and BabyO2 ranges.
|
|
9
|
+
*
|
|
10
|
+
* They share the family's framing and characteristics but not its opcodes: this range
|
|
11
|
+
* numbers its own commands, so realtime parameters are `0x17` here rather than the `0x08`
|
|
12
|
+
* the blood-pressure monitors answer, and its stored files are read with `0x03`-`0x05`
|
|
13
|
+
* rather than the generic `0xF1`-`0xF4`. A file transfer written for the rest of the family
|
|
14
|
+
* does not apply to these.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/** Realtime parameters. A read: it reports what the sensor sees and starts nothing. */
|
|
18
|
+
const RT_PARAM = 0x17;
|
|
19
|
+
|
|
20
|
+
/** Only the command byte, because what makes a reading valid here is a bit, not a byte. */
|
|
21
|
+
const CASE_SELECTOR_BYTES = [1];
|
|
22
|
+
|
|
23
|
+
/** Header plus the realtime parameters through the pulse rate. */
|
|
24
|
+
const MIN_LENGTH_BYTES = 10;
|
|
25
|
+
const PAYLOAD = 7;
|
|
26
|
+
const SPOT_CHECK_TIMEOUT_MS = 60_000;
|
|
27
|
+
/**
|
|
28
|
+
* Declares one oximeter of the range.
|
|
29
|
+
*
|
|
30
|
+
* **A finger that is not in the sensor yields no reading, reported as an error.** The device
|
|
31
|
+
* answers every poll whether or not it is measuring, and marks an unusable reading in two
|
|
32
|
+
* bits of a status byte - which a declaration cannot read, because a case is selected by
|
|
33
|
+
* whole bytes. What it can do is refuse the number: an oxygen saturation measured off the
|
|
34
|
+
* finger falls outside the physiological range, so it is discarded rather than reported.
|
|
35
|
+
* The reading is therefore never wrong, but a device left connected with nobody wearing it
|
|
36
|
+
* reports a decoding failure on each poll. Reading those bits quietly needs a device class.
|
|
37
|
+
*/
|
|
38
|
+
const viatomOximeter = (advertisedName, params) => lepuDevice({
|
|
39
|
+
id: params.id,
|
|
40
|
+
nameMatch: params.nameMatch ?? lepuNameMatch(advertisedName),
|
|
41
|
+
stuckDataTimeoutMs: SPOT_CHECK_TIMEOUT_MS,
|
|
42
|
+
pollCommand: RT_PARAM,
|
|
43
|
+
minLengthBytes: MIN_LENGTH_BYTES,
|
|
44
|
+
caseSelectorBytes: CASE_SELECTOR_BYTES,
|
|
45
|
+
cases: [{
|
|
46
|
+
selector: "17",
|
|
47
|
+
kind: "result",
|
|
48
|
+
measurementTypeKey: MeasurementTypeKey.bloodOxygenPulseRate,
|
|
49
|
+
description: "Realtime parameters",
|
|
50
|
+
fields: [{
|
|
51
|
+
name: "bloodOxygen",
|
|
52
|
+
byteIndexes: [PAYLOAD],
|
|
53
|
+
encoding: "uint",
|
|
54
|
+
unit: "%"
|
|
55
|
+
}, {
|
|
56
|
+
name: "pulseRate",
|
|
57
|
+
byteIndexes: [PAYLOAD + 1, PAYLOAD + 2],
|
|
58
|
+
byteOrder: "little",
|
|
59
|
+
encoding: "uint",
|
|
60
|
+
unit: "bpm"
|
|
61
|
+
}]
|
|
62
|
+
}],
|
|
63
|
+
...(params.expectedDeviceTypes ? {
|
|
64
|
+
expectedDeviceTypes: params.expectedDeviceTypes
|
|
65
|
+
} : {})
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* The names the oximeter range advertises.
|
|
70
|
+
*
|
|
71
|
+
* ```typescript
|
|
72
|
+
* const oximeters = VIATOM_OXIMETER_NAMES.map((name) =>
|
|
73
|
+
* viatomOximeter(name, { id: `viatom-${name.toLowerCase()}` }),
|
|
74
|
+
* );
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
const VIATOM_OXIMETER_NAMES = ["BBSM S1", "BBSM S2", "CMRing", "KidsO2-WPS", "O2 Intg", "O2M-WPS", "O2R WAVE", "O2RMed S", "O2Ring", "O2Ring S", "O2Ring SC", "O2Ring SF", "O2Ring SP", "O2Ring-RE", "O2RingF", "Oxyfit", "Oxyfit-WPS", "OxyU", "OxyU SE", "SI PO2"];
|
|
78
|
+
export { VIATOM_OXIMETER_NAMES, viatomOximeter };
|
|
79
|
+
//# sourceMappingURL=viatom.oximeters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["MeasurementTypeKey","lepuNameMatch","lepuDevice","RT_PARAM","CASE_SELECTOR_BYTES","MIN_LENGTH_BYTES","PAYLOAD","SPOT_CHECK_TIMEOUT_MS","viatomOximeter","advertisedName","params","id","nameMatch","stuckDataTimeoutMs","pollCommand","minLengthBytes","caseSelectorBytes","cases","selector","kind","measurementTypeKey","bloodOxygenPulseRate","description","fields","name","byteIndexes","encoding","unit","byteOrder","expectedDeviceTypes","VIATOM_OXIMETER_NAMES"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.oximeters.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,YAAY;AAG/C,SAASC,aAAa,QAAQ,4BAAyB;AACvD,SAASC,UAAU,QAAQ,4BAAyB;;AAEpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAMC,QAAQ,GAAG,IAAI;;AAErB;AACA,MAAMC,mBAAmB,GAAG,CAAC,CAAC,CAAC;;AAE/B;AACA,MAAMC,gBAAgB,GAAG,EAAE;AAE3B,MAAMC,OAAO,GAAG,CAAC;AAEjB,MAAMC,qBAAqB,GAAG,MAAM;AAoBpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,cAAc,GAAGA,CACrBC,cAAsB,EACtBC,MAA4B,KAE5BR,UAAU,CAAC;EACTS,EAAE,EAAED,MAAM,CAACC,EAAE;EACbC,SAAS,EAAEF,MAAM,CAACE,SAAS,IAAIX,aAAa,CAACQ,cAAc,CAAC;EAC5DI,kBAAkB,EAAEN,qBAAqB;EACzCO,WAAW,EAAEX,QAAQ;EACrBY,cAAc,EAAEV,gBAAgB;EAChCW,iBAAiB,EAAEZ,mBAAmB;EACtCa,KAAK,EAAE,CACL;IACEC,QAAQ,EAAE,IAAI;IACdC,IAAI,EAAE,QAAQ;IACdC,kBAAkB,EAAEpB,kBAAkB,CAACqB,oBAAoB;IAC3DC,WAAW,EAAE,qBAAqB;IAClCC,MAAM,EAAE,CACN;MACEC,IAAI,EAAE,aAAa;MACnBC,WAAW,EAAE,CAACnB,OAAO,CAAC;MACtBoB,QAAQ,EAAE,MAAM;MAChBC,IAAI,EAAE;IACR,CAAC,EACD;MACEH,IAAI,EAAE,WAAW;MACjBC,WAAW,EAAE,CAACnB,OAAO,GAAG,CAAC,EAAEA,OAAO,GAAG,CAAC,CAAC;MACvCsB,SAAS,EAAE,QAAQ;MACnBF,QAAQ,EAAE,MAAM;MAChBC,IAAI,EAAE;IACR,CAAC;EAEL,CAAC,CACF;EACD,IAAIjB,MAAM,CAACmB,mBAAmB,GAC1B;IAAEA,mBAAmB,EAAEnB,MAAM,CAACmB;EAAoB,CAAC,GACnD,CAAC,CAAC;AACR,CAAC,CAAC;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,qBAAwC,GAAG,CAC/C,SAAS,EACT,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,SAAS,EACT,UAAU,EACV,UAAU,EACV,QAAQ,EACR,UAAU,EACV,WAAW,EACX,WAAW,EACX,WAAW,EACX,WAAW,EACX,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,MAAM,EACN,SAAS,EACT,QAAQ,CACT;AAED,SAASA,qBAAqB,EAAEtB,cAAc","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["modules/bt-management/types/command-sequencer.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["modules/bt-management/types/custom-checksum-algorithm.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["modules/bt-management/types/custom-checksum-spec.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CUSTOM_DEVICE_BRAND"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/types/custom-device-definition.ts"],"mappings":";;AAAA,SAASA,mBAAmB,QAAQ,qCAAkC;;
|
|
1
|
+
{"version":3,"names":["CUSTOM_DEVICE_BRAND"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/types/custom-device-definition.ts"],"mappings":";;AAAA,SAASA,mBAAmB,QAAQ,qCAAkC;;AAStE;AACA;AACA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["modules/bt-management/types/custom-lepu-spec.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["modules/bt-management/types/custom-measurement-spec.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["modules/bt-management/types/device-command.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import { IntegratedDevices } from "./integrated-devices.js";
|
|
4
4
|
|
|
5
|
-
/**
|
|
6
|
-
* A built-in device has a measurement type the SDK knows statically. A device registered
|
|
7
|
-
* through defineCustomDevice reports the catalog-checked properties its declaration named.
|
|
5
|
+
/**
|
|
6
|
+
* A built-in device has a measurement type the SDK knows statically. A device registered
|
|
7
|
+
* through defineCustomDevice reports the catalog-checked properties its declaration named.
|
|
8
8
|
*/
|
|
9
9
|
//# sourceMappingURL=device-measurement-map.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["IntegratedDevices"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/types/device-measurement-map.ts"],"mappings":";;AAWA,SAASA,iBAAiB,QAAQ,yBAAsB;;
|
|
1
|
+
{"version":3,"names":["IntegratedDevices"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/types/device-measurement-map.ts"],"mappings":";;AAWA,SAASA,iBAAiB,QAAQ,yBAAsB;;AA0BxD;AACA;AACA;AACA","ignoreList":[]}
|
|
@@ -20,6 +20,8 @@ export let IntegratedDevices = /*#__PURE__*/function (IntegratedDevices) {
|
|
|
20
20
|
IntegratedDevices["S5"] = "Le S5";
|
|
21
21
|
IntegratedDevices["ALIVE_COR"] = "alivecor";
|
|
22
22
|
IntegratedDevices["BGM"] = "BGM";
|
|
23
|
+
IntegratedDevices["VEROVAL_DUO_CONTROL"] = "Veroval duo control";
|
|
24
|
+
IntegratedDevices["VEROVAL_ECG"] = "Veroval ECG";
|
|
23
25
|
return IntegratedDevices;
|
|
24
26
|
}({});
|
|
25
27
|
//# sourceMappingURL=integrated-devices.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["IntegratedDevices"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/types/integrated-devices.ts"],"mappings":";;AAAA,WAAYA,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["IntegratedDevices"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/types/integrated-devices.ts"],"mappings":";;AAAA,WAAYA,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["modules/bt-management/types/measurement-group.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { calculateCrc8 } from "./calculate-crc-8.js";
|
|
4
|
+
import { hexToByte } from "./hex-to-byte.js";
|
|
5
|
+
const BYTE_MASK = 0xff;
|
|
6
|
+
const foldBytes = (covered, combine) => covered.reduce((total, byte) => combine(total, hexToByte(byte || "0")) & BYTE_MASK, 0);
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* One implementation per algorithm, looked up by name.
|
|
10
|
+
*
|
|
11
|
+
* A map rather than a switch, so adding an algorithm is adding an entry, and so a
|
|
12
|
+
* declaration naming one that does not exist is rejected at registration instead of falling
|
|
13
|
+
* through to a default that would accept every frame.
|
|
14
|
+
*/
|
|
15
|
+
const ALGORITHMS = {
|
|
16
|
+
crc8: covered => calculateCrc8(covered, covered.length),
|
|
17
|
+
xor: covered => foldBytes(covered, (total, byte) => total ^ byte),
|
|
18
|
+
sum: covered => foldBytes(covered, (total, byte) => total + byte)
|
|
19
|
+
};
|
|
20
|
+
const isChecksumAlgorithm = candidate => typeof candidate === "string" && candidate in ALGORITHMS;
|
|
21
|
+
|
|
22
|
+
/** The bytes a checksum covers, defaulting to everything between `from` and the checksum. */
|
|
23
|
+
const coveredBytes = (pkg, checksum) => {
|
|
24
|
+
const from = checksum.from ?? 0;
|
|
25
|
+
const byteCount = checksum.byteCount ?? checksum.index - from;
|
|
26
|
+
return pkg.slice(from, from + byteCount);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Whether a buffer's checksum byte matches the bytes it covers.
|
|
31
|
+
*
|
|
32
|
+
* A buffer too short to hold the checksum byte fails rather than reading it as zero: an
|
|
33
|
+
* absent byte is not a matching byte, and treating it as one would let a truncated
|
|
34
|
+
* notification through as a valid reading.
|
|
35
|
+
*/
|
|
36
|
+
const hasValidChecksum = (pkg, checksum) => {
|
|
37
|
+
const declared = pkg[checksum.index];
|
|
38
|
+
if (declared === undefined) {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
return ALGORITHMS[checksum.algorithm](coveredBytes(pkg, checksum)) === hexToByte(declared);
|
|
42
|
+
};
|
|
43
|
+
export { hasValidChecksum, isChecksumAlgorithm };
|
|
44
|
+
//# sourceMappingURL=calculate-checksum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["calculateCrc8","hexToByte","BYTE_MASK","foldBytes","covered","combine","reduce","total","byte","ALGORITHMS","crc8","length","xor","sum","isChecksumAlgorithm","candidate","coveredBytes","pkg","checksum","from","byteCount","index","slice","hasValidChecksum","declared","undefined","algorithm"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/utils/calculate-checksum.ts"],"mappings":";;AAGA,SAASA,aAAa,QAAQ,sBAAmB;AACjD,SAASC,SAAS,QAAQ,kBAAe;AAEzC,MAAMC,SAAS,GAAG,IAAI;AAEtB,MAAMC,SAAS,GAAGA,CAChBC,OAAiB,EACjBC,OAAgD,KAEhDD,OAAO,CAACE,MAAM,CACZ,CAACC,KAAK,EAAEC,IAAI,KAAKH,OAAO,CAACE,KAAK,EAAEN,SAAS,CAACO,IAAI,IAAI,GAAG,CAAC,CAAC,GAAGN,SAAS,EACnE,CACF,CAAC;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMO,UAGL,GAAG;EACFC,IAAI,EAAGN,OAAO,IAAKJ,aAAa,CAACI,OAAO,EAAEA,OAAO,CAACO,MAAM,CAAC;EACzDC,GAAG,EAAGR,OAAO,IAAKD,SAAS,CAACC,OAAO,EAAE,CAACG,KAAK,EAAEC,IAAI,KAAKD,KAAK,GAAGC,IAAI,CAAC;EACnEK,GAAG,EAAGT,OAAO,IAAKD,SAAS,CAACC,OAAO,EAAE,CAACG,KAAK,EAAEC,IAAI,KAAKD,KAAK,GAAGC,IAAI;AACpE,CAAC;AAED,MAAMM,mBAAmB,GACvBC,SAAkB,IAElB,OAAOA,SAAS,KAAK,QAAQ,IAAIA,SAAS,IAAIN,UAAU;;AAE1D;AACA,MAAMO,YAAY,GAAGA,CAACC,GAAa,EAAEC,QAA4B,KAAe;EAC9E,MAAMC,IAAI,GAAGD,QAAQ,CAACC,IAAI,IAAI,CAAC;EAC/B,MAAMC,SAAS,GAAGF,QAAQ,CAACE,SAAS,IAAIF,QAAQ,CAACG,KAAK,GAAGF,IAAI;EAE7D,OAAOF,GAAG,CAACK,KAAK,CAACH,IAAI,EAAEA,IAAI,GAAGC,SAAS,CAAC;AAC1C,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMG,gBAAgB,GAAGA,CACvBN,GAAa,EACbC,QAA4B,KAChB;EACZ,MAAMM,QAAQ,GAAGP,GAAG,CAACC,QAAQ,CAACG,KAAK,CAAC;EAEpC,IAAIG,QAAQ,KAAKC,SAAS,EAAE;IAC1B,OAAO,KAAK;EACd;EAEA,OACEhB,UAAU,CAACS,QAAQ,CAACQ,SAAS,CAAC,CAACV,YAAY,CAACC,GAAG,EAAEC,QAAQ,CAAC,CAAC,KAC3DjB,SAAS,CAACuB,QAAQ,CAAC;AAEvB,CAAC;AAED,SAASD,gBAAgB,EAAET,mBAAmB","ignoreList":[]}
|
|
@@ -2,7 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
import { decodeMedicalFloat } from "./decode-medical-float.js";
|
|
4
4
|
const HEX_ONLY = /^[0-9a-f]+$/;
|
|
5
|
+
const ASCII_ZERO = 0x30;
|
|
6
|
+
const ASCII_NINE = 0x39;
|
|
7
|
+
const HEX_BYTE = /../g;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Reads bytes that are decimal digits written as characters, not a number.
|
|
11
|
+
*
|
|
12
|
+
* A byte outside "0"-"9" makes the whole field undefined rather than being skipped: these
|
|
13
|
+
* records are fixed width and a non-digit means the field was not what the declaration
|
|
14
|
+
* says it is, so decoding the rest of it would report a number built from part of a value.
|
|
15
|
+
*/
|
|
16
|
+
const fromAsciiDigits = hex => {
|
|
17
|
+
const codes = (hex.match(HEX_BYTE) ?? []).map(byte => parseInt(byte, 16));
|
|
18
|
+
if (codes.length === 0 || codes.some(code => code < ASCII_ZERO || code > ASCII_NINE)) {
|
|
19
|
+
return undefined;
|
|
20
|
+
}
|
|
21
|
+
return Number(codes.map(code => code - ASCII_ZERO).join(""));
|
|
22
|
+
};
|
|
5
23
|
const toRaw = (hex, field) => {
|
|
24
|
+
if (field.encoding === "ascii") {
|
|
25
|
+
return fromAsciiDigits(hex);
|
|
26
|
+
}
|
|
6
27
|
const raw = parseInt(hex, 16);
|
|
7
28
|
const bits = hex.length * 4;
|
|
8
29
|
if (field.encoding === "int") {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["decodeMedicalFloat","HEX_ONLY","
|
|
1
|
+
{"version":3,"names":["decodeMedicalFloat","HEX_ONLY","ASCII_ZERO","ASCII_NINE","HEX_BYTE","fromAsciiDigits","hex","codes","match","map","byte","parseInt","length","some","code","undefined","Number","join","toRaw","field","encoding","raw","bits","sign","createCustomFieldParser","assembledHex","toLowerCase","byteIndexes","test","isFinite","value","scale","offset","decimals","factor","Math","round"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/utils/create-custom-field-parser.ts"],"mappings":";;AAEA,SAASA,kBAAkB,QAAQ,2BAAwB;AAE3D,MAAMC,QAAQ,GAAG,aAAa;AAE9B,MAAMC,UAAU,GAAG,IAAI;AACvB,MAAMC,UAAU,GAAG,IAAI;AACvB,MAAMC,QAAQ,GAAG,KAAK;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,eAAe,GAAIC,GAAW,IAAyB;EAC3D,MAAMC,KAAK,GAAG,CAACD,GAAG,CAACE,KAAK,CAACJ,QAAQ,CAAC,IAAI,EAAE,EAAEK,GAAG,CAAEC,IAAI,IAAKC,QAAQ,CAACD,IAAI,EAAE,EAAE,CAAC,CAAC;EAE3E,IACEH,KAAK,CAACK,MAAM,KAAK,CAAC,IAClBL,KAAK,CAACM,IAAI,CAAEC,IAAI,IAAKA,IAAI,GAAGZ,UAAU,IAAIY,IAAI,GAAGX,UAAU,CAAC,EAC5D;IACA,OAAOY,SAAS;EAClB;EAEA,OAAOC,MAAM,CAACT,KAAK,CAACE,GAAG,CAAEK,IAAI,IAAKA,IAAI,GAAGZ,UAAU,CAAC,CAACe,IAAI,CAAC,EAAE,CAAC,CAAC;AAChE,CAAC;AAED,MAAMC,KAAK,GAAGA,CACZZ,GAAW,EACXa,KAA0B,KACH;EACvB,IAAIA,KAAK,CAACC,QAAQ,KAAK,OAAO,EAAE;IAC9B,OAAOf,eAAe,CAACC,GAAG,CAAC;EAC7B;EAEA,MAAMe,GAAG,GAAGV,QAAQ,CAACL,GAAG,EAAE,EAAE,CAAC;EAC7B,MAAMgB,IAAI,GAAGhB,GAAG,CAACM,MAAM,GAAG,CAAC;EAE3B,IAAIO,KAAK,CAACC,QAAQ,KAAK,KAAK,EAAE;IAC5B,MAAMG,IAAI,GAAG,CAAC,KAAKD,IAAI,GAAG,CAAC,CAAC;IAE5B,OAAOD,GAAG,IAAIE,IAAI,GAAGF,GAAG,GAAGE,IAAI,GAAG,CAAC,GAAGF,GAAG;EAC3C;EAEA,IAAIF,KAAK,CAACC,QAAQ,KAAK,QAAQ,EAAE;IAC/B,OAAOpB,kBAAkB,CAACqB,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC;EACvC;EAEA,IAAIF,KAAK,CAACC,QAAQ,KAAK,OAAO,EAAE;IAC9B,OAAOpB,kBAAkB,CAACqB,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC;EACvC;EAEA,OAAOA,GAAG;AACZ,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMG,uBAAuB,GACjCL,KAA0B,IAC1BM,YAAoB,IAAyB;EAC5C,MAAMnB,GAAG,GAAG,CAACmB,YAAY,IAAI,EAAE,EAAEC,WAAW,CAAC,CAAC;EAE9C,IACEpB,GAAG,CAACM,MAAM,KAAKO,KAAK,CAACQ,WAAW,CAACf,MAAM,GAAG,CAAC,IAC3C,CAACX,QAAQ,CAAC2B,IAAI,CAACtB,GAAG,CAAC,EACnB;IACA,OAAOS,SAAS;EAClB;EAEA,MAAMM,GAAG,GAAGH,KAAK,CAACZ,GAAG,EAAEa,KAAK,CAAC;EAE7B,IAAIE,GAAG,KAAKN,SAAS,IAAI,CAACC,MAAM,CAACa,QAAQ,CAACR,GAAG,CAAC,EAAE;IAC9C,OAAON,SAAS;EAClB;EAEA,MAAMe,KAAK,GAAGT,GAAG,GAAGF,KAAK,CAACY,KAAK,GAAGZ,KAAK,CAACa,MAAM;EAE9C,IAAI,CAAChB,MAAM,CAACa,QAAQ,CAACC,KAAK,CAAC,EAAE;IAC3B,OAAOf,SAAS;EAClB;EAEA,IAAII,KAAK,CAACc,QAAQ,KAAKlB,SAAS,EAAE;IAChC,OAAOe,KAAK;EACd;EAEA,MAAMI,MAAM,GAAG,EAAE,IAAIf,KAAK,CAACc,QAAQ;EAEnC,OAAOE,IAAI,CAACC,KAAK,CAACN,KAAK,GAAGI,MAAM,CAAC,GAAGA,MAAM;AAC5C,CAAC","ignoreList":[]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
import { hasValidChecksum } from "./calculate-checksum.js";
|
|
3
4
|
const byteAt = (pkg, index) => parseInt(pkg[index] ?? "0", 16);
|
|
4
5
|
const announcedLength = (pkg, length) => {
|
|
5
6
|
const bytes = [];
|
|
@@ -27,6 +28,14 @@ export const createFrameValidator = frame => pkg => {
|
|
|
27
28
|
return false;
|
|
28
29
|
}
|
|
29
30
|
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Checked before the length, because a corrupted buffer can carry a plausible length.
|
|
34
|
+
* A frame that fails here is discarded rather than decoded at a wrong value.
|
|
35
|
+
*/
|
|
36
|
+
if (frame.checksum && !hasValidChecksum(pkg, frame.checksum)) {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
30
39
|
if (!frame.length) {
|
|
31
40
|
return true;
|
|
32
41
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["byteAt","pkg","index","parseInt","announcedLength","length","bytes","i","widthBytes","push","ordered","byteOrder","reverse","reduce","total","byte","createFrameValidator","frame","minLengthBytes","header","toLowerCase","overheadBytes"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/utils/create-frame-validator.ts"],"mappings":";;AAEA,
|
|
1
|
+
{"version":3,"names":["hasValidChecksum","byteAt","pkg","index","parseInt","announcedLength","length","bytes","i","widthBytes","push","ordered","byteOrder","reverse","reduce","total","byte","createFrameValidator","frame","minLengthBytes","header","toLowerCase","checksum","overheadBytes"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/utils/create-frame-validator.ts"],"mappings":";;AAEA,SAASA,gBAAgB,QAAQ,yBAAsB;AAEvD,MAAMC,MAAM,GAAGA,CAACC,GAAa,EAAEC,KAAa,KAC1CC,QAAQ,CAACF,GAAG,CAACC,KAAK,CAAC,IAAI,GAAG,EAAE,EAAE,CAAC;AAEjC,MAAME,eAAe,GAAGA,CACtBH,GAAa,EACbI,MAA8C,KACnC;EACX,MAAMC,KAAe,GAAG,EAAE;EAE1B,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGF,MAAM,CAACG,UAAU,EAAED,CAAC,EAAE,EAAE;IAC1CD,KAAK,CAACG,IAAI,CAACT,MAAM,CAACC,GAAG,EAAEI,MAAM,CAACH,KAAK,GAAGK,CAAC,CAAC,CAAC;EAC3C;EAEA,MAAMG,OAAO,GAAGL,MAAM,CAACM,SAAS,KAAK,QAAQ,GAAGL,KAAK,CAACM,OAAO,CAAC,CAAC,GAAGN,KAAK;EAEvE,OAAOI,OAAO,CAACG,MAAM,CAAC,CAACC,KAAK,EAAEC,IAAI,KAAKD,KAAK,GAAG,GAAG,GAAGC,IAAI,EAAE,CAAC,CAAC;AAC/D,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,oBAAoB,GAC9BC,KAAsB,IACtBhB,GAAa,IAAc;EAC1B,IAAIA,GAAG,CAACI,MAAM,GAAGY,KAAK,CAACC,cAAc,EAAE;IACrC,OAAO,KAAK;EACd;EAEA,MAAMC,MAAM,GAAGF,KAAK,CAACE,MAAM,IAAI,EAAE;EAEjC,KAAK,IAAIZ,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGY,MAAM,CAACd,MAAM,EAAEE,CAAC,EAAE,EAAE;IACtC,IAAI,CAACN,GAAG,CAACM,CAAC,CAAC,IAAI,EAAE,EAAEa,WAAW,CAAC,CAAC,KAAKD,MAAM,CAACZ,CAAC,CAAC,EAAE;MAC9C,OAAO,KAAK;IACd;EACF;;EAEA;AACJ;AACA;AACA;EACI,IAAIU,KAAK,CAACI,QAAQ,IAAI,CAACtB,gBAAgB,CAACE,GAAG,EAAEgB,KAAK,CAACI,QAAQ,CAAC,EAAE;IAC5D,OAAO,KAAK;EACd;EAEA,IAAI,CAACJ,KAAK,CAACZ,MAAM,EAAE;IACjB,OAAO,IAAI;EACb;EAEA,OACEJ,GAAG,CAACI,MAAM,IACVY,KAAK,CAACZ,MAAM,CAACiB,aAAa,GAAGlB,eAAe,CAACH,GAAG,EAAEgB,KAAK,CAACZ,MAAM,CAAC;AAEnE,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const HEX_BYTE = /[0-9a-f]{2}/g;
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Splits a hex string into the bytes it spells: "a508f7" -> ["a5","08","f7"].
|
|
7
|
+
*
|
|
8
|
+
* Anything that is not a pair of hex digits is dropped, so a malformed string yields a
|
|
9
|
+
* shorter command rather than a byte that is half a value. Both callers hand it hex that
|
|
10
|
+
* was already validated - a declaration checks it at registration, and a built frame is
|
|
11
|
+
* assembled a byte at a time - so the dropping is a floor, not a path anything relies on.
|
|
12
|
+
*/
|
|
13
|
+
export const hexToBytes = hex => hex.toLowerCase().match(HEX_BYTE) ?? [];
|
|
14
|
+
//# sourceMappingURL=hex-to-bytes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["HEX_BYTE","hexToBytes","hex","toLowerCase","match"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/utils/hex-to-bytes.ts"],"mappings":";;AAAA,MAAMA,QAAQ,GAAG,cAAc;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,UAAU,GAAIC,GAAW,IACpCA,GAAG,CAACC,WAAW,CAAC,CAAC,CAACC,KAAK,CAACJ,QAAQ,CAAC,IAAI,EAAE","ignoreList":[]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const BYTE_MASK = 0xff;
|
|
4
|
+
const BYTE_BITS = 8;
|
|
5
|
+
|
|
6
|
+
/** Little-endian unsigned 32-bit: 0x0000000A -> [0x0a, 0x00, 0x00, 0x00]. */
|
|
7
|
+
export const le32ToBytes = value => [value & BYTE_MASK, value >> BYTE_BITS & BYTE_MASK, value >> BYTE_BITS * 2 & BYTE_MASK, value >> BYTE_BITS * 3 & BYTE_MASK];
|
|
8
|
+
//# sourceMappingURL=le-32-to-bytes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["BYTE_MASK","BYTE_BITS","le32ToBytes","value"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/utils/le-32-to-bytes.ts"],"mappings":";;AAAA,MAAMA,SAAS,GAAG,IAAI;AACtB,MAAMC,SAAS,GAAG,CAAC;;AAEnB;AACA,OAAO,MAAMC,WAAW,GAAIC,KAAa,IAAe,CACtDA,KAAK,GAAGH,SAAS,EAChBG,KAAK,IAAIF,SAAS,GAAID,SAAS,EAC/BG,KAAK,IAAKF,SAAS,GAAG,CAAE,GAAID,SAAS,EACrCG,KAAK,IAAKF,SAAS,GAAG,CAAE,GAAID,SAAS,CACvC","ignoreList":[]}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* @param byteOffset added to every declared index, for a frame that repeats one record.
|
|
5
|
+
*/
|
|
6
|
+
export const parseMeasurement = (measurementInHex, parsingCase, byteOffset = 0) => {
|
|
4
7
|
const parserDefinitions = parsingCase.parseDefinitions;
|
|
5
8
|
const result = parserDefinitions.reduce((acc, parserDefinition) => {
|
|
6
|
-
const parsingValue = getFullValueForMeasurementProperty(measurementInHex, parserDefinition);
|
|
9
|
+
const parsingValue = getFullValueForMeasurementProperty(measurementInHex, parserDefinition, byteOffset);
|
|
7
10
|
if (parserDefinition.customParserDefinition) {
|
|
8
11
|
acc[parserDefinition.name] = parserDefinition.customParserDefinition(parsingValue);
|
|
9
12
|
} else {
|
|
@@ -19,14 +22,14 @@ export const parseMeasurement = (measurementInHex, parsingCase) => {
|
|
|
19
22
|
return measurement;
|
|
20
23
|
};
|
|
21
24
|
|
|
22
|
-
/** Example: We received message ["1A","02", "00", "50"]. Value for weight is on indexes 2,3. Which means we need to combine 2nd and 3rd indexes to get result
|
|
23
|
-
* This method will combine them and return string "0050".
|
|
24
|
-
* Indexes should be written in ParseDeinition
|
|
25
|
+
/** Example: We received message ["1A","02", "00", "50"]. Value for weight is on indexes 2,3. Which means we need to combine 2nd and 3rd indexes to get result
|
|
26
|
+
* This method will combine them and return string "0050".
|
|
27
|
+
* Indexes should be written in ParseDeinition
|
|
25
28
|
*/
|
|
26
|
-
const getFullValueForMeasurementProperty = (messageInHex, parseDefinition) => {
|
|
29
|
+
const getFullValueForMeasurementProperty = (messageInHex, parseDefinition, byteOffset) => {
|
|
27
30
|
let valuesInString = "";
|
|
28
31
|
for (let i = 0; i < parseDefinition.byteIndexes.length; i++) {
|
|
29
|
-
valuesInString += messageInHex[parseDefinition.byteIndexes[i]
|
|
32
|
+
valuesInString += messageInHex[(parseDefinition.byteIndexes[i] ?? 0) + byteOffset];
|
|
30
33
|
}
|
|
31
34
|
return valuesInString;
|
|
32
35
|
};
|