@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
|
@@ -4,85 +4,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.BP2FrameReader = void 0;
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var _le16FromHex = require("../../../utils/le-16-from-hex.js");
|
|
11
|
-
const FRAME_START_BYTE = "a5";
|
|
12
|
-
const COMMAND_INDEX = 1;
|
|
13
|
-
const COMMAND_COMPLEMENT_INDEX = 2;
|
|
14
|
-
const PAYLOAD_LENGTH_INDEX = 5;
|
|
15
|
-
const HEADER_BYTES = 7;
|
|
16
|
-
const CHECKSUM_BYTES = 1;
|
|
17
|
-
const BYTE_MASK = 0xff;
|
|
18
|
-
|
|
19
|
-
/** Start byte, command and its complement: the shortest run that can identify a start. */
|
|
20
|
-
const START_PATTERN_BYTES = 3;
|
|
21
|
-
const isFrameStart = (buffer, index) => {
|
|
22
|
-
if ((buffer[index] || "").toLowerCase() !== FRAME_START_BYTE) {
|
|
23
|
-
return false;
|
|
24
|
-
}
|
|
25
|
-
const command = (0, _hexToByte.hexToByte)(buffer[index + COMMAND_INDEX] || "0");
|
|
26
|
-
const complement = (0, _hexToByte.hexToByte)(buffer[index + COMMAND_COMPLEMENT_INDEX] || "0");
|
|
27
|
-
return command === (~complement & BYTE_MASK);
|
|
28
|
-
};
|
|
29
|
-
const findFrameStart = buffer => {
|
|
30
|
-
const lastCandidate = buffer.length - START_PATTERN_BYTES;
|
|
31
|
-
for (let index = 0; index <= lastCandidate; index++) {
|
|
32
|
-
if (isFrameStart(buffer, index)) {
|
|
33
|
-
return index;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
return -1;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Bytes that cannot begin a frame start, and are therefore safe to drop when no start
|
|
41
|
-
* was found. The trailing bytes are kept because a start pattern may still be arriving.
|
|
42
|
-
*/
|
|
43
|
-
const droppableLeadingBytes = buffer => Math.max(0, buffer.length - (START_PATTERN_BYTES - 1));
|
|
7
|
+
var _lepuFrameReader = require("../lepu/lepu.frame-reader.js");
|
|
8
|
+
/** The start byte the BP2 and most of its family use. */
|
|
9
|
+
const BP2_START_BYTES = ["a5"];
|
|
44
10
|
|
|
45
11
|
/**
|
|
46
12
|
* Reads Lepu protocol frames as used by the BP2.
|
|
47
13
|
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
* the search for a start; the checksum is what actually decides a frame is trustworthy.
|
|
14
|
+
* The frame itself is shared across the family, so it lives in `LepuFrameReader`; the only
|
|
15
|
+
* thing that makes it a BP2 is which start byte it accepts.
|
|
51
16
|
*/
|
|
52
|
-
class BP2FrameReader {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
if (start === -1) {
|
|
56
|
-
return {
|
|
57
|
-
status: _frameReadStatus.FrameReadStatus.INCOMPLETE,
|
|
58
|
-
consumedBytes: droppableLeadingBytes(buffer)
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
const payloadLength = (0, _le16FromHex.le16FromHex)(buffer, start + PAYLOAD_LENGTH_INDEX);
|
|
62
|
-
const frameLength = HEADER_BYTES + payloadLength + CHECKSUM_BYTES;
|
|
63
|
-
if (start + frameLength > buffer.length) {
|
|
64
|
-
return {
|
|
65
|
-
status: _frameReadStatus.FrameReadStatus.INCOMPLETE,
|
|
66
|
-
consumedBytes: start
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
const frame = buffer.slice(start, start + frameLength);
|
|
70
|
-
if (!this.hasValidChecksum(frame)) {
|
|
71
|
-
return {
|
|
72
|
-
status: _frameReadStatus.FrameReadStatus.CORRUPT,
|
|
73
|
-
consumedBytes: start + START_PATTERN_BYTES
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
return {
|
|
77
|
-
status: _frameReadStatus.FrameReadStatus.COMPLETE,
|
|
78
|
-
consumedBytes: start + frameLength,
|
|
79
|
-
frame
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
hasValidChecksum(frame) {
|
|
83
|
-
const checksummedBytes = frame.length - CHECKSUM_BYTES;
|
|
84
|
-
const declared = (0, _hexToByte.hexToByte)(frame[checksummedBytes] || "0");
|
|
85
|
-
return declared === (0, _calculateCrc.calculateCrc8)(frame, checksummedBytes);
|
|
17
|
+
class BP2FrameReader extends _lepuFrameReader.LepuFrameReader {
|
|
18
|
+
constructor() {
|
|
19
|
+
super(BP2_START_BYTES);
|
|
86
20
|
}
|
|
87
21
|
}
|
|
88
22
|
exports.BP2FrameReader = BP2FrameReader;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_lepuFrameReader","require","BP2_START_BYTES","BP2FrameReader","LepuFrameReader","constructor","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/bp2/bp2.frame-reader.ts"],"mappings":";;;;;;AAAA,IAAAA,gBAAA,GAAAC,OAAA;AAEA;AACA,MAAMC,eAAe,GAAG,CAAC,IAAI,CAAC;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,cAAc,SAASC,gCAAe,CAAC;EAC3CC,WAAWA,CAAA,EAAG;IACnB,KAAK,CAACH,eAAe,CAAC;EACxB;AACF;AAACI,OAAA,CAAAH,cAAA,GAAAA,cAAA","ignoreList":[]}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BTCommandWriter = void 0;
|
|
7
|
+
var _sLog = require("../../../helpers/utils/s-log.js");
|
|
8
|
+
var _sentryLogger = require("../../../helpers/utils/sentry-logger.js");
|
|
9
|
+
var _hexToBase = require("../../utils/hex-to-base-64.js");
|
|
10
|
+
const MAX_WRITE_ATTEMPTS = 3;
|
|
11
|
+
|
|
12
|
+
/** The MTU every BLE link starts at, before either side asks for more. */
|
|
13
|
+
const DEFAULT_ATT_MTU = 23;
|
|
14
|
+
|
|
15
|
+
/** An ATT write spends three bytes on its own header. */
|
|
16
|
+
const ATT_WRITE_HEADER_BYTES = 3;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* The write channel to a connected device.
|
|
20
|
+
*
|
|
21
|
+
* These protocols allow one command outstanding at a time, and the reply to it is what
|
|
22
|
+
* decides the next one, so writes are serialised rather than merely guarded against
|
|
23
|
+
* re-entry. Refusing a command while another is in flight stalls a self-clocking exchange
|
|
24
|
+
* permanently: the refused command is the one that would have provoked the next reply, and
|
|
25
|
+
* nothing retries it.
|
|
26
|
+
*/
|
|
27
|
+
class BTCommandWriter {
|
|
28
|
+
pendingWrites = Promise.resolve();
|
|
29
|
+
mtu = DEFAULT_ATT_MTU;
|
|
30
|
+
constructor(device, onError) {
|
|
31
|
+
this.device = device;
|
|
32
|
+
this.onError = onError;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Records what the link actually negotiated.
|
|
37
|
+
*
|
|
38
|
+
* The floor stands until something says otherwise, because a link that has not
|
|
39
|
+
* negotiated is at the minimum, and over-estimating truncates while under-estimating
|
|
40
|
+
* only costs a second packet.
|
|
41
|
+
*/
|
|
42
|
+
useNegotiatedMtu = mtu => {
|
|
43
|
+
if (typeof mtu === "number" && Number.isInteger(mtu) && mtu > this.mtu) {
|
|
44
|
+
this.mtu = mtu;
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
/** Drops anything still queued, for a link that is going away. */
|
|
49
|
+
reset = () => {
|
|
50
|
+
this.pendingWrites = Promise.resolve();
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Queues commands behind whatever is already being written.
|
|
55
|
+
*
|
|
56
|
+
* The returned promise settles when the last of them has been written and never rejects.
|
|
57
|
+
* A write that fails is retried and reported where it happens; the catch here is a
|
|
58
|
+
* backstop, so that anything that gets past that still cannot poison the queue and
|
|
59
|
+
* silence every command after it.
|
|
60
|
+
*/
|
|
61
|
+
send = commands => {
|
|
62
|
+
this.pendingWrites = this.pendingWrites.then(() => this.writeInOrder(commands)).catch(error => {
|
|
63
|
+
this.onError?.(error);
|
|
64
|
+
});
|
|
65
|
+
return this.pendingWrites;
|
|
66
|
+
};
|
|
67
|
+
writeInOrder = async commands => {
|
|
68
|
+
for (const command of commands) {
|
|
69
|
+
await this.writeCommand(command);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Writes one command, split to fit the link.
|
|
75
|
+
*
|
|
76
|
+
* A write longer than the negotiated MTU is truncated by the stack rather than refused,
|
|
77
|
+
* so an oversized command arrives as a shorter one whose header still looks valid. The
|
|
78
|
+
* Er2 negotiates the 23-byte minimum where the rest of the family grants 247, which is
|
|
79
|
+
* enough to cut a 28-byte file-read request in half.
|
|
80
|
+
*
|
|
81
|
+
* A chunk that cannot be written abandons the rest of the command. The device reassembles
|
|
82
|
+
* by arrival, so continuing past a gap would hand it a frame that is not the one asked
|
|
83
|
+
* for - worse than sending nothing, because it would be answered.
|
|
84
|
+
*/
|
|
85
|
+
writeCommand = async command => {
|
|
86
|
+
for (const chunk of this.chunksOf(command.frame)) {
|
|
87
|
+
const written = await this.writeChunk(command, chunk);
|
|
88
|
+
if (!written) {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Writes one chunk the way the characteristic accepts writes.
|
|
96
|
+
*
|
|
97
|
+
* A with-response write to a characteristic that only supports write-without-response
|
|
98
|
+
* fails outright, so the command says which it is rather than the transport guessing.
|
|
99
|
+
*/
|
|
100
|
+
writeTo = async (command, value) => {
|
|
101
|
+
if (command.withoutResponse) {
|
|
102
|
+
await this.device.writeCharacteristicWithoutResponseForService(command.serviceUuid, command.characteristicUuid, value);
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
await this.device.writeCharacteristicWithResponseForService(command.serviceUuid, command.characteristicUuid, value);
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Splits a frame into writes the link will carry whole.
|
|
110
|
+
*
|
|
111
|
+
* A frame that already fits yields one chunk, so the common command - a poll of a handful
|
|
112
|
+
* of bytes - is written exactly as it was before there was any splitting at all.
|
|
113
|
+
*/
|
|
114
|
+
chunksOf = frame => {
|
|
115
|
+
const size = Math.max(1, this.mtu - ATT_WRITE_HEADER_BYTES);
|
|
116
|
+
const chunks = [];
|
|
117
|
+
for (let start = 0; start < frame.length; start += size) {
|
|
118
|
+
chunks.push(frame.slice(start, start + size));
|
|
119
|
+
}
|
|
120
|
+
return chunks;
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Writes one chunk, retrying a failed write.
|
|
125
|
+
*
|
|
126
|
+
* The attempt count is local rather than an instance field, so a write that exhausted its
|
|
127
|
+
* retries cannot leave the next one with none left - which is what a shared counter did
|
|
128
|
+
* on any path that failed to reset it.
|
|
129
|
+
*/
|
|
130
|
+
writeChunk = async (command, chunk) => {
|
|
131
|
+
for (let attempt = 1; attempt <= MAX_WRITE_ATTEMPTS; attempt++) {
|
|
132
|
+
try {
|
|
133
|
+
const isConnected = await this.device.isConnected();
|
|
134
|
+
if (!isConnected) {
|
|
135
|
+
return false;
|
|
136
|
+
}
|
|
137
|
+
await this.writeTo(command, (0, _hexToBase.hexToBase64)(chunk.join("")));
|
|
138
|
+
return true;
|
|
139
|
+
} catch (error) {
|
|
140
|
+
(0, _sentryLogger.sentryLogger)("error", "DEVICE: Error sending command", {
|
|
141
|
+
error: error instanceof Error ? error.message : error,
|
|
142
|
+
deviceName: this.device.name
|
|
143
|
+
});
|
|
144
|
+
if (attempt === MAX_WRITE_ATTEMPTS) {
|
|
145
|
+
(0, _sLog.slog)(error, "BT_CONNECTION_HANDLER: Error sending command", {
|
|
146
|
+
deviceName: this.device.name
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
return false;
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
exports.BTCommandWriter = BTCommandWriter;
|
|
155
|
+
//# sourceMappingURL=bt-command-writer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_sLog","require","_sentryLogger","_hexToBase","MAX_WRITE_ATTEMPTS","DEFAULT_ATT_MTU","ATT_WRITE_HEADER_BYTES","BTCommandWriter","pendingWrites","Promise","resolve","mtu","constructor","device","onError","useNegotiatedMtu","Number","isInteger","reset","send","commands","then","writeInOrder","catch","error","command","writeCommand","chunk","chunksOf","frame","written","writeChunk","writeTo","value","withoutResponse","writeCharacteristicWithoutResponseForService","serviceUuid","characteristicUuid","writeCharacteristicWithResponseForService","size","Math","max","chunks","start","length","push","slice","attempt","isConnected","hexToBase64","join","sentryLogger","Error","message","deviceName","name","slog","exports"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/bt-command-writer.ts"],"mappings":";;;;;;AAEA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAEA,IAAAE,UAAA,GAAAF,OAAA;AAEA,MAAMG,kBAAkB,GAAG,CAAC;;AAE5B;AACA,MAAMC,eAAe,GAAG,EAAE;;AAE1B;AACA,MAAMC,sBAAsB,GAAG,CAAC;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,eAAe,CAAC;EACnBC,aAAa,GAAkBC,OAAO,CAACC,OAAO,CAAC,CAAC;EAChDC,GAAG,GAAGN,eAAe;EAEtBO,WAAWA,CACCC,MAAc,EACdC,OAA2C,EAC5D;IAAA,KAFiBD,MAAc,GAAdA,MAAc;IAAA,KACdC,OAA2C,GAA3CA,OAA2C;EAC3D;;EAEH;AACF;AACA;AACA;AACA;AACA;AACA;EACSC,gBAAgB,GAAIJ,GAAY,IAAW;IAChD,IAAI,OAAOA,GAAG,KAAK,QAAQ,IAAIK,MAAM,CAACC,SAAS,CAACN,GAAG,CAAC,IAAIA,GAAG,GAAG,IAAI,CAACA,GAAG,EAAE;MACtE,IAAI,CAACA,GAAG,GAAGA,GAAG;IAChB;EACF,CAAC;;EAED;EACOO,KAAK,GAAGA,CAAA,KAAY;IACzB,IAAI,CAACV,aAAa,GAAGC,OAAO,CAACC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C,KAAK,EAAE,8CAA8C,EAAE;YAC1D8B,UAAU,EAAE,IAAI,CAACzC,MAAM,CAAC0C;UAC1B,CAAC,CAAC;QACJ;MACF;IACF;IAEA,OAAO,KAAK;EACd,CAAC;AACH;AAACE,OAAA,CAAAlD,eAAA,GAAAA,eAAA","ignoreList":[]}
|
|
@@ -4,20 +4,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.BTConnectionHandler = void 0;
|
|
7
|
-
var _index = require("../../../helpers/index.js");
|
|
8
7
|
var _sentryLogger = require("../../../helpers/utils/sentry-logger.js");
|
|
9
8
|
var _deviceStatus = require("../../types/device-status.js");
|
|
10
9
|
var _base64ToHex = require("../../utils/base-64-to-hex.js");
|
|
11
|
-
var
|
|
10
|
+
var _btCommandWriter = require("./bt-command-writer.js");
|
|
12
11
|
class BTConnectionHandler {
|
|
13
12
|
characteristicSubscriptions = [];
|
|
14
|
-
isSendingCommand = false;
|
|
15
|
-
retryCount = 0;
|
|
16
13
|
constructor(device, mainServices, callbacks, preferredMtu) {
|
|
17
14
|
this.device = device;
|
|
18
15
|
this.mainServices = mainServices;
|
|
19
16
|
this.callbacks = callbacks;
|
|
20
17
|
this.preferredMtu = preferredMtu;
|
|
18
|
+
this.writer = new _btCommandWriter.BTCommandWriter(device, callbacks.onError);
|
|
21
19
|
}
|
|
22
20
|
connect = async () => {
|
|
23
21
|
try {
|
|
@@ -39,23 +37,12 @@ class BTConnectionHandler {
|
|
|
39
37
|
destroy = () => {
|
|
40
38
|
this.characteristicSubscriptions.forEach(sub => sub?.remove());
|
|
41
39
|
this.characteristicSubscriptions = [];
|
|
42
|
-
this.
|
|
43
|
-
this.retryCount = 0;
|
|
40
|
+
this.writer.reset();
|
|
44
41
|
this.onDisconnectSubscription?.remove();
|
|
45
42
|
};
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
this.isSendingCommand = true;
|
|
51
|
-
for (const mainService of this.mainServices) {
|
|
52
|
-
if (mainService.writeUuid) {
|
|
53
|
-
await this.sendCommand(mainService);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
this.isSendingCommand = false;
|
|
57
|
-
this.retryCount = 0;
|
|
58
|
-
};
|
|
43
|
+
|
|
44
|
+
/** Sends commands to the device, in order, one at a time. */
|
|
45
|
+
sendCommands = commands => this.writer.send(commands);
|
|
59
46
|
|
|
60
47
|
/**
|
|
61
48
|
* Asks for a larger MTU so a frame arrives in fewer notifications.
|
|
@@ -68,7 +55,8 @@ class BTConnectionHandler {
|
|
|
68
55
|
return;
|
|
69
56
|
}
|
|
70
57
|
try {
|
|
71
|
-
await this.device.requestMTU(this.preferredMtu);
|
|
58
|
+
const negotiated = await this.device.requestMTU(this.preferredMtu);
|
|
59
|
+
this.writer.useNegotiatedMtu(negotiated?.mtu ?? this.device.mtu);
|
|
72
60
|
} catch (error) {
|
|
73
61
|
(0, _sentryLogger.sentryLogger)("info", "DEVICE: MTU request was not granted", {
|
|
74
62
|
deviceId: this.device.id,
|
|
@@ -152,7 +140,7 @@ class BTConnectionHandler {
|
|
|
152
140
|
this.characteristicSubscriptions.push(subscription);
|
|
153
141
|
}
|
|
154
142
|
}
|
|
155
|
-
await this.
|
|
143
|
+
await this.sendCommands(this.callbacks.initialCommands?.() ?? []);
|
|
156
144
|
} catch (error) {
|
|
157
145
|
(0, _sentryLogger.sentryLogger)("error", "DEVICE: Error subscribing to all characteristics", {
|
|
158
146
|
error: error instanceof Error ? error.message : error,
|
|
@@ -161,34 +149,6 @@ class BTConnectionHandler {
|
|
|
161
149
|
this.callbacks.onError?.(error);
|
|
162
150
|
}
|
|
163
151
|
};
|
|
164
|
-
sendCommand = async mainService => {
|
|
165
|
-
if (!mainService.writeUuid) {
|
|
166
|
-
return;
|
|
167
|
-
}
|
|
168
|
-
while (this.retryCount < 3) {
|
|
169
|
-
try {
|
|
170
|
-
const isConnected = await this.device.isConnected();
|
|
171
|
-
if (!isConnected) {
|
|
172
|
-
return;
|
|
173
|
-
}
|
|
174
|
-
const command = (0, _hexToBase.hexToBase64)(mainService.writeUuid.mainCommandUuid);
|
|
175
|
-
await this.device.writeCharacteristicWithResponseForService(mainService.uuid, mainService.writeUuid.uuid, command);
|
|
176
|
-
this.retryCount = 0;
|
|
177
|
-
break;
|
|
178
|
-
} catch (error) {
|
|
179
|
-
this.retryCount++;
|
|
180
|
-
(0, _sentryLogger.sentryLogger)("error", "DEVICE: Error sending command", {
|
|
181
|
-
error: error instanceof Error ? error.message : error,
|
|
182
|
-
deviceName: this.device.name
|
|
183
|
-
});
|
|
184
|
-
if (this.retryCount === 3) {
|
|
185
|
-
(0, _index.slog)(error, "BT_CONNECTION_HANDLER: Error sending command", {
|
|
186
|
-
deviceName: this.device.name
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
};
|
|
192
152
|
}
|
|
193
153
|
exports.BTConnectionHandler = BTConnectionHandler;
|
|
194
154
|
//# sourceMappingURL=bt-connection-handler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_sentryLogger","require","_deviceStatus","_base64ToHex","_btCommandWriter","BTConnectionHandler","characteristicSubscriptions","constructor","device","mainServices","callbacks","preferredMtu","writer","BTCommandWriter","onError","connect","connectWithRetries","requestPreferredMtu","onStatusChanged","DeviceStatus","CONNECTED","discoverAllServicesAndCharacteristics","onDisconnectSubscription","onDisconnected","onDeviceDisconnected","subscribeToAllCharacteristics","error","sentryLogger","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","base64ToHex","onDataReceived","push","initialCommands","exports"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/bt-connection-handler.ts"],"mappings":";;;;;;AAEA,IAAAA,aAAA,GAAAC,OAAA;AAEA,IAAAC,aAAA,GAAAD,OAAA;AAEA,IAAAE,YAAA,GAAAF,OAAA;AAEA,IAAAG,gBAAA,GAAAH,OAAA;AAWO,MAAMI,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,IAAIC,gCAAe,CAACL,MAAM,EAAEE,SAAS,CAACI,OAAO,CAAC;EAC9D;EAEOC,OAAO,GAAG,MAAAA,CAAA,KAAY;IAC3B,IAAI;MACF,MAAM,IAAI,CAACC,kBAAkB,CAAC,CAAC;MAC/B,MAAM,IAAI,CAACC,mBAAmB,CAAC,CAAC;MAEhC,IAAI,CAACP,SAAS,CAACQ,eAAe,GAAGC,0BAAY,CAACC,SAAS,CAAC;MAExD,MAAM,IAAI,CAACZ,MAAM,CAACa,qCAAqC,CAAC,CAAC;MAEzD,IAAI,CAACC,wBAAwB,GAAG,IAAI,CAACd,MAAM,CAACe,cAAc,CACxD,IAAI,CAACC,oBACP,CAAC;MAED,IAAI,CAACC,6BAA6B,CAAC,CAAC;IACtC,CAAC,CAAC,OAAOC,KAAK,EAAE;MACd,IAAAC,0BAAY,EAAC,OAAO,EAAE,wCAAwC,EAAE;QAC9DD,KAAK,EAAEA,KAAK,YAAYE,KAAK,GAAGF,KAAK,CAACG,OAAO,GAAGH,KAAK;QACrDI,UAAU,EAAE,IAAI,CAACtB,MAAM,CAACuB;MAC1B,CAAC,CAA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,IAAI,CAAC5D,SAAS,CAACI,OAAO,GACpB,IAAIc,KAAK,CAAC,iCAAiC,CAC7C,CAAC;cAED;YACF;YAEA,MAAM2C,QAAQ,GAAG,IAAAC,wBAAW,EAACH,MAAM,CAACC,KAAK,CAAC;YAE1C,IAAI,CAAC5D,SAAS,CAAC+D,cAAc,GAAGJ,MAAM,CAACD,IAAI,EAAEG,QAAQ,CAAC;UACxD,CACF,CAAC;UAED,IAAI,CAACjE,2BAA2B,CAACoE,IAAI,CAACR,YAAY,CAAC;QACrD;MACF;MAEA,MAAM,IAAI,CAAC5B,YAAY,CAAC,IAAI,CAAC5B,SAAS,CAACiE,eAAe,GAAG,CAAC,IAAI,EAAE,CAAC;IACnE,CAAC,CAAC,OAAOjD,KAAK,EAAE;MACd,IAAAC,0BAAY,EACV,OAAO,EACP,kDAAkD,EAClD;QACED,KAAK,EAAEA,KAAK,YAAYE,KAAK,GAAGF,KAAK,CAACG,OAAO,GAAGH,KAAK;QACrDI,UAAU,EAAE,IAAI,CAACtB,MAAM,CAACuB;MAC1B,CACF,CAAC;MACD,IAAI,CAACrB,SAAS,CAACI,OAAO,GAAGY,KAAyB,CAAC;IACrD;EACF,CAAC;AAEH;AAACkD,OAAA,CAAAvE,mBAAA,GAAAA,mBAAA","ignoreList":[]}
|
|
@@ -61,14 +61,13 @@ class BTDataProcessor {
|
|
|
61
61
|
* A frame that fails its integrity check is reported and skipped rather than parsed.
|
|
62
62
|
*/
|
|
63
63
|
readFramesFromBuffer = (reader, uuid, buffer) => {
|
|
64
|
-
let hasReadFrame = false;
|
|
65
64
|
while (buffer.length > 0) {
|
|
66
65
|
const result = reader.readFrame(buffer);
|
|
67
66
|
const hasProgressed = result.consumedBytes > 0;
|
|
68
67
|
buffer.splice(0, result.consumedBytes);
|
|
69
68
|
if (result.status === _frameReadStatus.FrameReadStatus.COMPLETE) {
|
|
70
|
-
hasReadFrame = true;
|
|
71
69
|
this.handleFrame(uuid, result.frame);
|
|
70
|
+
this.answerFrame(result.frame);
|
|
72
71
|
continue;
|
|
73
72
|
}
|
|
74
73
|
if (result.status === _frameReadStatus.FrameReadStatus.CORRUPT) {
|
|
@@ -78,9 +77,6 @@ class BTDataProcessor {
|
|
|
78
77
|
break;
|
|
79
78
|
}
|
|
80
79
|
}
|
|
81
|
-
if (hasReadFrame) {
|
|
82
|
-
this.callbacks.onSendCommandToDevice?.();
|
|
83
|
-
}
|
|
84
80
|
};
|
|
85
81
|
|
|
86
82
|
/**
|
|
@@ -92,7 +88,22 @@ class BTDataProcessor {
|
|
|
92
88
|
}
|
|
93
89
|
this.handleFrame(uuid, buffer);
|
|
94
90
|
this.buffers.set(this.currentUuid, []);
|
|
95
|
-
this.
|
|
91
|
+
this.answerFrame(buffer);
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Answers one complete frame with whatever the device's sequencer decides.
|
|
96
|
+
*
|
|
97
|
+
* Every frame is offered, including one that matched no parsing case. An identity reply
|
|
98
|
+
* and a file-transfer chunk carry no measurement, and a sequencer that never saw them
|
|
99
|
+
* could not take the step that follows - the exchange would stop dead on the first frame
|
|
100
|
+
* that was protocol rather than data.
|
|
101
|
+
*/
|
|
102
|
+
answerFrame = frame => {
|
|
103
|
+
const commands = this.callbacks.nextCommand?.(frame);
|
|
104
|
+
if (commands && commands.length > 0) {
|
|
105
|
+
this.callbacks.sendCommands?.(commands);
|
|
106
|
+
}
|
|
96
107
|
};
|
|
97
108
|
handleFrame = (uuid, frame) => {
|
|
98
109
|
const data = this.frameParser.parse(uuid, frame);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_sentryLogger","require","_caseType","_frameReadStatus","_frameParser","_measurementStateMachine","BTDataProcessor","buffers","Map","constructor","device","mainServices","stuckDataTimeoutDuration","callbacks","frameReader","frameParser","FrameParser","measurementState","MeasurementStateMachine","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","require","_caseType","_frameReadStatus","_frameParser","_measurementStateMachine","BTDataProcessor","buffers","Map","constructor","device","mainServices","stuckDataTimeoutDuration","callbacks","frameReader","frameParser","FrameParser","measurementState","MeasurementStateMachine","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","FrameReadStatus","COMPLETE","handleFrame","frame","answerFrame","CORRUPT","reportCorruptFrame","INCOMPLETE","validatePackage","commands","nextCommand","sendCommands","data","parse","sentryLogger","join","dependentData","parsingCase","caseType","CaseType","DEPENDENT","handleDependentResult","advance","onError","Error","cause","message","setTimeout","cancelConnection","exports"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/bt-data-processor.ts"],"mappings":";;;;;;AAGA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAIA,IAAAE,gBAAA,GAAAF,OAAA;AAKA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,wBAAA,GAAAJ,OAAA;AAgCO,MAAMK,eAAe,CAAwB;EAClD;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACUC,OAAO,GAAG,IAAIC,GAAG,CAAmB,CAAC;EAI7CC,WAAWA,CACQC,MAAc,EAC/BC,YAA2C,EAC1BC,wBAAgC,EAChCC,SAAoC,EACpCC,WAAyB,EAC1C;IAAA,KALiBJ,MAAc,GAAdA,MAAc;IAAA,KAEdE,wBAAgC,GAAhCA,wBAAgC;IAAA,KAChCC,SAAoC,GAApCA,SAAoC;IAAA,KACpCC,WAAyB,GAAzBA,WAAyB;IAE1C,IAAI,CAACC,WAAW,GAAG,IAAIC,wBAAW,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QACrDC,KAAK,EAAE;UACLC,OAAO,EAAE;QACX;MACF,CAAC,CACH,CAAC;MACD,IAAI,CAACjE,MAAM,CAACmE,gBAAgB,GAAG,CAAC;IAClC,CAAC,EAAE,IAAI,CAACjE,wBAAwB,CAAC;EACnC,CAAC;AACH;AAACkE,OAAA,CAAAxE,eAAA,GAAAA,eAAA","ignoreList":[]}
|
|
@@ -6,8 +6,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.BTManagedDevice = void 0;
|
|
7
7
|
var _sentryLogger = require("../../../helpers/utils/sentry-logger.js");
|
|
8
8
|
var _deviceStatus = require("../../types/device-status.js");
|
|
9
|
+
var _summariseMeasurementForLog = require("../../utils/summarise-measurement-for-log.js");
|
|
10
|
+
var _supportedMeasurementTypeKeys = require("../../utils/supported-measurement-type-keys.js");
|
|
9
11
|
var _btConnectionHandler = require("./bt-connection-handler.js");
|
|
10
12
|
var _btDataProcessor = require("./bt-data-processor.js");
|
|
13
|
+
var _pollingCommandSequencer = require("./polling-command-sequencer.js");
|
|
11
14
|
class BTManagedDevice {
|
|
12
15
|
/**
|
|
13
16
|
* The timeout in milliseconds for the stuck data.
|
|
@@ -22,6 +25,17 @@ class BTManagedDevice {
|
|
|
22
25
|
* @returns The handled data.
|
|
23
26
|
*/
|
|
24
27
|
|
|
28
|
+
/**
|
|
29
|
+
* Builds the policy that decides what to send this device, and when.
|
|
30
|
+
*
|
|
31
|
+
* A factory rather than an instance, because a sequencer carries the state of the
|
|
32
|
+
* exchange - whether the device has identified itself, how far a file read has got. One
|
|
33
|
+
* shared across connections would resume a conversation the device has forgotten.
|
|
34
|
+
*
|
|
35
|
+
* A device that leaves this undefined polls with the command its services declare, which
|
|
36
|
+
* is what every device did before a policy could be expressed at all.
|
|
37
|
+
*/
|
|
38
|
+
|
|
25
39
|
/**
|
|
26
40
|
* Locates frame boundaries inside the notification buffer.
|
|
27
41
|
*
|
|
@@ -95,10 +109,7 @@ class BTManagedDevice {
|
|
|
95
109
|
...data
|
|
96
110
|
}) => {
|
|
97
111
|
(0, _sentryLogger.sentryLogger)("info", "BT_MANAGER: Calling onResult callback", {
|
|
98
|
-
data:
|
|
99
|
-
...data,
|
|
100
|
-
diagramPoints: "diagramPoints" in data ? data.diagramPoints.length : undefined
|
|
101
|
-
},
|
|
112
|
+
data: (0, _summariseMeasurementForLog.summariseMeasurementForLog)(data),
|
|
102
113
|
deviceData: this.deviceData,
|
|
103
114
|
deviceName: this.deviceData.name
|
|
104
115
|
});
|
|
@@ -122,7 +133,8 @@ class BTManagedDevice {
|
|
|
122
133
|
};
|
|
123
134
|
connect = async () => {
|
|
124
135
|
// To access the abstract property in the constructor, we need to set it here
|
|
125
|
-
this.deviceData.measurementTypes = this.
|
|
136
|
+
this.deviceData.measurementTypes = (0, _supportedMeasurementTypeKeys.supportedMeasurementTypeKeys)(this.mainServices);
|
|
137
|
+
const sequencer = this.createCommandSequencer?.() ?? (0, _pollingCommandSequencer.pollingSequencerFor)(this.mainServices);
|
|
126
138
|
this.connectionHandler = new _btConnectionHandler.BTConnectionHandler(this.device, this.mainServices, {
|
|
127
139
|
onStatusChanged: status => {
|
|
128
140
|
this.onDeviceStatusChanged?.bind(this)(status);
|
|
@@ -134,7 +146,8 @@ class BTManagedDevice {
|
|
|
134
146
|
onError: error => this.onError?.bind(this)(error),
|
|
135
147
|
onDataReceived: (uuid, hexValue) => {
|
|
136
148
|
this.dataProcessor?.processData(uuid, hexValue);
|
|
137
|
-
}
|
|
149
|
+
},
|
|
150
|
+
initialCommands: () => sequencer.initialCommands()
|
|
138
151
|
}, this.preferredMtu);
|
|
139
152
|
this.dataProcessor = new _btDataProcessor.BTDataProcessor(this.device, this.mainServices, this.stuckDataTimeout, {
|
|
140
153
|
onStatusChanged: this.onDeviceStatusChanged?.bind(this),
|
|
@@ -147,19 +160,13 @@ class BTManagedDevice {
|
|
|
147
160
|
this.onError?.bind(this)(error);
|
|
148
161
|
}
|
|
149
162
|
},
|
|
150
|
-
|
|
163
|
+
nextCommand: frame => sequencer.nextCommand(frame),
|
|
164
|
+
sendCommands: commands => void this.connectionHandler?.sendCommands(commands),
|
|
151
165
|
onError: this.onError?.bind(this),
|
|
152
166
|
handleDependentResult: this.handleDependentResult?.bind(this)
|
|
153
167
|
}, this.frameReader);
|
|
154
168
|
await this.connectionHandler.connect();
|
|
155
169
|
};
|
|
156
|
-
getSupportedMeasurementTypeKeys = () => {
|
|
157
|
-
const measurementTypes = this.mainServices.flatMap(service => {
|
|
158
|
-
return service.monitorUuids.flatMap(uuid => uuid.parsingModel.cases.map(c => c.measurementTypeKey) || []);
|
|
159
|
-
}).filter(type => type !== undefined);
|
|
160
|
-
const uniqueMeasurementTypes = [...new Set(measurementTypes.flat())];
|
|
161
|
-
return uniqueMeasurementTypes;
|
|
162
|
-
};
|
|
163
170
|
}
|
|
164
171
|
exports.BTManagedDevice = BTManagedDevice;
|
|
165
172
|
//# sourceMappingURL=bt-managed-device.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_sentryLogger","require","_deviceStatus","_btConnectionHandler","_btDataProcessor","BTManagedDevice","constructor","device","deviceName","onError","onErrorCallback","onDeviceStatusChanged","onDeviceStatusChangedCallback","onResult","onResultCallback","onDeviceDisconnected","onDeviceDisconnectedCallback","sentryLogger","deviceId","id","deviceData","name","localName","manufacturerData","sn","measurementTypes","status","measurementTypeKey","error","Error","message","caseType","_","data","
|
|
1
|
+
{"version":3,"names":["_sentryLogger","require","_deviceStatus","_summariseMeasurementForLog","_supportedMeasurementTypeKeys","_btConnectionHandler","_btDataProcessor","_pollingCommandSequencer","BTManagedDevice","constructor","device","deviceName","onError","onErrorCallback","onDeviceStatusChanged","onDeviceStatusChangedCallback","onResult","onResultCallback","onDeviceDisconnected","onDeviceDisconnectedCallback","sentryLogger","deviceId","id","deviceData","name","localName","manufacturerData","sn","measurementTypes","status","measurementTypeKey","error","Error","message","caseType","_","data","summariseMeasurementForLog","destroy","connectionHandler","dataProcessor","undefined","connect","supportedMeasurementTypeKeys","mainServices","sequencer","createCommandSequencer","pollingSequencerFor","BTConnectionHandler","onStatusChanged","bind","DeviceStatus","DISCONNECTED","onDataReceived","uuid","hexValue","processData","initialCommands","preferredMtu","BTDataProcessor","stuckDataTimeout","onStreamStart","validatePackage","parsedData","collectedValues","handleSuccessResult","nextCommand","frame","sendCommands","commands","handleDependentResult","frameReader","exports"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/bt-managed-device.ts"],"mappings":";;;;;;AAGA,IAAAA,aAAA,GAAAC,OAAA;AAOA,IAAAC,aAAA,GAAAD,OAAA;AAMA,IAAAE,2BAAA,GAAAF,OAAA;AACA,IAAAG,6BAAA,GAAAH,OAAA;AAEA,IAAAI,oBAAA,GAAAJ,OAAA;AACA,IAAAK,gBAAA,GAAAL,OAAA;AACA,IAAAM,wBAAA,GAAAN,OAAA;AAEO,MAAeO,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;IAU9B,IAAAU,0BAAY,EAAC,MAAM,EAAE,sCAAsC,EAAE;MAC3DC,QAAQ,EAAEX,MAAM,CAACY,EAAE;MACnBX,UAAU,EAAEA;IACd,CAAC,CAAC;IACF,IAAI,CAACY,UAAU,GAAG;MAChBD,EAAE,EAAEZ,MAAM,CAACY,EAAE;MACbE,IAAI,EAAEb,UAAU;MAChBc,SAAS,EAAEf,MA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