@ovok/native 1.16.1-rc.4 → 1.16.1-rc.6
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/google-return-page/index.js +24 -0
- package/lib/commonjs/modules/auth/google-return-page/index.js.map +1 -0
- package/lib/commonjs/modules/auth/hooks/use-social-sign-in.web.js +15 -0
- package/lib/commonjs/modules/auth/hooks/use-social-sign-in.web.js.map +1 -0
- package/lib/commonjs/modules/auth/index.js +21 -10
- package/lib/commonjs/modules/auth/index.js.map +1 -1
- package/lib/commonjs/modules/auth/session/logout-session.js +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login-button.web.js +73 -0
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login-button.web.js.map +1 -0
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login.js +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login-button.web.js +73 -0
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login-button.web.js.map +1 -0
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login.js +1 -1
- package/lib/commonjs/modules/auth/sign-in/index.js +24 -0
- package/lib/commonjs/modules/auth/sign-in/index.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/utils/apple-web-sign-in.js +90 -0
- package/lib/commonjs/modules/auth/sign-in/utils/apple-web-sign-in.js.map +1 -0
- package/lib/commonjs/modules/auth/sign-in/utils/google-redirect-sign-in.js +89 -0
- package/lib/commonjs/modules/auth/sign-in/utils/google-redirect-sign-in.js.map +1 -0
- package/lib/commonjs/modules/auth/sign-in/utils/jwt-claims.js +21 -0
- package/lib/commonjs/modules/auth/sign-in/utils/jwt-claims.js.map +1 -0
- package/lib/commonjs/modules/auth/utils/sign-out-google.web.js +10 -0
- package/lib/commonjs/modules/auth/utils/sign-out-google.web.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/custom/compile-custom-lepu.js +3 -2
- package/lib/commonjs/modules/bt-management/services/custom/compile-custom-lepu.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js +64 -44
- package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.js +98 -0
- package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.js +127 -0
- package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.device.js +12 -7
- 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.history-sequencer.js +16 -1
- 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-data-processor.js +10 -2
- package/lib/commonjs/modules/bt-management/services/devices/bt-data-processor.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe.records.js +2 -7
- package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe.records.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js +2 -2
- 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.transports.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-files.js +74 -17
- 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 +4 -4
- 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.wbp02.protocol.js +3 -7
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.wbp02.protocol.js.map +1 -1
- package/lib/commonjs/modules/bt-management/utils/calculate-crc-16-modbus.js +23 -0
- package/lib/commonjs/modules/bt-management/utils/calculate-crc-16-modbus.js.map +1 -0
- package/lib/commonjs/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.js +13 -0
- package/lib/commonjs/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.js.map +1 -0
- package/lib/commonjs/modules/data-sync/services/managers/data-processor.js +7 -7
- package/lib/commonjs/modules/data-sync/services/managers/data-processor.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/convert-generic-health-data.js +8 -3
- package/lib/commonjs/modules/data-sync/utils/convert-generic-health-data.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/default-health-coding.js +47 -0
- package/lib/commonjs/modules/data-sync/utils/default-health-coding.js.map +1 -0
- 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/next/bluetooth/ble-plx/ble-peripheral.js +35 -0
- package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-peripheral.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-scanner.js +3 -30
- package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-scanner.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/ble-plx/legacy-driver.js +2 -2
- package/lib/commonjs/modules/next/bluetooth/ble-plx/legacy-driver.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/react-native/ovok-sink.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/web/create-web-bluetooth-runtime.js +28 -0
- package/lib/commonjs/modules/next/bluetooth/web/create-web-bluetooth-runtime.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/web/index.js +208 -0
- package/lib/commonjs/modules/next/bluetooth/web/index.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/web/web-ble-device.js +143 -0
- package/lib/commonjs/modules/next/bluetooth/web/web-ble-device.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/web/web-ble-shapes.js +43 -0
- package/lib/commonjs/modules/next/bluetooth/web/web-ble-shapes.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-permissions.js +21 -0
- package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-permissions.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-scanner.js +133 -0
- package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-scanner.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-services.js +28 -0
- package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-services.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-values.js +37 -0
- package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-values.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth.types.js +2 -0
- package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth.types.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/web/web-gatt.js +83 -0
- package/lib/commonjs/modules/next/bluetooth/web/web-gatt.js.map +1 -0
- package/lib/commonjs/modules/next/breathing-exercise/index.js +17 -0
- package/lib/commonjs/modules/next/breathing-exercise/index.js.map +1 -0
- package/lib/commonjs/modules/next/cms/index.js +17 -0
- package/lib/commonjs/modules/next/cms/index.js.map +1 -0
- package/lib/commonjs/modules/next/content/index.js +17 -0
- package/lib/commonjs/modules/next/content/index.js.map +1 -0
- package/lib/commonjs/modules/next/diary/index.js +17 -0
- package/lib/commonjs/modules/next/diary/index.js.map +1 -0
- package/lib/commonjs/modules/next/image/index.js +17 -0
- package/lib/commonjs/modules/next/image/index.js.map +1 -0
- package/lib/commonjs/modules/next/journal/index.js +17 -0
- package/lib/commonjs/modules/next/journal/index.js.map +1 -0
- package/lib/commonjs/modules/next/language-switcher/index.js +17 -0
- package/lib/commonjs/modules/next/language-switcher/index.js.map +1 -0
- package/lib/commonjs/modules/next/measurement/index.js +17 -0
- package/lib/commonjs/modules/next/measurement/index.js.map +1 -0
- package/lib/commonjs/modules/next/observation-detail/index.js +17 -0
- package/lib/commonjs/modules/next/observation-detail/index.js.map +1 -0
- package/lib/commonjs/modules/next/patient/index.js +17 -0
- package/lib/commonjs/modules/next/patient/index.js.map +1 -0
- package/lib/commonjs/modules/next/pdf/index.js +17 -0
- package/lib/commonjs/modules/next/pdf/index.js.map +1 -0
- package/lib/commonjs/modules/next/picker-sheet/index.js +17 -0
- package/lib/commonjs/modules/next/picker-sheet/index.js.map +1 -0
- package/lib/commonjs/modules/next/progress-bar/index.js +17 -0
- package/lib/commonjs/modules/next/progress-bar/index.js.map +1 -0
- package/lib/commonjs/modules/next/progress-ring/index.js +17 -0
- package/lib/commonjs/modules/next/progress-ring/index.js.map +1 -0
- package/lib/commonjs/modules/next/setting/index.js +17 -0
- package/lib/commonjs/modules/next/setting/index.js.map +1 -0
- package/lib/commonjs/modules/next/tab/index.js +17 -0
- package/lib/commonjs/modules/next/tab/index.js.map +1 -0
- package/lib/commonjs/modules/next/theme/index.js +17 -0
- package/lib/commonjs/modules/next/theme/index.js.map +1 -0
- package/lib/commonjs/modules/next/tile/index.js +17 -0
- package/lib/commonjs/modules/next/tile/index.js.map +1 -0
- package/lib/commonjs/modules/next/ui/index.js +17 -0
- package/lib/commonjs/modules/next/ui/index.js.map +1 -0
- package/lib/module/modules/auth/google-return-page/index.js +21 -0
- package/lib/module/modules/auth/google-return-page/index.js.map +1 -0
- package/lib/module/modules/auth/hooks/use-social-sign-in.web.js +10 -0
- package/lib/module/modules/auth/hooks/use-social-sign-in.web.js.map +1 -0
- package/lib/module/modules/auth/index.js +2 -1
- package/lib/module/modules/auth/index.js.map +1 -1
- package/lib/module/modules/auth/session/logout-session.js +1 -1
- package/lib/module/modules/auth/session/logout-session.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/social-logins/apple-login-button.web.js +67 -0
- package/lib/module/modules/auth/sign-in/components/social-logins/apple-login-button.web.js.map +1 -0
- package/lib/module/modules/auth/sign-in/components/social-logins/apple-login.js +1 -1
- package/lib/module/modules/auth/sign-in/components/social-logins/apple-login.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/social-logins/google-login-button.web.js +68 -0
- package/lib/module/modules/auth/sign-in/components/social-logins/google-login-button.web.js.map +1 -0
- package/lib/module/modules/auth/sign-in/components/social-logins/google-login.js +1 -1
- package/lib/module/modules/auth/sign-in/components/social-logins/google-login.js.map +1 -1
- package/lib/module/modules/auth/sign-in/index.js +2 -0
- package/lib/module/modules/auth/sign-in/index.js.map +1 -1
- package/lib/module/modules/auth/sign-in/utils/apple-web-sign-in.js +84 -0
- package/lib/module/modules/auth/sign-in/utils/apple-web-sign-in.js.map +1 -0
- package/lib/module/modules/auth/sign-in/utils/google-redirect-sign-in.js +84 -0
- package/lib/module/modules/auth/sign-in/utils/google-redirect-sign-in.js.map +1 -0
- package/lib/module/modules/auth/sign-in/utils/jwt-claims.js +17 -0
- package/lib/module/modules/auth/sign-in/utils/jwt-claims.js.map +1 -0
- package/lib/module/modules/auth/utils/sign-out-google.web.js +5 -0
- package/lib/module/modules/auth/utils/sign-out-google.web.js.map +1 -0
- package/lib/module/modules/bt-management/services/custom/compile-custom-lepu.js +3 -2
- package/lib/module/modules/bt-management/services/custom/compile-custom-lepu.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js +64 -44
- package/lib/module/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.js +91 -0
- package/lib/module/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.js +123 -0
- package/lib/module/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.device.js +12 -7
- 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.history-sequencer.js +16 -1
- 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-data-processor.js +10 -2
- package/lib/module/modules/bt-management/services/devices/bt-data-processor.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/cofoe/cofoe.records.js +2 -7
- package/lib/module/modules/bt-management/services/devices/cofoe/cofoe.records.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/custom/custom.device.js +2 -2
- 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.transports.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-files.js +74 -17
- 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 +4 -4
- 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.wbp02.protocol.js +3 -7
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.wbp02.protocol.js.map +1 -1
- package/lib/module/modules/bt-management/utils/calculate-crc-16-modbus.js +18 -0
- package/lib/module/modules/bt-management/utils/calculate-crc-16-modbus.js.map +1 -0
- package/lib/module/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.js +8 -0
- package/lib/module/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.js.map +1 -0
- package/lib/module/modules/data-sync/services/managers/data-processor.js +7 -7
- package/lib/module/modules/data-sync/services/managers/data-processor.js.map +1 -1
- package/lib/module/modules/data-sync/utils/convert-generic-health-data.js +8 -3
- package/lib/module/modules/data-sync/utils/convert-generic-health-data.js.map +1 -1
- package/lib/module/modules/data-sync/utils/default-health-coding.js +44 -0
- package/lib/module/modules/data-sync/utils/default-health-coding.js.map +1 -0
- 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/next/bluetooth/ble-plx/ble-peripheral.js +30 -0
- package/lib/module/modules/next/bluetooth/ble-plx/ble-peripheral.js.map +1 -0
- package/lib/module/modules/next/bluetooth/ble-plx/ble-scanner.js +2 -27
- package/lib/module/modules/next/bluetooth/ble-plx/ble-scanner.js.map +1 -1
- package/lib/module/modules/next/bluetooth/ble-plx/legacy-driver.js +1 -1
- package/lib/module/modules/next/bluetooth/ble-plx/legacy-driver.js.map +1 -1
- package/lib/module/modules/next/bluetooth/react-native/ovok-sink.js.map +1 -1
- package/lib/module/modules/next/bluetooth/web/create-web-bluetooth-runtime.js +25 -0
- package/lib/module/modules/next/bluetooth/web/create-web-bluetooth-runtime.js.map +1 -0
- package/lib/module/modules/next/bluetooth/web/index.js +28 -0
- package/lib/module/modules/next/bluetooth/web/index.js.map +1 -0
- package/lib/module/modules/next/bluetooth/web/web-ble-device.js +140 -0
- package/lib/module/modules/next/bluetooth/web/web-ble-device.js.map +1 -0
- package/lib/module/modules/next/bluetooth/web/web-ble-shapes.js +39 -0
- package/lib/module/modules/next/bluetooth/web/web-ble-shapes.js.map +1 -0
- package/lib/module/modules/next/bluetooth/web/web-bluetooth-permissions.js +18 -0
- package/lib/module/modules/next/bluetooth/web/web-bluetooth-permissions.js.map +1 -0
- package/lib/module/modules/next/bluetooth/web/web-bluetooth-scanner.js +128 -0
- package/lib/module/modules/next/bluetooth/web/web-bluetooth-scanner.js.map +1 -0
- package/lib/module/modules/next/bluetooth/web/web-bluetooth-services.js +25 -0
- package/lib/module/modules/next/bluetooth/web/web-bluetooth-services.js.map +1 -0
- package/lib/module/modules/next/bluetooth/web/web-bluetooth-values.js +29 -0
- package/lib/module/modules/next/bluetooth/web/web-bluetooth-values.js.map +1 -0
- package/lib/module/modules/next/bluetooth/web/web-bluetooth.types.js +2 -0
- package/lib/module/modules/next/bluetooth/web/web-bluetooth.types.js.map +1 -0
- package/lib/module/modules/next/bluetooth/web/web-gatt.js +79 -0
- package/lib/module/modules/next/bluetooth/web/web-gatt.js.map +1 -0
- package/lib/module/modules/next/breathing-exercise/index.js +5 -0
- package/lib/module/modules/next/breathing-exercise/index.js.map +1 -0
- package/lib/module/modules/next/cms/index.js +5 -0
- package/lib/module/modules/next/cms/index.js.map +1 -0
- package/lib/module/modules/next/content/index.js +5 -0
- package/lib/module/modules/next/content/index.js.map +1 -0
- package/lib/module/modules/next/diary/index.js +5 -0
- package/lib/module/modules/next/diary/index.js.map +1 -0
- package/lib/module/modules/next/image/index.js +5 -0
- package/lib/module/modules/next/image/index.js.map +1 -0
- package/lib/module/modules/next/journal/index.js +5 -0
- package/lib/module/modules/next/journal/index.js.map +1 -0
- package/lib/module/modules/next/language-switcher/index.js +5 -0
- package/lib/module/modules/next/language-switcher/index.js.map +1 -0
- package/lib/module/modules/next/measurement/index.js +5 -0
- package/lib/module/modules/next/measurement/index.js.map +1 -0
- package/lib/module/modules/next/observation-detail/index.js +5 -0
- package/lib/module/modules/next/observation-detail/index.js.map +1 -0
- package/lib/module/modules/next/patient/index.js +5 -0
- package/lib/module/modules/next/patient/index.js.map +1 -0
- package/lib/module/modules/next/pdf/index.js +5 -0
- package/lib/module/modules/next/pdf/index.js.map +1 -0
- package/lib/module/modules/next/picker-sheet/index.js +5 -0
- package/lib/module/modules/next/picker-sheet/index.js.map +1 -0
- package/lib/module/modules/next/progress-bar/index.js +5 -0
- package/lib/module/modules/next/progress-bar/index.js.map +1 -0
- package/lib/module/modules/next/progress-ring/index.js +5 -0
- package/lib/module/modules/next/progress-ring/index.js.map +1 -0
- package/lib/module/modules/next/setting/index.js +5 -0
- package/lib/module/modules/next/setting/index.js.map +1 -0
- package/lib/module/modules/next/tab/index.js +5 -0
- package/lib/module/modules/next/tab/index.js.map +1 -0
- package/lib/module/modules/next/theme/index.js +5 -0
- package/lib/module/modules/next/theme/index.js.map +1 -0
- package/lib/module/modules/next/tile/index.js +5 -0
- package/lib/module/modules/next/tile/index.js.map +1 -0
- package/lib/module/modules/next/ui/index.js +5 -0
- package/lib/module/modules/next/ui/index.js.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/google-return-page/index.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/auth/google-return-page/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/hooks/use-social-sign-in.web.d.ts +7 -0
- package/lib/typescript/commonjs/src/modules/auth/hooks/use-social-sign-in.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/auth/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/register/components/register.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/sign-in.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/apple-login-button.web.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/apple-login-button.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/apple-login.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/google-login-button.web.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/google-login-button.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/google-login.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/social-logins.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/auth/sign-in/index.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/types/apple-login-props.d.ts +13 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/types/apple-login-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/types/google-login-props.d.ts +13 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/types/google-login-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/apple-web-sign-in.d.ts +17 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/apple-web-sign-in.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/google-redirect-sign-in.d.ts +14 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/google-redirect-sign-in.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/jwt-claims.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/jwt-claims.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/utils/sign-out-google.web.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/auth/utils/sign-out-google.web.d.ts.map +1 -0
- 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/blood-glucose/blood-glucose.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.d.ts +34 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.d.ts +32 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.d.ts.map +1 -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.history-sequencer.d.ts +7 -1
- 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-data-processor.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-data-processor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/cofoe/cofoe.records.d.ts.map +1 -1
- 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.transports.d.ts +2 -1
- 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/viatom/viatom.ecg-files.d.ts +9 -3
- 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.wbp02.protocol.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-lepu-spec.d.ts +5 -2
- 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/utils/calculate-crc-16-modbus.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/calculate-crc-16-modbus.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.d.ts.map +1 -0
- 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/health-sync-props.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-sync-props.d.ts.map +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/default-health-coding.d.ts +10 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/default-health-coding.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/health-units.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-link.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-link.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-peripheral.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-peripheral.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-scanner.d.ts +3 -7
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-scanner.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/react-native/ovok-sink.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/next/bluetooth/react-native/ovok-sink.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/create-web-bluetooth-runtime.d.ts +23 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/create-web-bluetooth-runtime.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/index.d.ts +41 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-ble-device.d.ts +53 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-ble-device.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-ble-shapes.d.ts +27 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-ble-shapes.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-permissions.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-permissions.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-scanner.d.ts +29 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-scanner.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-services.d.ts +10 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-services.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-values.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-values.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth.types.d.ts +56 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth.types.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-gatt.d.ts +27 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-gatt.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/breathing-exercise/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/next/breathing-exercise/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/cms/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/next/cms/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/content/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/next/content/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/diary/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/next/diary/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/image/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/next/image/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/journal/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/next/journal/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/language-switcher/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/next/language-switcher/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/measurement/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/next/measurement/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/observation-detail/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/next/observation-detail/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/patient/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/next/patient/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/pdf/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/next/pdf/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/picker-sheet/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/next/picker-sheet/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/progress-bar/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/next/progress-bar/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/progress-ring/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/next/progress-ring/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/setting/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/next/setting/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/tab/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/next/tab/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/theme/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/next/theme/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/tile/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/next/tile/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/ui/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/next/ui/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/google-return-page/index.d.ts +8 -0
- package/lib/typescript/module/src/modules/auth/google-return-page/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/hooks/use-social-sign-in.web.d.ts +7 -0
- package/lib/typescript/module/src/modules/auth/hooks/use-social-sign-in.web.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/index.d.ts +1 -0
- package/lib/typescript/module/src/modules/auth/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/register/components/register.d.ts +2 -2
- package/lib/typescript/module/src/modules/auth/sign-in/components/sign-in.d.ts +2 -2
- package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/apple-login-button.web.d.ts +5 -0
- package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/apple-login-button.web.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/apple-login.d.ts +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/google-login-button.web.d.ts +5 -0
- package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/google-login-button.web.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/google-login.d.ts +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/social-logins.d.ts +2 -2
- package/lib/typescript/module/src/modules/auth/sign-in/index.d.ts +2 -0
- package/lib/typescript/module/src/modules/auth/sign-in/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/types/apple-login-props.d.ts +13 -0
- package/lib/typescript/module/src/modules/auth/sign-in/types/apple-login-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/types/google-login-props.d.ts +13 -0
- package/lib/typescript/module/src/modules/auth/sign-in/types/google-login-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/utils/apple-web-sign-in.d.ts +17 -0
- package/lib/typescript/module/src/modules/auth/sign-in/utils/apple-web-sign-in.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/sign-in/utils/google-redirect-sign-in.d.ts +14 -0
- package/lib/typescript/module/src/modules/auth/sign-in/utils/google-redirect-sign-in.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/sign-in/utils/jwt-claims.d.ts +9 -0
- package/lib/typescript/module/src/modules/auth/sign-in/utils/jwt-claims.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/utils/sign-out-google.web.d.ts +3 -0
- package/lib/typescript/module/src/modules/auth/utils/sign-out-google.web.d.ts.map +1 -0
- 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/blood-glucose/blood-glucose.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.d.ts +34 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.d.ts +32 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.d.ts.map +1 -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.history-sequencer.d.ts +7 -1
- 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-data-processor.d.ts +2 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-data-processor.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/cofoe/cofoe.records.d.ts.map +1 -1
- 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.transports.d.ts +2 -1
- 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/viatom/viatom.ecg-files.d.ts +9 -3
- 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.wbp02.protocol.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/custom-lepu-spec.d.ts +5 -2
- 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/utils/calculate-crc-16-modbus.d.ts +3 -0
- package/lib/typescript/module/src/modules/bt-management/utils/calculate-crc-16-modbus.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.d.ts +3 -0
- package/lib/typescript/module/src/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.d.ts.map +1 -0
- 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/health-sync-props.d.ts +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/health-sync-props.d.ts.map +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/default-health-coding.d.ts +10 -0
- package/lib/typescript/module/src/modules/data-sync/utils/default-health-coding.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/data-sync/utils/health-units.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-link.d.ts +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-link.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-peripheral.d.ts +8 -0
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-peripheral.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-scanner.d.ts +3 -7
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-scanner.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/react-native/ovok-sink.d.ts +2 -2
- package/lib/typescript/module/src/modules/next/bluetooth/react-native/ovok-sink.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/web/create-web-bluetooth-runtime.d.ts +23 -0
- package/lib/typescript/module/src/modules/next/bluetooth/web/create-web-bluetooth-runtime.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/web/index.d.ts +41 -0
- package/lib/typescript/module/src/modules/next/bluetooth/web/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/web/web-ble-device.d.ts +53 -0
- package/lib/typescript/module/src/modules/next/bluetooth/web/web-ble-device.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/web/web-ble-shapes.d.ts +27 -0
- package/lib/typescript/module/src/modules/next/bluetooth/web/web-ble-shapes.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-permissions.d.ts +8 -0
- package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-permissions.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-scanner.d.ts +29 -0
- package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-scanner.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-services.d.ts +10 -0
- package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-services.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-values.d.ts +9 -0
- package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-values.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth.types.d.ts +56 -0
- package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth.types.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/web/web-gatt.d.ts +27 -0
- package/lib/typescript/module/src/modules/next/bluetooth/web/web-gatt.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/breathing-exercise/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/next/breathing-exercise/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/cms/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/next/cms/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/content/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/next/content/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/diary/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/next/diary/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/image/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/next/image/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/journal/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/next/journal/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/language-switcher/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/next/language-switcher/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/measurement/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/next/measurement/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/observation-detail/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/next/observation-detail/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/patient/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/next/patient/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/pdf/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/next/pdf/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/picker-sheet/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/next/picker-sheet/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/progress-bar/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/next/progress-bar/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/progress-ring/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/next/progress-ring/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/setting/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/next/setting/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/tab/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/next/tab/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/theme/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/next/theme/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/tile/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/next/tile/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/ui/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/next/ui/index.d.ts.map +1 -0
- package/package.json +1 -1
package/lib/module/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js
CHANGED
|
@@ -1,54 +1,64 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { MeasurementTypeKey } from "@ovok/core/next";
|
|
4
|
+
import { NO_PARSING_CASES } from "../../../constants/no-parsing-cases.js";
|
|
4
5
|
import { CaseType } from "../../../types/case-type.js";
|
|
5
6
|
import { IntegratedDevices } from "../../../types/integrated-devices.js";
|
|
6
|
-
import { hexToByte } from "../../../utils/hex-to-byte.js";
|
|
7
7
|
import { BTManagedDevice } from "../bt-managed-device.js";
|
|
8
8
|
import { TAIDOC, TAIDOC_CHARACTERISTIC, TAIDOC_SERVICE, taidocCommand } from "../taidoc/taidoc.protocol.js";
|
|
9
9
|
import { isPatientGlucoseRecord } from "../taidoc/taidoc.records.js";
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
import { TELEBGM_NOTIFY, TELEBGM_SERVICE, TELEBGM_WRITE, TeleBgmFrameReader } from "./telebgm.protocol.js";
|
|
11
|
+
import { TeleBgmSequencer } from "./telebgm.sequencer.js";
|
|
12
12
|
const GLUCOSE_REQUEST = taidocCommand(TAIDOC.readingResult).join("");
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
uuid:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
13
|
+
const TELEBGM_SERVICES = [{
|
|
14
|
+
uuid: TELEBGM_SERVICE,
|
|
15
|
+
monitorUuids: [{
|
|
16
|
+
uuid: TELEBGM_NOTIFY,
|
|
17
|
+
parsingModel: NO_PARSING_CASES
|
|
18
|
+
}]
|
|
19
|
+
}];
|
|
20
|
+
const taidocServices = device => [{
|
|
21
|
+
uuid: TAIDOC_SERVICE,
|
|
22
|
+
monitorUuids: [{
|
|
23
|
+
uuid: TAIDOC_CHARACTERISTIC,
|
|
24
|
+
parsingModel: {
|
|
25
|
+
caseValuePosition: [1],
|
|
26
|
+
cases: [...["46", ...(device === IntegratedDevices.GLUCOCHECK ? ["50"] : [])].map(caseValue => ({
|
|
27
|
+
caseType: CaseType.OTHER,
|
|
28
|
+
caseValue,
|
|
29
|
+
parseDefinitions: []
|
|
30
|
+
})), {
|
|
31
|
+
measurementTypeKey: MeasurementTypeKey.bloodGlucose,
|
|
32
|
+
caseType: CaseType.RESULT,
|
|
33
|
+
caseValue: "26",
|
|
34
|
+
parseDefinitions: [{
|
|
35
|
+
name: "bloodGlucose",
|
|
36
|
+
parseType: "custom",
|
|
37
|
+
byteIndexes: [3, 2],
|
|
38
|
+
parseReference: 16,
|
|
39
|
+
customParserDefinition: value => {
|
|
40
|
+
const raw = parseInt(value, 16);
|
|
41
|
+
return device === IntegratedDevices.TAIDOC_GLUCOSE ? Number((raw * 18).toFixed(2)) : raw;
|
|
42
|
+
}
|
|
42
43
|
}]
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
44
|
+
}]
|
|
45
|
+
}
|
|
46
|
+
}],
|
|
47
|
+
writeUuid: {
|
|
48
|
+
uuid: TAIDOC_CHARACTERISTIC,
|
|
49
|
+
mainCommandUuid: GLUCOSE_REQUEST
|
|
50
|
+
}
|
|
51
|
+
}];
|
|
52
|
+
const writesWithoutResponse = async device => {
|
|
53
|
+
try {
|
|
54
|
+
const characteristics = await device.characteristicsForService(TELEBGM_SERVICE);
|
|
55
|
+
const write = characteristics.find(({
|
|
56
|
+
uuid
|
|
57
|
+
}) => uuid.toLowerCase() === TELEBGM_WRITE);
|
|
58
|
+
return write?.isWritableWithResponse === false && write.isWritableWithoutResponse;
|
|
59
|
+
} catch {
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
52
62
|
};
|
|
53
63
|
|
|
54
64
|
/** Decodes the legacy TaiDoc, GlucoCheck Gold and TeleBGM glucose protocols. */
|
|
@@ -56,16 +66,26 @@ export class BloodGlucoseDevice extends BTManagedDevice {
|
|
|
56
66
|
stuckDataTimeout = 60_000;
|
|
57
67
|
constructor(device, params) {
|
|
58
68
|
super(device, params);
|
|
59
|
-
|
|
69
|
+
if (params.deviceName !== IntegratedDevices.BGM) {
|
|
70
|
+
this.mainServices = taidocServices(params.deviceName);
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
this.mainServices = TELEBGM_SERVICES;
|
|
74
|
+
this.frameReader = new TeleBgmFrameReader();
|
|
75
|
+
this.createCommandSequencer = () => new TeleBgmSequencer({
|
|
76
|
+
onResult: this.reportResult,
|
|
77
|
+
writesWithoutResponse: () => writesWithoutResponse(device),
|
|
78
|
+
clockSync: params.clockSync
|
|
79
|
+
});
|
|
60
80
|
}
|
|
61
|
-
validatePackage = pkg => pkg.length >=
|
|
81
|
+
validatePackage = pkg => pkg.length >= 8;
|
|
62
82
|
handleSuccessResult(result, frame) {
|
|
63
83
|
if (result.caseType !== CaseType.RESULT || result.bloodGlucose === 0) {
|
|
64
84
|
return;
|
|
65
85
|
}
|
|
66
86
|
|
|
67
87
|
// A ketone, cholesterol or control-solution record decodes to a number too; it is not glucose.
|
|
68
|
-
if (
|
|
88
|
+
if (!isPatientGlucoseRecord(frame)) {
|
|
69
89
|
return;
|
|
70
90
|
}
|
|
71
91
|
this.onResult?.(result);
|
package/lib/module/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MeasurementTypeKey","
|
|
1
|
+
{"version":3,"names":["MeasurementTypeKey","NO_PARSING_CASES","CaseType","IntegratedDevices","BTManagedDevice","TAIDOC","TAIDOC_CHARACTERISTIC","TAIDOC_SERVICE","taidocCommand","isPatientGlucoseRecord","TELEBGM_NOTIFY","TELEBGM_SERVICE","TELEBGM_WRITE","TeleBgmFrameReader","TeleBgmSequencer","GLUCOSE_REQUEST","readingResult","join","TELEBGM_SERVICES","uuid","monitorUuids","parsingModel","taidocServices","device","caseValuePosition","cases","GLUCOCHECK","map","caseValue","caseType","OTHER","parseDefinitions","measurementTypeKey","bloodGlucose","RESULT","name","parseType","byteIndexes","parseReference","customParserDefinition","value","raw","parseInt","TAIDOC_GLUCOSE","Number","toFixed","writeUuid","mainCommandUuid","writesWithoutResponse","characteristics","characteristicsForService","write","find","toLowerCase","isWritableWithResponse","isWritableWithoutResponse","BloodGlucoseDevice","stuckDataTimeout","constructor","params","deviceName","BGM","mainServices","frameReader","createCommandSequencer","onResult","reportResult","clockSync","validatePackage","pkg","length","handleSuccessResult","result","frame"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/blood-glucose/blood-glucose.device.ts"],"mappings":";;AAAA,SAAkCA,kBAAkB,QAAQ,iBAAiB;AAG7E,SAASC,gBAAgB,QAAQ,wCAAqC;AACtE,SAASC,QAAQ,QAAQ,6BAA0B;AAGnD,SAASC,iBAAiB,QAAQ,sCAAmC;AAGrE,SAASC,eAAe,QAAQ,yBAAsB;AACtD,SACEC,MAA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lD,gBAAgB,CAAC;MACnBmD,QAAQ,EAAE,IAAI,CAACC,YAAY;MAC3BlB,qBAAqB,EAAEA,CAAA,KAAMA,qBAAqB,CAACzB,MAAM,CAAC;MAC1D4C,SAAS,EAAER,MAAM,CAACQ;IACpB,CAAC,CAAC;EACN;EAEUC,eAAe,GAAIC,GAAa,IAAcA,GAAG,CAACC,MAAM,IAAI,CAAC;EAE7DC,mBAAmBA,CAC3BC,MAA2E,EAC3EC,KAAe,EACT;IACN,IAAID,MAAM,CAAC3C,QAAQ,KAAK3B,QAAQ,CAACgC,MAAM,IAAIsC,MAAM,CAACvC,YAAY,KAAK,CAAC,EAAE;MACpE;IACF;;IAEA;IACA,IAAI,CAACxB,sBAAsB,CAACgE,KAAK,CAAC,EAAE;MAClC;IACF;IAEA,IAAI,CAACR,QAAQ,GAAGO,MAA0D,CAAC;EAC7E;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/* eslint-disable import/group-exports */
|
|
4
|
+
|
|
5
|
+
import { bytesToHex } from "../../../utils/bytes-to-hex.js";
|
|
6
|
+
import { calculateCrc16Modbus } from "../../../utils/calculate-crc-16-modbus.js";
|
|
7
|
+
import { frameBytes } from "../../../utils/frame-bytes.js";
|
|
8
|
+
import { complete, corrupt, incomplete } from "../../../utils/frame-read-results.js";
|
|
9
|
+
export const TELEBGM_SERVICE = "0003cdd0-0000-1000-8000-00805f9b0131";
|
|
10
|
+
export const TELEBGM_NOTIFY = "0003cdd1-0000-1000-8000-00805f9b0131";
|
|
11
|
+
export const TELEBGM_WRITE = "0003cdd2-0000-1000-8000-00805f9b0131";
|
|
12
|
+
|
|
13
|
+
/** Command byte of a frame; the meter answers a request with the same byte. */
|
|
14
|
+
export const TELEBGM_COMMAND = {
|
|
15
|
+
testStatus: 0x12,
|
|
16
|
+
setTime: 0x44,
|
|
17
|
+
softwareVersion: 0x66,
|
|
18
|
+
serial: 0x77,
|
|
19
|
+
units: 0xaa,
|
|
20
|
+
historyEnd: 0xd1,
|
|
21
|
+
history: 0xdd,
|
|
22
|
+
transferEnd: 0xf2
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** Parameter byte of a request, a clock write and an acknowledgement. */
|
|
26
|
+
export const TELEBGM_PARAMETER = {
|
|
27
|
+
request: 0x55,
|
|
28
|
+
write: 0x66,
|
|
29
|
+
ack: 0x99
|
|
30
|
+
};
|
|
31
|
+
const START = 0x7b;
|
|
32
|
+
const END = 0x7d;
|
|
33
|
+
const APP_ADDRESS = [0x01, 0x10, 0x01, 0x20];
|
|
34
|
+
const COMMAND_INDEX = 5;
|
|
35
|
+
const LENGTH_INDEX = 7;
|
|
36
|
+
const HEADER_BYTES = 9;
|
|
37
|
+
|
|
38
|
+
/** Four CRC nibbles, then the end byte. */
|
|
39
|
+
const TRAILER_BYTES = 5;
|
|
40
|
+
|
|
41
|
+
/** Longer than any reply; a corrupted length would otherwise hold the buffer for ever. */
|
|
42
|
+
const MAX_PAYLOAD_BYTES = 64;
|
|
43
|
+
|
|
44
|
+
/** The CRC of everything between the start byte and the CRC, as four nibbles. */
|
|
45
|
+
const crcNibbles = body => {
|
|
46
|
+
const crc = calculateCrc16Modbus(body);
|
|
47
|
+
return [crc & 0xff, crc >> 8].flatMap(byte => [byte >> 4, byte & 0x0f]);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/** `7B 01 10 01 20 <command> <parameter> <length, 2 bytes> <payload> <CRC nibbles> 7D`. */
|
|
51
|
+
export const telebgmFrame = (command, parameter, payload = []) => {
|
|
52
|
+
const body = [...APP_ADDRESS, command, parameter, payload.length >> 8, payload.length & 0xff, ...payload];
|
|
53
|
+
return bytesToHex([START, ...body, ...crcNibbles(body), END]);
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
/** A frame's command byte and payload. */
|
|
57
|
+
export const unframe = frame => {
|
|
58
|
+
const bytes = frameBytes(frame);
|
|
59
|
+
return {
|
|
60
|
+
command: bytes[COMMAND_INDEX],
|
|
61
|
+
payload: bytes.slice(HEADER_BYTES, -TRAILER_BYTES)
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
const isIntact = frame => {
|
|
65
|
+
const crcAt = frame.length - TRAILER_BYTES;
|
|
66
|
+
return frame[frame.length - 1] === END && crcNibbles(frame.slice(1, crcAt)).every((nibble, index) => frame[crcAt + index] === nibble);
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
/** Reads frames by their length field, a record being longer than one notification, and checks their CRC. */
|
|
70
|
+
export class TeleBgmFrameReader {
|
|
71
|
+
readFrame(buffer) {
|
|
72
|
+
const values = frameBytes(buffer);
|
|
73
|
+
const start = values.indexOf(START);
|
|
74
|
+
if (start === -1) {
|
|
75
|
+
return incomplete(values.length);
|
|
76
|
+
}
|
|
77
|
+
if (start + HEADER_BYTES > values.length) {
|
|
78
|
+
return incomplete(start);
|
|
79
|
+
}
|
|
80
|
+
const payloadBytes = (values[start + LENGTH_INDEX] ?? 0) << 8 | (values[start + LENGTH_INDEX + 1] ?? 0);
|
|
81
|
+
const total = HEADER_BYTES + payloadBytes + TRAILER_BYTES;
|
|
82
|
+
if (payloadBytes > MAX_PAYLOAD_BYTES) {
|
|
83
|
+
return corrupt(start + 1);
|
|
84
|
+
}
|
|
85
|
+
if (start + total > values.length) {
|
|
86
|
+
return incomplete(start);
|
|
87
|
+
}
|
|
88
|
+
return isIntact(values.slice(start, start + total)) ? complete(buffer.slice(start, start + total), start + total) : corrupt(start + 1);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=telebgm.protocol.js.map
|
package/lib/module/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["bytesToHex","calculateCrc16Modbus","frameBytes","complete","corrupt","incomplete","TELEBGM_SERVICE","TELEBGM_NOTIFY","TELEBGM_WRITE","TELEBGM_COMMAND","testStatus","setTime","softwareVersion","serial","units","historyEnd","history","transferEnd","TELEBGM_PARAMETER","request","write","ack","START","END","APP_ADDRESS","COMMAND_INDEX","LENGTH_INDEX","HEADER_BYTES","TRAILER_BYTES","MAX_PAYLOAD_BYTES","crcNibbles","body","crc","flatMap","byte","telebgmFrame","command","parameter","payload","length","unframe","frame","bytes","slice","isIntact","crcAt","every","nibble","index","TeleBgmFrameReader","readFrame","buffer","values","start","indexOf","payloadBytes","total"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/blood-glucose/telebgm.protocol.ts"],"mappings":";;AAAA;;AAGA,SAASA,UAAU,QAAQ,gCAA6B;AACxD,SAASC,oBAAoB,QAAQ,2CAAwC;AAC7E,SAASC,UAAU,QAAQ,+BAA4B;AACvD,SAASC,QAAQ,EAAEC,OAAO,EAAEC,UAAU,QAAQ,sCAAmC;AAEjF,OAAO,MAAMC,eAAe,GAAG,sCAAsC;AACrE,OAAO,MAAMC,cAAc,GAAG,sCAAsC;AACpE,OAAO,MAAMC,aAAa,GAAG,sCAAsC;;AAEnE;AACA,OAAO,MAAMC,eAAe,GAAG;EAC7BC,UAAU,EAAE,IAAI;EAChBC,OAAO,EAAE,IAAI;EACbC,eAAe,EAAE,IAAI;EACrBC,MAAM,EAAE,IAAI;EACZC,KAAK,EAAE,IAAI;EACXC,UAAU,EAAE,IAAI;EAChBC,OAAO,EAAE,IAAI;EACbC,WAAW,EAAE;AACf,CAAU;;AAEV;AACA,OAAO,MAAMC,iBAAiB,GAAG;EAAEC,OAAO,EAAE,IAAI;EAAEC,KAAK,EAAE,IAAI;EAAEC,GAAG,EAAE;AAAK,CAAU;AAEnF,MAAMC,KAAK,GAAG,IAAI;AAClB,MAAMC,GAAG,GAAG,IAAI;AAChB,MAAMC,WAAW,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;AAC5C,MAAMC,aAAa,GAAG,CAAC;AACvB,MAAMC,YAAY,GAAG,CAAC;AACtB,MAAMC,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AGG,KAAK,CAAC,GAC3DpD,OAAO,CAACiD,KAAK,GAAG,CAAC,CAAC;EACxB;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { MeasurementTypeKey } from "@ovok/core/next";
|
|
4
|
+
import { CaseType } from "../../../types/case-type.js";
|
|
5
|
+
import { getClockParts, isClockSyncEnabled } from "../../../types/clock-sync.js";
|
|
6
|
+
import { tenthsMmolToMgPerDl } from "../../../utils/tenths-mmol-to-mg-per-dl.js";
|
|
7
|
+
import { TELEBGM_COMMAND, TELEBGM_PARAMETER, TELEBGM_SERVICE, TELEBGM_WRITE, telebgmFrame, unframe } from "./telebgm.protocol.js";
|
|
8
|
+
|
|
9
|
+
/** Units reply of a meter showing mg/dL; any other shows mmol/L and reports tenths of a mmol/L. */
|
|
10
|
+
const MG_PER_DL_UNITS = 0x11;
|
|
11
|
+
|
|
12
|
+
/** Result type of a control-solution test, which is not the patient's glucose. */
|
|
13
|
+
const CONTROL_SOLUTION = 0x22;
|
|
14
|
+
|
|
15
|
+
/** `YY MM DD hh mm`, the value as hundreds and units, meal flag, result type. */
|
|
16
|
+
const RECORD_BYTES = 9;
|
|
17
|
+
const RESULT_TYPE_INDEX = 8;
|
|
18
|
+
/** A record's wall-clock time, or undefined when a field is out of range. */
|
|
19
|
+
const recordTime = ([year, month, day, hours, minutes], timezone = "local") => {
|
|
20
|
+
const fields = [2000 + (year ?? 0), (month ?? 0) - 1, day ?? 0, hours ?? 0, minutes ?? 0];
|
|
21
|
+
const time = timezone === "utc" ? new Date(Date.UTC(...fields)) : new Date(...fields);
|
|
22
|
+
const parts = getClockParts(time, timezone);
|
|
23
|
+
return parts.month === month && parts.day === day && parts.hours === hours && parts.minutes === minutes ? time : undefined;
|
|
24
|
+
};
|
|
25
|
+
const readRecord = (payload, reportsMmol, timezone) => {
|
|
26
|
+
if (payload.length < RECORD_BYTES || payload[RESULT_TYPE_INDEX] === CONTROL_SOLUTION) {
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
const value = (payload[5] ?? 0) * 100 + (payload[6] ?? 0);
|
|
30
|
+
const recordedAt = recordTime(payload, timezone);
|
|
31
|
+
return recordedAt && value > 0 ? {
|
|
32
|
+
bloodGlucose: reportsMmol ? tenthsMmolToMgPerDl(value) : value,
|
|
33
|
+
recordedAt
|
|
34
|
+
} : undefined;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* TeleBGM Gen1: reads the serial, version and units, sets the clock, then downloads the stored
|
|
39
|
+
* readings. The meter sends a reading only when asked for its history, and expects every
|
|
40
|
+
* test-status frame and the end of a transfer to be acknowledged.
|
|
41
|
+
*/
|
|
42
|
+
export class TeleBgmSequencer {
|
|
43
|
+
withoutResponse = false;
|
|
44
|
+
reportsMmol = false;
|
|
45
|
+
finished = false;
|
|
46
|
+
constructor(params) {
|
|
47
|
+
this.params = params;
|
|
48
|
+
}
|
|
49
|
+
initialCommands = async () => {
|
|
50
|
+
this.withoutResponse = await this.params.writesWithoutResponse();
|
|
51
|
+
return [this.request(TELEBGM_COMMAND.serial)];
|
|
52
|
+
};
|
|
53
|
+
isHistoryTransfer = () => true;
|
|
54
|
+
isNormalDisconnect = () => this.finished;
|
|
55
|
+
nextCommand = frame => {
|
|
56
|
+
const {
|
|
57
|
+
command,
|
|
58
|
+
payload
|
|
59
|
+
} = unframe(frame);
|
|
60
|
+
switch (command) {
|
|
61
|
+
case TELEBGM_COMMAND.testStatus:
|
|
62
|
+
return [this.acknowledge(command)];
|
|
63
|
+
case TELEBGM_COMMAND.serial:
|
|
64
|
+
return [this.request(TELEBGM_COMMAND.softwareVersion)];
|
|
65
|
+
case TELEBGM_COMMAND.softwareVersion:
|
|
66
|
+
return [this.request(TELEBGM_COMMAND.units)];
|
|
67
|
+
case TELEBGM_COMMAND.units:
|
|
68
|
+
this.reportsMmol = payload[0] !== MG_PER_DL_UNITS;
|
|
69
|
+
return [this.setClock() ?? this.request(TELEBGM_COMMAND.history)];
|
|
70
|
+
case TELEBGM_COMMAND.setTime:
|
|
71
|
+
return [this.request(TELEBGM_COMMAND.history)];
|
|
72
|
+
case TELEBGM_COMMAND.history:
|
|
73
|
+
this.report(payload);
|
|
74
|
+
return undefined;
|
|
75
|
+
case TELEBGM_COMMAND.transferEnd:
|
|
76
|
+
this.finished = true;
|
|
77
|
+
return [this.acknowledge(command)];
|
|
78
|
+
case TELEBGM_COMMAND.historyEnd:
|
|
79
|
+
this.finished = true;
|
|
80
|
+
return undefined;
|
|
81
|
+
default:
|
|
82
|
+
return undefined;
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
report = payload => {
|
|
86
|
+
const reading = readRecord(payload, this.reportsMmol, this.params.clockSync?.timezone);
|
|
87
|
+
if (reading) {
|
|
88
|
+
this.params.onResult({
|
|
89
|
+
caseType: CaseType.RESULT,
|
|
90
|
+
measurementTypeKey: MeasurementTypeKey.bloodGlucose,
|
|
91
|
+
...reading
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
setClock = () => {
|
|
96
|
+
const {
|
|
97
|
+
clockSync
|
|
98
|
+
} = this.params;
|
|
99
|
+
if (!isClockSyncEnabled(clockSync)) {
|
|
100
|
+
return undefined;
|
|
101
|
+
}
|
|
102
|
+
const {
|
|
103
|
+
year,
|
|
104
|
+
month,
|
|
105
|
+
day,
|
|
106
|
+
hours,
|
|
107
|
+
minutes,
|
|
108
|
+
seconds
|
|
109
|
+
} = getClockParts(clockSync?.now?.() ?? new Date(), clockSync?.timezone);
|
|
110
|
+
return this.command(telebgmFrame(TELEBGM_COMMAND.setTime, TELEBGM_PARAMETER.write, [year % 100, month, day, hours, minutes, seconds]));
|
|
111
|
+
};
|
|
112
|
+
request = command => this.command(telebgmFrame(command, TELEBGM_PARAMETER.request));
|
|
113
|
+
acknowledge = command => this.command(telebgmFrame(command, TELEBGM_PARAMETER.ack));
|
|
114
|
+
command = frame => ({
|
|
115
|
+
serviceUuid: TELEBGM_SERVICE,
|
|
116
|
+
characteristicUuid: TELEBGM_WRITE,
|
|
117
|
+
frame,
|
|
118
|
+
...(this.withoutResponse ? {
|
|
119
|
+
withoutResponse: true
|
|
120
|
+
} : {})
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
//# sourceMappingURL=telebgm.sequencer.js.map
|
package/lib/module/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["MeasurementTypeKey","CaseType","getClockParts","isClockSyncEnabled","tenthsMmolToMgPerDl","TELEBGM_COMMAND","TELEBGM_PARAMETER","TELEBGM_SERVICE","TELEBGM_WRITE","telebgmFrame","unframe","MG_PER_DL_UNITS","CONTROL_SOLUTION","RECORD_BYTES","RESULT_TYPE_INDEX","recordTime","year","month","day","hours","minutes","timezone","fields","time","Date","UTC","parts","undefined","readRecord","payload","reportsMmol","length","value","recordedAt","bloodGlucose","TeleBgmSequencer","withoutResponse","finished","constructor","params","initialCommands","writesWithoutResponse","request","serial","isHistoryTransfer","isNormalDisconnect","nextCommand","frame","command","testStatus","acknowledge","softwareVersion","units","setClock","history","setTime","report","transferEnd","historyEnd","reading","clockSync","onResult","caseType","RESULT","measurementTypeKey","seconds","now","write","ack","serviceUuid","characteristicUuid"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,iBAAiB;AAEpD,SAASC,QAAQ,QAAQ,6BAA0B;AACnD,SAGEC,aAAa,EACbC,kBAAkB,QACb,8BAA2B;AAGlC,SAASC,mBAAmB,QAAQ,4CAAyC;AAE7E,SACEC,eAAe,EACfC,iBAAiB,EACjBC,eAAe,EACfC,aAAa,EACbC,YAAY,EACZC,OAAO,QACF,uBAAoB;;AAE3B;AACA,MAAMC,eAAe,GAAG,IAAI;;AAE5B;AACA,MAAMC,gBA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,GAAG;MAAEC,KAAK;MAAEC,OAAO;MAAE6C;IAAQ,CAAC,GAAG/D,aAAa,CACjE0D,SAAS,EAAEM,GAAG,GAAG,CAAC,IAAI,IAAI1C,IAAI,CAAC,CAAC,EAChCoC,SAAS,EAAEvC,QACb,CAAC;IAED,OAAO,IAAI,CAAC2B,OAAO,CACjBvC,YAAY,CAACJ,eAAe,CAACkD,OAAO,EAAEjD,iBAAiB,CAAC6D,KAAK,EAAE,CAACnD,IAAI,GAAG,GAAG,EAAEC,KAAK,EAAEC,GAAG,EAAEC,KAAK,EAAEC,OAAO,EAAE6C,OAAO,CAAC,CAClH,CAAC;EACH,CAAC;EAEOvB,OAAO,GAAIM,OAAe,IAChC,IAAI,CAACA,OAAO,CAACvC,YAAY,CAACuC,OAAO,EAAE1C,iBAAiB,CAACoC,OAAO,CAAC,CAAC;EAExDQ,WAAW,GAAIF,OAAe,IACpC,IAAI,CAACA,OAAO,CAACvC,YAAY,CAACuC,OAAO,EAAE1C,iBAAiB,CAAC8D,GAAG,CAAC,CAAC;EAEpDpB,OAAO,GAAID,KAAe,KAAqB;IACrDsB,WAAW,EAAE9D,eAAe;IAC5B+D,kBAAkB,EAAE9D,aAAa;IACjCuC,KAAK;IACL,IAAI,IAAI,CAACX,eAAe,GAAG;MAAEA,eAAe,EAAE;IAAK,CAAC,GAAG,CAAC,CAAC;EAC3D,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
@@ -26,8 +26,12 @@ import { bp2MainServices } from "./bp2.main-services.js";
|
|
|
26
26
|
*/
|
|
27
27
|
/** BP2 ECG waveform resolution from the device protocol. */
|
|
28
28
|
const BP2_ECG_MILLIVOLTS_PER_COUNT = 0.003098;
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
|
|
30
|
+
/** The realtime ECG stream's rate. */
|
|
31
|
+
const BP2_LIVE_ECG_SAMPLES_PER_SECOND = 250;
|
|
32
|
+
|
|
33
|
+
/** Stored ECG files hold the waveform at half the realtime rate. */
|
|
34
|
+
const BP2_FILE_ECG_SAMPLES_PER_SECOND = 125;
|
|
31
35
|
const BP2_ECG_NO_VALUE = 0x7fff;
|
|
32
36
|
const BP2_BP_NO_VALUE = 0xffff;
|
|
33
37
|
const BP2_PULSE_NO_VALUES = new Set([0xff, 0x1ff, BP2_BP_NO_VALUE]);
|
|
@@ -98,7 +102,7 @@ class BP2Device extends BTManagedDevice {
|
|
|
98
102
|
successResult.diagramPoints = this.diagramPoints;
|
|
99
103
|
successResult.duration = this.duration;
|
|
100
104
|
this.addDeviceTimestamp(successResult);
|
|
101
|
-
const error = this.checkIfHasErrorForEcg(successResult);
|
|
105
|
+
const error = this.checkIfHasErrorForEcg(successResult, BP2_LIVE_ECG_SAMPLES_PER_SECOND);
|
|
102
106
|
if (error) {
|
|
103
107
|
this.onError?.(error);
|
|
104
108
|
return;
|
|
@@ -216,7 +220,7 @@ class BP2Device extends BTManagedDevice {
|
|
|
216
220
|
...decoded,
|
|
217
221
|
caseType: CaseType.RESULT
|
|
218
222
|
};
|
|
219
|
-
const error = result.measurementTypeKey === MeasurementTypeKey.bloodPressure ? this.checkIfHasErrorForBloodPressure(result) : this.checkIfHasErrorForEcg(result);
|
|
223
|
+
const error = result.measurementTypeKey === MeasurementTypeKey.bloodPressure ? this.checkIfHasErrorForBloodPressure(result) : this.checkIfHasErrorForEcg(result, BP2_FILE_ECG_SAMPLES_PER_SECOND);
|
|
220
224
|
if (error) {
|
|
221
225
|
this.onError?.(error);
|
|
222
226
|
return;
|
|
@@ -244,7 +248,7 @@ class BP2Device extends BTManagedDevice {
|
|
|
244
248
|
this.pendingResults.forEach(result => this.onResult?.(result));
|
|
245
249
|
this.pendingResults.clear();
|
|
246
250
|
};
|
|
247
|
-
checkIfHasErrorForEcg(successResult) {
|
|
251
|
+
checkIfHasErrorForEcg(successResult, samplesPerSecond) {
|
|
248
252
|
const ecgMeasurement = successResult;
|
|
249
253
|
if (ecgMeasurement.diagnosticResult === EcgDiagnosticFlag.POOR_WAVEFORM) {
|
|
250
254
|
return MeasurementFeedbackKey.POOR_WAVEFORM;
|
|
@@ -269,8 +273,9 @@ class BP2Device extends BTManagedDevice {
|
|
|
269
273
|
return MeasurementFeedbackKey.INSUFFICIENT_DATA_LENGTH;
|
|
270
274
|
}
|
|
271
275
|
if (ecgMeasurement.duration > 0) {
|
|
272
|
-
const expectedSamples = ecgMeasurement.duration *
|
|
273
|
-
|
|
276
|
+
const expectedSamples = ecgMeasurement.duration * samplesPerSecond;
|
|
277
|
+
const toleranceSamples = samplesPerSecond;
|
|
278
|
+
if (ecgMeasurement.diagramPoints.length < expectedSamples - toleranceSamples || ecgMeasurement.diagramPoints.length > expectedSamples + toleranceSamples) {
|
|
274
279
|
return MeasurementFeedbackKey.INSUFFICIENT_DATA_LENGTH;
|
|
275
280
|
}
|
|
276
281
|
} else if (ecgMeasurement.diagramPoints.length < 3500) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MeasurementTypeKey","EcgDiagnosticFlag","sentryLogger","bloodPressureTranslatedExceptionMap","MeasurementFeedbackKey","PREFERRED_MTU","BloodPressureStates","CaseType","DeviceStatus","hexToByte","i16FromHex","le16FromHex","le32FromHex","BTManagedDevice","decodeBP2File","recordedAtFromLocalSeconds","BP2FrameReader","BP2HistorySequencer","bp2MainServices","BP2_ECG_MILLIVOLTS_PER_COUNT","BP2_ECG_SAMPLES_PER_SECOND","BP2_ECG_SAMPLE_TOLERANCE","BP2_ECG_NO_VALUE","BP2_BP_NO_VALUE","BP2_PULSE_NO_VALUES","Set","BP2Device","collectedValues","diagramPoints","duration","historyMode","historyRequested","pendingResults","Map","reportedFileNames","mainServices","stuckDataTimeout","constructor","device","params","clockSync","deliveredFileNames","deliveredEcgFileNames","onStreamStart","lastLiveResultSignature","undefined","createCommandSequencer","clear","service","write","writeUuid","serviceUuid","uuid","characteristicUuid","onFile","handleHistoryFile","onError","handleHistoryError","onTransferFinished","reportPendingResults","shouldStartTransfer","onTransferRequested","onOrphanStreamEnd","skipFiles","frameReader","preferredMtu","handleSuccessResult","successResult","measurementTypeKey","caseType","Error","ecg","handleEcgResult","bloodPressure","handleBloodPressureResult","RESULT","addDeviceTimestamp","error","checkIfHasErrorForEcg","queueHistoryResult","onResult","handleEcgStream","lenL","lenH","dataLen","dataStart","dataEnd","data","slice","onDeviceStatusChanged","MEASURING","samplingNum","samplesStart","i","byteIndexInData","sampleVal","push","checkIfHasErrorForBloodPressure","result","recordedAt","length","bpMeasurement","status","diastolic","systolic","heartRate","DEVICE_ERROR","REGULAR","errorString","get","DEVICE_INTERRUPTED","has","signature","signatureFor","set","join","diagnosticResult","file","name","decoded","content","pending","add","matchesPendingResult","delete","pendingBloodPressure","decodedBloodPressure","pendingEcg","decodedEcg","reason","forEach","ecgMeasurement","POOR_WAVEFORM","LEAD_OFF","INSUFFICIENT_DATA_LENGTH","expectedSamples"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/bp2/bp2.device.ts"],"mappings":";;AAAA;;AAEA,SAEEA,kBAAkB,EAGlBC,iBAAiB,QACZ,iBAAiB;AAGxB,SAASC,YAAY,QAAQ,4CAAyC;AACtE,SAASC,mCAAmC,QAAQ,+DAA4D;AAChH,SAASC,sBAAsB,QAAQ,4CAAyC;AAChF,SAASC,aAAa,QAAQ,qCAAkC;AAChE,SAASC,mBAAmB,QAAQ,yCAAsC;AAC1E,SAASC,QAAQ,QAAQ,6BAA0B;AAInD,SAASC,YAAY,QAAQ,iCAA8B;AAI3D,SAASC,SAAS,QAAQ,+BAA4B;AACtD,SAASC,UAAU,QAAQ,iCAA8B;AACzD,SAASC,WAAW,QAAQ,kCAA+B;AAC3D,SAASC,WAAW,QAAQ,kCAA+B;AAC3D,SAASC,eAAe,QAAQ,yBAAsB;AAEtD,SAASC,aAAa,EAAEC,0BAA0B,QAAQ,gBAAa;AACvE,SAASC,cAAc,QAAQ,uBAAoB;AACnD,SAASC,mBAAmB,QAAQ,4BAAyB;AAC7D,SAASC,eAAe,QAAQ,wBAAqB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D;IAEA,IAAIqB,cAAc,CAACtG,QAAQ,KAAKgB,SAAS,IAAIsF,cAAc,CAACtG,QAAQ,GAAG,EAAE,EAAE;MACzE,OAAOzB,sBAAsB,CAACkI,wBAAwB;IACxD;IAEA,IAAIH,cAAc,CAACvG,aAAa,CAACwE,MAAM,KAAK,CAAC,EAAE;MAC7C,OAAOhG,sBAAsB,CAACkI,wBAAwB;IACxD;IAEA,IAAIH,cAAc,CAACtG,QAAQ,GAAG,CAAC,EAAE;MAC/B,MAAM0G,eAAe,GACnBJ,cAAc,CAACtG,QAAQ,GAAGT,0BAA0B;MAEtD,IACE+G,cAAc,CAACvG,aAAa,CAACwE,MAAM,GACjCmC,eAAe,GAAGlH,wBAAwB,IAC5C8G,cAAc,CAACvG,aAAa,CAACwE,MAAM,GACjCmC,eAAe,GAAGlH,wBAAwB,EAC5C;QACA,OAAOjB,sBAAsB,CAACkI,wBAAwB;MACxD;IACF,CAAC,MAAM,IAAIH,cAAc,CAACvG,aAAa,CAACwE,MAAM,GAAG,IAAI,EAAE;MACrD,OAAOhG,sBAAsB,CAACkI,wBAAwB;IACxD;IAEA,OAAOzF,SAAS;EAClB;AACF;AAEA,SAASnB,SAAS,EAAEP,4BAA4B","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["MeasurementTypeKey","EcgDiagnosticFlag","sentryLogger","bloodPressureTranslatedExceptionMap","MeasurementFeedbackKey","PREFERRED_MTU","BloodPressureStates","CaseType","DeviceStatus","hexToByte","i16FromHex","le16FromHex","le32FromHex","BTManagedDevice","decodeBP2File","recordedAtFromLocalSeconds","BP2FrameReader","BP2HistorySequencer","bp2MainServices","BP2_ECG_MILLIVOLTS_PER_COUNT","BP2_LIVE_ECG_SAMPLES_PER_SECOND","BP2_FILE_ECG_SAMPLES_PER_SECOND","BP2_ECG_NO_VALUE","BP2_BP_NO_VALUE","BP2_PULSE_NO_VALUES","Set","BP2Device","collectedValues","diagramPoints","duration","historyMode","historyRequested","pendingResults","Map","reportedFileNames","mainServices","stuckDataTimeout","constructor","device","params","clockSync","deliveredFileNames","deliveredEcgFileNames","onStreamStart","lastLiveResultSignature","undefined","createCommandSequencer","clear","service","write","writeUuid","serviceUuid","uuid","characteristicUuid","onFile","handleHistoryFile","onError","handleHistoryError","onTransferFinished","reportPendingResults","shouldStartTransfer","onTransferRequested","onOrphanStreamEnd","skipFiles","frameReader","preferredMtu","handleSuccessResult","successResult","measurementTypeKey","caseType","Error","ecg","handleEcgResult","bloodPressure","handleBloodPressureResult","RESULT","addDeviceTimestamp","error","checkIfHasErrorForEcg","queueHistoryResult","onResult","handleEcgStream","lenL","lenH","dataLen","dataStart","dataEnd","data","slice","onDeviceStatusChanged","MEASURING","samplingNum","samplesStart","i","byteIndexInData","sampleVal","push","checkIfHasErrorForBloodPressure","result","recordedAt","length","bpMeasurement","status","diastolic","systolic","heartRate","DEVICE_ERROR","REGULAR","errorString","get","DEVICE_INTERRUPTED","has","signature","signatureFor","set","join","diagnosticResult","file","name","decoded","content","pending","add","matchesPendingResult","delete","pendingBloodPressure","decodedBloodPressure","pendingEcg","decodedEcg","reason","forEach","samplesPerSecond","ecgMeasurement","POOR_WAVEFORM","LEAD_OFF","INSUFFICIENT_DATA_LENGTH","expectedSamples","toleranceSamples"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/bp2/bp2.device.ts"],"mappings":";;AAAA;;AAEA,SAEEA,kBAAkB,EAGlBC,iBAAiB,QACZ,iBAAiB;AAGxB,SAASC,YAAY,QAAQ,4CAAyC;AACtE,SAASC,mCAAmC,QAAQ,+DAA4D;AAChH,SAASC,sBAAsB,QAAQ,4CAAyC;AAChF,SAASC,aAAa,QAAQ,qCAAkC;AAChE,SAASC,mBAAmB,QAAQ,yCAAsC;AAC1E,SAASC,QAAQ,QAAQ,6BAA0B;AAInD,SAASC,YAAY,QAAQ,iCAA8B;AAI3D,SAASC,SAAS,QAAQ,+BAA4B;AACtD,SAASC,UAAU,QAAQ,iCAA8B;AACzD,SAASC,WA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06";
|
|
15
15
|
const BP2_IDLE_STATES = new Set(["00", "01", "03"]);
|
|
16
|
-
|
|
16
|
+
|
|
17
|
+
/** The pace of Viatom's own BP2 client, which the device keeps up with while it measures. */
|
|
18
|
+
const BP2_POLL_INTERVAL_MS = 500;
|
|
19
|
+
|
|
20
|
+
/** How long a queued realtime poll may go unanswered before it is sent again. */
|
|
21
|
+
const BP2_POLL_ANSWER_TIMEOUT_MS = BP2_POLL_INTERVAL_MS + 1_000;
|
|
17
22
|
/** Reads unseen BP2 history on connect and after each realtime result. */
|
|
18
23
|
class BP2HistorySequencer {
|
|
19
24
|
builder = new LepuCommandBuilder();
|
|
@@ -34,6 +39,15 @@ class BP2HistorySequencer {
|
|
|
34
39
|
return this.startTransfer();
|
|
35
40
|
};
|
|
36
41
|
isHistoryTransfer = () => true;
|
|
42
|
+
commandTimeoutMs = () => this.isPolling() ? BP2_POLL_ANSWER_TIMEOUT_MS : undefined;
|
|
43
|
+
|
|
44
|
+
/** The BP2 can drop a poll while it starts measuring, so a missing answer is asked for again. */
|
|
45
|
+
onCommandTimeout = () => this.isPolling() ? {
|
|
46
|
+
commands: [this.pollCommand()]
|
|
47
|
+
} : {};
|
|
48
|
+
|
|
49
|
+
/** Only the realtime answer settles a poll; any other frame leaves its timeout running. */
|
|
50
|
+
commandProgress = frame => this.isPolling() && lepuCommandOf(frame) !== BP2_REALTIME_COMMAND ? "ignored" : "complete";
|
|
37
51
|
nextCommand = frame => {
|
|
38
52
|
if (this.phase === "clock") {
|
|
39
53
|
if (lepuCommandOf(frame) !== LepuCommand.SET_TIME) {
|
|
@@ -81,6 +95,7 @@ class BP2HistorySequencer {
|
|
|
81
95
|
this.params.onTransferFinished();
|
|
82
96
|
return [this.pollCommand()];
|
|
83
97
|
};
|
|
98
|
+
isPolling = () => this.phase === "files" && this.transfer === undefined;
|
|
84
99
|
pollCommand = () => ({
|
|
85
100
|
...this.params.write,
|
|
86
101
|
frame: this.builder.build(BP2_REALTIME_COMMAND),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["sentryLogger","isClockSyncEnabled","hexToByte","LepuCommandBuilder","LepuCommand","clockPayload","LepuFileTransfer","lepuCommandOf","isLepuSuccess","describeLepuResponseType","BP2_REALTIME_COMMAND","BP2_RESULT_STATES","Set","BP2_ECG_STATE","BP2_IDLE_STATES","BP2_POLL_INTERVAL_MS","BP2HistorySequencer","builder","lastRunStatusFrameCount","realtimeEcgActive","phase","constructor","params","initialCommands","clockSync","write","frame","build","SET_TIME","startTransfer","isHistoryTransfer","
|
|
1
|
+
{"version":3,"names":["sentryLogger","isClockSyncEnabled","hexToByte","LepuCommandBuilder","LepuCommand","clockPayload","LepuFileTransfer","lepuCommandOf","isLepuSuccess","describeLepuResponseType","BP2_REALTIME_COMMAND","BP2_RESULT_STATES","Set","BP2_ECG_STATE","BP2_IDLE_STATES","BP2_POLL_INTERVAL_MS","BP2_POLL_ANSWER_TIMEOUT_MS","BP2HistorySequencer","builder","lastRunStatusFrameCount","realtimeEcgActive","phase","constructor","params","initialCommands","clockSync","write","frame","build","SET_TIME","startTransfer","isHistoryTransfer","commandTimeoutMs","isPolling","undefined","onCommandTimeout","commands","pollCommand","commandProgress","nextCommand","onError","transfer","logRunStatus","isResult","isResultFrame","endedWithoutResult","isIdleFrame","onOrphanStreamEnd","shouldStartTransfer","onTransferRequested","delayBeforeWriteMs","onFile","skipFiles","afterTransfer","finishTransfer","onTransferFinished","has","toLowerCase","runStatus","lastRunStatus"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/bp2/bp2.history-sequencer.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,4CAAyC;AACtE,SACEC,kBAAkB,QAEb,8BAA2B;AAMlC,SAASC,SAAS,QAAQ,+BAA4B;AACtD,SAASC,kBAAkB,QAAQ,iCAA8B;AACjE,SAASC,WAAW,QAAQ,0BAAuB;AACnD,SAASC,YAAY,QAAQ,8BAA2B;AACxD,SAAmBC,gBAAgB,QAAQ,+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":[]}
|
|
@@ -175,7 +175,7 @@ export class BTDataProcessor {
|
|
|
175
175
|
message: "Device is stuck"
|
|
176
176
|
}
|
|
177
177
|
}));
|
|
178
|
-
this.
|
|
178
|
+
this.cancelConnection(MeasurementFeedbackKey.STUCK);
|
|
179
179
|
}, this.stuckDataTimeoutDuration);
|
|
180
180
|
};
|
|
181
181
|
startCommandTimeout = () => {
|
|
@@ -194,9 +194,17 @@ export class BTDataProcessor {
|
|
|
194
194
|
}
|
|
195
195
|
if (result?.terminal) {
|
|
196
196
|
this.callbacks.onError?.(new Error(MeasurementFeedbackKey.COMMAND_TIMEOUT));
|
|
197
|
-
|
|
197
|
+
this.cancelConnection(MeasurementFeedbackKey.COMMAND_TIMEOUT);
|
|
198
198
|
}
|
|
199
199
|
}, duration);
|
|
200
200
|
};
|
|
201
|
+
|
|
202
|
+
/** Ends the link from this side, logged so it is never mistaken for the device hanging up. */
|
|
203
|
+
cancelConnection = reason => {
|
|
204
|
+
sentryLogger("warning", "BT_MANAGER: Cancelling the connection", {
|
|
205
|
+
reason
|
|
206
|
+
});
|
|
207
|
+
void this.device.cancelConnection?.();
|
|
208
|
+
};
|
|
201
209
|
}
|
|
202
210
|
//# sourceMappingURL=bt-data-processor.js.map
|