@ovok/native 1.16.1-rc.6 → 1.16.1-rc.7
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-management/components/bt-provider-child-wrapper.js +19 -7
- package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/runtime-context.js.map +1 -1
- package/lib/commonjs/modules/bt-management/index.js +12 -0
- package/lib/commonjs/modules/bt-management/index.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/bt-manager.js +27 -1
- package/lib/commonjs/modules/bt-management/services/bt-manager.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/custom/compile-custom-lepu.js +39 -0
- package/lib/commonjs/modules/bt-management/services/custom/compile-custom-lepu.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.device.js +36 -10
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.frame-reader.js +2 -2
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.frame-reader.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js +69 -25
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-command-writer.js +30 -2
- package/lib/commonjs/modules/bt-management/services/devices/bt-command-writer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-data-processor.js +1 -1
- 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 +48 -3
- 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 +6 -2
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js +113 -24
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.advertisement.js +19 -2
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.advertisement.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.connect-retry.js +32 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.connect-retry.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.delivered-files.js +73 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.delivered-files.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.js +130 -30
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.js +103 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-transfer.js +20 -14
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.frame-reader.js +4 -2
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.frame-reader.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.identity-gate.js +94 -10
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.identity-gate.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.js +75 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.js +113 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.pulse-wave.js +67 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.pulse-wave.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.recorder.js +55 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.recorder.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.recording-watch.js +57 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.recording-watch.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.session.js +49 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.session.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.stored-files.js +46 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.stored-files.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.transports.js +10 -4
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.transports.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.waveform.js +27 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.waveform.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js +0 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-files.js +3 -5
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-files.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js +17 -8
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.js +47 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.oximeters.js +58 -32
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.oximeters.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/series-recorder.js +27 -5
- package/lib/commonjs/modules/bt-management/services/series-recorder.js.map +1 -1
- package/lib/commonjs/modules/bt-management/types/device-waveform.js +6 -0
- package/lib/commonjs/modules/bt-management/types/device-waveform.js.map +1 -0
- package/lib/commonjs/modules/bt-management/utils/i-16-from-hex.js.map +1 -1
- package/lib/commonjs/modules/bt-management/utils/le-32-from-hex.js.map +1 -1
- package/lib/commonjs/modules/data-sync/components/apple/apple-health-authorization-provider.js +15 -8
- package/lib/commonjs/modules/data-sync/components/apple/apple-health-authorization-provider.js.map +1 -1
- package/lib/commonjs/modules/data-sync/components/apple/apple-health-authorization-utils.js +1 -1
- package/lib/commonjs/modules/data-sync/components/apple/apple-health-authorization-utils.js.map +1 -1
- package/lib/commonjs/modules/data-sync/constants.js +4 -1
- package/lib/commonjs/modules/data-sync/constants.js.map +1 -1
- package/lib/commonjs/modules/data-sync/hooks/use-listen-changes.js +6 -9
- package/lib/commonjs/modules/data-sync/hooks/use-listen-changes.js.map +1 -1
- package/lib/commonjs/modules/data-sync/services/managers/data-processor.js +1 -0
- package/lib/commonjs/modules/data-sync/services/managers/data-processor.js.map +1 -1
- package/lib/commonjs/modules/data-sync/types/health-sync-keys.js +13 -0
- package/lib/commonjs/modules/data-sync/types/health-sync-keys.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/convert-ecg-samples-to-observation.js +47 -0
- package/lib/commonjs/modules/data-sync/utils/convert-ecg-samples-to-observation.js.map +1 -0
- package/lib/commonjs/modules/data-sync/utils/convert-generic-health-data.js +6 -3
- package/lib/commonjs/modules/data-sync/utils/convert-generic-health-data.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/convert-samples-to-observation.js +7 -15
- package/lib/commonjs/modules/data-sync/utils/convert-samples-to-observation.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/default-health-coding.js +25 -4
- package/lib/commonjs/modules/data-sync/utils/default-health-coding.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/get-records-from-health-connect.js +20 -4
- package/lib/commonjs/modules/data-sync/utils/get-records-from-health-connect.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/get-samples-from-health.js +43 -86
- package/lib/commonjs/modules/data-sync/utils/get-samples-from-health.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/get-total-samples-count.js +6 -5
- package/lib/commonjs/modules/data-sync/utils/get-total-samples-count.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/health-data-catalog.js +15 -15
- package/lib/commonjs/modules/data-sync/utils/health-data-catalog.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/health-units.js +6 -1
- package/lib/commonjs/modules/data-sync/utils/health-units.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/healthkit-daily-statistics.js +64 -0
- package/lib/commonjs/modules/data-sync/utils/healthkit-daily-statistics.js.map +1 -0
- package/lib/commonjs/modules/data-sync/utils/healthkit-data-types.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/healthkit-query-options.js +20 -0
- package/lib/commonjs/modules/data-sync/utils/healthkit-query-options.js.map +1 -0
- package/lib/commonjs/modules/data-sync/utils/healthkit-sample-source.js +21 -0
- package/lib/commonjs/modules/data-sync/utils/healthkit-sample-source.js.map +1 -0
- package/lib/commonjs/modules/data-sync/utils/healthkit-samples.js +59 -0
- package/lib/commonjs/modules/data-sync/utils/healthkit-samples.js.map +1 -0
- package/lib/commonjs/modules/data-sync/utils/healthkit-series.js +20 -11
- package/lib/commonjs/modules/data-sync/utils/healthkit-series.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/ble-plx/built-in-devices.js +12 -2
- package/lib/commonjs/modules/next/bluetooth/ble-plx/built-in-devices.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/ble-plx/legacy-driver.js +39 -5
- package/lib/commonjs/modules/next/bluetooth/ble-plx/legacy-driver.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/connections.js +45 -2
- package/lib/commonjs/modules/next/bluetooth/connections.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/driver.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/errors.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/index.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/readings.js +10 -2
- package/lib/commonjs/modules/next/bluetooth/readings.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/runtime.js +37 -1
- package/lib/commonjs/modules/next/bluetooth/runtime.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/web/index.js.map +1 -1
- package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js +19 -7
- package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/runtime-context.js.map +1 -1
- package/lib/module/modules/bt-management/index.js +1 -0
- package/lib/module/modules/bt-management/index.js.map +1 -1
- package/lib/module/modules/bt-management/services/bt-manager.js +27 -1
- package/lib/module/modules/bt-management/services/bt-manager.js.map +1 -1
- package/lib/module/modules/bt-management/services/custom/compile-custom-lepu.js +39 -0
- package/lib/module/modules/bt-management/services/custom/compile-custom-lepu.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.device.js +36 -10
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.frame-reader.js +2 -3
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.frame-reader.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js +68 -25
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-command-writer.js +30 -2
- package/lib/module/modules/bt-management/services/devices/bt-command-writer.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-data-processor.js +1 -1
- 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 +48 -3
- 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 +6 -2
- package/lib/module/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/custom/custom.device.js +113 -24
- package/lib/module/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.advertisement.js +17 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.advertisement.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.connect-retry.js +28 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.connect-retry.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.delivered-files.js +69 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.delivered-files.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.js +129 -30
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.js +99 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.js +20 -14
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.frame-reader.js +4 -2
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.frame-reader.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.identity-gate.js +94 -10
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.identity-gate.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.js +72 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.js +109 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.pulse-wave.js +64 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.pulse-wave.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.recorder.js +51 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.recorder.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.recording-watch.js +53 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.recording-watch.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.session.js +45 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.session.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.stored-files.js +42 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.stored-files.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.transports.js +10 -4
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.transports.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.waveform.js +22 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.waveform.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js +0 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-files.js +3 -6
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-files.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js +17 -8
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.js +44 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.oximeters.js +58 -32
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.oximeters.js.map +1 -1
- package/lib/module/modules/bt-management/services/series-recorder.js +27 -5
- package/lib/module/modules/bt-management/services/series-recorder.js.map +1 -1
- package/lib/module/modules/bt-management/types/device-waveform.js +4 -0
- package/lib/module/modules/bt-management/types/device-waveform.js.map +1 -0
- package/lib/module/modules/bt-management/utils/i-16-from-hex.js.map +1 -1
- package/lib/module/modules/bt-management/utils/le-32-from-hex.js.map +1 -1
- package/lib/module/modules/data-sync/components/apple/apple-health-authorization-provider.js +16 -9
- package/lib/module/modules/data-sync/components/apple/apple-health-authorization-provider.js.map +1 -1
- package/lib/module/modules/data-sync/components/apple/apple-health-authorization-utils.js +2 -2
- package/lib/module/modules/data-sync/components/apple/apple-health-authorization-utils.js.map +1 -1
- package/lib/module/modules/data-sync/constants.js +4 -1
- package/lib/module/modules/data-sync/constants.js.map +1 -1
- package/lib/module/modules/data-sync/hooks/use-listen-changes.js +7 -10
- package/lib/module/modules/data-sync/hooks/use-listen-changes.js.map +1 -1
- package/lib/module/modules/data-sync/services/managers/data-processor.js +1 -0
- package/lib/module/modules/data-sync/services/managers/data-processor.js.map +1 -1
- package/lib/module/modules/data-sync/types/health-sync-keys.js +13 -0
- package/lib/module/modules/data-sync/types/health-sync-keys.js.map +1 -1
- package/lib/module/modules/data-sync/utils/convert-ecg-samples-to-observation.js +43 -0
- package/lib/module/modules/data-sync/utils/convert-ecg-samples-to-observation.js.map +1 -0
- package/lib/module/modules/data-sync/utils/convert-generic-health-data.js +6 -3
- package/lib/module/modules/data-sync/utils/convert-generic-health-data.js.map +1 -1
- package/lib/module/modules/data-sync/utils/convert-samples-to-observation.js +7 -15
- package/lib/module/modules/data-sync/utils/convert-samples-to-observation.js.map +1 -1
- package/lib/module/modules/data-sync/utils/default-health-coding.js +25 -4
- package/lib/module/modules/data-sync/utils/default-health-coding.js.map +1 -1
- package/lib/module/modules/data-sync/utils/get-records-from-health-connect.js +20 -4
- package/lib/module/modules/data-sync/utils/get-records-from-health-connect.js.map +1 -1
- package/lib/module/modules/data-sync/utils/get-samples-from-health.js +44 -87
- package/lib/module/modules/data-sync/utils/get-samples-from-health.js.map +1 -1
- package/lib/module/modules/data-sync/utils/get-total-samples-count.js +5 -4
- package/lib/module/modules/data-sync/utils/get-total-samples-count.js.map +1 -1
- package/lib/module/modules/data-sync/utils/health-data-catalog.js +15 -15
- package/lib/module/modules/data-sync/utils/health-data-catalog.js.map +1 -1
- package/lib/module/modules/data-sync/utils/health-units.js +6 -1
- package/lib/module/modules/data-sync/utils/health-units.js.map +1 -1
- package/lib/module/modules/data-sync/utils/healthkit-daily-statistics.js +59 -0
- package/lib/module/modules/data-sync/utils/healthkit-daily-statistics.js.map +1 -0
- package/lib/module/modules/data-sync/utils/healthkit-data-types.js.map +1 -1
- package/lib/module/modules/data-sync/utils/healthkit-query-options.js +16 -0
- package/lib/module/modules/data-sync/utils/healthkit-query-options.js.map +1 -0
- package/lib/module/modules/data-sync/utils/healthkit-sample-source.js +17 -0
- package/lib/module/modules/data-sync/utils/healthkit-sample-source.js.map +1 -0
- package/lib/module/modules/data-sync/utils/healthkit-samples.js +52 -0
- package/lib/module/modules/data-sync/utils/healthkit-samples.js.map +1 -0
- package/lib/module/modules/data-sync/utils/healthkit-series.js +19 -10
- package/lib/module/modules/data-sync/utils/healthkit-series.js.map +1 -1
- package/lib/module/modules/next/bluetooth/ble-plx/built-in-devices.js +12 -2
- package/lib/module/modules/next/bluetooth/ble-plx/built-in-devices.js.map +1 -1
- package/lib/module/modules/next/bluetooth/ble-plx/legacy-driver.js +39 -5
- package/lib/module/modules/next/bluetooth/ble-plx/legacy-driver.js.map +1 -1
- package/lib/module/modules/next/bluetooth/connections.js +45 -2
- package/lib/module/modules/next/bluetooth/connections.js.map +1 -1
- package/lib/module/modules/next/bluetooth/driver.js.map +1 -1
- package/lib/module/modules/next/bluetooth/errors.js.map +1 -1
- package/lib/module/modules/next/bluetooth/index.js.map +1 -1
- package/lib/module/modules/next/bluetooth/readings.js +10 -2
- package/lib/module/modules/next/bluetooth/readings.js.map +1 -1
- package/lib/module/modules/next/bluetooth/runtime.js +37 -1
- package/lib/module/modules/next/bluetooth/runtime.js.map +1 -1
- package/lib/module/modules/next/bluetooth/web/index.js.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/runtime-context.d.ts +4 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/runtime-context.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts +21 -5
- package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-lepu.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts +2 -1
- 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/bp2/bp2.history-sequencer.d.ts +24 -4
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.history-sequencer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-command-writer.d.ts +6 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-command-writer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts +23 -3
- 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 +6 -3
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts +20 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.advertisement.d.ts +8 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.advertisement.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.connect-retry.d.ts +12 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.connect-retry.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.delivered-files.d.ts +24 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.delivered-files.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.d.ts +40 -5
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.d.ts +20 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts +6 -3
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts +26 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.d.ts +42 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.d.ts +28 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.recorder.d.ts +32 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.recorder.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.recording-watch.d.ts +28 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.recording-watch.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.session.d.ts +17 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.session.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.stored-files.d.ts +33 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.stored-files.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.waveform.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.waveform.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/series-recorder.d.ts +6 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/series-recorder.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/create-device-params.d.ts +7 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/create-device-params.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-lepu-spec.d.ts +42 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-lepu-spec.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-connection-event.d.ts +17 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-connection-event.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-waveform.d.ts +15 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-waveform.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/i-16-from-hex.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/utils/i-16-from-hex.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/utils/le-32-from-hex.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/utils/le-32-from-hex.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/components/apple/apple-health-authorization-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/components/apple/apple-health-authorization-utils.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/data-sync/components/apple/apple-health-authorization-utils.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/constants.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/data-sync/constants.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/hooks/use-listen-changes.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/services/managers/data-processor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/apple-health-authorization-provider-props.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/data-sync/types/apple-health-authorization-provider-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/apple-health-sync-props.d.ts +4 -7
- package/lib/typescript/commonjs/src/modules/data-sync/types/apple-health-sync-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/get-data-from-provider-props.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/get-data-from-provider-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-authorization-status.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-authorization-status.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-sync-keys.d.ts +11 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-sync-keys.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-ecg-samples-to-observation.d.ts +6 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-ecg-samples-to-observation.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-generic-health-data.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-generic-health-data.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-samples-to-observation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/default-health-coding.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-records-from-health-connect.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-records-from-health-connect.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-samples-from-health.d.ts +12 -46
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-samples-from-health.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-total-samples-count.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/health-data-catalog.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/health-units.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/data-sync/utils/health-units.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-daily-statistics.d.ts +10 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-daily-statistics.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-data-types.d.ts +5 -5
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-data-types.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-query-options.d.ts +7 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-query-options.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-sample-source.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-sample-source.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-samples.d.ts +30 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-samples.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-series.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-series.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/to-core-health-observations.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/to-core-health-observations.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts +12 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts +2 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/connections.d.ts +13 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/connections.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/driver.d.ts +20 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/driver.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/errors.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/errors.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/index.d.ts +2 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/readings.d.ts +3 -2
- package/lib/typescript/commonjs/src/modules/next/bluetooth/readings.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/runtime.d.ts +19 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/runtime.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/snapshot.d.ts +33 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/snapshot.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/runtime-context.d.ts +4 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/runtime-context.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/index.d.ts +1 -0
- package/lib/typescript/module/src/modules/bt-management/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts +21 -5
- package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-lepu.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts +4 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts +2 -1
- 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/bp2/bp2.history-sequencer.d.ts +24 -4
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.history-sequencer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-command-writer.d.ts +6 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-command-writer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts +23 -3
- 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 +6 -3
- package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts +20 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.advertisement.d.ts +8 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.advertisement.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.connect-retry.d.ts +12 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.connect-retry.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.delivered-files.d.ts +24 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.delivered-files.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.d.ts +40 -5
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.d.ts +20 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts +6 -3
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts +3 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts +26 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.d.ts +42 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.d.ts +28 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave.d.ts +16 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.recorder.d.ts +32 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.recorder.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.recording-watch.d.ts +28 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.recording-watch.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.session.d.ts +17 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.session.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.stored-files.d.ts +33 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.stored-files.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts +4 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.waveform.d.ts +9 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.waveform.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.d.ts +8 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/series-recorder.d.ts +6 -1
- package/lib/typescript/module/src/modules/bt-management/services/series-recorder.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/create-device-params.d.ts +7 -1
- package/lib/typescript/module/src/modules/bt-management/types/create-device-params.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/custom-lepu-spec.d.ts +42 -1
- package/lib/typescript/module/src/modules/bt-management/types/custom-lepu-spec.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/device-connection-event.d.ts +17 -1
- package/lib/typescript/module/src/modules/bt-management/types/device-connection-event.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/device-waveform.d.ts +15 -0
- package/lib/typescript/module/src/modules/bt-management/types/device-waveform.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/utils/i-16-from-hex.d.ts +1 -1
- package/lib/typescript/module/src/modules/bt-management/utils/i-16-from-hex.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/utils/le-32-from-hex.d.ts +1 -1
- package/lib/typescript/module/src/modules/bt-management/utils/le-32-from-hex.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/components/apple/apple-health-authorization-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/components/apple/apple-health-authorization-utils.d.ts +2 -2
- package/lib/typescript/module/src/modules/data-sync/components/apple/apple-health-authorization-utils.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/constants.d.ts +3 -1
- package/lib/typescript/module/src/modules/data-sync/constants.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/hooks/use-listen-changes.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/services/managers/data-processor.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/apple-health-authorization-provider-props.d.ts +2 -2
- package/lib/typescript/module/src/modules/data-sync/types/apple-health-authorization-provider-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/apple-health-sync-props.d.ts +4 -7
- package/lib/typescript/module/src/modules/data-sync/types/apple-health-sync-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/get-data-from-provider-props.d.ts +3 -1
- package/lib/typescript/module/src/modules/data-sync/types/get-data-from-provider-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/health-authorization-status.d.ts +2 -2
- package/lib/typescript/module/src/modules/data-sync/types/health-authorization-status.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/health-sync-keys.d.ts +11 -1
- package/lib/typescript/module/src/modules/data-sync/types/health-sync-keys.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/convert-ecg-samples-to-observation.d.ts +6 -0
- package/lib/typescript/module/src/modules/data-sync/utils/convert-ecg-samples-to-observation.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/data-sync/utils/convert-generic-health-data.d.ts +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/convert-generic-health-data.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/convert-samples-to-observation.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/default-health-coding.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/get-records-from-health-connect.d.ts +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/get-records-from-health-connect.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/get-samples-from-health.d.ts +12 -46
- package/lib/typescript/module/src/modules/data-sync/utils/get-samples-from-health.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/get-total-samples-count.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/health-data-catalog.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/health-units.d.ts +2 -2
- package/lib/typescript/module/src/modules/data-sync/utils/health-units.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-daily-statistics.d.ts +10 -0
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-daily-statistics.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-data-types.d.ts +5 -5
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-data-types.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-query-options.d.ts +7 -0
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-query-options.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-sample-source.d.ts +8 -0
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-sample-source.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-samples.d.ts +30 -0
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-samples.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-series.d.ts +2 -2
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-series.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/to-core-health-observations.d.ts +1 -0
- package/lib/typescript/module/src/modules/data-sync/utils/to-core-health-observations.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts +12 -1
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts +2 -1
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/connections.d.ts +13 -1
- package/lib/typescript/module/src/modules/next/bluetooth/connections.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/driver.d.ts +20 -0
- package/lib/typescript/module/src/modules/next/bluetooth/driver.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/errors.d.ts +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/errors.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/index.d.ts +2 -1
- package/lib/typescript/module/src/modules/next/bluetooth/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/readings.d.ts +3 -2
- package/lib/typescript/module/src/modules/next/bluetooth/readings.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/runtime.d.ts +19 -1
- package/lib/typescript/module/src/modules/next/bluetooth/runtime.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/snapshot.d.ts +33 -1
- package/lib/typescript/module/src/modules/next/bluetooth/snapshot.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/web/index.d.ts +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/web/index.d.ts.map +1 -1
- package/package.json +8 -3
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.LepuSession = void 0;
|
|
7
|
+
var _bytesToHex = require("../../../utils/bytes-to-hex.js");
|
|
8
|
+
var _calculateCrc = require("../../../utils/calculate-crc-8.js");
|
|
9
|
+
var _hexToByte = require("../../../utils/hex-to-byte.js");
|
|
10
|
+
var _viatomLepuCrypto = require("../viatom/viatom-lepu-crypto.js");
|
|
11
|
+
var _lepuFrame = require("./lepu.frame.js");
|
|
12
|
+
const PAYLOAD_LENGTH_INDEX = 5;
|
|
13
|
+
const BITS_PER_BYTE = 8;
|
|
14
|
+
const BYTE_MASK = 0xff;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* One connection's AES key, from the moment the device hands it over in the handshake.
|
|
18
|
+
*
|
|
19
|
+
* Requests leave encrypted and replies reach every parser in plain text. Without a key, and
|
|
20
|
+
* for an empty payload, frames pass through unchanged, as the vendor's own client does.
|
|
21
|
+
*/
|
|
22
|
+
class LepuSession {
|
|
23
|
+
begin = key => {
|
|
24
|
+
this.key = [...key];
|
|
25
|
+
};
|
|
26
|
+
end = () => {
|
|
27
|
+
this.key = undefined;
|
|
28
|
+
};
|
|
29
|
+
encryptFrame = frame => this.withPayload(frame, _viatomLepuCrypto.encryptLepuPayload) ?? [...frame];
|
|
30
|
+
|
|
31
|
+
/** The frame in plain text, or `undefined` when its payload does not decrypt. */
|
|
32
|
+
decryptFrame = frame => this.withPayload(frame, _viatomLepuCrypto.decryptLepuPayload);
|
|
33
|
+
withPayload = (frame, transform) => {
|
|
34
|
+
const payload = (0, _lepuFrame.lepuPayloadOf)(frame).map(_hexToByte.hexToByte);
|
|
35
|
+
if (!this.key || payload.length === 0) {
|
|
36
|
+
return [...frame];
|
|
37
|
+
}
|
|
38
|
+
const transformed = transform(payload, this.key);
|
|
39
|
+
return transformed && rebuildFrame(frame, transformed);
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/** The same header with a new payload, its length and its checksum. */
|
|
44
|
+
exports.LepuSession = LepuSession;
|
|
45
|
+
const rebuildFrame = (frame, payload) => {
|
|
46
|
+
const body = [...frame.slice(0, PAYLOAD_LENGTH_INDEX), (0, _bytesToHex.byteToHex)(payload.length & BYTE_MASK), (0, _bytesToHex.byteToHex)(payload.length >> BITS_PER_BYTE), ...payload.map(_bytesToHex.byteToHex)];
|
|
47
|
+
return [...body, (0, _bytesToHex.byteToHex)((0, _calculateCrc.calculateCrc8)(body, body.length))];
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=lepu.session.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_bytesToHex","require","_calculateCrc","_hexToByte","_viatomLepuCrypto","_lepuFrame","PAYLOAD_LENGTH_INDEX","BITS_PER_BYTE","BYTE_MASK","LepuSession","begin","key","end","undefined","encryptFrame","frame","withPayload","encryptLepuPayload","decryptFrame","decryptLepuPayload","transform","payload","lepuPayloadOf","map","hexToByte","length","transformed","rebuildFrame","exports","body","slice","byteToHex","calculateCrc8"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.session.ts"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AAKA,IAAAI,UAAA,GAAAJ,OAAA;AAEA,MAAMK,oBAAoB,GAAG,CAAC;AAC9B,MAAMC,aAAa,GAAG,CAAC;AACvB,MAAMC,SAAS,GAAG,IAAI;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,WAAW,CAAC;EAGTC,KAAK,GAAIC,GAAsB,IAAW;IAC/C,IAAI,CAACA,GAAG,GAAG,CAAC,GAAGA,GAAG,CAAC;EACrB,CAAC;EAEMC,GAAG,GAAGA,CAAA,KAAY;IACvB,IAAI,CAACD,GAAG,GAAGE,SAAS;EACtB,CAAC;EAEMC,YAAY,GAAIC,KAAwB,IAC7C,IAAI,CAACC,WAAW,CAACD,KAAK,EAAEE,oCAAkB,CAAC,IAAI,CAAC,GAAGF,KAAK,CAAC;;EAE3D;EACOG,YAAY,GAAIH,KAAwB,IAC7C,IAAI,CAACC,WAAW,CAACD,KAAK,EAAEI,oCAAkB,CAAC;EAErCH,WAAW,GAAGA,CACpBD,KAAwB,EACxBK,SAA8E,KACrD;IACzB,MAAMC,OAAO,GAAG,IAAAC,wBAAa,EAACP,KAAK,CAAC,CAACQ,GAAG,CAACC,oBAAS,CAAC;IAEnD,IAAI,CAAC,IAAI,CAACb,GAAG,IAAIU,OAAO,CAACI,MAAM,KAAK,CAAC,EAAE;MACrC,OAAO,CAAC,GAAGV,KAAK,CAAC;IACnB;IAEA,MAAMW,WAAW,GAAGN,SAAS,CAACC,OAAO,EAAE,IAAI,CAACV,GAAG,CAAC;IAEhD,OAAOe,WAAW,IAAIC,YAAY,CAACZ,KAAK,EAAEW,WAAW,CAAC;EACxD,CAAC;AACH;;AAEA;AAAAE,OAAA,CAAAnB,WAAA,GAAAA,WAAA;AACA,MAAMkB,YAAY,GAAGA,CACnBZ,KAAwB,EACxBM,OAA0B,KACb;EACb,MAAMQ,IAAI,GAAG,CACX,GAAGd,KAAK,CAACe,KAAK,CAAC,CAAC,EAAExB,oBAAoB,CAAC,EACvC,IAAAyB,qBAAS,EAACV,OAAO,CAACI,MAAM,GAAGjB,SAAS,CAAC,EACrC,IAAAuB,qBAAS,EAACV,OAAO,CAACI,MAAM,IAAIlB,aAAa,CAAC,EAC1C,GAAGc,OAAO,CAACE,GAAG,CAACQ,qBAAS,CAAC,CAC1B;EAED,OAAO,CAAC,GAAGF,IAAI,EAAE,IAAAE,qBAAS,EAAC,IAAAC,2BAAa,EAACH,IAAI,EAAEA,IAAI,CAACJ,MAAM,CAAC,CAAC,CAAC;AAC/D,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.LepuStoredFiles = void 0;
|
|
7
|
+
var _lepuFileTransfer = require("./lepu.file-transfer.js");
|
|
8
|
+
/**
|
|
9
|
+
* The files a Lepu device holds, read only when asked.
|
|
10
|
+
*
|
|
11
|
+
* On connect their names are only listed, so a later `readNew` fetches what the device stored
|
|
12
|
+
* since; `readAll` is the app's explicit history sync. A file read once on a connection is not
|
|
13
|
+
* read again on it, and one whose reading the app took is not read again at all.
|
|
14
|
+
*/
|
|
15
|
+
class LepuStoredFiles {
|
|
16
|
+
listedOnConnect = new Set();
|
|
17
|
+
read = new Set();
|
|
18
|
+
constructor(params) {
|
|
19
|
+
this.params = params;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/** Lists the files without opening any. */
|
|
23
|
+
listExisting = afterTransfer => this.transfer(afterTransfer, () => false, names => names.forEach(name => this.listedOnConnect.add(name)));
|
|
24
|
+
|
|
25
|
+
/** Reads the files stored since the connection listed them. */
|
|
26
|
+
readNew = afterTransfer => this.transfer(afterTransfer, name => !this.listedOnConnect.has(name) && this.isUnread(name));
|
|
27
|
+
|
|
28
|
+
/** Reads every stored file not read yet. */
|
|
29
|
+
readAll = afterTransfer => this.transfer(afterTransfer, this.isUnread);
|
|
30
|
+
isUnread = name => !this.read.has(name) && !this.params.deliveredFiles?.has(name) && (this.params.acceptFile?.(name) ?? true);
|
|
31
|
+
transfer = (afterTransfer, acceptFile, onFileList) => new _lepuFileTransfer.LepuFileTransfer({
|
|
32
|
+
...this.params,
|
|
33
|
+
acceptFile,
|
|
34
|
+
afterTransfer,
|
|
35
|
+
onFileList: names => {
|
|
36
|
+
this.params.deliveredFiles?.keepListed(names);
|
|
37
|
+
onFileList?.(names);
|
|
38
|
+
},
|
|
39
|
+
onFile: file => {
|
|
40
|
+
this.read.add(file.name);
|
|
41
|
+
this.params.onFile(file, () => this.params.deliveredFiles?.add(file.name));
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
exports.LepuStoredFiles = LepuStoredFiles;
|
|
46
|
+
//# sourceMappingURL=lepu.stored-files.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_lepuFileTransfer","require","LepuStoredFiles","listedOnConnect","Set","read","constructor","params","listExisting","afterTransfer","transfer","names","forEach","name","add","readNew","has","isUnread","readAll","deliveredFiles","acceptFile","onFileList","LepuFileTransfer","keepListed","onFile","file","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.stored-files.ts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cAAc,EAAEI,UAAU,CAACZ,KAAK,CAAC;MAC7CU,UAAU,GAAGV,KAAK,CAAC;IACrB,CAAC;IACDa,MAAM,EAAGC,IAAI,IAAK;MAChB,IAAI,CAACpB,IAAI,CAACS,GAAG,CAACW,IAAI,CAACZ,IAAI,CAAC;MACxB,IAAI,CAACN,MAAM,CAACiB,MAAM,CAACC,IAAI,EAAE,MAAM,IAAI,CAAClB,MAAM,CAACY,cAAc,EAAEL,GAAG,CAACW,IAAI,CAACZ,IAAI,CAAC,CAAC;IAC5E;EACF,CAAC,CAAC;AACN;AAACa,OAAA,CAAAxB,eAAA,GAAAA,eAAA","ignoreList":[]}
|
|
@@ -27,10 +27,10 @@ var _checkmeProtocol = require("../checkme/checkme.protocol.js");
|
|
|
27
27
|
* - **The payload layout.** Every product decodes differently, and a guessed offset yields
|
|
28
28
|
* a plausible wrong reading rather than an error. Declared cases are the caller's.
|
|
29
29
|
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
30
|
+
* A product whose advertisement offers or requires encryption gets the vendor's handshake on
|
|
31
|
+
* the standard protocol first (`withLepuEncryption`); the rest speak it in cleartext, as the
|
|
32
|
+
* BP2 does in production. The oxygen protocol has no handshake, so its declarations refuse an
|
|
33
|
+
* advertisement that requires one (`rejectEncryptionAtBytes`).
|
|
34
34
|
*/
|
|
35
35
|
|
|
36
36
|
/**
|
|
@@ -210,12 +210,18 @@ const lepuDevice = params => {
|
|
|
210
210
|
...(params.pollIntervalMs === undefined ? {} : {
|
|
211
211
|
pollIntervalMs: params.pollIntervalMs
|
|
212
212
|
}),
|
|
213
|
+
...(params.recordingStatus === undefined ? {} : {
|
|
214
|
+
recordingStatus: params.recordingStatus
|
|
215
|
+
}),
|
|
213
216
|
...(params.writeWithoutResponse === undefined ? {} : {
|
|
214
217
|
writeWithoutResponse: params.writeWithoutResponse
|
|
215
218
|
}),
|
|
216
219
|
...(params.setClockBeforeInfo === undefined ? {} : {
|
|
217
220
|
setClockBeforeInfo: params.setClockBeforeInfo
|
|
218
221
|
}),
|
|
222
|
+
...(params.pulseWave === undefined ? {} : {
|
|
223
|
+
pulseWave: params.pulseWave
|
|
224
|
+
}),
|
|
219
225
|
...(params.clockSyncProtocol === undefined ? {} : {
|
|
220
226
|
clockSyncProtocol: params.clockSyncProtocol
|
|
221
227
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_preferredMtu","require","_defineCustomDevice","_checkmeProtocol","STANDARD_SERVICE","CHECKME_SERVICE","STANDARD_WRITE","CHECKME_WRITE","STANDARD_NOTIFY","CHECKME_NOTIFY","AW1_SERVICE","AW1_WRITE","AW1_NOTIFY","DING_SERVICE","DING_WRITE","DING_NOTIFY","AI_TELE_SERVICE","AI_TELE_WRITE","AI_TELE_NOTIFY","MINIMUM_MTU","DEFAULT_STUCK_TIMEOUT_MS","START_BYTE","lepuTransports","exports","standard","serviceUuid","notifyUuid","writeUuid","preferredMtu","PREFERRED_MTU","standardSmallMtu","aw1","ding","aiTele","COMMAND_BYTE","lepuDevice","params","transport","viatomOxygen","protocol","monitor","each","uuid","frame","minLengthBytes","caseSelectorBytes","undefined","cases","services","v2","defineCustomDevice","id","nameMatch","matchByService","stuckDataTimeoutMs","clockSync","sessionPolicy","lepu","startBytes","manufacturerDataProtocol","requestStartByte","rejectEncryptionAtBytes","write","characteristicUuid","expectedDeviceTypes","fileTransfer","ecgFileDecoder","pollCommand","pollIntervalMs","writeWithoutResponse","setClockBeforeInfo","clockSyncProtocol","map","service","decorateReading","createFrameHandler"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.transports.ts"],"mappings":";;;;;;AAEA,IAAAA,aAAA,GAAAC,OAAA;AAUA,IAAAC,mBAAA,GAAAD,OAAA;AACA,IAAAE,gBAAA,GAAAF,OAAA;AAbA;;AAmBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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J;IACAP,WAAW,EAAEZ,YAAY;IAEzB;IACAa,UAAU,EAAEX,WAAW;IAEvB;IACAY,SAAS,EAAEb,UAAU;IAErB;IACAc,YAAY,EAAEC;EAChB,CAAC;EAED;EACAI,MAAM,EAAE;IACN;IACAR,WAAW,EAAET,eAAe;IAE5B;IACAU,UAAU,EAAER,cAAc;IAE1B;IACAS,SAAS,EAAEV,aAAa;IAExB;IACAW,YAAY,EAAEC;EAChB;AACF,CAAkD;;AAElD;;AAGA;;
|
|
1
|
+
{"version":3,"names":["_preferredMtu","require","_defineCustomDevice","_checkmeProtocol","STANDARD_SERVICE","CHECKME_SERVICE","STANDARD_WRITE","CHECKME_WRITE","STANDARD_NOTIFY","CHECKME_NOTIFY","AW1_SERVICE","AW1_WRITE","AW1_NOTIFY","DING_SERVICE","DING_WRITE","DING_NOTIFY","AI_TELE_SERVICE","AI_TELE_WRITE","AI_TELE_NOTIFY","MINIMUM_MTU","DEFAULT_STUCK_TIMEOUT_MS","START_BYTE","lepuTransports","exports","standard","serviceUuid","notifyUuid","writeUuid","preferredMtu","PREFERRED_MTU","standardSmallMtu","aw1","ding","aiTele","COMMAND_BYTE","lepuDevice","params","transport","viatomOxygen","protocol","monitor","each","uuid","frame","minLengthBytes","caseSelectorBytes","undefined","cases","services","v2","defineCustomDevice","id","nameMatch","matchByService","stuckDataTimeoutMs","clockSync","sessionPolicy","lepu","startBytes","manufacturerDataProtocol","requestStartByte","rejectEncryptionAtBytes","write","characteristicUuid","expectedDeviceTypes","fileTransfer","ecgFileDecoder","pollCommand","pollIntervalMs","recordingStatus","writeWithoutResponse","setClockBeforeInfo","pulseWave","clockSyncProtocol","map","service","decorateReading","createFrameHandler"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.transports.ts"],"mappings":";;;;;;AAEA,IAAAA,aAAA,GAAAC,OAAA;AAUA,IAAAC,mBAAA,GAAAD,OAAA;AACA,IAAAE,gBAAA,GAAAF,OAAA;AAbA;;AAmB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,GACvC,CAAC,CAAC,GACF;QAAEyB,kBAAkB,EAAEnC,MAAM,CAACmC;MAAmB,CAAC,CAAC;MACtD,IAAInC,MAAM,CAACoC,SAAS,KAAK1B,SAAS,GAC9B,CAAC,CAAC,GACF;QAAE0B,SAAS,EAAEpC,MAAM,CAACoC;MAAU,CAAC,CAAC;MACpC,IAAIpC,MAAM,CAACqC,iBAAiB,KAAK3B,SAAS,GACtC,CAAC,CAAC,GACF;QAAE2B,iBAAiB,EAAErC,MAAM,CAACqC;MAAkB,CAAC;IACrD,CAAC;IACDzB,QAAQ,EAAEA,QAAQ,CAAC0B,GAAG,CAAEC,OAAO,KAAM;MACnC,GAAGA,OAAO;MACVnC,OAAO,EAAEmC,OAAO,CAACnC,OAAO,CAACkC,GAAG,CAAEjC,IAAI,KAAM;QACtC,GAAGA,IAAI;QACPI,iBAAiB,EAAEJ,IAAI,CAACI,iBAAiB,IAAI,CAACX,YAAY;MAC5D,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ,CAAC,EACD;IACE,IAAIE,MAAM,CAACwC,eAAe,KAAK9B,SAAS,GACpC,CAAC,CAAC,GACF;MAAE8B,eAAe,EAAExC,MAAM,CAACwC;IAAgB,CAAC,CAAC;IAChD,IAAIxC,MAAM,CAACyC,kBAAkB,KAAK/B,SAAS,GACvC,CAAC,CAAC,GACF;MAAE+B,kBAAkB,EAAEzC,MAAM,CAACyC;IAAmB,CAAC;EACvD,CACF,CAAC;AACH,CAAC;AAACtD,OAAA,CAAAY,UAAA,GAAAA,UAAA","ignoreList":[]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.waveformSamples = exports.millivoltsOf = void 0;
|
|
7
|
+
var _i16FromHex = require("../../../utils/i-16-from-hex.js");
|
|
8
|
+
var _le16FromHex = require("../../../utils/le-16-from-hex.js");
|
|
9
|
+
const SAMPLE_BYTES = 2;
|
|
10
|
+
const COUNT_BYTES = 2;
|
|
11
|
+
const CHECKSUM_BYTES = 1;
|
|
12
|
+
|
|
13
|
+
/** The raw sample counts a poll answer carries, never more than the frame holds. */
|
|
14
|
+
const waveformSamples = (pollAnswer, waveform) => {
|
|
15
|
+
const first = waveform.countByteIndex + COUNT_BYTES;
|
|
16
|
+
const declared = (0, _le16FromHex.le16FromHex)(pollAnswer, waveform.countByteIndex);
|
|
17
|
+
const available = Math.floor((pollAnswer.length - CHECKSUM_BYTES - first) / SAMPLE_BYTES);
|
|
18
|
+
return Array.from({
|
|
19
|
+
length: Math.max(0, Math.min(declared, available))
|
|
20
|
+
}, (_, index) => (0, _i16FromHex.i16FromHex)(pollAnswer, first + index * SAMPLE_BYTES));
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** One count in millivolts; the no-signal marker reads as 0. */
|
|
24
|
+
exports.waveformSamples = waveformSamples;
|
|
25
|
+
const millivoltsOf = (count, waveform) => count === waveform.noSignalCount ? 0 : count * waveform.millivoltsPerCount;
|
|
26
|
+
exports.millivoltsOf = millivoltsOf;
|
|
27
|
+
//# sourceMappingURL=lepu.waveform.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_i16FromHex","require","_le16FromHex","SAMPLE_BYTES","COUNT_BYTES","CHECKSUM_BYTES","waveformSamples","pollAnswer","waveform","first","countByteIndex","declared","le16FromHex","available","Math","floor","length","Array","from","max","min","_","index","i16FromHex","exports","millivoltsOf","count","noSignalCount","millivoltsPerCount"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.waveform.ts"],"mappings":";;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAIA,MAAME,YAAY,GAAG,CAAC;AACtB,MAAMC,WAAW,GAAG,CAAC;AACrB,MAAMC,cAAc,GAAG,CAAC;;AAExB;AACA,MAAMC,eAAe,GAAGA,CAACC,UAA6B,EAAEC,QAAkB,KAAe;EACvF,MAAMC,KAAK,GAAGD,QAAQ,CAACE,cAAc,GAAGN,WAAW;EACnD,MAAMO,QAAQ,GAAG,IAAAC,wBAAW,EAACL,UAAU,EAAEC,QAAQ,CAACE,cAAc,CAAC;EACjE,MAAMG,SAAS,GAAGC,IAAI,CAACC,KAAK,CAAC,CAACR,UAAU,CAACS,MAAM,GAAGX,cAAc,GAAGI,KAAK,IAAIN,YAAY,CAAC;EAEzF,OAAOc,KAAK,CAACC,IAAI,CAAC;IAAEF,MAAM,EAAEF,IAAI,CAACK,GAAG,CAAC,CAAC,EAAEL,IAAI,CAACM,GAAG,CAACT,QAAQ,EAAEE,SAAS,CAAC;EAAE,CAAC,EAAE,CAACQ,CAAC,EAAEC,KAAK,KACjF,IAAAC,sBAAU,EAAChB,UAAU,EAAEE,KAAK,GAAGa,KAAK,GAAGnB,YAAY,CAAC,CAAC;AACzD,CAAC;;AAED;AAAAqB,OAAA,CAAAlB,eAAA,GAAAA,eAAA;AACA,MAAMmB,YAAY,GAAGA,CAACC,KAAa,EAAElB,QAAkB,KACrDkB,KAAK,KAAKlB,QAAQ,CAACmB,aAAa,GAAG,CAAC,GAAGD,KAAK,GAAGlB,QAAQ,CAACoB,kBAAkB;AAACJ,OAAA,CAAAC,YAAA,GAAAA,YAAA","ignoreList":[]}
|
|
@@ -69,7 +69,6 @@ const viatomBpMonitor = (advertisedName, params) => {
|
|
|
69
69
|
clockSync: "supported",
|
|
70
70
|
clockSyncProtocol: BP3_MODEL_NAMES.includes(advertisedName) ? "bp3" : "bp2",
|
|
71
71
|
fileTransfer: BP3_MODEL_NAMES.includes(advertisedName) ? "bp3" : "bp2",
|
|
72
|
-
rejectEncryptionAtBytes: [4],
|
|
73
72
|
pollCommand: RT_DATA,
|
|
74
73
|
pollIntervalMs: 200,
|
|
75
74
|
minLengthBytes: MIN_LENGTH_BYTES,
|
package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_le32FromHex","require","_defineCustomDevice","_bp2Files","_lepuNameMatch","_lepuTransports","_tmbBpHandler","_viatomBpEcgHandler","_viatomBpMonitorCases","RT_DATA","CASE_SELECTOR_BYTES","MIN_LENGTH_BYTES","RESULT_CODE_INDEX","DEVICE_TIME_INDEX","rejectFailedResult","reading","frame","resultCode","Number","parseInt","Error","toString","padStart","recordedAt","length","recordedAtFromLocalSeconds","le32FromHex","undefined","viatomBpMonitor","advertisedName","params","isBp3","BP3_MODEL_NAMES","includes","hasEcg","lepuDevice","id","toLowerCase","replace","nameMatch","lepuNameMatch","clockSync","clockSyncProtocol","fileTransfer","
|
|
1
|
+
{"version":3,"names":["_le32FromHex","require","_defineCustomDevice","_bp2Files","_lepuNameMatch","_lepuTransports","_tmbBpHandler","_viatomBpEcgHandler","_viatomBpMonitorCases","RT_DATA","CASE_SELECTOR_BYTES","MIN_LENGTH_BYTES","RESULT_CODE_INDEX","DEVICE_TIME_INDEX","rejectFailedResult","reading","frame","resultCode","Number","parseInt","Error","toString","padStart","recordedAt","length","recordedAtFromLocalSeconds","le32FromHex","undefined","viatomBpMonitor","advertisedName","params","isBp3","BP3_MODEL_NAMES","includes","hasEcg","lepuDevice","id","toLowerCase","replace","nameMatch","lepuNameMatch","clockSync","clockSyncProtocol","fileTransfer","pollCommand","pollIntervalMs","minLengthBytes","caseSelectorBytes","cases","BP3_ECG_CASES","BP3_CASES","BP2_CASES","BP2_ECG_CASES","map","each","decorateReading","createFrameHandler","createViatomFrameHandler","expectedDeviceTypes","exports","bp2aMonitor","bp2tMonitor","bp2wMonitor","bp2vMonitor","lpBp2wMonitor","TMB_SERVICE","TMB_WRITE","TMB_ACK","TMB_NOTIFY","TMB_INDICATE","tmbBpMonitor","defineCustomDevice","stuckDataTimeoutMs","preferredMtu","tmb","serviceUuid","writeUuid","ackUuid","services","uuid","monitor","selector","kind","createTmbBloodPressureFrameHandler","TMB_MODEL_NAMES"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.bp-monitors.ts"],"mappings":";;;;;;AAMA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,mBAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,eAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAL,OAAA;AAEA,IAAAM,mBAAA,GAAAN,OAAA;AACA,IAAAO,qBAAA,GAAAP,OAAA;AAdA;;AAqBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAMQ,OAAO,GAAG,IAAI;;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,mBAAmB,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;;AAElC;AACA,MAAMC,gBAAgB,GAAG,EAAE;AAC3B,MAAMC,iBAAiB,GAAG,EAAE;AAC5B,MAAMC,iBAAiB,GAAG,EAAE;AAE5B,MAAMC,kBAA0C,GAAGA,CAACC,OAAO,EAAEC,KAAK,KAAK;EACrE,MAAMC,UAAU,GAAGC,MAAM,CAACC,QAAQ,CAACH,KAAK,GAAGJ,iBAAiB,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC;EAE1E,IAAIK,UAAU,KAAK,CAAC,EAAE;IACpB,MAAM,IAAIG,KAAK,CACb,+DAA+DH,UAAU,CACtEI,QAAQ,CAAC,EAAE,CAAC,CACZC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EACrB,CAAC;EACH;EAEA,MAAMC,UAAU,GACdP,KAAK,IAAIA,KAAK,CAACQ,MAAM,IAAIX,iBAAiB,GAAG,CAAC,GAC1C,IAAAY,oCAA0B,EAAC,IAAAC,wBAAW,EAAC,CAAC,GAAGV,KAAK,CAAC,EAAEH,iBAAiB,CAAC,CAAC,GACtEc,SAAS;EAEf,OAAOJ,UAAU,GAAG;I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AAzB,OAAA,CAAAyB,eAAA,GAAG,CACzC,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,UAAU,EACV,UAAU,CACX","ignoreList":[]}
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.recordedAtFromViatomFileName = exports.decodeViatomEcgRecording = exports.VIATOM_ECG_SAMPLE_RATE_HZ = exports.VIATOM_ECG_MILLIVOLTS_PER_COUNT = void 0;
|
|
7
|
-
var _hexToByte = require("../../../utils/hex-to-byte.js");
|
|
8
7
|
/** ECG sample rate in hertz. */
|
|
9
8
|
const VIATOM_ECG_SAMPLE_RATE_HZ = exports.VIATOM_ECG_SAMPLE_RATE_HZ = 125;
|
|
10
9
|
|
|
@@ -92,14 +91,13 @@ const toMillivolts = count => count === NO_SIGNAL_COUNT ? 0 : count * VIATOM_ECG
|
|
|
92
91
|
* Decodes an ER1/ER2 recording. A file whose waveform does not last as long as its tail
|
|
93
92
|
* records is returned empty, because that file is in a format this decoder does not read.
|
|
94
93
|
*/
|
|
95
|
-
const decodeViatomEcgRecording =
|
|
96
|
-
if (
|
|
94
|
+
const decodeViatomEcgRecording = bytes => {
|
|
95
|
+
if (bytes.length <= FILE_HEAD_BYTES + FILE_TAIL_BYTES) {
|
|
97
96
|
return emptyRecording();
|
|
98
97
|
}
|
|
99
|
-
const bytes = content.map(_hexToByte.hexToByte);
|
|
100
98
|
const tailStart = bytes.length - FILE_TAIL_BYTES;
|
|
101
99
|
const duration = readUInt32LittleEndian(bytes, tailStart);
|
|
102
|
-
const counts = decompressWaveform(bytes.
|
|
100
|
+
const counts = decompressWaveform(bytes.subarray(FILE_HEAD_BYTES, tailStart));
|
|
103
101
|
if (!matchesRecordedTime(counts.length, duration)) {
|
|
104
102
|
return emptyRecording();
|
|
105
103
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["VIATOM_ECG_SAMPLE_RATE_HZ","exports","VIATOM_ECG_MILLIVOLTS_PER_COUNT","validDate","year","month","day","hour","minute","second","date","Date","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","undefined","recordedAtFromViatomFileName","name","digits","match","length","Number","slice","FILE_HEAD_BYTES","FILE_TAIL_BYTES","NO_SIGNAL_COUNT","LARGE_STEP_BASE","RECORDED_TIME_TOLERANCE_SECONDS","emptyRecording","samples","duration","toInt8","byte","toInt16","value","ONE_BYTE_STEP","width","next","current","bytes","at","ESCAPED_STEPS","Map","_current","decompressWaveform","counts","step","get","push","readUInt32LittleEndian","from","matchesRecordedTime","sampleCount","seconds","Math","abs","toMillivolts","count","decodeViatomEcgRecording","tailStart","subarray","map"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.ecg-files.ts"],"mappings":";;;;;;AAAA;AACA,MAAMA,yBAAyB,GAAAC,OAAA,CAAAD,yBAAA,GAAG,GAAG;;AAErC;AACA,MAAME,+BAA+B,GAAAD,OAAA,CAAAC,+BAAA,GAAG,QAAQ;AAEhD,MAAMC,SAAS,GAAGA,CAChBC,IAAY,EACZC,KAAa,EACbC,GAAW,EACXC,IAAY,EACZC,MAAc,EACdC,MAAc,KACO;EACrB,MAAMC,IAAI,GAAG,IAAIC,IAAI,CAACP,IAAI,EAAEC,KAAK,GAAG,CAAC,EAAEC,GAAG,EAAEC,IAAI,EAAEC,MAAM,EAAEC,MAAM,EAAE,CAAC,CAAC;EAEpE,OAAOC,IAAI,CAACE,WAAW,CAAC,CAAC,KAAKR,IAAI,IAChCM,IAAI,CAACG,QAAQ,CAAC,CAAC,KAAKR,KAAK,GAAG,CAAC,IAC7BK,IAAI,CAACI,OAAO,CAAC,CAAC,KAAKR,GAAG,IACtBI,IAAI,CAACK,QAAQ,CAAC,CAAC,KAAKR,IAAI,IACxBG,IAAI,CAACM,UAAU,CAAC,CAAC,KAAKR,MAAM,IAC5BE,IAAI,C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DA,OAAO,GAAG,CAAC,IACXC,IAAI,CAACC,GAAG,CAACH,WAAW,GAAGC,OAAO,GAAGxD,yBAAyB,CAAC,IACzD8B,+BAA+B,GAAG9B,yBAAyB;AAE/D,MAAM2D,YAAY,GAAIC,KAAa,IACjCA,KAAK,KAAKhC,eAAe,GAAG,CAAC,GAAGgC,KAAK,GAAG1D,+BAA+B;;AAEzE;AACA;AACA;AACA;AACA,MAAM2D,wBAAwB,GAAInB,KAAiB,IAAyB;EAC1E,IAAIA,KAAK,CAACnB,MAAM,IAAIG,eAAe,GAAGC,eAAe,EAAE;IACrD,OAAOI,cAAc,CAAC,CAAC;EACzB;EAEA,MAAM+B,SAAS,GAAGpB,KAAK,CAACnB,MAAM,GAAGI,eAAe;EAChD,MAAMM,QAAQ,GAAGmB,sBAAsB,CAACV,KAAK,EAAEoB,SAAS,CAAC;EACzD,MAAMd,MAAM,GAAGD,kBAAkB,CAACL,KAAK,CAACqB,QAAQ,CAACrC,eAAe,EAAEoC,SAAS,CAAC,CAAC;EAE7E,IAAI,CAACR,mBAAmB,CAACN,MAAM,CAACzB,MAAM,EAAEU,QAAQ,CAAC,EAAE;IACjD,OAAOF,cAAc,CAAC,CAAC;EACzB;EAEA,OAAO;IAAEC,OAAO,EAAEgB,MAAM,CAACgB,GAAG,CAACL,YAAY,CAAC;IAAE1B;EAAS,CAAC;AACxD,CAAC;AAAChC,OAAA,CAAA4D,wBAAA,GAAAA,wBAAA","ignoreList":[]}
|
|
@@ -7,6 +7,7 @@ exports.er3Recorder = exports.er2Recorder = exports.er1Recorder = exports.ER3_MO
|
|
|
7
7
|
var _next = require("@ovok/core/next");
|
|
8
8
|
var _lepuNameMatch = require("../lepu/lepu.name-match.js");
|
|
9
9
|
var _lepuTransports = require("../lepu/lepu.transports.js");
|
|
10
|
+
var _viatomEcgRecordingStatus = require("./viatom.ecg-recording-status.js");
|
|
10
11
|
/**
|
|
11
12
|
* The Viatom ECG recorders - ER1, ER2 and ER3.
|
|
12
13
|
*
|
|
@@ -41,16 +42,18 @@ const RT_DATA = 0x03;
|
|
|
41
42
|
/** The ER3 answers its realtime data on a different opcode from the rest of the range. */
|
|
42
43
|
const ER3_RT_DATA = 0x06;
|
|
43
44
|
const HEART_RATE_UNIT = "bpm";
|
|
45
|
+
|
|
46
|
+
/** The vendor's own client polls realtime at this pace. */
|
|
47
|
+
const POLL_INTERVAL_MS = 500;
|
|
44
48
|
/** ER1, ER2 and ER3 share one parameter block: the heart rate opens it. */
|
|
45
49
|
const ER_HEART_RATE_BYTES = [7, 8];
|
|
46
50
|
/**
|
|
47
|
-
* Declares one recorder, reporting the heart rate from its realtime frame.
|
|
51
|
+
* Declares one recorder, reporting the heart rate from its realtime frame while it records.
|
|
48
52
|
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
* status byte, which a declaration cannot select on, so a recorder left connected and unworn
|
|
52
|
-
* reports a decoding failure on each poll. Reading those bits quietly needs a device class.
|
|
53
|
+
* Every other run status - idle, preparing, saving, lead off - leaves the device connected
|
|
54
|
+
* rather than measuring, so an unworn recorder is never shown as taking a reading.
|
|
53
55
|
*/
|
|
56
|
+
const byteHex = value => value.toString(16).padStart(2, "0");
|
|
54
57
|
const declareRecorder = (advertisedName, profile, params) => (0, _lepuTransports.lepuDevice)({
|
|
55
58
|
id: params.id ?? `viatom-${advertisedName.toLowerCase().replace(/[^a-z0-9]+/g, "-")}`,
|
|
56
59
|
nameMatch: params.nameMatch ?? (0, _lepuNameMatch.lepuNameMatch)(advertisedName),
|
|
@@ -61,10 +64,12 @@ const declareRecorder = (advertisedName, profile, params) => (0, _lepuTransports
|
|
|
61
64
|
emit: "none"
|
|
62
65
|
},
|
|
63
66
|
pollCommand: profile.pollCommand,
|
|
64
|
-
|
|
65
|
-
|
|
67
|
+
pollIntervalMs: POLL_INTERVAL_MS,
|
|
68
|
+
recordingStatus: (0, _viatomEcgRecordingStatus.viatomRecordingStatus)(advertisedName),
|
|
69
|
+
minLengthBytes: _viatomEcgRecordingStatus.RUN_STATUS_BYTE + 1,
|
|
70
|
+
caseSelectorBytes: [1, _viatomEcgRecordingStatus.RUN_STATUS_BYTE],
|
|
66
71
|
cases: [{
|
|
67
|
-
selector: profile.pollCommand
|
|
72
|
+
selector: `${byteHex(profile.pollCommand)}?${_viatomEcgRecordingStatus.RECORDING_STATE}`,
|
|
68
73
|
kind: "result",
|
|
69
74
|
measurementTypeKey: _next.MeasurementTypeKey.heartRate,
|
|
70
75
|
description: "Realtime parameters and waveform",
|
|
@@ -75,6 +80,10 @@ const declareRecorder = (advertisedName, profile, params) => (0, _lepuTransports
|
|
|
75
80
|
encoding: "uint",
|
|
76
81
|
unit: HEART_RATE_UNIT
|
|
77
82
|
}]
|
|
83
|
+
}, {
|
|
84
|
+
selector: `${byteHex(profile.pollCommand)}??`,
|
|
85
|
+
kind: "idle",
|
|
86
|
+
description: "Realtime frame while not recording"
|
|
78
87
|
}],
|
|
79
88
|
...(params.expectedDeviceTypes ? {
|
|
80
89
|
expectedDeviceTypes: params.expectedDeviceTypes
|
package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_next","require","_lepuNameMatch","_lepuTransports","RT_DATA","ER3_RT_DATA","HEART_RATE_UNIT","ER_HEART_RATE_BYTES","declareRecorder","advertisedName","profile","params","lepuDevice","id","toLowerCase","replace","nameMatch","lepuNameMatch","transport","clockSync","sessionPolicy","minSamples","emit","pollCommand","minLengthBytes","
|
|
1
|
+
{"version":3,"names":["_next","require","_lepuNameMatch","_lepuTransports","_viatomEcgRecordingStatus","RT_DATA","ER3_RT_DATA","HEART_RATE_UNIT","POLL_INTERVAL_MS","ER_HEART_RATE_BYTES","byteHex","value","toString","padStart","declareRecorder","advertisedName","profile","params","lepuDevice","id","toLowerCase","replace","nameMatch","lepuNameMatch","transport","clockSync","sessionPolicy","minSamples","emit","pollCommand","pollIntervalMs","recordingStatus","viatomRecordingStatus","minLengthBytes","RUN_STATUS_BYTE","caseSelectorBytes","cases","selector","RECORDING_STATE","kind","measurementTypeKey","MeasurementTypeKey","heartRate","description","fields","name","byteIndexes","heartRateBytes","byteOrder","encoding","unit","expectedDeviceTypes","fileTransfer","undefined","DECODED_ECG_MODEL_NAMES","has","ecgFileDecoder","er1Recorder","exports","er2Recorder","er3Recorder","ER1_MODEL_NAMES","ER2_MODEL_NAMES","Set","ER3_MODEL_NAMES"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.ecg-recorders.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAGA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA;AAEA,IAAAG,yBAAA,GAAAH,OAAA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAMI,OAAO,GAAG,IAAI;;AAEpB;AACA,MAAMC,WAAW,GAAG,IAAI;AAExB,MAAMC,eAAe,GAAG,KAAK;;AAE7B;AACA,MAAMC,gBAAgB,GAAG,GAAG;AAe5B;AACA,MAAMC,mBAAqC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;AAoBpD;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,OAAO,GAAIC,KAAa,IAAaA,KAAK,CAACC,QAAQ,CAAC,EAAE,CAAC,CAACC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC;AAE9E,MAAMC,eAAe,GAAGA,CACtBC,cAAsB,EACtBC,OAAmB,EACnBC,MAAuB,KAEvB,IAAAC,0BAAU,EAAC;EACTC,EAAE,EAAEF,MAAM,CAACE,EAAE,IAAI,UAAUJ,cAAc,CAACK,WAAW,CAAC,CAAC,CAACC,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC,EAAE;EACrFC,SAAS,EAA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,MAAM,EACN,MAAM,EACN,QAAQ,EACR,OAAO,EACP,SAAS,EACT,MAAM,EACN,MAAM,CACP;;AAED;AACA,MAAMR,uBAAuB,GAAG,IAAIS,GAAG,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;;AAEpE;AACA,MAAMC,eAAkC,GAAAN,OAAA,CAAAM,eAAA,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC","ignoreList":[]}
|
package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.viatomRecordingStatus = exports.RUN_STATUS_BYTE = exports.RECORDING_STATE = void 0;
|
|
7
|
+
var _viatomEcgFiles = require("./viatom.ecg-files.js");
|
|
8
|
+
/** The run status, with the current state in its low nibble. */
|
|
9
|
+
const RUN_STATUS_BYTE = exports.RUN_STATUS_BYTE = 15;
|
|
10
|
+
const RECORDING_STATE = exports.RECORDING_STATE = 2;
|
|
11
|
+
const LEAD_OFF_STATE = 7;
|
|
12
|
+
const SAVED_STATE = 4;
|
|
13
|
+
|
|
14
|
+
/** The seconds recorded so far, u32 little-endian, right before the run status. */
|
|
15
|
+
const RECORD_SECONDS_BYTE = 11;
|
|
16
|
+
|
|
17
|
+
/** After the 18-byte parameter block: the sample count, then int16 samples. */
|
|
18
|
+
const WAVEFORM_COUNT_BYTE = 25;
|
|
19
|
+
const SAMPLES_PER_SECOND = 125;
|
|
20
|
+
const NO_SIGNAL_COUNT = 0x7fff;
|
|
21
|
+
|
|
22
|
+
/** Ends a recording and stores it when it is long enough. */
|
|
23
|
+
const STOP_MEASUREMENT = 0x05;
|
|
24
|
+
|
|
25
|
+
/** The holter patches keep only recordings of 5 minutes or more; the rest keep 30 s or more. */
|
|
26
|
+
const HOLTER_MODEL_NAMES = new Set(["ER1-W", "ER1-L", "Cardio AI"]);
|
|
27
|
+
const HOLTER_MINIMUM_STORED_SECONDS = 300;
|
|
28
|
+
const MINIMUM_STORED_SECONDS = 30;
|
|
29
|
+
|
|
30
|
+
/** How an ER recorder reports its open recording in the realtime answer. */
|
|
31
|
+
const viatomRecordingStatus = advertisedName => ({
|
|
32
|
+
byteIndex: RUN_STATUS_BYTE,
|
|
33
|
+
secondsByteIndex: RECORD_SECONDS_BYTE,
|
|
34
|
+
recordingState: RECORDING_STATE,
|
|
35
|
+
leadOffState: LEAD_OFF_STATE,
|
|
36
|
+
savedState: SAVED_STATE,
|
|
37
|
+
minimumStoredSeconds: HOLTER_MODEL_NAMES.has(advertisedName) ? HOLTER_MINIMUM_STORED_SECONDS : MINIMUM_STORED_SECONDS,
|
|
38
|
+
stopCommand: STOP_MEASUREMENT,
|
|
39
|
+
waveform: {
|
|
40
|
+
countByteIndex: WAVEFORM_COUNT_BYTE,
|
|
41
|
+
sampleRateHz: SAMPLES_PER_SECOND,
|
|
42
|
+
millivoltsPerCount: _viatomEcgFiles.VIATOM_ECG_MILLIVOLTS_PER_COUNT,
|
|
43
|
+
noSignalCount: NO_SIGNAL_COUNT
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
exports.viatomRecordingStatus = viatomRecordingStatus;
|
|
47
|
+
//# sourceMappingURL=viatom.ecg-recording-status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_viatomEcgFiles","require","RUN_STATUS_BYTE","exports","RECORDING_STATE","LEAD_OFF_STATE","SAVED_STATE","RECORD_SECONDS_BYTE","WAVEFORM_COUNT_BYTE","SAMPLES_PER_SECOND","NO_SIGNAL_COUNT","STOP_MEASUREMENT","HOLTER_MODEL_NAMES","Set","HOLTER_MINIMUM_STORED_SECONDS","MINIMUM_STORED_SECONDS","viatomRecordingStatus","advertisedName","byteIndex","secondsByteIndex","recordingState","leadOffState","savedState","minimumStoredSeconds","has","stopCommand","waveform","countByteIndex","sampleRateHz","millivoltsPerCount","VIATOM_ECG_MILLIVOLTS_PER_COUNT","noSignalCount"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.ts"],"mappings":";;;;;;AAEA,IAAAA,eAAA,GAAAC,OAAA;AAEA;AACA,MAAMC,eAAe,GAAAC,OAAA,CAAAD,eAAA,GAAG,EAAE;AAC1B,MAAME,eAAe,GAAAD,OAAA,CAAAC,eAAA,GAAG,CAAC;AACzB,MAAMC,cAAc,GAAG,CAAC;AACxB,MAAMC,WAAW,GAAG,CAAC;;AAErB;AACA,MAAMC,mBAAmB,GAAG,EAAE;;AAE9B;AACA,MAAMC,mBAAmB,GAAG,EAAE;AAC9B,MAAMC,kBAAkB,GAAG,GAAG;AAC9B,MAAMC,eAAe,GAAG,MAAM;;AAE9B;AACA,MAAMC,gBAAgB,GAAG,IAAI;;AAE7B;AACA,MAAMC,kBAAkB,GAAG,IAAIC,GAAG,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;AACnE,MAAMC,6BAA6B,GAAG,GAAG;AACzC,MAAMC,sBAAsB,GAAG,EAAE;;AAEjC;AACA,MAAMC,qBAAqB,GACzBC,cAAsB,KAC8B;EACpDC,SAAS,EAAEhB,eAAe;EAC1BiB,gBAAgB,EAAEZ,mBAAmB;EACrCa,cAAc,EAAEhB,eAAe;EAC/BiB,YAAY,EAAEhB,cAAc;EAC5BiB,UAAU,EAAEhB,WAAW;EACvBiB,oBAAoB,EAAEX,kBAAkB,CAACY,GAAG,CAACP,cAAc,CAAC,GACxDH,6BAA6B,GAC7BC,sBAAsB;EAC1BU,WAAW,EAAEd,gBAAgB;EAC7Be,QAAQ,EAAE;IACRC,cAAc,EAAEnB,mBAAmB;IACnCoB,YAAY,EAAEnB,kBAAkB;IAChCoB,kBAAkB,EAAEC,+CAA+B;IACnDC,aAAa,EAAErB;EACjB;AACF,CAAC,CAAC;AAACP,OAAA,CAAAa,qBAAA,GAAAA,qBAAA","ignoreList":[]}
|
|
@@ -17,17 +17,71 @@ var _lepuTransports = require("../lepu/lepu.transports.js");
|
|
|
17
17
|
* the blood-pressure monitors answer, and its stored files are read with `0x03`-`0x05`
|
|
18
18
|
* rather than the generic `0xF1`-`0xF4`. A file transfer written for the rest of the family
|
|
19
19
|
* does not apply to these.
|
|
20
|
+
*
|
|
21
|
+
* A ring that serves its pulse wave (`0x1B`) is polled for that instead: its answer starts with
|
|
22
|
+
* the same saturation and pulse rate, followed by the wave.
|
|
20
23
|
*/
|
|
21
24
|
|
|
22
25
|
/** Realtime parameters. A read: it reports what the sensor sees and starts nothing. */
|
|
23
26
|
const RT_PARAM = 0x17;
|
|
24
27
|
|
|
25
|
-
/** Status, payload length, oxygen
|
|
26
|
-
const CASE_SELECTOR_BYTES = [1, 5, 6, 7, 8, 9, 18];
|
|
28
|
+
/** Status, payload length, oxygen and pulse, then the sensor state of a parameters answer and of a wave answer. */
|
|
29
|
+
const CASE_SELECTOR_BYTES = [1, 5, 6, 7, 8, 9, 18, 13];
|
|
27
30
|
|
|
28
31
|
/** Header plus the complete realtime response, including sensor state and checksum. */
|
|
29
32
|
const MIN_LENGTH_BYTES = 21;
|
|
33
|
+
|
|
34
|
+
/** A wave answer of two samples or more, longer than any parameters answer, so the two never share a case. */
|
|
35
|
+
const WAVE_MIN_LENGTH_BYTES = MIN_LENGTH_BYTES + 1;
|
|
30
36
|
const PAYLOAD = 7;
|
|
37
|
+
const OXYGEN_AND_PULSE_FIELDS = [{
|
|
38
|
+
name: "bloodOxygen",
|
|
39
|
+
byteIndexes: [PAYLOAD],
|
|
40
|
+
encoding: "uint",
|
|
41
|
+
unit: "%"
|
|
42
|
+
}, {
|
|
43
|
+
name: "pulseRate",
|
|
44
|
+
byteIndexes: [PAYLOAD + 1, PAYLOAD + 2],
|
|
45
|
+
byteOrder: "little",
|
|
46
|
+
encoding: "uint",
|
|
47
|
+
unit: "bpm"
|
|
48
|
+
}];
|
|
49
|
+
const CASES = [{
|
|
50
|
+
selector: "000002??????????",
|
|
51
|
+
kind: "idle",
|
|
52
|
+
description: "Device information response"
|
|
53
|
+
}, {
|
|
54
|
+
selector: "000d00ffffff00??",
|
|
55
|
+
kind: "idle",
|
|
56
|
+
description: "No finger detected"
|
|
57
|
+
}, {
|
|
58
|
+
selector: "000d0000000001??",
|
|
59
|
+
kind: "idle",
|
|
60
|
+
description: "Sensor acquiring"
|
|
61
|
+
}, {
|
|
62
|
+
selector: "000d00??????01??",
|
|
63
|
+
kind: "result",
|
|
64
|
+
measurementTypeKey: _next.MeasurementTypeKey.bloodOxygenPulseRate,
|
|
65
|
+
description: "Realtime parameters",
|
|
66
|
+
fields: OXYGEN_AND_PULSE_FIELDS
|
|
67
|
+
}, {
|
|
68
|
+
selector: "00????????????00",
|
|
69
|
+
kind: "idle",
|
|
70
|
+
minLengthBytes: WAVE_MIN_LENGTH_BYTES,
|
|
71
|
+
description: "Pulse wave without sensor contact"
|
|
72
|
+
}, {
|
|
73
|
+
selector: "00????000000??01",
|
|
74
|
+
kind: "idle",
|
|
75
|
+
minLengthBytes: WAVE_MIN_LENGTH_BYTES,
|
|
76
|
+
description: "Pulse wave, sensor acquiring"
|
|
77
|
+
}, {
|
|
78
|
+
selector: "00????????????01",
|
|
79
|
+
kind: "result",
|
|
80
|
+
minLengthBytes: WAVE_MIN_LENGTH_BYTES,
|
|
81
|
+
measurementTypeKey: _next.MeasurementTypeKey.bloodOxygenPulseRate,
|
|
82
|
+
description: "Realtime parameters with the pulse wave",
|
|
83
|
+
fields: OXYGEN_AND_PULSE_FIELDS
|
|
84
|
+
}];
|
|
31
85
|
const SPOT_CHECK_TIMEOUT_MS = 60_000;
|
|
32
86
|
|
|
33
87
|
/** OxyII realtime-parameter replies carry the values after the seven-byte frame header. */
|
|
@@ -95,38 +149,10 @@ const viatomOximeter = (advertisedName, params) => {
|
|
|
95
149
|
emit: "mean"
|
|
96
150
|
},
|
|
97
151
|
pollCommand: RT_PARAM,
|
|
152
|
+
pulseWave: true,
|
|
98
153
|
minLengthBytes: MIN_LENGTH_BYTES,
|
|
99
154
|
caseSelectorBytes: CASE_SELECTOR_BYTES,
|
|
100
|
-
cases:
|
|
101
|
-
selector: "000002????????",
|
|
102
|
-
kind: "idle",
|
|
103
|
-
description: "Device information response"
|
|
104
|
-
}, {
|
|
105
|
-
selector: "000d00ffffff00",
|
|
106
|
-
kind: "idle",
|
|
107
|
-
description: "No finger detected"
|
|
108
|
-
}, {
|
|
109
|
-
selector: "000d0000000001",
|
|
110
|
-
kind: "idle",
|
|
111
|
-
description: "Sensor acquiring"
|
|
112
|
-
}, {
|
|
113
|
-
selector: "000d00??????01",
|
|
114
|
-
kind: "result",
|
|
115
|
-
measurementTypeKey: _next.MeasurementTypeKey.bloodOxygenPulseRate,
|
|
116
|
-
description: "Realtime parameters",
|
|
117
|
-
fields: [{
|
|
118
|
-
name: "bloodOxygen",
|
|
119
|
-
byteIndexes: [PAYLOAD],
|
|
120
|
-
encoding: "uint",
|
|
121
|
-
unit: "%"
|
|
122
|
-
}, {
|
|
123
|
-
name: "pulseRate",
|
|
124
|
-
byteIndexes: [PAYLOAD + 1, PAYLOAD + 2],
|
|
125
|
-
byteOrder: "little",
|
|
126
|
-
encoding: "uint",
|
|
127
|
-
unit: "bpm"
|
|
128
|
-
}]
|
|
129
|
-
}],
|
|
155
|
+
cases: CASES,
|
|
130
156
|
...(expectedDeviceTypes === undefined ? {} : {
|
|
131
157
|
expectedDeviceTypes
|
|
132
158
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_next","require","_lepuNameMatch","_lepuTransports","RT_PARAM","CASE_SELECTOR_BYTES","MIN_LENGTH_BYTES","PAYLOAD","
|
|
1
|
+
{"version":3,"names":["_next","require","_lepuNameMatch","_lepuTransports","RT_PARAM","CASE_SELECTOR_BYTES","MIN_LENGTH_BYTES","WAVE_MIN_LENGTH_BYTES","PAYLOAD","OXYGEN_AND_PULSE_FIELDS","name","byteIndexes","encoding","unit","byteOrder","CASES","selector","kind","description","measurementTypeKey","MeasurementTypeKey","bloodOxygenPulseRate","fields","minLengthBytes","SPOT_CHECK_TIMEOUT_MS","OXYII_MIN_LENGTH_BYTES","OXYII_CASE_SELECTOR_BYTES","OXYII_CASES","scale","decimals","VIATOM_OXYII_NAMES","exports","viatomOximeter","advertisedName","params","expectedDeviceTypes","undefined","lepuDevice","id","toLowerCase","replace","nameMatch","lepuNameMatch","stuckDataTimeoutMs","protocol","manufacturerDataProtocol","rejectEncryptionAtBytes","v2","caseSelectorBytes","cases","setClockBeforeInfo","writeWithoutResponse","sessionPolicy","minSamples","emit","pollCommand","pulseWave","viatomOxyIiMonitor","transport","VIATOM_OXIMETER_NAMES"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.oximeters.ts"],"mappings":";;;;;;AAEA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA;AARA;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAMG,QAAQ,GAAG,IAAI;;AAErB;AACA,MAAMC,mBAAmB,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC;;AAEtD;AACA,MAAMC,gBAAgB,GAAG,EAAE;;AAE3B;AACA,MAAMC,qBAAqB,GAAGD,gBAAgB,GAAG,CAAC;AAElD,MAAME,OAAO,GAAG,CAAC;AAEjB,MAAMC,uBAA0C,GAAG,CACjD;EACEC,IAAI,EAAE,aAAa;EACnBC,WAAW,EAAE,CAACH,OAAO,CAAC;EACtBI,QAAQ,EAAE,MAAM;EAChBC,IAAI,EAAE;AACR,CAAC,EACD;EACEH,IAAI,EAAE,WAAW;EACjBC,WAAW,EAAE,CAACH,OAAO,GAAG,CAAC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