@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,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { customDeviceError } from "./custom-device-error.js";
|
|
4
|
+
import { normalizeBleUuid } from "./normalize-ble-uuid.js";
|
|
5
|
+
const HEX_BYTE = /^[0-9a-f]{2}$/;
|
|
6
|
+
const MAX_OPCODE = 0xff;
|
|
7
|
+
const MAX_DEVICE_TYPE = 0xffff;
|
|
8
|
+
const assertStartBytes = (id, startBytes) => {
|
|
9
|
+
if (!Array.isArray(startBytes) || startBytes.length === 0) {
|
|
10
|
+
throw customDeviceError(id, "lepu.startBytes", "must list at least one frame start byte, such as [\"a5\"]");
|
|
11
|
+
}
|
|
12
|
+
return startBytes.map((byte, index) => {
|
|
13
|
+
const normalized = String(byte).toLowerCase();
|
|
14
|
+
if (!HEX_BYTE.test(normalized)) {
|
|
15
|
+
throw customDeviceError(id, `lepu.startBytes[${index}]`, `is "${String(byte)}"; it must be exactly two hex digits`);
|
|
16
|
+
}
|
|
17
|
+
return normalized;
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
const assertDeviceTypes = (id, deviceTypes) => {
|
|
21
|
+
if (!Array.isArray(deviceTypes)) {
|
|
22
|
+
throw customDeviceError(id, "lepu.expectedDeviceTypes", "must be an array of the model numbers this declaration was written for");
|
|
23
|
+
}
|
|
24
|
+
return deviceTypes.map((deviceType, index) => {
|
|
25
|
+
if (!Number.isInteger(deviceType) || deviceType < 0 || deviceType > MAX_DEVICE_TYPE) {
|
|
26
|
+
throw customDeviceError(id, `lepu.expectedDeviceTypes[${index}]`, `is ${String(deviceType)}; a model number is a whole number between 0 and ${MAX_DEVICE_TYPE}`);
|
|
27
|
+
}
|
|
28
|
+
return deviceType;
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* The opcode to poll with, once the device has been identified.
|
|
34
|
+
*
|
|
35
|
+
* Identification is the advertised name unless `expectedDeviceTypes` narrows it further.
|
|
36
|
+
* The name is what the vendor's own SDK binds every one of its products on - a 732-line
|
|
37
|
+
* cascade of name checks resolving to 176 models - so requiring more than that to poll at
|
|
38
|
+
* all would hold this SDK to a bar the hardware's own maker does not meet, and would leave
|
|
39
|
+
* every device undeclarable.
|
|
40
|
+
*
|
|
41
|
+
* Naming the models is still the stronger declaration, and is worth doing once the numbers
|
|
42
|
+
* are known: the family's low opcodes act, and a frame built for the wrong product is still
|
|
43
|
+
* well formed, so a name that matched the wrong hardware would not be caught by anything
|
|
44
|
+
* else in the protocol.
|
|
45
|
+
*/
|
|
46
|
+
const assertPollCommand = (id, lepu) => {
|
|
47
|
+
const {
|
|
48
|
+
pollCommand
|
|
49
|
+
} = lepu;
|
|
50
|
+
if (pollCommand === undefined) {
|
|
51
|
+
return undefined;
|
|
52
|
+
}
|
|
53
|
+
if (!Number.isInteger(pollCommand) || pollCommand < 0 || pollCommand > MAX_OPCODE) {
|
|
54
|
+
throw customDeviceError(id, "lepu.pollCommand", `is ${String(pollCommand)}; an opcode is a whole number between 0 and ${MAX_OPCODE}`);
|
|
55
|
+
}
|
|
56
|
+
return pollCommand;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Validates the Lepu declaration and normalises its UUIDs.
|
|
61
|
+
*
|
|
62
|
+
* The write service has to be one the declaration already monitors: a command written to a
|
|
63
|
+
* service the device never opened is accepted by nothing and answered by nothing, which
|
|
64
|
+
* looks exactly like hardware that is simply not responding.
|
|
65
|
+
*/
|
|
66
|
+
export const compileCustomLepu = (id, spec, serviceUuids) => {
|
|
67
|
+
const lepu = spec.lepu;
|
|
68
|
+
if (!lepu) {
|
|
69
|
+
return undefined;
|
|
70
|
+
}
|
|
71
|
+
if (spec.services.some(service => service.write)) {
|
|
72
|
+
throw customDeviceError(id, "services[].write", "cannot be declared alongside lepu, which builds its own commands and addresses them through lepu.write");
|
|
73
|
+
}
|
|
74
|
+
const startBytes = assertStartBytes(id, lepu.startBytes);
|
|
75
|
+
const expectedDeviceTypes = assertDeviceTypes(id, lepu.expectedDeviceTypes);
|
|
76
|
+
const pollCommand = assertPollCommand(id, lepu);
|
|
77
|
+
const serviceUuid = normalizeBleUuid(id, "lepu.write.serviceUuid", lepu.write?.serviceUuid);
|
|
78
|
+
if (!serviceUuids.includes(serviceUuid)) {
|
|
79
|
+
throw customDeviceError(id, "lepu.write.serviceUuid", `is "${serviceUuid}", which this device does not declare among its services`);
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
startBytes,
|
|
83
|
+
expectedDeviceTypes,
|
|
84
|
+
...(pollCommand === undefined ? {} : {
|
|
85
|
+
pollCommand
|
|
86
|
+
}),
|
|
87
|
+
write: {
|
|
88
|
+
serviceUuid,
|
|
89
|
+
characteristicUuid: normalizeBleUuid(id, "lepu.write.characteristicUuid", lepu.write?.characteristicUuid)
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
//# sourceMappingURL=compile-custom-lepu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["customDeviceError","normalizeBleUuid","HEX_BYTE","MAX_OPCODE","MAX_DEVICE_TYPE","assertStartBytes","id","startBytes","Array","isArray","length","map","byte","index","normalized","String","toLowerCase","test","assertDeviceTypes","deviceTypes","deviceType","Number","isInteger","assertPollCommand","lepu","pollCommand","undefined","compileCustomLepu","spec","serviceUuids","services","some","service","write","expectedDeviceTypes","serviceUuid","includes","characteristicUuid"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/custom/compile-custom-lepu.ts"],"mappings":";;AAGA,SAASA,iBAAiB,QAAQ,0BAAuB;AACzD,SAASC,gBAAgB,QAAQ,yBAAsB;AAEvD,MAAMC,QAAQ,GAAG,eAAe;AAChC,MAAMC,UAAU,GAAG,IAAI;AACvB,MAAMC,eAAe,GAAG,MAAM;AAE9B,MAAMC,gBAAgB,GAAGA,CAACC,EAAU,EAAEC,UAAmB,KAAe;EACtE,IAAI,CAACC,KAAK,CAACC,OAAO,CAACF,UAAU,CAAC,IAAIA,UAAU,CAACG,MAAM,KAAK,CAAC,EAAE;IACzD,MAAMV,iBAAiB,CACrBM,EAAE,EACF,iBAAiB,EACjB,2DACF,CAAC;EACH;EAEA,OAAOC,UAAU,CAACI,GAAG,CAAC,CAACC,IAAI,EAAEC,KAAK,KAAK;IACrC,MAAMC,UAAU,GAAGC,MAA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I,kBACd;IACF;EACF,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -2,11 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
import { CUSTOM_DEVICE_BRAND } from "../../constants/custom-device-brand.js";
|
|
4
4
|
import { IntegratedDevices } from "../../types/integrated-devices.js";
|
|
5
|
+
import { compileCustomLepu } from "./compile-custom-lepu.js";
|
|
5
6
|
import { compileCustomMonitor } from "./compile-custom-monitor.js";
|
|
6
7
|
import { customDeviceError } from "./custom-device-error.js";
|
|
7
8
|
import { normalizeBleUuid } from "./normalize-ble-uuid.js";
|
|
8
9
|
const MIN_STUCK_TIMEOUT_MS = 1_000;
|
|
9
10
|
|
|
11
|
+
/** The smallest MTU a BLE link has, and the largest an ATT packet may declare. */
|
|
12
|
+
const MIN_MTU = 23;
|
|
13
|
+
const MAX_MTU = 517;
|
|
14
|
+
|
|
10
15
|
// The SDK's own F4 scale waits this long, because it sleeps while still connected.
|
|
11
16
|
const MAX_STUCK_TIMEOUT_MS = 6_000_000;
|
|
12
17
|
const HEX_BYTES = /^([0-9a-f]{2})+$/;
|
|
@@ -42,6 +47,16 @@ const assertStuckTimeout = (id, spec) => {
|
|
|
42
47
|
}
|
|
43
48
|
return timeout;
|
|
44
49
|
};
|
|
50
|
+
const assertPreferredMtu = (id, spec) => {
|
|
51
|
+
const mtu = spec.preferredMtu;
|
|
52
|
+
if (mtu === undefined) {
|
|
53
|
+
return undefined;
|
|
54
|
+
}
|
|
55
|
+
if (!Number.isInteger(mtu) || mtu < MIN_MTU || mtu > MAX_MTU) {
|
|
56
|
+
throw customDeviceError(id, "preferredMtu", `is ${String(mtu)}; it must be a whole number between ${MIN_MTU} and ${MAX_MTU}`);
|
|
57
|
+
}
|
|
58
|
+
return mtu;
|
|
59
|
+
};
|
|
45
60
|
const compileWrite = (id, path, write) => {
|
|
46
61
|
if (!write) {
|
|
47
62
|
return undefined;
|
|
@@ -68,6 +83,7 @@ export const defineCustomDevice = spec => {
|
|
|
68
83
|
const id = assertIdentity(spec);
|
|
69
84
|
const nameMatch = compileNameMatch(id, spec);
|
|
70
85
|
const stuckDataTimeout = assertStuckTimeout(id, spec);
|
|
86
|
+
const preferredMtu = assertPreferredMtu(id, spec);
|
|
71
87
|
if (!Array.isArray(spec.services) || spec.services.length === 0) {
|
|
72
88
|
throw customDeviceError(id, "services", "must declare at least one service");
|
|
73
89
|
}
|
|
@@ -101,6 +117,7 @@ export const defineCustomDevice = spec => {
|
|
|
101
117
|
writeUuid: compileWrite(id, path, service.write)
|
|
102
118
|
};
|
|
103
119
|
});
|
|
120
|
+
const lepu = compileCustomLepu(id, spec, mainServices.map(service => service.uuid));
|
|
104
121
|
return {
|
|
105
122
|
[CUSTOM_DEVICE_BRAND]: true,
|
|
106
123
|
id: id,
|
|
@@ -109,7 +126,13 @@ export const defineCustomDevice = spec => {
|
|
|
109
126
|
mainServices,
|
|
110
127
|
stuckDataTimeout,
|
|
111
128
|
fields,
|
|
112
|
-
frames
|
|
129
|
+
frames,
|
|
130
|
+
...(preferredMtu === undefined ? {} : {
|
|
131
|
+
preferredMtu
|
|
132
|
+
}),
|
|
133
|
+
...(lepu === undefined ? {} : {
|
|
134
|
+
lepu
|
|
135
|
+
})
|
|
113
136
|
};
|
|
114
137
|
};
|
|
115
138
|
//# sourceMappingURL=define-custom-device.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CUSTOM_DEVICE_BRAND","IntegratedDevices","compileCustomMonitor","customDeviceError","normalizeBleUuid","MIN_STUCK_TIMEOUT_MS","MAX_STUCK_TIMEOUT_MS","HEX_BYTES","assertIdentity","spec","id","trim","String","builtIn","Object","values","find","name","toLowerCase","compileNameMatch","nameMatch","RegExp","global","sticky","exact","replace","assertStuckTimeout","timeout","stuckDataTimeoutMs","Number","isInteger","
|
|
1
|
+
{"version":3,"names":["CUSTOM_DEVICE_BRAND","IntegratedDevices","compileCustomLepu","compileCustomMonitor","customDeviceError","normalizeBleUuid","MIN_STUCK_TIMEOUT_MS","MIN_MTU","MAX_MTU","MAX_STUCK_TIMEOUT_MS","HEX_BYTES","assertIdentity","spec","id","trim","String","builtIn","Object","values","find","name","toLowerCase","compileNameMatch","nameMatch","RegExp","global","sticky","exact","replace","assertStuckTimeout","timeout","stuckDataTimeoutMs","Number","isInteger","assertPreferredMtu","mtu","preferredMtu","undefined","compileWrite","path","write","commandHex","test","uuid","mainCommandUuid","defineCustomDevice","stuckDataTimeout","Array","isArray","services","length","fields","Map","frames","seenCharacteristics","Set","mainServices","map","service","serviceIndex","monitor","monitorUuids","monitorIndex","monitorPath","characteristic","frame","has","add","set","writeUuid","lepu"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/custom/define-custom-device.ts"],"mappings":";;AAAA,SAASA,mBAAmB,QAAQ,wCAAqC;AAMzE,SAASC,iBAAiB,QAAQ,mCAAgC;AAGlE,SAASC,iBAAiB,QAAQ,0BAAuB;AACzD,SAASC,oBAAoB,QAAQ,6BAA0B;AAC/D,SAASC,iBAAiB,QAAQ,0BAAuB;AACzD,SAASC,gBAAgB,QAAQ,yBAAsB;AAEvD,MAAMC,oBAAoB,GAAG,KAAK;;AAElC;AACA,MAAMC,OAAO,GAAG,EAAE;AAClB,MAAMC,OAAO,GAAG,GAAG;;AAEnB;AACA,MAAMC,oBAAoB,GAAG,SAAS;AACtC,MAAMC,SAAS,GAAG,kBAAkB;AAEpC,MAAMC,cAAc,GAAIC,IAAsB,IAAa;EACzD,MAAMC,EAAE,GAAG,OAAOD,IAAI,EAAEC,EAAE,KAAK,QAAQ,GAAGD,IAAI,CAACC,EAAE,CAACC,IAAI,CAAC,CAAC,GAAG,EAAE;EAE7D,IAAI,CAACD,EAAE,EAAE;IACP,MAAMT,iBAAiB,CAACW,MAAM,CAACH,IAAI,EAAEC,EAAE,CAAC,EAAE,IAAI,EAAE,mBAAmB,CAAC;EACtE;EAEA,MAAMG,OAAO,GAAGC,MAAM,CAACC,MAAM,CAACjB,iBAAiB,CAAC,CAACkB,IAA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C;MAAM,CAAC,GAAG9D,oBAAoB,CACpDU,EAAE,EACFkD,WAAW,EACXH,OAAO,EACPT,MACF,CAAC;MAED,IAAIG,mBAAmB,CAACY,GAAG,CAACF,cAAc,CAACrB,IAAI,CAAC,EAAE;QAChD,MAAMvC,iBAAiB,CACrBS,EAAE,EACF,GAAGkD,WAAW,OAAO,EACrB,0DACF,CAAC;MACH;MAEAT,mBAAmB,CAACa,GAAG,CAACH,cAAc,CAACrB,IAAI,CAAC;MAC5CU,MAAM,CAACe,GAAG,CAACJ,cAAc,CAACrB,IAAI,EAAEsB,KAAK,CAAC;MAEtC,OAAOD,cAAc;IACvB,CAAC,CAAC;IAEF,OAAO;MACLrB,IAAI,EAAEtC,gBAAgB,CAACQ,EAAE,EAAE,GAAG0B,IAAI,OAAO,EAAEmB,OAAO,CAACf,IAAI,CAAC;MACxDkB,YAAY;MACZQ,SAAS,EAAE/B,YAAY,CAACzB,EAAE,EAAE0B,IAAI,EAAEmB,OAAO,CAAClB,KAAK;IACjD,CAAC;EACH,CAAC,CAAC;EAEF,MAAM8B,IAAI,GAAGpE,iBAAiB,CAC5BW,EAAE,EACFD,IAAI,EACJ4C,YAAY,CAACC,GAAG,CAAEC,OAAO,IAAKA,OAAO,CAACf,IAAI,CAC5C,CAAC;EAED,OAAO;IACL,CAAC3C,mBAAmB,GAAG,IAAI;IAC3Ba,EAAE,EAAEA,EAAoB;IACxBD,IAAI;IACJW,SAAS;IACTiC,YAAY;IACZV,gBAAgB;IAChBK,MAAM;IACNE,MAAM;IACN,IAAIjB,YAAY,KAAKC,SAAS,GAAG,CAAC,CAAC,GAAG;MAAED;IAAa,CAAC,CAAC;IACvD,IAAIkC,IAAI,KAAKjC,SAAS,GAAG,CAAC,CAAC,GAAG;MAAEiC;IAAK,CAAC;EACxC,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -8,6 +8,24 @@ import { BP2Device } from "./devices/bp2/bp2.device.js";
|
|
|
8
8
|
import { CustomDevice } from "./devices/custom/custom.device.js";
|
|
9
9
|
import { F4Device } from "./devices/f4/f4.device.js";
|
|
10
10
|
import { SPO2Device } from "./devices/spo/spo2.device.js";
|
|
11
|
+
import { VerovalDuoControlDevice } from "./devices/veroval/veroval.duo-control-device.js";
|
|
12
|
+
import { VerovalEcgDevice } from "./devices/veroval/veroval.ecg-device.js";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The built-in names the SDK can actually build.
|
|
16
|
+
*
|
|
17
|
+
* `integratedDevicesMap` matches more names than this, on purpose: matching is what names a
|
|
18
|
+
* device in a scan result and a device list, which is useful for hardware the SDK cannot
|
|
19
|
+
* yet decode. Connecting to one of those is what fails, and it fails saying so.
|
|
20
|
+
*/
|
|
21
|
+
const DEVICE_CLASSES = {
|
|
22
|
+
[IntegratedDevices.BP2]: BP2Device,
|
|
23
|
+
[IntegratedDevices.F4]: F4Device,
|
|
24
|
+
[IntegratedDevices.PC60WF]: SPO2Device,
|
|
25
|
+
[IntegratedDevices.BC01]: BC01Device,
|
|
26
|
+
[IntegratedDevices.VEROVAL_DUO_CONTROL]: VerovalDuoControlDevice,
|
|
27
|
+
[IntegratedDevices.VEROVAL_ECG]: VerovalEcgDevice
|
|
28
|
+
};
|
|
11
29
|
const collectCustomDevices = acceptedDevices => {
|
|
12
30
|
const customDevices = new Map();
|
|
13
31
|
const matchers = new Set();
|
|
@@ -67,15 +85,9 @@ export class DeviceCreator {
|
|
|
67
85
|
// @ts-expect-error - the caller asked for this custom device by its own id
|
|
68
86
|
return new CustomDevice(params.device, params, custom);
|
|
69
87
|
}
|
|
70
|
-
const
|
|
71
|
-
[IntegratedDevices.BP2]: BP2Device,
|
|
72
|
-
[IntegratedDevices.F4]: F4Device,
|
|
73
|
-
[IntegratedDevices.PC60WF]: SPO2Device,
|
|
74
|
-
[IntegratedDevices.BC01]: BC01Device
|
|
75
|
-
};
|
|
76
|
-
const deviceClass = deviceMap[params.deviceName];
|
|
88
|
+
const deviceClass = DEVICE_CLASSES[params.deviceName];
|
|
77
89
|
if (!deviceClass) {
|
|
78
|
-
throw new Error(`
|
|
90
|
+
throw new Error(`"${params.deviceName}" is a name the SDK matches during a scan but has no decoder for, so "${params.device.name}" cannot be connected. The names it can decode are ${Object.keys(DEVICE_CLASSES).join(", ")}; anything else needs a declaration registered with defineCustomDevice and passed in acceptedDevices.`);
|
|
79
91
|
}
|
|
80
92
|
|
|
81
93
|
// @ts-expect-error - This is a workaround to allow the deviceClass to be instantiated with the correct type
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["integratedDevicesMap","IntegratedDevices","isCustomDeviceDefinition","BC01Device","BP2Device","CustomDevice","F4Device","SPO2Device","collectCustomDevices","acceptedDevices","customDevices","Map","matchers","Set","forEach","entry","index","Error","has","id","nameMatch","source","set","add","DeviceCreator","deviceNameCache","CACHE_MAX_SIZE","constructor","acceptedDeviceNames","getDeviceName","foundName","undefined","get","matched","matchDeviceName","cacheDeviceName","createDevice","params","String","deviceName","trim","device","name","custom","
|
|
1
|
+
{"version":3,"names":["integratedDevicesMap","IntegratedDevices","isCustomDeviceDefinition","BC01Device","BP2Device","CustomDevice","F4Device","SPO2Device","VerovalDuoControlDevice","VerovalEcgDevice","DEVICE_CLASSES","BP2","F4","PC60WF","BC01","VEROVAL_DUO_CONTROL","VEROVAL_ECG","collectCustomDevices","acceptedDevices","customDevices","Map","matchers","Set","forEach","entry","index","Error","has","id","nameMatch","source","set","add","DeviceCreator","deviceNameCache","CACHE_MAX_SIZE","constructor","acceptedDeviceNames","getDeviceName","foundName","undefined","get","matched","matchDeviceName","cacheDeviceName","createDevice","params","String","deviceName","trim","device","name","custom","deviceClass","Object","keys","join","destroy","clear","regex","deviceType","test","some","values","size","firstKey","next","value","delete"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/services/device-creator.ts"],"mappings":";;AAAA,SAASA,oBAAoB,QAAQ,wCAAqC;AAM1E,SAASC,iBAAiB,QAAQ,gCAA6B;AAC/D,SAASC,wBAAwB,QAAQ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I,CAACjC,aAAa,CAAC4C,MAAM,CAAC,CAAC,EAAE;MAChD,IAAIX,MAAM,CAACvB,SAAS,CAACgC,IAAI,CAACb,UAAU,CAAC,EAAE;QACrC,OAAOI,MAAM,CAACxB,EAAE;MAClB;IACF;IAEA,OAAOY,SAAS;EAClB,CAAC;EAEOI,eAAeA,CACrBI,UAAkB,EAClBY,UAA4B,EACtB;IACN;IACA,IAAI,IAAI,CAAC1B,eAAe,CAAC8B,IAAI,IAAI,IAAI,CAAC7B,cAAc,EAAE;MACpD,MAAM8B,QAAQ,GAAG,IAAI,CAAC/B,eAAe,CAACqB,IAAI,CAAC,CAAC,CAACW,IAAI,CAAC,CAAC,CAACC,KAAK;MAEzD,IAAIF,QAAQ,KAAKzB,SAAS,EAAE;QAC1B,IAAI,CAACN,eAAe,CAACkC,MAAM,CAACH,QAAQ,CAAC;MACvC;IACF;IAEA,IAAI,CAAC/B,eAAe,CAACH,GAAG,CAACiB,UAAU,EAAEY,UAAU,CAAC;EAClD;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { MeasurementTypeKey } from "@ovok/core";
|
|
4
|
+
import { defineCustomDevice } from "../../custom/define-custom-device.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Declarations for the AOJ Medical thermometers.
|
|
8
|
+
*
|
|
9
|
+
* Their frame is `aa | 01 | cmd | len | payload | xor`, where the checksum covers everything
|
|
10
|
+
* from the device-type byte up to itself. It is not the Lepu framing, despite both being
|
|
11
|
+
* reachable from the same vendor app: no complement byte, no sequence number, a one-byte
|
|
12
|
+
* length and an exclusive-or rather than a CRC.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/** Every frame opens with these two: a fixed start byte and a fixed device type. */
|
|
16
|
+
const FRAME_HEADER = ["aa", "01"];
|
|
17
|
+
const COMMAND_BYTE = 2;
|
|
18
|
+
|
|
19
|
+
/** Header, a three-byte payload and the checksum. */
|
|
20
|
+
const FRAME_BYTES = 8;
|
|
21
|
+
const CHECKSUM_INDEX = 7;
|
|
22
|
+
|
|
23
|
+
/** The checksum starts after the start byte, which it does not cover. */
|
|
24
|
+
const CHECKSUM_FROM = 1;
|
|
25
|
+
const PAYLOAD = 4;
|
|
26
|
+
|
|
27
|
+
/** The device answers a realtime-temperature request with this. */
|
|
28
|
+
const TEMPERATURE_REPLY = "c1";
|
|
29
|
+
|
|
30
|
+
/** Hundredths of a degree, big-endian - the one field in this family that is not little. */
|
|
31
|
+
const TEMPERATURE_SCALE = 0.01;
|
|
32
|
+
const TEMPERATURE_DECIMALS = 2;
|
|
33
|
+
const SPOT_CHECK_TIMEOUT_MS = 60_000;
|
|
34
|
+
/**
|
|
35
|
+
* The AOJ-20A infrared thermometer.
|
|
36
|
+
*
|
|
37
|
+
* Declared without a write characteristic, because the device sends its reading rather than
|
|
38
|
+
* waiting to be asked: the vendor app has a request for it, calls it from nowhere, and still
|
|
39
|
+
* displays temperatures - so the reply arrives when someone takes a measurement. Not writing
|
|
40
|
+
* also means not polling, which for a spot-check device would otherwise re-report the same
|
|
41
|
+
* reading for as long as the link stayed up.
|
|
42
|
+
*
|
|
43
|
+
* Only the realtime reply is declared. The stored-history reply shares the header and would
|
|
44
|
+
* need its own case; nothing reads history yet, and a case that decoded it into the same
|
|
45
|
+
* measurement would post old readings as though they had just been taken.
|
|
46
|
+
*/
|
|
47
|
+
export const aoj20aThermometer = params => defineCustomDevice({
|
|
48
|
+
id: params.id,
|
|
49
|
+
nameMatch: params.nameMatch,
|
|
50
|
+
stuckDataTimeoutMs: params.stuckDataTimeoutMs ?? SPOT_CHECK_TIMEOUT_MS,
|
|
51
|
+
services: [{
|
|
52
|
+
uuid: "ffe0",
|
|
53
|
+
monitor: [{
|
|
54
|
+
uuid: "ffe1",
|
|
55
|
+
frame: {
|
|
56
|
+
header: FRAME_HEADER,
|
|
57
|
+
minLengthBytes: FRAME_BYTES,
|
|
58
|
+
checksum: {
|
|
59
|
+
algorithm: "xor",
|
|
60
|
+
index: CHECKSUM_INDEX,
|
|
61
|
+
from: CHECKSUM_FROM
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
caseSelectorBytes: [COMMAND_BYTE],
|
|
65
|
+
cases: [{
|
|
66
|
+
selector: TEMPERATURE_REPLY,
|
|
67
|
+
kind: "result",
|
|
68
|
+
measurementTypeKey: MeasurementTypeKey.temperature,
|
|
69
|
+
fields: [{
|
|
70
|
+
name: "bodyTemp",
|
|
71
|
+
byteIndexes: [PAYLOAD, PAYLOAD + 1],
|
|
72
|
+
byteOrder: "big",
|
|
73
|
+
unit: "Cel",
|
|
74
|
+
scale: TEMPERATURE_SCALE,
|
|
75
|
+
decimals: TEMPERATURE_DECIMALS
|
|
76
|
+
}]
|
|
77
|
+
}]
|
|
78
|
+
}]
|
|
79
|
+
}]
|
|
80
|
+
});
|
|
81
|
+
//# sourceMappingURL=aoj.thermometers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["MeasurementTypeKey","defineCustomDevice","FRAME_HEADER","COMMAND_BYTE","FRAME_BYTES","CHECKSUM_INDEX","CHECKSUM_FROM","PAYLOAD","TEMPERATURE_REPLY","TEMPERATURE_SCALE","TEMPERATURE_DECIMALS","SPOT_CHECK_TIMEOUT_MS","aoj20aThermometer","params","id","nameMatch","stuckDataTimeoutMs","services","uuid","monitor","frame","header","minLengthBytes","checksum","algorithm","index","from","caseSelectorBytes","cases","selector","kind","measurementTypeKey","temperature","fields","name","byteIndexes","byteOrder","unit","scale","decimals"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/aoj/aoj.thermometers.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,YAAY;AAG/C,SAASC,kBAAkB,QAAQ,sCAAmC;;AAEtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAMC,YAAY,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC;AAEjC,MA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AQ,EAAE7B;QACZ,CAAC;MAEL,CAAC;IAEL,CAAC;EAEL,CAAC;AAEL,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,84 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { calculateCrc8 } from "../../../utils/calculate-crc-8.js";
|
|
5
|
-
import { hexToByte } from "../../../utils/hex-to-byte.js";
|
|
6
|
-
import { le16FromHex } from "../../../utils/le-16-from-hex.js";
|
|
7
|
-
const FRAME_START_BYTE = "a5";
|
|
8
|
-
const COMMAND_INDEX = 1;
|
|
9
|
-
const COMMAND_COMPLEMENT_INDEX = 2;
|
|
10
|
-
const PAYLOAD_LENGTH_INDEX = 5;
|
|
11
|
-
const HEADER_BYTES = 7;
|
|
12
|
-
const CHECKSUM_BYTES = 1;
|
|
13
|
-
const BYTE_MASK = 0xff;
|
|
3
|
+
import { LepuFrameReader } from "../lepu/lepu.frame-reader.js";
|
|
14
4
|
|
|
15
|
-
/**
|
|
16
|
-
const
|
|
17
|
-
const isFrameStart = (buffer, index) => {
|
|
18
|
-
if ((buffer[index] || "").toLowerCase() !== FRAME_START_BYTE) {
|
|
19
|
-
return false;
|
|
20
|
-
}
|
|
21
|
-
const command = hexToByte(buffer[index + COMMAND_INDEX] || "0");
|
|
22
|
-
const complement = hexToByte(buffer[index + COMMAND_COMPLEMENT_INDEX] || "0");
|
|
23
|
-
return command === (~complement & BYTE_MASK);
|
|
24
|
-
};
|
|
25
|
-
const findFrameStart = buffer => {
|
|
26
|
-
const lastCandidate = buffer.length - START_PATTERN_BYTES;
|
|
27
|
-
for (let index = 0; index <= lastCandidate; index++) {
|
|
28
|
-
if (isFrameStart(buffer, index)) {
|
|
29
|
-
return index;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
return -1;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Bytes that cannot begin a frame start, and are therefore safe to drop when no start
|
|
37
|
-
* was found. The trailing bytes are kept because a start pattern may still be arriving.
|
|
38
|
-
*/
|
|
39
|
-
const droppableLeadingBytes = buffer => Math.max(0, buffer.length - (START_PATTERN_BYTES - 1));
|
|
5
|
+
/** The start byte the BP2 and most of its family use. */
|
|
6
|
+
const BP2_START_BYTES = ["a5"];
|
|
40
7
|
|
|
41
8
|
/**
|
|
42
9
|
* Reads Lepu protocol frames as used by the BP2.
|
|
43
10
|
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
* the search for a start; the checksum is what actually decides a frame is trustworthy.
|
|
11
|
+
* The frame itself is shared across the family, so it lives in `LepuFrameReader`; the only
|
|
12
|
+
* thing that makes it a BP2 is which start byte it accepts.
|
|
47
13
|
*/
|
|
48
|
-
export class BP2FrameReader {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
if (start === -1) {
|
|
52
|
-
return {
|
|
53
|
-
status: FrameReadStatus.INCOMPLETE,
|
|
54
|
-
consumedBytes: droppableLeadingBytes(buffer)
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
const payloadLength = le16FromHex(buffer, start + PAYLOAD_LENGTH_INDEX);
|
|
58
|
-
const frameLength = HEADER_BYTES + payloadLength + CHECKSUM_BYTES;
|
|
59
|
-
if (start + frameLength > buffer.length) {
|
|
60
|
-
return {
|
|
61
|
-
status: FrameReadStatus.INCOMPLETE,
|
|
62
|
-
consumedBytes: start
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
const frame = buffer.slice(start, start + frameLength);
|
|
66
|
-
if (!this.hasValidChecksum(frame)) {
|
|
67
|
-
return {
|
|
68
|
-
status: FrameReadStatus.CORRUPT,
|
|
69
|
-
consumedBytes: start + START_PATTERN_BYTES
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
return {
|
|
73
|
-
status: FrameReadStatus.COMPLETE,
|
|
74
|
-
consumedBytes: start + frameLength,
|
|
75
|
-
frame
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
hasValidChecksum(frame) {
|
|
79
|
-
const checksummedBytes = frame.length - CHECKSUM_BYTES;
|
|
80
|
-
const declared = hexToByte(frame[checksummedBytes] || "0");
|
|
81
|
-
return declared === calculateCrc8(frame, checksummedBytes);
|
|
14
|
+
export class BP2FrameReader extends LepuFrameReader {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(BP2_START_BYTES);
|
|
82
17
|
}
|
|
83
18
|
}
|
|
84
19
|
//# sourceMappingURL=bp2.frame-reader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["LepuFrameReader","BP2_START_BYTES","BP2FrameReader","constructor"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/bp2/bp2.frame-reader.ts"],"mappings":";;AAAA,SAASA,eAAe,QAAQ,8BAA2B;;AAE3D;AACA,MAAMC,eAAe,GAAG,CAAC,IAAI,CAAC;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,cAAc,SAASF,eAAe,CAAC;EAC3CG,WAAWA,CAAA,EAAG;IACnB,KAAK,CAACF,eAAe,CAAC;EACxB;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { slog } from "../../../helpers/utils/s-log.js";
|
|
4
|
+
import { sentryLogger } from "../../../helpers/utils/sentry-logger.js";
|
|
5
|
+
import { hexToBase64 } from "../../utils/hex-to-base-64.js";
|
|
6
|
+
const MAX_WRITE_ATTEMPTS = 3;
|
|
7
|
+
|
|
8
|
+
/** The MTU every BLE link starts at, before either side asks for more. */
|
|
9
|
+
const DEFAULT_ATT_MTU = 23;
|
|
10
|
+
|
|
11
|
+
/** An ATT write spends three bytes on its own header. */
|
|
12
|
+
const ATT_WRITE_HEADER_BYTES = 3;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The write channel to a connected device.
|
|
16
|
+
*
|
|
17
|
+
* These protocols allow one command outstanding at a time, and the reply to it is what
|
|
18
|
+
* decides the next one, so writes are serialised rather than merely guarded against
|
|
19
|
+
* re-entry. Refusing a command while another is in flight stalls a self-clocking exchange
|
|
20
|
+
* permanently: the refused command is the one that would have provoked the next reply, and
|
|
21
|
+
* nothing retries it.
|
|
22
|
+
*/
|
|
23
|
+
export class BTCommandWriter {
|
|
24
|
+
pendingWrites = Promise.resolve();
|
|
25
|
+
mtu = DEFAULT_ATT_MTU;
|
|
26
|
+
constructor(device, onError) {
|
|
27
|
+
this.device = device;
|
|
28
|
+
this.onError = onError;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Records what the link actually negotiated.
|
|
33
|
+
*
|
|
34
|
+
* The floor stands until something says otherwise, because a link that has not
|
|
35
|
+
* negotiated is at the minimum, and over-estimating truncates while under-estimating
|
|
36
|
+
* only costs a second packet.
|
|
37
|
+
*/
|
|
38
|
+
useNegotiatedMtu = mtu => {
|
|
39
|
+
if (typeof mtu === "number" && Number.isInteger(mtu) && mtu > this.mtu) {
|
|
40
|
+
this.mtu = mtu;
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/** Drops anything still queued, for a link that is going away. */
|
|
45
|
+
reset = () => {
|
|
46
|
+
this.pendingWrites = Promise.resolve();
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Queues commands behind whatever is already being written.
|
|
51
|
+
*
|
|
52
|
+
* The returned promise settles when the last of them has been written and never rejects.
|
|
53
|
+
* A write that fails is retried and reported where it happens; the catch here is a
|
|
54
|
+
* backstop, so that anything that gets past that still cannot poison the queue and
|
|
55
|
+
* silence every command after it.
|
|
56
|
+
*/
|
|
57
|
+
send = commands => {
|
|
58
|
+
this.pendingWrites = this.pendingWrites.then(() => this.writeInOrder(commands)).catch(error => {
|
|
59
|
+
this.onError?.(error);
|
|
60
|
+
});
|
|
61
|
+
return this.pendingWrites;
|
|
62
|
+
};
|
|
63
|
+
writeInOrder = async commands => {
|
|
64
|
+
for (const command of commands) {
|
|
65
|
+
await this.writeCommand(command);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Writes one command, split to fit the link.
|
|
71
|
+
*
|
|
72
|
+
* A write longer than the negotiated MTU is truncated by the stack rather than refused,
|
|
73
|
+
* so an oversized command arrives as a shorter one whose header still looks valid. The
|
|
74
|
+
* Er2 negotiates the 23-byte minimum where the rest of the family grants 247, which is
|
|
75
|
+
* enough to cut a 28-byte file-read request in half.
|
|
76
|
+
*
|
|
77
|
+
* A chunk that cannot be written abandons the rest of the command. The device reassembles
|
|
78
|
+
* by arrival, so continuing past a gap would hand it a frame that is not the one asked
|
|
79
|
+
* for - worse than sending nothing, because it would be answered.
|
|
80
|
+
*/
|
|
81
|
+
writeCommand = async command => {
|
|
82
|
+
for (const chunk of this.chunksOf(command.frame)) {
|
|
83
|
+
const written = await this.writeChunk(command, chunk);
|
|
84
|
+
if (!written) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Writes one chunk the way the characteristic accepts writes.
|
|
92
|
+
*
|
|
93
|
+
* A with-response write to a characteristic that only supports write-without-response
|
|
94
|
+
* fails outright, so the command says which it is rather than the transport guessing.
|
|
95
|
+
*/
|
|
96
|
+
writeTo = async (command, value) => {
|
|
97
|
+
if (command.withoutResponse) {
|
|
98
|
+
await this.device.writeCharacteristicWithoutResponseForService(command.serviceUuid, command.characteristicUuid, value);
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
await this.device.writeCharacteristicWithResponseForService(command.serviceUuid, command.characteristicUuid, value);
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Splits a frame into writes the link will carry whole.
|
|
106
|
+
*
|
|
107
|
+
* A frame that already fits yields one chunk, so the common command - a poll of a handful
|
|
108
|
+
* of bytes - is written exactly as it was before there was any splitting at all.
|
|
109
|
+
*/
|
|
110
|
+
chunksOf = frame => {
|
|
111
|
+
const size = Math.max(1, this.mtu - ATT_WRITE_HEADER_BYTES);
|
|
112
|
+
const chunks = [];
|
|
113
|
+
for (let start = 0; start < frame.length; start += size) {
|
|
114
|
+
chunks.push(frame.slice(start, start + size));
|
|
115
|
+
}
|
|
116
|
+
return chunks;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Writes one chunk, retrying a failed write.
|
|
121
|
+
*
|
|
122
|
+
* The attempt count is local rather than an instance field, so a write that exhausted its
|
|
123
|
+
* retries cannot leave the next one with none left - which is what a shared counter did
|
|
124
|
+
* on any path that failed to reset it.
|
|
125
|
+
*/
|
|
126
|
+
writeChunk = async (command, chunk) => {
|
|
127
|
+
for (let attempt = 1; attempt <= MAX_WRITE_ATTEMPTS; attempt++) {
|
|
128
|
+
try {
|
|
129
|
+
const isConnected = await this.device.isConnected();
|
|
130
|
+
if (!isConnected) {
|
|
131
|
+
return false;
|
|
132
|
+
}
|
|
133
|
+
await this.writeTo(command, hexToBase64(chunk.join("")));
|
|
134
|
+
return true;
|
|
135
|
+
} catch (error) {
|
|
136
|
+
sentryLogger("error", "DEVICE: Error sending command", {
|
|
137
|
+
error: error instanceof Error ? error.message : error,
|
|
138
|
+
deviceName: this.device.name
|
|
139
|
+
});
|
|
140
|
+
if (attempt === MAX_WRITE_ATTEMPTS) {
|
|
141
|
+
slog(error, "BT_CONNECTION_HANDLER: Error sending command", {
|
|
142
|
+
deviceName: this.device.name
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
return false;
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
//# sourceMappingURL=bt-command-writer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["slog","sentryLogger","hexToBase64","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","join","Error","message","deviceName","name"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/bt-command-writer.ts"],"mappings":";;AAEA,SAASA,IAAI,QAAQ,iCAA8B;AACnD,SAASC,YAAY,QAAQ,yCAAsC;AAEnE,SAASC,WAAW,QAAQ,+BAA4B;AAExD,MAAMC,kBAAkB,GAAG,CAAC;;AAE5B;AACA,MAAMC,eAAe,GAAG,EAAE;;AAE1B;AACA,MAAMC,sBAAsB,GAAG,CAAC;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,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,OAAO,CAAC,CAAC;EACxC,CAAC;;EAED;AACF;AACA;AACA;AACA;AACA;AACA;AACA;E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