@ovok/native 1.2.0 → 1.4.0
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/auth/sign-in/components/social-logins/apple-login-button.js +9 -3
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login-button.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login-button.js +8 -2
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login-button.js.map +1 -1
- package/lib/commonjs/modules/bt-device/constants/device-instruction-pdfs.js +22 -22
- package/lib/commonjs/modules/bt-device/constants/device-instruction-pdfs.js.map +1 -1
- package/lib/commonjs/modules/bt-device/constants/device-list-items.js +36 -0
- package/lib/commonjs/modules/bt-device/constants/device-list-items.js.map +1 -1
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-assets.js +36 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-assets.js.map +1 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-entries.js +45 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-entries.js.map +1 -0
- package/lib/commonjs/modules/bt-device/constants/supported-devices.js +198 -42
- package/lib/commonjs/modules/bt-device/constants/supported-devices.js.map +1 -1
- package/lib/commonjs/modules/bt-management/components/bluetooth-device-picker.js +88 -0
- package/lib/commonjs/modules/bt-management/components/bluetooth-device-picker.js.map +1 -0
- package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js +77 -10
- package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
- package/lib/commonjs/modules/bt-management/constants/integrated-devices-map.js +1 -1
- package/lib/commonjs/modules/bt-management/constants/integrated-devices-map.js.map +1 -1
- package/lib/commonjs/modules/bt-management/index.js +77 -0
- package/lib/commonjs/modules/bt-management/index.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/background-sync/background-ble-manager.js +27 -0
- package/lib/commonjs/modules/bt-management/services/background-sync/background-ble-manager.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/background-sync/background-service-uuids.js +31 -0
- package/lib/commonjs/modules/bt-management/services/background-sync/background-service-uuids.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/background-sync/background-sync-coordinator.js +104 -0
- package/lib/commonjs/modules/bt-management/services/background-sync/background-sync-coordinator.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/bt-manager.js +59 -6
- package/lib/commonjs/modules/bt-management/services/bt-manager.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/custom/define-custom-device.js +6 -2
- package/lib/commonjs/modules/bt-management/services/custom/define-custom-device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/device-creator.js +19 -8
- package/lib/commonjs/modules/bt-management/services/device-creator.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj.thermometers.js +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj.thermometers.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01-command-builders.js +50 -0
- package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01-command-builders.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01-command-sequencer.js +78 -127
- package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01-command-sequencer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01.device.js +2 -0
- package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01.frame-reader.js +60 -0
- package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01.frame-reader.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js +74 -0
- package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/boso/boso.medicus.js +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/boso/boso.medicus.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-command-writer.js +3 -0
- package/lib/commonjs/modules/bt-management/services/devices/bt-command-writer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js +37 -4
- 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.file-transfer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.transports.js +4 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.transports.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js +2 -1
- package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/uebe/visomat.comfort-soft-bt.js +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/uebe/visomat.comfort-soft-bt.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.bp-monitors.js +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.bp-monitors.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js +1 -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 +35 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-files.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js +3 -2
- 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.lepod.js +2 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.lepod.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.oximeters.js +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.oximeters.js.map +1 -1
- package/lib/commonjs/modules/bt-management/types/background-sync.js +6 -0
- package/lib/commonjs/modules/bt-management/types/background-sync.js.map +1 -0
- package/lib/commonjs/modules/bt-management/types/device-measurement-map.js.map +1 -1
- package/lib/commonjs/modules/data-sync/services/managers/data-processor.js +11 -2
- package/lib/commonjs/modules/data-sync/services/managers/data-processor.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/get-samples-from-health.js +3 -1
- 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 +3 -1
- package/lib/commonjs/modules/data-sync/utils/get-total-samples-count.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/health-units.js +22 -0
- package/lib/commonjs/modules/data-sync/utils/health-units.js.map +1 -0
- package/lib/module/modules/auth/sign-in/components/social-logins/apple-login-button.js +9 -3
- package/lib/module/modules/auth/sign-in/components/social-logins/apple-login-button.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/social-logins/google-login-button.js +8 -2
- package/lib/module/modules/auth/sign-in/components/social-logins/google-login-button.js.map +1 -1
- package/lib/module/modules/bt-device/constants/device-instruction-pdfs.js +1 -1
- package/lib/module/modules/bt-device/constants/device-instruction-pdfs.js.map +1 -1
- package/lib/module/modules/bt-device/constants/device-list-items.js +36 -0
- package/lib/module/modules/bt-device/constants/device-list-items.js.map +1 -1
- package/lib/module/modules/bt-device/constants/supported-device-catalog-assets.js +33 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-assets.js.map +1 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-entries.js +41 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-entries.js.map +1 -0
- package/lib/module/modules/bt-device/constants/supported-devices.js +188 -32
- package/lib/module/modules/bt-device/constants/supported-devices.js.map +1 -1
- package/lib/module/modules/bt-management/components/bluetooth-device-picker.js +83 -0
- package/lib/module/modules/bt-management/components/bluetooth-device-picker.js.map +1 -0
- package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js +77 -10
- package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
- package/lib/module/modules/bt-management/constants/integrated-devices-map.js +1 -1
- package/lib/module/modules/bt-management/constants/integrated-devices-map.js.map +1 -1
- package/lib/module/modules/bt-management/index.js +7 -0
- package/lib/module/modules/bt-management/index.js.map +1 -1
- package/lib/module/modules/bt-management/services/background-sync/background-ble-manager.js +22 -0
- package/lib/module/modules/bt-management/services/background-sync/background-ble-manager.js.map +1 -0
- package/lib/module/modules/bt-management/services/background-sync/background-service-uuids.js +26 -0
- package/lib/module/modules/bt-management/services/background-sync/background-service-uuids.js.map +1 -0
- package/lib/module/modules/bt-management/services/background-sync/background-sync-coordinator.js +100 -0
- package/lib/module/modules/bt-management/services/background-sync/background-sync-coordinator.js.map +1 -0
- package/lib/module/modules/bt-management/services/bt-manager.js +61 -7
- package/lib/module/modules/bt-management/services/bt-manager.js.map +1 -1
- package/lib/module/modules/bt-management/services/custom/define-custom-device.js +6 -2
- package/lib/module/modules/bt-management/services/custom/define-custom-device.js.map +1 -1
- package/lib/module/modules/bt-management/services/device-creator.js +19 -8
- package/lib/module/modules/bt-management/services/device-creator.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/aoj/aoj.thermometers.js +1 -1
- package/lib/module/modules/bt-management/services/devices/aoj/aoj.thermometers.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bc01/bc01-command-builders.js +40 -0
- package/lib/module/modules/bt-management/services/devices/bc01/bc01-command-builders.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/bc01/bc01-command-sequencer.js +59 -109
- package/lib/module/modules/bt-management/services/devices/bc01/bc01-command-sequencer.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bc01/bc01.device.js +2 -0
- package/lib/module/modules/bt-management/services/devices/bc01/bc01.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bc01/bc01.frame-reader.js +56 -0
- package/lib/module/modules/bt-management/services/devices/bc01/bc01.frame-reader.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js +69 -0
- package/lib/module/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/boso/boso.medicus.js +1 -1
- package/lib/module/modules/bt-management/services/devices/boso/boso.medicus.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-command-writer.js +3 -0
- package/lib/module/modules/bt-management/services/devices/bt-command-writer.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/custom/custom.device.js +36 -4
- 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.file-transfer.js +2 -1
- 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.transports.js +4 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.transports.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js +2 -1
- package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/uebe/visomat.comfort-soft-bt.js +1 -1
- package/lib/module/modules/bt-management/services/devices/uebe/visomat.comfort-soft-bt.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/veroval/veroval.bp-monitors.js +1 -1
- package/lib/module/modules/bt-management/services/devices/veroval/veroval.bp-monitors.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js +1 -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 +31 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-files.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js +3 -2
- 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.lepod.js +2 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.lepod.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.oximeters.js +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.oximeters.js.map +1 -1
- package/lib/module/modules/bt-management/types/background-sync.js +4 -0
- package/lib/module/modules/bt-management/types/background-sync.js.map +1 -0
- package/lib/module/modules/bt-management/types/device-measurement-map.js.map +1 -1
- package/lib/module/modules/data-sync/services/managers/data-processor.js +11 -2
- package/lib/module/modules/data-sync/services/managers/data-processor.js.map +1 -1
- package/lib/module/modules/data-sync/utils/get-samples-from-health.js +3 -1
- 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 +3 -1
- package/lib/module/modules/data-sync/utils/get-total-samples-count.js.map +1 -1
- package/lib/module/modules/data-sync/utils/health-units.js +17 -0
- package/lib/module/modules/data-sync/utils/health-units.js.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/apple-login-button.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/google-login-button.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-device/constants/device-instruction-pdfs.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/bt-device/constants/device-instruction-pdfs.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-device/constants/device-list-items.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-assets.d.ts +31 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-assets.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-entries.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-entries.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-devices.d.ts +36 -22
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-devices.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/components/bluetooth-device-picker.d.ts +11 -0
- package/lib/typescript/commonjs/src/modules/bt-management/components/bluetooth-device-picker.d.ts.map +1 -0
- 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/index.d.ts +7 -0
- package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/background-sync/background-ble-manager.d.ts +13 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/background-sync/background-ble-manager.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/background-sync/background-service-uuids.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/background-sync/background-service-uuids.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/background-sync/background-sync-coordinator.d.ts +29 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/background-sync/background-sync-coordinator.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts +26 -3
- 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/define-custom-device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/device-creator.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/device-creator.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj.thermometers.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj.thermometers.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01-command-builders.d.ts +31 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01-command-builders.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01-command-sequencer.d.ts +6 -5
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01-command-sequencer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01.device.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01.frame-reader.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01.frame-reader.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts +19 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/boso/boso.medicus.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/boso/boso.medicus.d.ts.map +1 -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/custom/custom.device.d.ts +1 -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.file-transfer.d.ts +3 -2
- 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.transports.d.ts +3 -2
- 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/standard-gatt/standard-gatt.profile.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/uebe/visomat.comfort-soft-bt.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/uebe/visomat.comfort-soft-bt.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.bp-monitors.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.bp-monitors.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts +1 -1
- 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 +9 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts +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.lepod.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.lepod.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts +1 -1
- 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/types/background-sync.d.ts +32 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/background-sync.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/btprovider-children-props.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/btprovider-children-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-definition.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-definition.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-spec.d.ts +6 -4
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-spec.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-lepu-spec.d.ts +2 -0
- 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-command.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-command.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-measurement-map.d.ts +4 -4
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-measurement-map.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/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-units.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/health-units.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/apple-login-button.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/google-login-button.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-device/constants/device-instruction-pdfs.d.ts +1 -1
- package/lib/typescript/module/src/modules/bt-device/constants/device-instruction-pdfs.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-device/constants/device-list-items.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-assets.d.ts +31 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-assets.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-entries.d.ts +3 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-entries.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-devices.d.ts +36 -22
- package/lib/typescript/module/src/modules/bt-device/constants/supported-devices.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/components/bluetooth-device-picker.d.ts +11 -0
- package/lib/typescript/module/src/modules/bt-management/components/bluetooth-device-picker.d.ts.map +1 -0
- 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/index.d.ts +7 -0
- package/lib/typescript/module/src/modules/bt-management/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/background-sync/background-ble-manager.d.ts +13 -0
- package/lib/typescript/module/src/modules/bt-management/services/background-sync/background-ble-manager.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/background-sync/background-service-uuids.d.ts +3 -0
- package/lib/typescript/module/src/modules/bt-management/services/background-sync/background-service-uuids.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/background-sync/background-sync-coordinator.d.ts +29 -0
- package/lib/typescript/module/src/modules/bt-management/services/background-sync/background-sync-coordinator.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts +26 -3
- 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/define-custom-device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/device-creator.d.ts +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/device-creator.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj.thermometers.d.ts +2 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj.thermometers.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01-command-builders.d.ts +31 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01-command-builders.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01-command-sequencer.d.ts +6 -5
- package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01-command-sequencer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01.device.d.ts +2 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01.frame-reader.d.ts +16 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01.frame-reader.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts +19 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/boso/boso.medicus.d.ts +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/boso/boso.medicus.d.ts.map +1 -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/custom/custom.device.d.ts +1 -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.file-transfer.d.ts +3 -2
- 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.transports.d.ts +3 -2
- 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/standard-gatt/standard-gatt.profile.d.ts +2 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/uebe/visomat.comfort-soft-bt.d.ts +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/uebe/visomat.comfort-soft-bt.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.bp-monitors.d.ts +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.bp-monitors.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts +1 -1
- 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 +9 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts +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.lepod.d.ts +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.lepod.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts +1 -1
- 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/types/background-sync.d.ts +32 -0
- package/lib/typescript/module/src/modules/bt-management/types/background-sync.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/btprovider-children-props.d.ts +2 -0
- package/lib/typescript/module/src/modules/bt-management/types/btprovider-children-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/custom-device-definition.d.ts +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/custom-device-definition.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/custom-device-spec.d.ts +6 -4
- package/lib/typescript/module/src/modules/bt-management/types/custom-device-spec.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/custom-lepu-spec.d.ts +2 -0
- 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-command.d.ts +5 -0
- package/lib/typescript/module/src/modules/bt-management/types/device-command.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/device-measurement-map.d.ts +4 -4
- package/lib/typescript/module/src/modules/bt-management/types/device-measurement-map.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/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-units.d.ts +3 -0
- package/lib/typescript/module/src/modules/data-sync/utils/health-units.d.ts.map +1 -0
- package/package.json +5 -3
|
@@ -10,6 +10,7 @@ var _hexToByte = require("../../../utils/hex-to-byte.js");
|
|
|
10
10
|
var _btManagedDevice = require("../bt-managed-device.js");
|
|
11
11
|
var _bc01CommandSequencer = require("./bc01-command-sequencer.js");
|
|
12
12
|
var _bc01FrameParser = require("./bc01-frame-parser.js");
|
|
13
|
+
var _bc01FrameReader = require("./bc01.frame-reader.js");
|
|
13
14
|
var _bc01MainServices = require("./bc01.main-services.js");
|
|
14
15
|
/** Minimum bytes a complete frame carries, keyed by its opening opcode. */
|
|
15
16
|
const BC01_FRAME_MIN_LENGTH = {
|
|
@@ -45,6 +46,7 @@ const BC01_FRAME_MIN_LENGTH = {
|
|
|
45
46
|
class BC01Device extends _btManagedDevice.BTManagedDevice {
|
|
46
47
|
onStreamStart = () => {};
|
|
47
48
|
mainServices = _bc01MainServices.bc01MainServices;
|
|
49
|
+
frameReader = new _bc01FrameReader.Bc01FrameReader();
|
|
48
50
|
|
|
49
51
|
/**
|
|
50
52
|
* 90 s covers the maximum firmware-side reagent-pad settle time on a URS-7
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_core","require","_caseType","_hexToByte","_btManagedDevice","_bc01CommandSequencer","_bc01FrameParser","_bc01MainServices","BC01_FRAME_MIN_LENGTH","BC01Device","BTManagedDevice","onStreamStart","mainServices","bc01MainServices","stuckDataTimeout","constructor","device","params","createCommandSequencer","Bc01CommandSequencer","write","serviceUuid","uuid","characteristicUuid","writeUuid","onRefused","reason","onError","Error","validatePackage","pkg","length","opcode","hexToByte","minLength","undefined","handleDependentResult","data","frame","reportUrsRecord","parsingCase","caseType","CaseType","OTHER","handleSuccessResult","parsed","parseBc01Record","measuredValues","BC01_ANALYTE_ORDER","reduce","acc","analyte","value","values","Object","keys","reading","RESULT","measurementTypeKey","MeasurementTypeKey","uricAcid","urineValues","recordedAt","timestamp","onResult","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/bc01/bc01.device.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAGA,IAAAC,SAAA,GAAAD,OAAA;AAQA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,gBAAA,GAAAH,OAAA;AAEA,IAAAI,qBAAA,GAAAJ,OAAA;AACA,IAAAK,gBAAA,GAAAL,OAAA;AACA,IAAAM,
|
|
1
|
+
{"version":3,"names":["_core","require","_caseType","_hexToByte","_btManagedDevice","_bc01CommandSequencer","_bc01FrameParser","_bc01FrameReader","_bc01MainServices","BC01_FRAME_MIN_LENGTH","BC01Device","BTManagedDevice","onStreamStart","mainServices","bc01MainServices","frameReader","Bc01FrameReader","stuckDataTimeout","constructor","device","params","createCommandSequencer","Bc01CommandSequencer","write","serviceUuid","uuid","characteristicUuid","writeUuid","onRefused","reason","onError","Error","validatePackage","pkg","length","opcode","hexToByte","minLength","undefined","handleDependentResult","data","frame","reportUrsRecord","parsingCase","caseType","CaseType","OTHER","handleSuccessResult","parsed","parseBc01Record","measuredValues","BC01_ANALYTE_ORDER","reduce","acc","analyte","value","values","Object","keys","reading","RESULT","measurementTypeKey","MeasurementTypeKey","uricAcid","urineValues","recordedAt","timestamp","onResult","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/bc01/bc01.device.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAGA,IAAAC,SAAA,GAAAD,OAAA;AAQA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,gBAAA,GAAAH,OAAA;AAEA,IAAAI,qBAAA,GAAAJ,OAAA;AACA,IAAAK,gBAAA,GAAAL,OAAA;AACA,IAAAM,gBAAA,GAAAN,OAAA;AACA,IAAAO,iBAAA,GAAAP,OAAA;AAEA;AACA,MAAMQ,qBAA6C,GAAG;EACpD,IAAI,EAAE,CAAC;EAAE;EACT,IAAI,EAAE,CAAC;EAAE;EACT,IAAI,EAAE,CAAC;EAAE;EACT,IAAI,EAAE,CAAC;EAAE;EACT,IAAI,EAAE,EAAE;EAAE;EACV,IAAI,EAAE,EAAE;EAAE;EACV,IAAI,EAAE,CAAC;EAAE;EACT,IAAI,EAAE,EAAE;EAAE;EACV,IAAI,EAAE,EAAE,CAAE;AACZ,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,UAAU,SAASC,gCAAe,CAAyB;EAC5DC,aAAa,GAAeA,CAAA,KAAM,CAAC,CAAC;EAEpCC,YAAY,GAAeC,kCAAgB;EAC3CC,WAAW,GAAoB,IAAIC,gCAAe,CAAC,CAAC;;EAE9D;AACF;AACA;AACA;AACA;AACA;EACYC,gBAAgB,GAAG,MAAM;EAEn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AAA,EAAmB;IAC9C;EACF;EAEQL,eAAeA,CAACD,KAAwB,EAAQ;IACtD,MAAMO,MAAM,GAAG,IAAAC,gCAAe,EAACR,KAAK,CAAC;IAErC,IAAI,CAACO,MAAM,EAAE;MACX;IACF;IAEA,MAAME,cAAc,GAAGC,mCAAkB,CAACC,MAAM,CAE9C,CAACC,GAAG,EAAEC,OAAO,KAAK;MAClB,MAAMC,KAAK,GAAGP,MAAM,CAACQ,MAAM,CAACF,OAAO,CAAC;MAEpC,IAAIC,KAAK,KAAKjB,SAAS,EAAE;QACvBe,GAAG,CAACC,OAAO,CAAC,GAAGC,KAAK;MACtB;MAEA,OAAOF,GAAG;IACZ,CAAC,EAAE,CAAC,CAAC,CAAC;IAEN,IAAII,MAAM,CAACC,IAAI,CAACR,cAAc,CAAC,CAAChB,MAAM,KAAK,CAAC,EAAE;MAC5C,IAAI,CAACJ,OAAO,GAAG,sDAAsD,CAAC;MAEtE;IACF;IAEA,MAAM6B,OAAO,GAAG;MACdf,QAAQ,EAAEC,kBAAQ,CAACe,MAAM;MACzBC,kBAAkB,EAAEC,wBAAkB,CAACC,QAAQ;MAC/CC,WAAW,EAAE,EAAE;MACfC,UAAU,EAAEjB,MAAM,CAACkB,SAAS;MAC5B,GAAGhB;IACL,CAEC;IAED,IAAI,CAACiB,QAAQ,GAAGR,OAAO,CAAC;EAC1B;AACF;AAACS,OAAA,CAAA1D,UAAA,GAAAA,UAAA","ignoreList":[]}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.bc01FrameLengths = exports.Bc01FrameReader = void 0;
|
|
7
|
+
var _frameReadStatus = require("../../../types/frame-read-status.js");
|
|
8
|
+
/** Fixed BC401 reply lengths, keyed by the first byte of each PHMS frame. */
|
|
9
|
+
const BC01_FRAME_LENGTHS = exports.bc01FrameLengths = {
|
|
10
|
+
f0: 2,
|
|
11
|
+
f2: 8,
|
|
12
|
+
f3: 3,
|
|
13
|
+
e0: 7,
|
|
14
|
+
e1: 16,
|
|
15
|
+
e2: 16,
|
|
16
|
+
e3: 3,
|
|
17
|
+
e4: 36,
|
|
18
|
+
e5: 36
|
|
19
|
+
};
|
|
20
|
+
const lower = byte => (byte ?? "").toLowerCase();
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Isolates the fixed-length frames used by Contec BC401BT.
|
|
24
|
+
*
|
|
25
|
+
* PHMS keeps a byte queue and repeatedly consumes complete replies. BLE notifications are
|
|
26
|
+
* not frame boundaries, so the SDK must retain partial replies and drain multiple replies
|
|
27
|
+
* when Android combines them into one notification.
|
|
28
|
+
*/
|
|
29
|
+
class Bc01FrameReader {
|
|
30
|
+
readFrame(buffer) {
|
|
31
|
+
const start = buffer.findIndex(byte => Object.prototype.hasOwnProperty.call(BC01_FRAME_LENGTHS, lower(byte)));
|
|
32
|
+
if (start === -1) {
|
|
33
|
+
return {
|
|
34
|
+
status: _frameReadStatus.FrameReadStatus.INCOMPLETE,
|
|
35
|
+
consumedBytes: buffer.length
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
const opcode = lower(buffer[start]);
|
|
39
|
+
const length = BC01_FRAME_LENGTHS[opcode];
|
|
40
|
+
if (length === undefined) {
|
|
41
|
+
return {
|
|
42
|
+
status: _frameReadStatus.FrameReadStatus.INCOMPLETE,
|
|
43
|
+
consumedBytes: start + 1
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
if (start + length > buffer.length) {
|
|
47
|
+
return {
|
|
48
|
+
status: _frameReadStatus.FrameReadStatus.INCOMPLETE,
|
|
49
|
+
consumedBytes: start
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
status: _frameReadStatus.FrameReadStatus.COMPLETE,
|
|
54
|
+
consumedBytes: start + length,
|
|
55
|
+
frame: buffer.slice(start, start + length)
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
exports.Bc01FrameReader = Bc01FrameReader;
|
|
60
|
+
//# sourceMappingURL=bc01.frame-reader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_frameReadStatus","require","BC01_FRAME_LENGTHS","exports","bc01FrameLengths","f0","f2","f3","e0","e1","e2","e3","e4","e5","lower","byte","toLowerCase","Bc01FrameReader","readFrame","buffer","start","findIndex","Object","prototype","hasOwnProperty","call","status","FrameReadStatus","INCOMPLETE","consumedBytes","length","opcode","undefined","COMPLETE","frame","slice"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/bc01/bc01.frame-reader.ts"],"mappings":";;;;;;AACA,IAAAA,gBAAA,GAAAC,OAAA;AAGA;AACA,MAAMC,kBAAoD,GAAAC,OAAA,CAAAC,gBAAA,GAAG;EAC3DC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,EAAE;EACNC,EAAE,EAAE,EAAE;EACNC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,EAAE;EACNC,EAAE,EAAE;AACN,CAAC;AAED,MAAMC,KAAK,GAAIC,IAAwB,IAAa,CAACA,IAAI,IAAI,EAAE,EAAEC,WAAW,CAAC,CAAC;;AAE9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,eAAe,CAAwB;EACpCC,SAASA,CAACC,MAAyB,EAAmB;IAC3D,MAAMC,KAAK,GAAGD,MAAM,CAACE,SAAS,CAAEN,IAAI,IAClCO,MAAM,CAACC,SAAS,CAACC,cAAc,CAACC,IAAI,CAACvB,kBAAkB,EAAEY,KAAK,CAACC,IAAI,CAAC,CACtE,CAAC;IAED,IAAIK,KAAK,KAAK,CAAC,CAAC,EAAE;MAChB,OAAO;QACLM,MAAM,EAAEC,gCAAe,CAACC,UAAU;QAClCC,aAAa,EAAEV,MAAM,CAACW;MACxB,CAAC;IACH;IAEA,MAAMC,MAAM,GAAGjB,KAAK,CAACK,MAAM,CAACC,KAAK,CAAC,CAAC;IACnC,MAAMU,MAAM,GAAG5B,kBAAkB,CAAC6B,MAAM,CAAC;IAEzC,IAAID,MAAM,KAAKE,SAAS,EAAE;MACxB,OAAO;QACLN,MAAM,EAAEC,gCAAe,CAACC,UAAU;QAClCC,aAAa,EAAET,KAAK,GAAG;MACzB,CAAC;IACH;IAEA,IAAIA,KAAK,GAAGU,MAAM,GAAGX,MAAM,CAACW,MAAM,EAAE;MAClC,OAAO;QACLJ,MAAM,EAAEC,gCAAe,CAACC,UAAU;QAClCC,aAAa,EAAET;MACjB,CAAC;IACH;IAEA,OAAO;MACLM,MAAM,EAAEC,gCAAe,CAACM,QAAQ;MAChCJ,aAAa,EAAET,KAAK,GAAGU,MAAM;MAC7BI,KAAK,EAAEf,MAAM,CAACgB,KAAK,CAACf,KAAK,EAAEA,KAAK,GAAGU,MAAM;IAC3C,CAAC;EACH;AACF;AAAC3B,OAAA,CAAAc,eAAA,GAAAA,eAAA","ignoreList":[]}
|
package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BloodGlucoseDevice = void 0;
|
|
7
|
+
var _core = require("@ovok/core");
|
|
8
|
+
var _caseType = require("../../../types/case-type.js");
|
|
9
|
+
var _integratedDevices = require("../../../types/integrated-devices.js");
|
|
10
|
+
var _hexToByte = require("../../../utils/hex-to-byte.js");
|
|
11
|
+
var _btManagedDevice = require("../bt-managed-device.js");
|
|
12
|
+
const LEGACY_SERVICE = "00001523-1212-efde-1523-785feabcd123";
|
|
13
|
+
const LEGACY_CHARACTERISTIC = "00001524-1212-efde-1523-785feabcd123";
|
|
14
|
+
const BGM_SERVICE = "0003cdd0-0000-1000-8000-00805f9b0131";
|
|
15
|
+
const BGM_CHARACTERISTIC = "0003cdd1-0000-1000-8000-00805f9b0131";
|
|
16
|
+
const GLUCOSE_REQUEST = "512600000000a31a";
|
|
17
|
+
const servicesFor = device => {
|
|
18
|
+
const isBgm = device === _integratedDevices.IntegratedDevices.BGM;
|
|
19
|
+
return [{
|
|
20
|
+
uuid: isBgm ? BGM_SERVICE : LEGACY_SERVICE,
|
|
21
|
+
monitorUuids: [{
|
|
22
|
+
uuid: isBgm ? BGM_CHARACTERISTIC : LEGACY_CHARACTERISTIC,
|
|
23
|
+
parsingModel: {
|
|
24
|
+
caseValuePosition: [isBgm ? 9 : 1],
|
|
25
|
+
cases: [...(isBgm ? ["00", "0b", "10", "11", "18", "22", "33", "55"] : ["46", ...(device === _integratedDevices.IntegratedDevices.GLUCOCHECK ? ["50"] : [])]).map(caseValue => ({
|
|
26
|
+
caseType: _caseType.CaseType.OTHER,
|
|
27
|
+
caseValue,
|
|
28
|
+
parseDefinitions: []
|
|
29
|
+
})), {
|
|
30
|
+
measurementTypeKey: _core.MeasurementTypeKey.bloodGlucose,
|
|
31
|
+
caseType: _caseType.CaseType.RESULT,
|
|
32
|
+
caseValue: isBgm ? "44" : "26",
|
|
33
|
+
parseDefinitions: [{
|
|
34
|
+
name: "bloodGlucose",
|
|
35
|
+
parseType: "custom",
|
|
36
|
+
byteIndexes: isBgm ? [10, 11] : [3, 2],
|
|
37
|
+
parseReference: 16,
|
|
38
|
+
customParserDefinition: value => {
|
|
39
|
+
if (isBgm) {
|
|
40
|
+
return (0, _hexToByte.hexToByte)(value.slice(0, 2)) * 100 + (0, _hexToByte.hexToByte)(value.slice(2, 4));
|
|
41
|
+
}
|
|
42
|
+
const raw = parseInt(value, 16);
|
|
43
|
+
return device === _integratedDevices.IntegratedDevices.TAIDOC_GLUCOSE ? Number((raw * 18).toFixed(2)) : raw;
|
|
44
|
+
}
|
|
45
|
+
}]
|
|
46
|
+
}]
|
|
47
|
+
}
|
|
48
|
+
}],
|
|
49
|
+
...(isBgm ? {} : {
|
|
50
|
+
writeUuid: {
|
|
51
|
+
uuid: LEGACY_CHARACTERISTIC,
|
|
52
|
+
mainCommandUuid: GLUCOSE_REQUEST
|
|
53
|
+
}
|
|
54
|
+
})
|
|
55
|
+
}];
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
/** Decodes the legacy TaiDoc, GlucoCheck Gold and TeleBGM glucose protocols. */
|
|
59
|
+
class BloodGlucoseDevice extends _btManagedDevice.BTManagedDevice {
|
|
60
|
+
stuckDataTimeout = 60_000;
|
|
61
|
+
constructor(device, params) {
|
|
62
|
+
super(device, params);
|
|
63
|
+
this.mainServices = servicesFor(params.deviceName);
|
|
64
|
+
}
|
|
65
|
+
validatePackage = pkg => pkg.length >= (this.deviceData.name === _integratedDevices.IntegratedDevices.BGM ? 12 : 8);
|
|
66
|
+
handleSuccessResult(result) {
|
|
67
|
+
if (result.caseType !== _caseType.CaseType.RESULT || result.bloodGlucose === 0) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
this.onResult?.(result);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
exports.BloodGlucoseDevice = BloodGlucoseDevice;
|
|
74
|
+
//# sourceMappingURL=blood-glucose.device.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_core","require","_caseType","_integratedDevices","_hexToByte","_btManagedDevice","LEGACY_SERVICE","LEGACY_CHARACTERISTIC","BGM_SERVICE","BGM_CHARACTERISTIC","GLUCOSE_REQUEST","servicesFor","device","isBgm","IntegratedDevices","BGM","uuid","monitorUuids","parsingModel","caseValuePosition","cases","GLUCOCHECK","map","caseValue","caseType","CaseType","OTHER","parseDefinitions","measurementTypeKey","MeasurementTypeKey","bloodGlucose","RESULT","name","parseType","byteIndexes","parseReference","customParserDefinition","value","hexToByte","slice","raw","parseInt","TAIDOC_GLUCOSE","Number","toFixed","writeUuid","mainCommandUuid","BloodGlucoseDevice","BTManagedDevice","stuckDataTimeout","constructor","params","mainServices","deviceName","validatePackage","pkg","length","deviceData","handleSuccessResult","result","onResult","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/blood-glucose/blood-glucose.device.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAGA,IAAAC,SAAA,GAAAD,OAAA;AAGA,IAAAE,kBAAA,GAAAF,OAAA;AAGA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,gBAAA,GAAAJ,OAAA;AAEA,MAAMK,cAAc,GAAG,sCAAsC;AAC7D,MAAMC,qBAAqB,GAAG,sCAAsC;AACpE,MAAMC,WAAW,GAAG,sCAAsC;AAC1D,MAAMC,kBAAkB,GAAG,sCAAsC;AACjE,MAAMC,eAAe,GAAG,kBAAkB;AAO1C,MAAMC,WAAW,GAAIC,MAAqB,IAAiB;EACzD,MAAMC,KAAK,GAAGD,MAAM,KAAKE,oCAAiB,CAACC,GAAG;EAE9C,OAAO,CACL;IACEC,IAAI,EAAEH,KAAK,GAAGL,WAAW,GAAGF,cAAc;IAC1CW,YAAY,EAAE,CACZ;MACED,IAAI,EAAEH,KAAK,GAAGJ,kBAAkB,GAAGF,qBAAqB;MACxDW,YAAY,EAAE;QACZC,iBAAiB,EAAE,CAACN,KAAK,GAAG,CAAC,GAAG,CAAC,CAAC;QAClCO,KAAK,EAAE,CACL,GAAG,CAACP,KAAK,GACL,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,GAChD,CAAC,IAAI,EAAE,IAAID,MAAM,KAAKE,oCAAiB,CAACO,UAAU,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,EACpEC,GAAG,CAAEC,SAAS,KAAM;UACpBC,QAAQ,EAAEC,kBAAQ,CAACC,KAAK;UACxBH,SAAS;UACTI,gBAAgB,EAAE;QACpB,CAAC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AAW,CAACwC,MAAM,CAACE,UAAU,CAAC;EACpD;EAEUC,eAAe,GAAIC,GAAa,IACxCA,GAAG,CAACC,MAAM,KAAK,IAAI,CAACC,UAAU,CAACzB,IAAI,KAAKlB,oCAAiB,CAACC,GAAG,GAAG,EAAE,GAAG,CAAC,CAAC;EAE/D2C,mBAAmBA,CAC3BC,MAA2E,EACrE;IACN,IAAIA,MAAM,CAACnC,QAAQ,KAAKC,kBAAQ,CAACM,MAAM,IAAI4B,MAAM,CAAC7B,YAAY,KAAK,CAAC,EAAE;MACpE;IACF;IAEA,IAAI,CAAC8B,QAAQ,GAAGD,MAA0D,CAAC;EAC7E;AACF;AAACE,OAAA,CAAAd,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
|
@@ -19,7 +19,7 @@ const BOSO_MEDICUS_NAME_MATCH = exports.BOSO_MEDICUS_NAME_MATCH = /^boso medicus
|
|
|
19
19
|
* the profile's user/status bytes without inventing a boso-specific wire format.
|
|
20
20
|
*/
|
|
21
21
|
const bosoMedicusMonitor = params => (0, _standardGattDevices.standardBloodPressureDevice)({
|
|
22
|
-
id: params.id,
|
|
22
|
+
id: params.id ?? "boso-medicus-system",
|
|
23
23
|
nameMatch: params.nameMatch ?? BOSO_MEDICUS_NAME_MATCH,
|
|
24
24
|
...(params.stuckDataTimeoutMs === undefined ? {} : {
|
|
25
25
|
stuckDataTimeoutMs: params.stuckDataTimeoutMs
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_standardGattDevices","require","BOSO_MEDICUS_NAME_MATCH","exports","bosoMedicusMonitor","params","standardBloodPressureDevice","id","nameMatch","stuckDataTimeoutMs","undefined"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/boso/boso.medicus.ts"],"mappings":";;;;;;AACA,IAAAA,oBAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA,MAAMC,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,GAAG,6BAA6B;AAc7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAME,kBAAkB,GACtBC,MAAyB,IAEzB,IAAAC,gDAA2B,EAAC;EAC1BC,EAAE,EAAEF,MAAM,CAACE,EAAE;
|
|
1
|
+
{"version":3,"names":["_standardGattDevices","require","BOSO_MEDICUS_NAME_MATCH","exports","bosoMedicusMonitor","params","standardBloodPressureDevice","id","nameMatch","stuckDataTimeoutMs","undefined"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/boso/boso.medicus.ts"],"mappings":";;;;;;AACA,IAAAA,oBAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA,MAAMC,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,GAAG,6BAA6B;AAc7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAME,kBAAkB,GACtBC,MAAyB,IAEzB,IAAAC,gDAA2B,EAAC;EAC1BC,EAAE,EAAEF,MAAM,CAACE,EAAE,IAAI,qBAAqB;EACtCC,SAAS,EAAEH,MAAM,CAACG,SAAS,IAAIN,uBAAuB;EACtD,IAAIG,MAAM,CAACI,kBAAkB,KAAKC,SAAS,GACvC,CAAC,CAAC,GACF;IAAED,kBAAkB,EAAEJ,MAAM,CAACI;EAAmB,CAAC;AACvD,CAAC,CAAC;AAACN,OAAA,CAAAC,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
|
@@ -83,6 +83,9 @@ class BTCommandWriter {
|
|
|
83
83
|
* for - worse than sending nothing, because it would be answered.
|
|
84
84
|
*/
|
|
85
85
|
writeCommand = async command => {
|
|
86
|
+
if (command.delayBeforeWriteMs && command.delayBeforeWriteMs > 0) {
|
|
87
|
+
await new Promise(resolve => setTimeout(resolve, command.delayBeforeWriteMs));
|
|
88
|
+
}
|
|
86
89
|
for (const chunk of this.chunksOf(command.frame)) {
|
|
87
90
|
const written = await this.writeChunk(command, chunk);
|
|
88
91
|
if (!written) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_sLog","require","_sentryLogger","_hexToBase","MAX_WRITE_ATTEMPTS","DEFAULT_ATT_MTU","ATT_WRITE_HEADER_BYTES","BTCommandWriter","pendingWrites","Promise","resolve","mtu","constructor","device","onError","useNegotiatedMtu","Number","isInteger","reset","send","commands","then","writeInOrder","catch","error","command","writeCommand","chunk","chunksOf","frame","written","writeChunk","writeTo","value","withoutResponse","writeCharacteristicWithoutResponseForService","serviceUuid","characteristicUuid","writeCharacteristicWithResponseForService","size","Math","max","chunks","start","length","push","slice","attempt","isConnected","hexToBase64","join","sentryLogger","Error","message","deviceName","name","slog","exports"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/bt-command-writer.ts"],"mappings":";;;;;;AAEA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAEA,IAAAE,UAAA,GAAAF,OAAA;AAEA,MAAMG,kBAAkB,GAAG,CAAC;;AAE5B;AACA,MAAMC,eAAe,GAAG,EAAE;;AAE1B;AACA,MAAMC,sBAAsB,GAAG,CAAC;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,eAAe,CAAC;EACnBC,aAAa,GAAkBC,OAAO,CAACC,OAAO,CAAC,CAAC;EAChDC,GAAG,GAAGN,eAAe;EAEtBO,WAAWA,CACCC,MAAc,EACdC,OAA2C,EAC5D;IAAA,KAFiBD,MAAc,GAAdA,MAAc;IAAA,KACdC,OAA2C,GAA3CA,OAA2C;EAC3D;;EAEH;AACF;AACA;AACA;AACA;AACA;AACA;EACSC,gBAAgB,GAAIJ,GAAY,IAAW;IAChD,IAAI,OAAOA,GAAG,KAAK,QAAQ,IAAIK,MAAM,CAACC,SAAS,CAACN,GAAG,CAAC,IAAIA,GAAG,GAAG,IAAI,CAACA,GAAG,EAAE;MACtE,IAAI,CAACA,GAAG,GAAGA,GAAG;IAChB;EACF,CAAC;;EAED;EACOO,KAAK,GAAGA,CAAA,KAAY;IACzB,IAAI,CAACV,aAAa,GAAGC,OAAO,CAACC,OAAO,CAAC,CAAC;EACxC,CAAC;;EAED;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACSS,IAAI,GAAIC,QAAkC,IAAoB;IACnE,IAAI,CAACZ,aAAa,GAAG,IAAI,CAACA,aAAa,CACpCa,IAAI,CAAC,MAAM,IAAI,CAACC,YAAY,CAACF,QAAQ,CAAC,CAAC,CACvCG,KAAK,CAAEC,KAAK,IAAK;MAChB,IAAI,CAACV,OAAO,GAAGU,KAAyB,CAAC;IAC3C,CAAC,CAAC;IAEJ,OAAO,IAAI,CAAChB,aAAa;EAC3B,CAAC;EAEOc,YAAY,GAAG,MACrBF,QAAkC,IAChB;IAClB,KAAK,MAAMK,OAAO,IAAIL,QAAQ,EAAE;MAC9B,MAAM,IAAI,CAACM,YAAY,CAACD,OAAO,CAAC;IAClC;EACF,CAAC;;EAED;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACUC,YAAY,GAAG,MAAOD,OAAsB,IAAoB;IACtE,KAAK,MAAME,KAAK,IAAI,IAAI,CAACC,QAAQ,
|
|
1
|
+
{"version":3,"names":["_sLog","require","_sentryLogger","_hexToBase","MAX_WRITE_ATTEMPTS","DEFAULT_ATT_MTU","ATT_WRITE_HEADER_BYTES","BTCommandWriter","pendingWrites","Promise","resolve","mtu","constructor","device","onError","useNegotiatedMtu","Number","isInteger","reset","send","commands","then","writeInOrder","catch","error","command","writeCommand","delayBeforeWriteMs","setTimeout","chunk","chunksOf","frame","written","writeChunk","writeTo","value","withoutResponse","writeCharacteristicWithoutResponseForService","serviceUuid","characteristicUuid","writeCharacteristicWithResponseForService","size","Math","max","chunks","start","length","push","slice","attempt","isConnected","hexToBase64","join","sentryLogger","Error","message","deviceName","name","slog","exports"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/bt-command-writer.ts"],"mappings":";;;;;;AAEA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAEA,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ED);
|
|
25
25
|
await this.device.discoverAllServicesAndCharacteristics();
|
|
26
26
|
this.onDisconnectSubscription = this.device.onDisconnected(this.onDeviceDisconnected);
|
|
27
|
-
this.subscribeToAllCharacteristics();
|
|
27
|
+
await this.subscribeToAllCharacteristics();
|
|
28
28
|
} catch (error) {
|
|
29
29
|
(0, _sentryLogger.sentryLogger)("error", "BT_MANAGER: Error connecting to device", {
|
|
30
30
|
error: error instanceof Error ? error.message : error,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_sentryLogger","require","_deviceStatus","_base64ToHex","_btCommandWriter","BTConnectionHandler","characteristicSubscriptions","constructor","device","mainServices","callbacks","preferredMtu","writer","BTCommandWriter","onError","connect","connectWithRetries","requestPreferredMtu","onStatusChanged","DeviceStatus","CONNECTED","discoverAllServicesAndCharacteristics","onDisconnectSubscription","onDisconnected","onDeviceDisconnected","subscribeToAllCharacteristics","error","sentryLogger","Error","message","deviceName","name","DISCONNECTED","destroy","forEach","sub","remove","reset","sendCommands","commands","send","negotiated","requestMTU","useNegotiatedMtu","mtu","deviceId","id","requestedMtu","String","maxRetries","retryDelay","maxDelay","connected","retryCount","isConnected","errorCode","willRetry","Promise","resolve","setTimeout","Math","min","pow","mainService","monitorUuid","monitorUuids","subscription","monitorCharacteristicForService","uuid","result","value","hexValue","base64ToHex","onDataReceived","push","initialCommands","exports"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/bt-connection-handler.ts"],"mappings":";;;;;;AAEA,IAAAA,aAAA,GAAAC,OAAA;AAEA,IAAAC,aAAA,GAAAD,OAAA;AAEA,IAAAE,YAAA,GAAAF,OAAA;AAEA,IAAAG,gBAAA,GAAAH,OAAA;AAWO,MAAMI,mBAAmB,CAAC;EAEvBC,2BAA2B,GAAmB,EAAE;EAGxDC,WAAWA,CACQC,MAAc,EACdC,YAA2C,EAC3CC,SAAqC,EACrCC,YAAqB,EACtC;IAAA,KAJiBH,MAAc,GAAdA,MAAc;IAAA,KACdC,YAA2C,GAA3CA,YAA2C;IAAA,KAC3CC,SAAqC,GAArCA,SAAqC;IAAA,KACrCC,YAAqB,GAArBA,YAAqB;IAEtC,IAAI,CAACC,MAAM,GAAG,IAAIC,gCAAe,CAACL,MAAM,EAAEE,SAAS,CAACI,OAAO,CAAC;EAC9D;EAEOC,OAAO,GAAG,MAAAA,CAAA,KAAY;IAC3B,IAAI;MACF,MAAM,IAAI,CAACC,kBAAkB,CAAC,CAAC;MAC/B,MAAM,IAAI,CAACC,mBAAmB,CAAC,CAAC;MAEhC,IAAI,CAACP,SAAS,CAACQ,eAAe,GAAGC,0BAAY,CAACC,SAAS,CAAC;MAExD,MAAM,IAAI,CAACZ,MAAM,CAACa,qCAAqC,CAAC,CAAC;MAEzD,IAAI,CAACC,wBAAwB,GAAG,IAAI,CAACd,MAAM,CAACe,cAAc,CACxD,IAAI,CAACC,oBACP,CAAC;MAED,IAAI,CAACC,6BAA6B,CAAC,CAAC;
|
|
1
|
+
{"version":3,"names":["_sentryLogger","require","_deviceStatus","_base64ToHex","_btCommandWriter","BTConnectionHandler","characteristicSubscriptions","constructor","device","mainServices","callbacks","preferredMtu","writer","BTCommandWriter","onError","connect","connectWithRetries","requestPreferredMtu","onStatusChanged","DeviceStatus","CONNECTED","discoverAllServicesAndCharacteristics","onDisconnectSubscription","onDisconnected","onDeviceDisconnected","subscribeToAllCharacteristics","error","sentryLogger","Error","message","deviceName","name","DISCONNECTED","destroy","forEach","sub","remove","reset","sendCommands","commands","send","negotiated","requestMTU","useNegotiatedMtu","mtu","deviceId","id","requestedMtu","String","maxRetries","retryDelay","maxDelay","connected","retryCount","isConnected","errorCode","willRetry","Promise","resolve","setTimeout","Math","min","pow","mainService","monitorUuid","monitorUuids","subscription","monitorCharacteristicForService","uuid","result","value","hexValue","base64ToHex","onDataReceived","push","initialCommands","exports"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/bt-connection-handler.ts"],"mappings":";;;;;;AAEA,IAAAA,aAAA,GAA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AG,IAAAC,wBAAW,EAACH,MAAM,CAACC,KAAK,CAAC;YAE1C,IAAI,CAAC5D,SAAS,CAAC+D,cAAc,GAAGJ,MAAM,CAACD,IAAI,EAAEG,QAAQ,CAAC;UACxD,CACF,CAAC;UAED,IAAI,CAACjE,2BAA2B,CAACoE,IAAI,CAACR,YAAY,CAAC;QACrD;MACF;MAEA,MAAM,IAAI,CAAC5B,YAAY,CAAC,IAAI,CAAC5B,SAAS,CAACiE,eAAe,GAAG,CAAC,IAAI,EAAE,CAAC;IACnE,CAAC,CAAC,OAAOjD,KAAK,EAAE;MACd,IAAAC,0BAAY,EACV,OAAO,EACP,kDAAkD,EAClD;QACED,KAAK,EAAEA,KAAK,YAAYE,KAAK,GAAGF,KAAK,CAACG,OAAO,GAAGH,KAAK;QACrDI,UAAU,EAAE,IAAI,CAACtB,MAAM,CAACuB;MAC1B,CACF,CAAC;MACD,IAAI,CAACrB,SAAS,CAACI,OAAO,GAAGY,KAAyB,CAAC;IACrD;EACF,CAAC;AAEH;AAACkD,OAAA,CAAAvE,mBAAA,GAAAA,mBAAA","ignoreList":[]}
|
|
@@ -4,13 +4,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.CustomDevice = void 0;
|
|
7
|
+
var _core = require("@ovok/core");
|
|
7
8
|
var _caseType = require("../../../types/case-type.js");
|
|
8
9
|
var _createFrameValidator = require("../../../utils/create-frame-validator.js");
|
|
9
10
|
var _parseMeasurement = require("../../../utils/parse-measurement.js");
|
|
10
11
|
var _rejectCustomReading = require("../../../utils/reject-custom-reading.js");
|
|
11
12
|
var _btManagedDevice = require("../bt-managed-device.js");
|
|
13
|
+
var _lepuCommandBuilder = require("../lepu/lepu.command-builder.js");
|
|
14
|
+
var _lepuFileTransfer = require("../lepu/lepu.file-transfer.js");
|
|
12
15
|
var _lepuFrameReader = require("../lepu/lepu.frame-reader.js");
|
|
16
|
+
var _viatomEcgFiles = require("../viatom/viatom.ecg-files.js");
|
|
13
17
|
var _customLepuSequencer = require("./custom-lepu-sequencer.js");
|
|
18
|
+
/* eslint-disable max-lines */
|
|
19
|
+
|
|
14
20
|
/**
|
|
15
21
|
* Runs a device registered with defineCustomDevice.
|
|
16
22
|
*
|
|
@@ -49,11 +55,38 @@ class CustomDevice extends _btManagedDevice.BTManagedDevice {
|
|
|
49
55
|
return;
|
|
50
56
|
}
|
|
51
57
|
this.frameReader = new _lepuFrameReader.LepuFrameReader(lepu.startBytes);
|
|
52
|
-
this.createCommandSequencer = () =>
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
58
|
+
this.createCommandSequencer = () => {
|
|
59
|
+
if (lepu.fileTransfer === "ecg") {
|
|
60
|
+
return new _lepuFileTransfer.LepuFileTransfer({
|
|
61
|
+
write: {
|
|
62
|
+
serviceUuid: lepu.write.serviceUuid,
|
|
63
|
+
characteristicUuid: lepu.write.characteristicUuid
|
|
64
|
+
},
|
|
65
|
+
builder: new _lepuCommandBuilder.LepuCommandBuilder(lepu.startBytes[0] ?? "a5"),
|
|
66
|
+
onFile: this.reportViatomEcgFile,
|
|
67
|
+
onError: reason => this.onError?.(new Error(`Viatom ECG: ${reason}`))
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
return (0, _customLepuSequencer.createLepuSequencer)(lepu, {
|
|
71
|
+
onIdentified: this.onIdentified,
|
|
72
|
+
onRefused: this.onIdentityRefused
|
|
73
|
+
});
|
|
74
|
+
};
|
|
56
75
|
}
|
|
76
|
+
reportViatomEcgFile = file => {
|
|
77
|
+
const decoded = (0, _viatomEcgFiles.decodeViatomEcgRecording)(file.content);
|
|
78
|
+
if (decoded.samples.length === 0) {
|
|
79
|
+
this.onError?.(new Error(`Viatom ECG: file "${file.name}" had no samples.`));
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
this.onResult?.({
|
|
83
|
+
measurementTypeKey: _core.MeasurementTypeKey.ecg,
|
|
84
|
+
caseType: _caseType.CaseType.RESULT,
|
|
85
|
+
diagnosticResult: _core.EcgDiagnosticFlag.REGULAR,
|
|
86
|
+
diagramPoints: decoded.samples,
|
|
87
|
+
duration: decoded.duration
|
|
88
|
+
});
|
|
89
|
+
};
|
|
57
90
|
onIdentified = info => (0, _customLepuSequencer.recordLepuIdentity)(this.deviceData, info);
|
|
58
91
|
onIdentityRefused = reason => {
|
|
59
92
|
this.onError?.(new Error(`Custom device "${this.definition.id}" was not addressed: ${reason}.`));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_core","require","_caseType","_createFrameValidator","_parseMeasurement","_rejectCustomReading","_btManagedDevice","_lepuCommandBuilder","_lepuFileTransfer","_lepuFrameReader","_viatomEcgFiles","_customLepuSequencer","CustomDevice","BTManagedDevice","validators","Map","constructor","device","params","definition","mainServices","stuckDataTimeout","preferredMtu","undefined","declareLepuProtocol","frames","forEach","frame","uuid","set","createFrameValidator","lepu","frameReader","LepuFrameReader","startBytes","createCommandSequencer","fileTransfer","LepuFileTransfer","write","serviceUuid","characteristicUuid","builder","LepuCommandBuilder","onFile","reportViatomEcgFile","onError","reason","Error","createLepuSequencer","onIdentified","onRefused","onIdentityRefused","file","decoded","decodeViatomEcgRecording","content","samples","length","name","onResult","measurementTypeKey","MeasurementTypeKey","ecg","caseType","CaseType","RESULT","diagnosticResult","EcgDiagnosticFlag","REGULAR","diagramPoints","duration","info","recordLepuIdentity","deviceData","id","validatePackage","pkg","validate","get","String","toLowerCase","handleDependentResult","data","reportFrame","error","parsingCase","OTHER","handleSuccessResult","repeated","repeatedRecords","report","parsedData","records","Math","floor","from","recordBytes","record","parseMeasurement","measurements","discard","measurement","reportMeasurement","discardedReadingError","reading","fieldNames","rejection","map","rejectCustomReading","fields","find","message","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/custom/custom.device.ts"],"mappings":";;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AAGA,IAAAC,SAA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AkB,EAAEyC,WAAW,CAACzC;IAClC,CAAiB;IAEjByC,WAAW,CAACI,UAAU,CAAC/E,OAAO,CAAEgC,IAAI,IAAK;MACvC8C,OAAO,CAAC9C,IAAI,CAAC,GAAGiC,UAAU,CAACjC,IAAI,CAAC;IAClC,CAAC,CAAC;IAEF,MAAMgD,SAAS,GAAGL,WAAW,CAACI,UAAU,CACrCE,GAAG,CAAEjD,IAAI,IACR,IAAAkD,wCAAmB,EACjB,IAAI,CAACzF,UAAU,CAAC0F,MAAM,EACtBR,WAAW,CAACzC,kBAAkB,EAC9BF,IAAI,EACJ8C,OAAO,CAAC9C,IAAI,CACd,CACF,CAAC,CACAoD,IAAI,CAAEC,OAAO,IAAKA,OAAO,KAAKxF,SAAS,CAAC;IAE3C,IAAImF,SAAS,EAAE;MACb,IAAI,CAACN,OAAO,CAACM,SAAS,EAAEF,OAAO,CAAC;MAEhC;IACF;IAEA,IAAI,CAAC7C,QAAQ,GAAG6C,OAAO,CAAC;EAC1B;AAEF;AAACQ,OAAA,CAAApG,YAAA,GAAAA,YAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_le32FromHex","require","_le32ToBytes","_lepuCommands","_lepuFileNames","_lepuFrame","_lepuResponseType","FILE_SIZE_OFFSET","MAX_FILE_BYTES","TRANSFER_COMMANDS","LepuCommand","GET_FILE_LIST","READ_FILE_START","READ_FILE_DATA","READ_FILE_END","LepuFileTransfer","files","fileIndex","name","totalBytes","content","isSessionOpen","isDone","constructor","params","initialCommands","commandFor","nextCommand","frame","command","lepuCommandOf","includes","undefined","isLepuSuccess","fail","describeLepuResponseType","lepuNamesFrom","lepuPayloadOf","openNextFile","openedFile","appendChunk","closedFile","lepuNameBytes","le32ToBytes","payload","le32FromHex","limit","maxFileBytes","closeFile","length","push","onProgress","receivedBytes","onFile","reason","onError","write","builder","build","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.file-transfer.ts"],"mappings":";;;;;;AAEA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAGA,IAAAE,aAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,iBAAA,GAAAL,OAAA;AAEA,MAAMM,gBAAgB,GAAG,CAAC;;AAE1B;AACA;AACA;AACA;AACA;AACA,MAAMC,cAAc,GAAG,OAAO;AAE9B,MAAMC,iBAAoC,GAAG,CAC3CC,yBAAW,CAACC,aAAa,EACzBD,yBAAW,CAACE,eAAe,EAC3BF,yBAAW,CAACG,cAAc,EAC1BH,yBAAW,CAACI,aAAa,CAC1B;AA+BD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"names":["_le32FromHex","require","_le32ToBytes","_lepuCommands","_lepuFileNames","_lepuFrame","_lepuResponseType","FILE_SIZE_OFFSET","MAX_FILE_BYTES","TRANSFER_COMMANDS","LepuCommand","GET_FILE_LIST","READ_FILE_START","READ_FILE_DATA","READ_FILE_END","LepuFileTransfer","files","fileIndex","name","totalBytes","content","isSessionOpen","isDone","constructor","params","initialCommands","commandFor","nextCommand","frame","command","lepuCommandOf","includes","undefined","isLepuSuccess","fail","describeLepuResponseType","lepuNamesFrom","lepuPayloadOf","openNextFile","openedFile","appendChunk","closedFile","lepuNameBytes","le32ToBytes","payload","le32FromHex","limit","maxFileBytes","closeFile","length","push","onProgress","receivedBytes","onFile","reason","onError","write","builder","build","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.file-transfer.ts"],"mappings":";;;;;;AAEA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAGA,IAAAE,aAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA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 @@ const COMMAND_BYTE = 1;
|
|
|
111
111
|
const lepuDevice = params => {
|
|
112
112
|
const transport = lepuTransports[params.transport ?? "standard"];
|
|
113
113
|
return (0, _defineCustomDevice.defineCustomDevice)({
|
|
114
|
-
id: params.id,
|
|
114
|
+
id: params.id ?? "lepu-device",
|
|
115
115
|
nameMatch: params.nameMatch,
|
|
116
116
|
stuckDataTimeoutMs: params.stuckDataTimeoutMs ?? DEFAULT_STUCK_TIMEOUT_MS,
|
|
117
117
|
preferredMtu: transport.preferredMtu,
|
|
@@ -122,6 +122,9 @@ const lepuDevice = params => {
|
|
|
122
122
|
characteristicUuid: transport.writeUuid
|
|
123
123
|
},
|
|
124
124
|
expectedDeviceTypes: [...(params.expectedDeviceTypes ?? [])],
|
|
125
|
+
...(params.fileTransfer === undefined ? {} : {
|
|
126
|
+
fileTransfer: params.fileTransfer
|
|
127
|
+
}),
|
|
125
128
|
...(params.pollCommand === undefined ? {} : {
|
|
126
129
|
pollCommand: params.pollCommand
|
|
127
130
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_defineCustomDevice","require","STANDARD_SERVICE","STANDARD_WRITE","STANDARD_NOTIFY","AW1_SERVICE","AW1_WRITE","AW1_NOTIFY","DING_SERVICE","DING_WRITE","DING_NOTIFY","AI_TELE_SERVICE","AI_TELE_WRITE","AI_TELE_NOTIFY","PREFERRED_MTU","MINIMUM_MTU","DEFAULT_STUCK_TIMEOUT_MS","START_BYTE","lepuTransports","exports","standard","serviceUuid","notifyUuid","writeUuid","preferredMtu","standardSmallMtu","aw1","ding","aiTele","COMMAND_BYTE","lepuDevice","params","transport","defineCustomDevice","id","nameMatch","stuckDataTimeoutMs","lepu","startBytes","write","characteristicUuid","expectedDeviceTypes","
|
|
1
|
+
{"version":3,"names":["_defineCustomDevice","require","STANDARD_SERVICE","STANDARD_WRITE","STANDARD_NOTIFY","AW1_SERVICE","AW1_WRITE","AW1_NOTIFY","DING_SERVICE","DING_WRITE","DING_NOTIFY","AI_TELE_SERVICE","AI_TELE_WRITE","AI_TELE_NOTIFY","PREFERRED_MTU","MINIMUM_MTU","DEFAULT_STUCK_TIMEOUT_MS","START_BYTE","lepuTransports","exports","standard","serviceUuid","notifyUuid","writeUuid","preferredMtu","standardSmallMtu","aw1","ding","aiTele","COMMAND_BYTE","lepuDevice","params","transport","defineCustomDevice","id","nameMatch","stuckDataTimeoutMs","lepu","startBytes","write","characteristicUuid","expectedDeviceTypes","fileTransfer","undefined","pollCommand","services","uuid","monitor","frame","minLengthBytes","caseSelectorBytes","cases"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.transports.ts"],"mappings":";;;;;;AAEA,IAAAA,mBAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,gBAAgB,GAAG,sCAAsC;AAC/D,MAAMC,cAAc,GAAG,sCAAsC;AAC7D,MAAMC,eAAe,GAAG,sCAAsC;;AAE9D;AACA,MAAMC,WAAW,GAAG,sCAAsC;AAC1D,MAAMC,SAAS,GAAG,sCAAsC;AACxD,MAAMC,UAAU,GAAG,sCAAsC;;AAEzD;AACA;AACA;AACA;AACA,MAAMC,YAAY,GAAG,sCAAsC;AAC3D,MAAMC,UAAU,GAAG,sCAAsC;AACzD,MAAMC,WAAW,GAAG,sCAAsC;;AAE1D;AACA,MAAMC,eAAe,GAAG,sCAAsC;AAC9D,MAAMC,aAAa,GAAG,sCAAsC;AAC5D,MAAMC,cAAc,GAAG,sCAAsC;;AAE7D;AACA,MAAMC,aAAa,GAAG,GAAG;;AAEzB;AACA,MAAMC,WAAW,GAAG,EAAE;;AAEtB;AACA,MAAMC,wBAAwB,GAAG,MAAM;AAEvC,MAAMC,UAAU,GAAG,IAAI;AASvB;AACA;AACA;AACA;AACA;AACA;A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AS,CAACX,WAAW;QAClCmB,kBAAkB,EAAER,SAAS,CAACT;MAChC,CAAC;MACDkB,mBAAmB,EAAE,CAAC,IAAIV,MAAM,CAACU,mBAAmB,IAAI,EAAE,CAAC,CAAC;MAC5D,IAAIV,MAAM,CAACW,YAAY,KAAKC,SAAS,GACjC,CAAC,CAAC,GACF;QAAED,YAAY,EAAEX,MAAM,CAACW;MAAa,CAAC,CAAC;MAC1C,IAAIX,MAAM,CAACa,WAAW,KAAKD,SAAS,GAChC,CAAC,CAAC,GACF;QAAEC,WAAW,EAAEb,MAAM,CAACa;MAAY,CAAC;IACzC,CAAC;IACDC,QAAQ,EAAE,CACR;MACEC,IAAI,EAAEd,SAAS,CAACX,WAAW;MAC3B0B,OAAO,EAAE,CACP;QACED,IAAI,EAAEd,SAAS,CAACV,UAAU;QAC1B0B,KAAK,EAAE;UAAEC,cAAc,EAAElB,MAAM,CAACkB;QAAe,CAAC;QAChDC,iBAAiB,EAAEnB,MAAM,CAACmB,iBAAiB,IAAI,CAACrB,YAAY,CAAC;QAC7DsB,KAAK,EAAEpB,MAAM,CAACoB;MAChB,CAAC;IAEL,CAAC;EAEL,CAAC,CAAC;AACJ,CAAC;AAAChC,OAAA,CAAAW,UAAA,GAAAA,UAAA","ignoreList":[]}
|
package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js
CHANGED
|
@@ -17,8 +17,9 @@ const sigUuid = assigned => `0000${assigned}-0000-1000-8000-00805f9b34fb`;
|
|
|
17
17
|
*/
|
|
18
18
|
exports.sigUuid = sigUuid;
|
|
19
19
|
const declareProfile = (params, profile) => (0, _defineCustomDevice.defineCustomDevice)({
|
|
20
|
-
id: params.id
|
|
20
|
+
id: params.id ?? `standard-${profile.measurementTypeKey}`,
|
|
21
21
|
nameMatch: params.nameMatch,
|
|
22
|
+
matchByService: true,
|
|
22
23
|
stuckDataTimeoutMs: params.stuckDataTimeoutMs ?? SPOT_CHECK_TIMEOUT_MS,
|
|
23
24
|
services: [{
|
|
24
25
|
uuid: sigUuid(profile.service),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_defineCustomDevice","require","SPOT_CHECK_TIMEOUT_MS","sigUuid","assigned","exports","declareProfile","params","profile","defineCustomDevice","id","nameMatch","stuckDataTimeoutMs","services","uuid","service","monitor","characteristic","frame","minLengthBytes","caseSelectorBytes","cases","selectors","map","selector","optional","optionalFields","kind","
|
|
1
|
+
{"version":3,"names":["_defineCustomDevice","require","SPOT_CHECK_TIMEOUT_MS","sigUuid","assigned","exports","declareProfile","params","profile","defineCustomDevice","id","measurementTypeKey","nameMatch","matchByService","stuckDataTimeoutMs","services","uuid","service","monitor","characteristic","frame","minLengthBytes","caseSelectorBytes","cases","selectors","map","selector","optional","optionalFields","kind","fields","littleEndian","name","byteIndexes","unit","encoding","byteOrder"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.ts"],"mappings":";;;;;;AAIA,IAAAA,mBAAA,GAAAC,OAAA;AAEA;AACA,MAAMC,qBAAqB,GAAG,MAAM;AAyCpC,MAAMC,OAAO,GAAIC,QAAgB,IAC/B,OAAOA,QAAQ,8BAA8B;;AAE/C;AACA;AACA;AACA;AACA;AACA;AALAC,OAAA,CAAAF,OAAA,GAAAA,OAAA;AAMA,MAAMG,cAAc,GAAGA,CACrBC,MAA4B,EAC5BC,OAAoB,KAEpB,IAAAC,sCAAkB,EAAC;EACjBC,EAAE,EAAEH,MAAM,CAACG,EAAE,IAAI,YAAYF,OAAO,CAACG,kBAAkB,EAAE;EACzDC,SAAS,EAAEL,MAAM,CAACK,SAAS;EAC3BC,cAAc,EAAE,IAAI;EACpBC,kBAAkB,EAAEP,MAAM,CAACO,kBAAkB,IAAIZ,qBAAqB;EACtEa,QAAQ,EAAE,CACR;IACEC,IAAI,EAAEb,OAAO,CAACK,OAAO,CAACS,OAAO,CAAC;IAC9BC,OAAO,EAAE,CACP;MACEF,IAAI,EAAEb,OAAO,CAACK,OAAO,CAACW,cAAc,CAAC;MACrCC,KAAK,EAAE;QAAEC,cAAc,EAAEb,OAAO,CAACa;MAAe,CAAC;MACjDC,iBAAiB,EAAE,CAAC,CAAC,CAAC;MACtBC,KAAK,EAAEf,OAAO,CAACgB,SAAS,CAACC,GAAG,CAAEC,QAAQ,IAAK;QACzC,MAAMC,QAAQ,GAAGnB,OAAO,CAACoB,cAAc,GAAGF,QAAQ,CAAC;QAEnD,OAAO;UACLA,QAAQ;UACRG,IAAI,EAAE,QAAiB;UACvBlB,kBAAkB,EAAEH,OAAO,CAACG,kBAAkB;UAC9CmB,MAAM,EAAE,CAAC,GAAGtB,OAAO,CAACsB,MAAM,EAAE,IAAIH,QAAQ,EAAEG,MAAM,IAAI,EAAE,CAAC,CAAC;UACxD,IAAIH,QAAQ,GACR;YAAEN,cAAc,EAAEM,QAAQ,CAACN;UAAe,CAAC,GAC3C,CAAC,CAAC;QACR,CAAC;MACH,CAAC;IACH,CAAC;EAEL,CAAC;AAEL,CAAC,CAAC;AAAChB,OAAA,CAAAC,cAAA,GAAAA,cAAA;AAEL,MAAMyB,YAAY,GAAGA,CACnBC,IAAY,EACZC,WAAqB,EACrBC,IAAY,EACZC,QAAqC,MAChB;EACrBH,IAAI;EACJC,WAAW;EACXG,SAAS,EAAE,QAAQ;EACnBD,QAAQ;EACRD;AACF,CAAC,CAAC;AAAC7B,OAAA,CAAA0B,YAAA,GAAAA,YAAA","ignoreList":[]}
|
|
@@ -15,7 +15,7 @@ const VISOMAT_COMFORT_SOFT_BT_NAME_MATCH = exports.VISOMAT_COMFORT_SOFT_BT_NAME_
|
|
|
15
15
|
* pairing flow.
|
|
16
16
|
*/
|
|
17
17
|
const visomatComfortSoftBtMonitor = params => (0, _standardGattDevices.standardBloodPressureDevice)({
|
|
18
|
-
id: params.id,
|
|
18
|
+
id: params.id ?? "visomat-comfort-soft-bt",
|
|
19
19
|
nameMatch: params.nameMatch ?? VISOMAT_COMFORT_SOFT_BT_NAME_MATCH,
|
|
20
20
|
...(params.stuckDataTimeoutMs === undefined ? {} : {
|
|
21
21
|
stuckDataTimeoutMs: params.stuckDataTimeoutMs
|
package/lib/commonjs/modules/bt-management/services/devices/uebe/visomat.comfort-soft-bt.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_standardGattDevices","require","VISOMAT_COMFORT_SOFT_BT_NAME_MATCH","exports","visomatComfortSoftBtMonitor","params","standardBloodPressureDevice","id","nameMatch","stuckDataTimeoutMs","undefined"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/uebe/visomat.comfort-soft-bt.ts"],"mappings":";;;;;;AACA,IAAAA,oBAAA,GAAAC,OAAA;AAEA;AACA,MAAMC,kCAAkC,GAAAC,OAAA,CAAAD,kCAAA,GAAG,kCAAkC;AAc7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAME,2BAA2B,GAC/BC,MAAkC,IAElC,IAAAC,gDAA2B,EAAC;EAC1BC,EAAE,EAAEF,MAAM,CAACE,EAAE;
|
|
1
|
+
{"version":3,"names":["_standardGattDevices","require","VISOMAT_COMFORT_SOFT_BT_NAME_MATCH","exports","visomatComfortSoftBtMonitor","params","standardBloodPressureDevice","id","nameMatch","stuckDataTimeoutMs","undefined"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/uebe/visomat.comfort-soft-bt.ts"],"mappings":";;;;;;AACA,IAAAA,oBAAA,GAAAC,OAAA;AAEA;AACA,MAAMC,kCAAkC,GAAAC,OAAA,CAAAD,kCAAA,GAAG,kCAAkC;AAc7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAME,2BAA2B,GAC/BC,MAAkC,IAElC,IAAAC,gDAA2B,EAAC;EAC1BC,EAAE,EAAEF,MAAM,CAACE,EAAE,IAAI,yBAAyB;EAC1CC,SAAS,EAAEH,MAAM,CAACG,SAAS,IAAIN,kCAAkC;EACjE,IAAIG,MAAM,CAACI,kBAAkB,KAAKC,SAAS,GACvC,CAAC,CAAC,GACF;IAAED,kBAAkB,EAAEJ,MAAM,CAACI;EAAmB,CAAC;AACvD,CAAC,CAAC;AAACN,OAAA,CAAAC,2BAAA,GAAAA,2BAAA","ignoreList":[]}
|
|
@@ -22,7 +22,7 @@ var _standardGattDevices = require("../standard-gatt/standard-gatt.devices.js");
|
|
|
22
22
|
const BPU_26 = "BPU26";
|
|
23
23
|
const BPW_26 = "BPW26";
|
|
24
24
|
const verovalCompactMonitor = (advertisedName, params) => (0, _standardGattDevices.standardBloodPressureDevice)({
|
|
25
|
-
id: params.id,
|
|
25
|
+
id: params.id ?? `veroval-${advertisedName.toLowerCase().replace(/[^a-z0-9]+/g, "-")}`,
|
|
26
26
|
nameMatch: params.nameMatch ?? new RegExp(`^${advertisedName}$`, "i"),
|
|
27
27
|
...(params.stuckDataTimeoutMs === undefined ? {} : {
|
|
28
28
|
stuckDataTimeoutMs: params.stuckDataTimeoutMs
|
package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.bp-monitors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_standardGattDevices","require","BPU_26","BPW_26","verovalCompactMonitor","advertisedName","params","standardBloodPressureDevice","id","nameMatch","RegExp","stuckDataTimeoutMs","undefined","exports","bpu26Monitor","bpw26Monitor","VEROVAL_BP_MODEL_NAMES"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/veroval/veroval.bp-monitors.ts"],"mappings":";;;;;;AACA,IAAAA,oBAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMC,MAAM,GAAG,OAAO;AACtB,MAAMC,MAAM,GAAG,OAAO;AActB,MAAMC,qBAAqB,GAAGA,CAC5BC,cAAsB,EACtBC,MAAuB,KAEvB,IAAAC,gDAA2B,EAAC;EAC1BC,EAAE,EAAEF,MAAM,CAACE,EAAE;
|
|
1
|
+
{"version":3,"names":["_standardGattDevices","require","BPU_26","BPW_26","verovalCompactMonitor","advertisedName","params","standardBloodPressureDevice","id","toLowerCase","replace","nameMatch","RegExp","stuckDataTimeoutMs","undefined","exports","bpu26Monitor","bpw26Monitor","VEROVAL_BP_MODEL_NAMES"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/veroval/veroval.bp-monitors.ts"],"mappings":";;;;;;AACA,IAAAA,oBAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMC,MAAM,GAAG,OAAO;AACtB,MAAMC,MAAM,GAAG,OAAO;AActB,MAAMC,qBAAqB,GAAGA,CAC5BC,cAAsB,EACtBC,MAAuB,KAEvB,IAAAC,gDAA2B,EAAC;EAC1BC,EAAE,EAAEF,MAAM,CAACE,EAAE,IAAI,WAAWH,cAAc,CAACI,WAAW,CAAC,CAAC,CAACC,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC,EAAE;EACtFC,SAAS,EAAEL,MAAM,CAACK,SAAS,IAAI,IAAIC,MAAM,CAAC,IAAIP,cAAc,GAAG,EAAE,GAAG,CAAC;EACrE,IAAIC,MAAM,CAACO,kBAAkB,KAAKC,SAAS,GACvC,CAAC,CAAC,GACF;IAAED,kBAAkB,EAAEP,MAAM,CAACO;EAAmB,CAAC;AACvD,CAAC,CAAC;;AAEJ;AAAAE,OAAA,CAAAX,qBAAA,GAAAA,qBAAA;AACA,MAAMY,YAAY,GAAIV,MAAuB,IAC3CF,qBAAqB,CAACF,MAAM,EAAEI,MAAM,CAAC;;AAEvC;AAAAS,OAAA,CAAAC,YAAA,GAAAA,YAAA;AACA,MAAMC,YAAY,GAAIX,MAAuB,IAC3CF,qBAAqB,CAACD,MAAM,EAAEG,MAAM,CAAC;;AAEvC;AAAAS,OAAA,CAAAE,YAAA,GAAAA,YAAA;AACA,MAAMC,sBAAyC,GAAAH,OAAA,CAAAG,sBAAA,GAAG,CAAChB,MAAM,EAAEC,MAAM,CAAC","ignoreList":[]}
|
|
@@ -82,7 +82,7 @@ const BP2_CASES = [measuring("0804", "Cuff inflating or deflating"), result("080
|
|
|
82
82
|
* cannot pick up a `BP2W`.
|
|
83
83
|
*/
|
|
84
84
|
const viatomBpMonitor = (advertisedName, params) => (0, _lepuTransports.lepuDevice)({
|
|
85
|
-
id: params.id,
|
|
85
|
+
id: params.id ?? `viatom-${advertisedName.toLowerCase().replace(/[^a-z0-9]+/g, "-")}`,
|
|
86
86
|
nameMatch: params.nameMatch ?? (0, _lepuNameMatch.lepuNameMatch)(advertisedName),
|
|
87
87
|
pollCommand: RT_DATA,
|
|
88
88
|
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":["_core","require","_lepuNameMatch","_lepuTransports","RT_DATA","CASE_SELECTOR_BYTES","MIN_LENGTH_BYTES","READING","name","byteIndexes","byteOrder","encoding","unit","result","selector","description","kind","measurementTypeKey","MeasurementTypeKey","bloodPressure","fields","measuring","BP2_CASES","viatomBpMonitor","advertisedName","params","lepuDevice","id","nameMatch","lepuNameMatch","pollCommand","minLengthBytes","caseSelectorBytes","cases","map","each","expectedDeviceTypes","exports","bp2aMonitor","bp2tMonitor","bp2wMonitor","BP3_MODEL_NAMES"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.bp-monitors.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAMG,OAAO,GAAG,IAAI;;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,mBAAmB,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;;AAElC;AACA,MAAMC,gB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GA,CACtBC,cAAsB,EACtBC,MAAsB,KAEtB,IAAAC,0BAAU,EAAC;EACTC,EAAE,EAAEF,MAAM,CAACE,EAAE;
|
|
1
|
+
{"version":3,"names":["_core","require","_lepuNameMatch","_lepuTransports","RT_DATA","CASE_SELECTOR_BYTES","MIN_LENGTH_BYTES","READING","name","byteIndexes","byteOrder","encoding","unit","result","selector","description","kind","measurementTypeKey","MeasurementTypeKey","bloodPressure","fields","measuring","BP2_CASES","viatomBpMonitor","advertisedName","params","lepuDevice","id","toLowerCase","replace","nameMatch","lepuNameMatch","pollCommand","minLengthBytes","caseSelectorBytes","cases","map","each","expectedDeviceTypes","exports","bp2aMonitor","bp2tMonitor","bp2wMonitor","BP3_MODEL_NAMES"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.bp-monitors.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAMG,OAAO,GAAG,IAAI;;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,mBAAmB,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;;AAElC;AACA,MAAMC,gBAAgB,GAAG,EAAE;AAE3B,MAAMC,OAA0B,GAAG,CACjC;EACEC,IAAI,EAAE,UAAU;EAChBC,WAAW,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;EACrBC,SAAS,EAAE,QAAQ;EACnBC,QAAQ,EAAE,MAAM;EAChBC,IAAI,EAAE;AACR,CAAC,EACD;EACEJ,IAAI,EAAE,WAAW;EACjBC,WAAW,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;EACrBC,SAAS,EAAE,QAAQ;EACnBC,QAAQ,EAAE,MAAM;EAChBC,IAAI,EAAE;AACR,CAAC,EACD;EACEJ,IAAI,EAAE,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GAAG,CAAEC,IAAI,KAAM;IAAE,GAAGA;EAAK,CAAC,CAAC,CAAC;EAC7C,IAAIZ,MAAM,CAACa,mBAAmB,GAC1B;IAAEA,mBAAmB,EAAEb,MAAM,CAACa;EAAoB,CAAC,GACnD,CAAC,CAAC;AACR,CAAC,CAAC;;AAEJ;AAAAC,OAAA,CAAAhB,eAAA,GAAAA,eAAA;AACA,MAAMiB,WAAW,GAAIf,MAAsB,IACzCF,eAAe,CAAC,MAAM,EAAEE,MAAM,CAAC;;AAEjC;AAAAc,OAAA,CAAAC,WAAA,GAAAA,WAAA;AACA,MAAMC,WAAW,GAAIhB,MAAsB,IACzCF,eAAe,CAAC,MAAM,EAAEE,MAAM,CAAC;;AAEjC;AAAAc,OAAA,CAAAE,WAAA,GAAAA,WAAA;AACA,MAAMC,WAAW,GAAIjB,MAAsB,IACzCF,eAAe,CAAC,MAAM,EAAEE,MAAM,CAAC;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAXAc,OAAA,CAAAG,WAAA,GAAAA,WAAA;AAYA,MAAMC,eAAkC,GAAAJ,OAAA,CAAAI,eAAA,GAAG,CACzC,KAAK,EACL,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,CACP","ignoreList":[]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
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
|
+
const VIATOM_ECG_SAMPLE_RATE_HZ = exports.VIATOM_ECG_SAMPLE_RATE_HZ = 125;
|
|
9
|
+
const VIATOM_ECG_MILLIVOLTS_PER_COUNT = exports.VIATOM_ECG_MILLIVOLTS_PER_COUNT = 0.002467;
|
|
10
|
+
const readUInt32LittleEndian = (bytes, from) => (0, _hexToByte.hexToByte)(bytes[from] ?? "0") | (0, _hexToByte.hexToByte)(bytes[from + 1] ?? "0") << 8 | (0, _hexToByte.hexToByte)(bytes[from + 2] ?? "0") << 16 | (0, _hexToByte.hexToByte)(bytes[from + 3] ?? "0") << 24;
|
|
11
|
+
|
|
12
|
+
/** Decodes the official ER1/ER2 file container and its signed ECG samples. */
|
|
13
|
+
const decodeViatomEcgRecording = content => {
|
|
14
|
+
if (content.length <= 30) {
|
|
15
|
+
return {
|
|
16
|
+
samples: [],
|
|
17
|
+
duration: 0
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
const waveStart = 10;
|
|
21
|
+
const waveEnd = content.length - 20;
|
|
22
|
+
const samples = [];
|
|
23
|
+
for (let index = waveStart; index + 1 < waveEnd; index += 2) {
|
|
24
|
+
const raw = (0, _hexToByte.hexToByte)(content[index] ?? "0") | (0, _hexToByte.hexToByte)(content[index + 1] ?? "0") << 8;
|
|
25
|
+
const signed = raw & 0x8000 ? raw - 0x10000 : raw;
|
|
26
|
+
samples.push(signed * VIATOM_ECG_MILLIVOLTS_PER_COUNT);
|
|
27
|
+
}
|
|
28
|
+
const recordedSeconds = readUInt32LittleEndian(content, content.length - 20);
|
|
29
|
+
return {
|
|
30
|
+
samples,
|
|
31
|
+
duration: recordedSeconds || samples.length / VIATOM_ECG_SAMPLE_RATE_HZ
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
exports.decodeViatomEcgRecording = decodeViatomEcgRecording;
|
|
35
|
+
//# sourceMappingURL=viatom.ecg-files.js.map
|