@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
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/** Wire constants and frame builders shared by the BC401 command sequencer. */
|
|
4
|
+
const OP_RESET = 0x80;
|
|
5
|
+
const OP_REQUEST_VERSION = 0x82;
|
|
6
|
+
const OP_SET_TIME = 0x83;
|
|
7
|
+
const OP_REQUEST_COUNT = 0x90;
|
|
8
|
+
const OP_REQUEST_RECORDS = 0x92;
|
|
9
|
+
const OP_REQUEST_QUANTITATIVE_RECORDS = 0x95;
|
|
10
|
+
const ACK_LAST_OF_SET = 0x7e;
|
|
11
|
+
const REQUEST_ALL = 0x00;
|
|
12
|
+
const REQUEST_NEXT_RECORD_GROUP = 0x01;
|
|
13
|
+
const RETRY_RECORD_GROUP = 0x02;
|
|
14
|
+
const FINAL_RECORD_DELAY_MS = 200;
|
|
15
|
+
const RESET_DELAY_MS = 100;
|
|
16
|
+
const RX = {
|
|
17
|
+
ACK: 0xf0,
|
|
18
|
+
VERSION_REPLY: 0xf2,
|
|
19
|
+
TIME_SYNC_ACK: 0xf3,
|
|
20
|
+
COUNT_REPLY: 0xe0,
|
|
21
|
+
STORED_RECORD_URS: 0xe1,
|
|
22
|
+
STORED_RECORD_PAGED: 0xe2,
|
|
23
|
+
FINISH: 0xe3,
|
|
24
|
+
STORED_QUANTITATIVE: 0xe4,
|
|
25
|
+
STORED_QUANTITATIVE_PAGED: 0xe5
|
|
26
|
+
};
|
|
27
|
+
const RECORD_FLAGS_INDEX = 1;
|
|
28
|
+
const RECORD_LAST_OF_SET_BIT = 0x40;
|
|
29
|
+
const asHex = byte => (byte & 0xff).toString(16).padStart(2, "0");
|
|
30
|
+
const bc401Checksum = bytes => bytes.reduce((acc, byte) => acc + (byte & 0x7f), 0) & 0x7f;
|
|
31
|
+
const buildCommand = (opcode, arg) => [opcode, arg, bc401Checksum([opcode, arg])];
|
|
32
|
+
const buildResetCommand = () => [OP_RESET, 0x00];
|
|
33
|
+
const buildRequestVersionCommand = () => [OP_REQUEST_VERSION, bc401Checksum([OP_REQUEST_VERSION])];
|
|
34
|
+
const buildSetTimeCommand = now => {
|
|
35
|
+
const payload = [OP_SET_TIME, now.getFullYear() - 2000, now.getMonth() + 1, now.getDate(), now.getHours(), now.getMinutes(), now.getSeconds(), now.getMilliseconds() & 0xff, now.getMilliseconds() >> 8 & 0xff];
|
|
36
|
+
return [...payload, bc401Checksum(payload)];
|
|
37
|
+
};
|
|
38
|
+
const buildDeleteCommand = () => [0x93, 0x13];
|
|
39
|
+
export { ACK_LAST_OF_SET, asHex, bc401Checksum, buildCommand, buildDeleteCommand, buildRequestVersionCommand, buildResetCommand, buildSetTimeCommand, FINAL_RECORD_DELAY_MS, OP_REQUEST_COUNT, OP_REQUEST_QUANTITATIVE_RECORDS, OP_REQUEST_RECORDS, RECORD_FLAGS_INDEX, RECORD_LAST_OF_SET_BIT, REQUEST_ALL, REQUEST_NEXT_RECORD_GROUP, RESET_DELAY_MS, RETRY_RECORD_GROUP, RX };
|
|
40
|
+
//# sourceMappingURL=bc01-command-builders.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["OP_RESET","OP_REQUEST_VERSION","OP_SET_TIME","OP_REQUEST_COUNT","OP_REQUEST_RECORDS","OP_REQUEST_QUANTITATIVE_RECORDS","ACK_LAST_OF_SET","REQUEST_ALL","REQUEST_NEXT_RECORD_GROUP","RETRY_RECORD_GROUP","FINAL_RECORD_DELAY_MS","RESET_DELAY_MS","RX","ACK","VERSION_REPLY","TIME_SYNC_ACK","COUNT_REPLY","STORED_RECORD_URS","STORED_RECORD_PAGED","FINISH","STORED_QUANTITATIVE","STORED_QUANTITATIVE_PAGED","RECORD_FLAGS_INDEX","RECORD_LAST_OF_SET_BIT","asHex","byte","toString","padStart","bc401Checksum","bytes","reduce","acc","buildCommand","opcode","arg","buildResetCommand","buildRequestVersionCommand","buildSetTimeCommand","now","payload","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","getMilliseconds","buildDeleteCommand"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/bc01/bc01-command-builders.ts"],"mappings":";;AAAA;AACA,MAAMA,QAAQ,GAAG,IAAI;AACrB,MAAMC,kBAAkB,GAAG,IAAI;AAC/B,MAAMC,WAAW,GAAG,IAAI;AACxB,MAAMC,gBAAgB,GAAG,IAAI;AAC7B,MAAMC,kBAAkB,GAAG,IAAI;AAC/B,MAAMC,+BAA+B,GAAG,IAAI;AAE5C,MAAMC,eAAe,GAAG,IAAI;AAC5B,MAAMC,WAAW,GAAG,IAAI;AACxB,MAAMC,yBAAyB,GAAG,IAAI;AACtC,MAAMC,kBAAkB,GA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AC,EAClBH,GAAG,CAACI,OAAO,CAAC,CAAC,EACbJ,GAAG,CAACK,QAAQ,CAAC,CAAC,EACdL,GAAG,CAACM,UAAU,CAAC,CAAC,EAChBN,GAAG,CAACO,UAAU,CAAC,CAAC,EAChBP,GAAG,CAACQ,eAAe,CAAC,CAAC,GAAG,IAAI,EAC3BR,GAAG,CAACQ,eAAe,CAAC,CAAC,IAAI,CAAC,GAAI,IAAI,CACpC;EAED,OAAO,CAAC,GAAGP,OAAO,EAAEX,aAAa,CAACW,OAAO,CAAC,CAAC;AAC7C,CAAC;AAED,MAAMQ,kBAAkB,GAAGA,CAAA,KAAgB,CAAC,IAAI,EAAE,IAAI,CAAC;AAEvD,SACEzC,eAAe,EACfkB,KAAK,EACLI,aAAa,EACbI,YAAY,EACZe,kBAAkB,EAClBX,0BAA0B,EAC1BD,iBAAiB,EACjBE,mBAAmB,EACnB3B,qBAAqB,EACrBP,gBAAgB,EAChBE,+BAA+B,EAC/BD,kBAAkB,EAClBkB,kBAAkB,EAClBC,sBAAsB,EACtBhB,WAAW,EACXC,yBAAyB,EACzBG,cAAc,EACdF,kBAAkB,EAClBG,EAAE","ignoreList":[]}
|
|
@@ -1,103 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { hexToByte } from "../../../utils/hex-to-byte.js";
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* The FF01/FF02 opcodes the BC401 firmware speaks, as reverse-engineered from
|
|
7
|
-
* PHMS 3.0.03 (`I1/b.java` for the switch, `B3/B5.java` for the builders and
|
|
8
|
-
* checksum, `L1/f.java` for the reset write).
|
|
9
|
-
*/
|
|
10
|
-
const OP_RESET = 0x80;
|
|
11
|
-
const OP_REQUEST_VERSION = 0x82;
|
|
12
|
-
const OP_SET_TIME = 0x83;
|
|
13
|
-
const OP_REQUEST_COUNT = 0x90;
|
|
14
|
-
const OP_REQUEST_RECORDS = 0x92;
|
|
15
|
-
|
|
16
|
-
/** Payload byte for `OP_REQUEST_RECORDS` that acknowledges the last record of the set. */
|
|
17
|
-
const ACK_LAST_OF_SET = 0x7e;
|
|
18
|
-
|
|
19
|
-
/** Payload byte for `OP_REQUEST_COUNT` and the initial `OP_REQUEST_RECORDS`. */
|
|
20
|
-
const REQUEST_ALL = 0x00;
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Device-to-host frame prefixes the FSM keys on. Values are decimal opcodes as
|
|
24
|
-
* they appear in the decompiled Java (`switch(bArr[0])`), rendered here as
|
|
25
|
-
* their real hex opcodes.
|
|
26
|
-
*/
|
|
27
|
-
const RX = {
|
|
28
|
-
ACK: 0xf0,
|
|
29
|
-
VERSION_REPLY: 0xf2,
|
|
30
|
-
TIME_SYNC_ACK: 0xf3,
|
|
31
|
-
COUNT_REPLY: 0xe0,
|
|
32
|
-
STORED_RECORD_URS: 0xe1,
|
|
33
|
-
STORED_RECORD_PAGED: 0xe2,
|
|
34
|
-
FINISH: 0xe3
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
/** Position in a 16-byte URS record where the flags byte sits; bit 0x40 marks the last of a set. */
|
|
38
|
-
const RECORD_FLAGS_INDEX = 1;
|
|
39
|
-
const RECORD_LAST_OF_SET_BIT = 0x40;
|
|
40
|
-
/**
|
|
41
|
-
* Formats one byte as a two-digit lowercase hex string, matching the way the
|
|
42
|
-
* SDK's transport already spells raw bytes.
|
|
43
|
-
*/
|
|
44
|
-
const asHex = byte => (byte & 0xff).toString(16).padStart(2, "0");
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* BC401 checksum: sum of the low 7 bits of every byte, folded back into 7 bits.
|
|
48
|
-
* Matches `B5.a` in the decompiled Java exactly.
|
|
49
|
-
*/
|
|
50
|
-
const bc401Checksum = bytes => bytes.reduce((acc, byte) => acc + (byte & 0x7f), 0) & 0x7f;
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Builds a "one payload byte plus checksum" command frame. This is the shape
|
|
54
|
-
* of every BC401 host-to-device command that carries an argument: opcode,
|
|
55
|
-
* argument, checksum-over-both.
|
|
56
|
-
*/
|
|
57
|
-
const buildCommand = (opcode, arg) => {
|
|
58
|
-
const chk = bc401Checksum([opcode, arg]);
|
|
59
|
-
return [opcode, arg, chk];
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Builds the two-byte reset frame. It is the one command that does not carry
|
|
64
|
-
* an argument or a checksum — PHMS writes it as `[0x80, 0x00]` verbatim
|
|
65
|
-
* (`L1/f.java:694`).
|
|
66
|
-
*/
|
|
67
|
-
const buildResetCommand = () => [OP_RESET, 0x00];
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Builds the request-version reply. The Java sends it as `[0x82, 0x02]` where
|
|
71
|
-
* `0x02` doubles as the checksum of `0x82` under the BC401 rule
|
|
72
|
-
* (`0x82 & 0x7f = 0x02`), so the same formula that guards every other command
|
|
73
|
-
* produces the right byte here.
|
|
74
|
-
*/
|
|
75
|
-
const buildRequestVersionCommand = () => {
|
|
76
|
-
const chk = bc401Checksum([OP_REQUEST_VERSION]);
|
|
77
|
-
return [OP_REQUEST_VERSION, chk];
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* Builds the `SET_TIME` frame for the moment the sequencer receives it. The
|
|
82
|
-
* device does not run its own clock across power cycles, so timestamps on
|
|
83
|
-
* stored records only make sense once the app tells it what "now" is.
|
|
84
|
-
* Millisecond field is written little-endian, matching `I1/b.java`.
|
|
85
|
-
*/
|
|
86
|
-
const buildSetTimeCommand = now => {
|
|
87
|
-
const yy = now.getFullYear() - 2000;
|
|
88
|
-
const mo = now.getMonth() + 1;
|
|
89
|
-
const dd = now.getDate();
|
|
90
|
-
const hh = now.getHours();
|
|
91
|
-
const mi = now.getMinutes();
|
|
92
|
-
const ss = now.getSeconds();
|
|
93
|
-
const ms = now.getMilliseconds();
|
|
94
|
-
const msLo = ms & 0xff;
|
|
95
|
-
const msHi = ms >> 8 & 0xff;
|
|
96
|
-
const payload = [OP_SET_TIME, yy, mo, dd, hh, mi, ss, msLo, msHi];
|
|
97
|
-
const chk = bc401Checksum(payload);
|
|
98
|
-
return [...payload, chk];
|
|
99
|
-
};
|
|
100
|
-
|
|
4
|
+
import { ACK_LAST_OF_SET, asHex, bc401Checksum, buildCommand, buildDeleteCommand, buildRequestVersionCommand, buildResetCommand, buildSetTimeCommand, FINAL_RECORD_DELAY_MS, OP_REQUEST_COUNT, OP_REQUEST_QUANTITATIVE_RECORDS, OP_REQUEST_RECORDS, RECORD_FLAGS_INDEX, RECORD_LAST_OF_SET_BIT, REQUEST_ALL, REQUEST_NEXT_RECORD_GROUP, RESET_DELAY_MS, RETRY_RECORD_GROUP, RX } from "./bc01-command-builders.js";
|
|
101
5
|
/**
|
|
102
6
|
* Walks the BC401 through its post-reset handshake and pulls every stored
|
|
103
7
|
* record.
|
|
@@ -118,13 +22,19 @@ const buildSetTimeCommand = now => {
|
|
|
118
22
|
export class Bc01CommandSequencer {
|
|
119
23
|
isDone = false;
|
|
120
24
|
|
|
25
|
+
/** Ten standard pages per request group; 10 means a new group. */
|
|
26
|
+
standardPage = 10;
|
|
27
|
+
|
|
28
|
+
/** Five quantitative pages per request group; 5 means a new group. */
|
|
29
|
+
quantitativePage = 5;
|
|
30
|
+
|
|
121
31
|
/** Injectable for tests; production reads `Date.now()`. */
|
|
122
32
|
|
|
123
33
|
constructor(params, clock = () => new Date()) {
|
|
124
34
|
this.params = params;
|
|
125
35
|
this.clock = clock;
|
|
126
36
|
}
|
|
127
|
-
initialCommands = () => [this.commandFor(buildResetCommand())];
|
|
37
|
+
initialCommands = () => [this.commandFor(buildResetCommand(), RESET_DELAY_MS)];
|
|
128
38
|
nextCommand = frame => {
|
|
129
39
|
if (this.isDone || frame.length === 0) {
|
|
130
40
|
return undefined;
|
|
@@ -141,7 +51,10 @@ export class Bc01CommandSequencer {
|
|
|
141
51
|
return [this.commandFor(buildCommand(OP_REQUEST_RECORDS, REQUEST_ALL))];
|
|
142
52
|
case RX.STORED_RECORD_URS:
|
|
143
53
|
case RX.STORED_RECORD_PAGED:
|
|
144
|
-
return this.answerStoredRecord(frame);
|
|
54
|
+
return this.answerStoredRecord(opcode, frame);
|
|
55
|
+
case RX.STORED_QUANTITATIVE:
|
|
56
|
+
case RX.STORED_QUANTITATIVE_PAGED:
|
|
57
|
+
return this.answerQuantitativeRecord(opcode, frame);
|
|
145
58
|
case RX.FINISH:
|
|
146
59
|
this.isDone = true;
|
|
147
60
|
return undefined;
|
|
@@ -149,23 +62,60 @@ export class Bc01CommandSequencer {
|
|
|
149
62
|
return undefined;
|
|
150
63
|
}
|
|
151
64
|
};
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
65
|
+
answerStoredRecord = (opcode, frame) => {
|
|
66
|
+
const flags = hexToByte(frame[RECORD_FLAGS_INDEX] ?? "0");
|
|
67
|
+
if (opcode === RX.STORED_RECORD_URS) {
|
|
68
|
+
return this.finishStoredRecords(OP_REQUEST_RECORDS);
|
|
69
|
+
}
|
|
70
|
+
const page = flags & 0x0f;
|
|
71
|
+
if (this.standardPage === 10) {
|
|
72
|
+
this.standardPage = 0;
|
|
73
|
+
}
|
|
74
|
+
if (page !== this.standardPage) {
|
|
75
|
+
this.standardPage = 10;
|
|
76
|
+
return [this.commandFor(buildCommand(OP_REQUEST_RECORDS, RETRY_RECORD_GROUP))];
|
|
77
|
+
}
|
|
78
|
+
this.standardPage += 1;
|
|
79
|
+
if (this.standardPage === 10 && (flags & RECORD_LAST_OF_SET_BIT) === 0) {
|
|
80
|
+
return [this.commandFor(buildCommand(OP_REQUEST_RECORDS, REQUEST_NEXT_RECORD_GROUP))];
|
|
81
|
+
}
|
|
82
|
+
if ((flags & RECORD_LAST_OF_SET_BIT) === 0) {
|
|
83
|
+
return undefined;
|
|
84
|
+
}
|
|
85
|
+
this.standardPage = 10;
|
|
86
|
+
return this.finishStoredRecords(OP_REQUEST_RECORDS);
|
|
87
|
+
};
|
|
88
|
+
answerQuantitativeRecord = (opcode, frame) => {
|
|
159
89
|
const flags = hexToByte(frame[RECORD_FLAGS_INDEX] ?? "0");
|
|
90
|
+
if (opcode === RX.STORED_QUANTITATIVE) {
|
|
91
|
+
return this.finishStoredRecords(OP_REQUEST_QUANTITATIVE_RECORDS);
|
|
92
|
+
}
|
|
93
|
+
const page = flags & 0x0f;
|
|
94
|
+
if (this.quantitativePage === 5) {
|
|
95
|
+
this.quantitativePage = 0;
|
|
96
|
+
}
|
|
97
|
+
if (page !== this.quantitativePage) {
|
|
98
|
+
this.quantitativePage = 5;
|
|
99
|
+
return [this.commandFor(buildCommand(OP_REQUEST_QUANTITATIVE_RECORDS, RETRY_RECORD_GROUP))];
|
|
100
|
+
}
|
|
101
|
+
this.quantitativePage += 1;
|
|
102
|
+
if (this.quantitativePage === 5 && (flags & RECORD_LAST_OF_SET_BIT) === 0) {
|
|
103
|
+
return [this.commandFor(buildCommand(OP_REQUEST_QUANTITATIVE_RECORDS, REQUEST_NEXT_RECORD_GROUP))];
|
|
104
|
+
}
|
|
160
105
|
if ((flags & RECORD_LAST_OF_SET_BIT) === 0) {
|
|
161
106
|
return undefined;
|
|
162
107
|
}
|
|
163
|
-
|
|
108
|
+
this.quantitativePage = 5;
|
|
109
|
+
return this.finishStoredRecords(OP_REQUEST_QUANTITATIVE_RECORDS);
|
|
110
|
+
};
|
|
111
|
+
finishStoredRecords = opcode => {
|
|
112
|
+
this.isDone = true;
|
|
113
|
+
return [this.commandFor(buildCommand(opcode, ACK_LAST_OF_SET)), this.commandFor(buildDeleteCommand(), FINAL_RECORD_DELAY_MS)];
|
|
164
114
|
};
|
|
165
|
-
commandFor = bytes => ({
|
|
115
|
+
commandFor = (bytes, delayBeforeWriteMs = 0) => ({
|
|
166
116
|
...this.params.write,
|
|
167
117
|
frame: bytes.map(asHex),
|
|
168
|
-
|
|
118
|
+
delayBeforeWriteMs
|
|
169
119
|
});
|
|
170
120
|
}
|
|
171
121
|
|
package/lib/module/modules/bt-management/services/devices/bc01/bc01-command-sequencer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["hexToByte","
|
|
1
|
+
{"version":3,"names":["hexToByte","ACK_LAST_OF_SET","asHex","bc401Checksum","buildCommand","buildDeleteCommand","buildRequestVersionCommand","buildResetCommand","buildSetTimeCommand","FINAL_RECORD_DELAY_MS","OP_REQUEST_COUNT","OP_REQUEST_QUANTITATIVE_RECORDS","OP_REQUEST_RECORDS","RECORD_FLAGS_INDEX","RECORD_LAST_OF_SET_BIT","REQUEST_ALL","REQUEST_NEXT_RECORD_GROUP","RESET_DELAY_MS","RETRY_RECORD_GROUP","RX","Bc01CommandSequencer","isDone","standardPage","quantitativePage","constructor","params","clock","Date","initialCommands","commandFor","nextCommand","frame","length","undefined","opcode","ACK","VERSION_REPLY","TIME_SYNC_ACK","COUNT_REPLY","STORED_RECORD_URS","STORED_RECORD_PAGED","answerStoredRecord","STORED_QUANTITATIVE","STORED_QUANTITATIVE_PAGED","answerQuantitativeRecord","FINISH","flags","finishStoredRecords","page","bytes","delayBeforeWriteMs","write","map","bc01CommandSequencerInternals"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/bc01/bc01-command-sequencer.ts"],"mappings":";;AAEA,SAASA,SAAS,QAAQ,+BAA4B;AAEtD,SACEC,eAAe,EACfC,KAAK,EACLC,aAAa,EACbC,YAAY,EACZC,kBAAkB,EAClBC,0BAA0B,EAC1BC,iBAAiB,EACjBC,mBAAmB,EACnBC,qBAAqB,EACrBC,gBAAgB,EAChBC,+BAA+B,EAC/BC,kBAAkB,EAClBC,kBAAkB,EAClBC,sBAAsB,EACtBC,WAAW,EACXC,yBAAyB,EACzBC,cAAc,EACdC,kBAAkB,EAClBC,EAAE,QACG,4BAAyB;AAehC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,IAAI;IAElB,OAAO,CACL,IAAI,CAACQ,UAAU,CAACzB,YAAY,CAAC8B,MAAM,EAAEjC,eAAe,CAAC,CAAC,EACtD,IAAI,CAAC4B,UAAU,CAACxB,kBAAkB,CAAC,CAAC,EAAEI,qBAAqB,CAAC,CAC7D;EACH,CAAC;EAEOoB,UAAU,GAAGA,CACnBoB,KAAwB,EACxBC,kBAAkB,GAAG,CAAC,MACH;IACnB,GAAG,IAAI,CAACzB,MAAM,CAAC0B,KAAK;IACpBpB,KAAK,EAAEkB,KAAK,CAACG,GAAG,CAAClD,KAAK,CAAC;IACvBgD;EACF,CAAC,CAAC;AACJ;;AAEA;AACA,OAAO,MAAMG,6BAA6B,GAAG;EAC3ClD,aAAa;EACbC,YAAY;EACZG,iBAAiB;EACjBD,0BAA0B;EAC1BE;AACF,CAAC","ignoreList":[]}
|
|
@@ -6,6 +6,7 @@ import { hexToByte } from "../../../utils/hex-to-byte.js";
|
|
|
6
6
|
import { BTManagedDevice } from "../bt-managed-device.js";
|
|
7
7
|
import { Bc01CommandSequencer } from "./bc01-command-sequencer.js";
|
|
8
8
|
import { BC01_ANALYTE_ORDER, parseBc01Record } from "./bc01-frame-parser.js";
|
|
9
|
+
import { Bc01FrameReader } from "./bc01.frame-reader.js";
|
|
9
10
|
import { bc01MainServices } from "./bc01.main-services.js";
|
|
10
11
|
|
|
11
12
|
/** Minimum bytes a complete frame carries, keyed by its opening opcode. */
|
|
@@ -42,6 +43,7 @@ const BC01_FRAME_MIN_LENGTH = {
|
|
|
42
43
|
export class BC01Device extends BTManagedDevice {
|
|
43
44
|
onStreamStart = () => {};
|
|
44
45
|
mainServices = bc01MainServices;
|
|
46
|
+
frameReader = new Bc01FrameReader();
|
|
45
47
|
|
|
46
48
|
/**
|
|
47
49
|
* 90 s covers the maximum firmware-side reagent-pad settle time on a URS-7
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MeasurementTypeKey","CaseType","hexToByte","BTManagedDevice","Bc01CommandSequencer","BC01_ANALYTE_ORDER","parseBc01Record","bc01MainServices","BC01_FRAME_MIN_LENGTH","BC01Device","onStreamStart","mainServices","stuckDataTimeout","constructor","device","params","createCommandSequencer","write","serviceUuid","uuid","characteristicUuid","writeUuid","onRefused","reason","onError","Error","validatePackage","pkg","length","opcode","minLength","undefined","handleDependentResult","data","frame","reportUrsRecord","parsingCase","caseType","OTHER","handleSuccessResult","parsed","measuredValues","reduce","acc","analyte","value","values","Object","keys","reading","RESULT","measurementTypeKey","uricAcid","urineValues","recordedAt","timestamp","onResult"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/bc01/bc01.device.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAiC,YAAY;AAGxE,SAASC,QAAQ,QAAQ,6BAA0B;AAQnD,SAASC,SAAS,QAAQ,+BAA4B;AACtD,SAASC,eAAe,QAAQ,yBAAsB;AAEtD,SAASC,oBAAoB,QAAQ,6BAA0B;AAC/D,SAASC,kBAAkB,EAAEC,eAAe,QAAQ,wBAAqB;AACzE,SAASC,gBAAgB,QAAQ,yBAAsB;;AAEvD;AACA,MAAMC,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;AACA,OAAO,MAAMC,UAAU,
|
|
1
|
+
{"version":3,"names":["MeasurementTypeKey","CaseType","hexToByte","BTManagedDevice","Bc01CommandSequencer","BC01_ANALYTE_ORDER","parseBc01Record","Bc01FrameReader","bc01MainServices","BC01_FRAME_MIN_LENGTH","BC01Device","onStreamStart","mainServices","frameReader","stuckDataTimeout","constructor","device","params","createCommandSequencer","write","serviceUuid","uuid","characteristicUuid","writeUuid","onRefused","reason","onError","Error","validatePackage","pkg","length","opcode","minLength","undefined","handleDependentResult","data","frame","reportUrsRecord","parsingCase","caseType","OTHER","handleSuccessResult","parsed","measuredValues","reduce","acc","analyte","value","values","Object","keys","reading","RESULT","measurementTypeKey","uricAcid","urineValues","recordedAt","timestamp","onResult"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/bc01/bc01.device.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAiC,YAAY;AAGxE,SAASC,QAAQ,QAAQ,6BAA0B;AAQnD,SAASC,SAAS,QAAQ,+BAA4B;AACtD,SAASC,eAAe,QAAQ,yBAAsB;AAEtD,SAASC,oBAAoB,QAAQ,6BAA0B;AAC/D,SAASC,kBAAkB,EAAEC,eAAe,QAAQ,wBAAqB;AACzE,SAASC,eAAe,QAAQ,wBAAqB;AACrD,SAASC,gBAAgB,QAAQ,yBAAsB;;AAEvD;AACA,MAAMC,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;AACA,OAAO,MAAMC,UAAU,SAASP,eAAe,CAAyB;EAC5DQ,aAAa,GAAeA,CAAA,KAAM,CAAC,CAAC;EAEpCC,YAAY,GAAeJ,gBAAgB;EAC3CK,WAAW,GAAoB,IAAIN,eAAe,CAAC,CAAC;;EAE9D;AACF;AACA;AACA;AACA;AACA;EACYO,gBAAgB,GAAG,MAAM;EAEnCC,WAAWA,CAACC,MAA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EAEQJ,eAAeA,CAACD,KAAwB,EAAQ;IACtD,MAAMM,MAAM,GAAGpC,eAAe,CAAC8B,KAAK,CAAC;IAErC,IAAI,CAACM,MAAM,EAAE;MACX;IACF;IAEA,MAAMC,cAAc,GAAGtC,kBAAkB,CAACuC,MAAM,CAE9C,CAACC,GAAG,EAAEC,OAAO,KAAK;MAClB,MAAMC,KAAK,GAAGL,MAAM,CAACM,MAAM,CAACF,OAAO,CAAC;MAEpC,IAAIC,KAAK,KAAKd,SAAS,EAAE;QACvBY,GAAG,CAACC,OAAO,CAAC,GAAGC,KAAK;MACtB;MAEA,OAAOF,GAAG;IACZ,CAAC,EAAE,CAAC,CAAC,CAAC;IAEN,IAAII,MAAM,CAACC,IAAI,CAACP,cAAc,CAAC,CAACb,MAAM,KAAK,CAAC,EAAE;MAC5C,IAAI,CAACJ,OAAO,GAAG,sDAAsD,CAAC;MAEtE;IACF;IAEA,MAAMyB,OAAO,GAAG;MACdZ,QAAQ,EAAEtC,QAAQ,CAACmD,MAAM;MACzBC,kBAAkB,EAAErD,kBAAkB,CAACsD,QAAQ;MAC/CC,WAAW,EAAE,EAAE;MACfC,UAAU,EAAEd,MAAM,CAACe,SAAS;MAC5B,GAAGd;IACL,CAEC;IAED,IAAI,CAACe,QAAQ,GAAGP,OAAO,CAAC;EAC1B;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { FrameReadStatus } from "../../../types/frame-read-status.js";
|
|
4
|
+
/** Fixed BC401 reply lengths, keyed by the first byte of each PHMS frame. */
|
|
5
|
+
const BC01_FRAME_LENGTHS = {
|
|
6
|
+
f0: 2,
|
|
7
|
+
f2: 8,
|
|
8
|
+
f3: 3,
|
|
9
|
+
e0: 7,
|
|
10
|
+
e1: 16,
|
|
11
|
+
e2: 16,
|
|
12
|
+
e3: 3,
|
|
13
|
+
e4: 36,
|
|
14
|
+
e5: 36
|
|
15
|
+
};
|
|
16
|
+
const lower = byte => (byte ?? "").toLowerCase();
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Isolates the fixed-length frames used by Contec BC401BT.
|
|
20
|
+
*
|
|
21
|
+
* PHMS keeps a byte queue and repeatedly consumes complete replies. BLE notifications are
|
|
22
|
+
* not frame boundaries, so the SDK must retain partial replies and drain multiple replies
|
|
23
|
+
* when Android combines them into one notification.
|
|
24
|
+
*/
|
|
25
|
+
class Bc01FrameReader {
|
|
26
|
+
readFrame(buffer) {
|
|
27
|
+
const start = buffer.findIndex(byte => Object.prototype.hasOwnProperty.call(BC01_FRAME_LENGTHS, lower(byte)));
|
|
28
|
+
if (start === -1) {
|
|
29
|
+
return {
|
|
30
|
+
status: FrameReadStatus.INCOMPLETE,
|
|
31
|
+
consumedBytes: buffer.length
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
const opcode = lower(buffer[start]);
|
|
35
|
+
const length = BC01_FRAME_LENGTHS[opcode];
|
|
36
|
+
if (length === undefined) {
|
|
37
|
+
return {
|
|
38
|
+
status: FrameReadStatus.INCOMPLETE,
|
|
39
|
+
consumedBytes: start + 1
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
if (start + length > buffer.length) {
|
|
43
|
+
return {
|
|
44
|
+
status: FrameReadStatus.INCOMPLETE,
|
|
45
|
+
consumedBytes: start
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
status: FrameReadStatus.COMPLETE,
|
|
50
|
+
consumedBytes: start + length,
|
|
51
|
+
frame: buffer.slice(start, start + length)
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
export { Bc01FrameReader, BC01_FRAME_LENGTHS as bc01FrameLengths };
|
|
56
|
+
//# sourceMappingURL=bc01.frame-reader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["FrameReadStatus","BC01_FRAME_LENGTHS","f0","f2","f3","e0","e1","e2","e3","e4","e5","lower","byte","toLowerCase","Bc01FrameReader","readFrame","buffer","start","findIndex","Object","prototype","hasOwnProperty","call","status","INCOMPLETE","consumedBytes","length","opcode","undefined","COMPLETE","frame","slice","bc01FrameLengths"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/bc01/bc01.frame-reader.ts"],"mappings":";;AACA,SAASA,eAAe,QAAQ,qCAAkC;AAGlE;AACA,MAAMC,kBAAoD,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,CAACrB,kBAAkB,EAAEU,KAAK,CAACC,IAAI,CAAC,CACtE,CAAC;IAED,IAAIK,KAAK,KAAK,CAAC,CAAC,EAAE;MAChB,OAAO;QACLM,MAAM,EAAEvB,eAAe,CAACwB,UAAU;QAClCC,aAAa,EAAET,MAAM,CAACU;MACxB,CAAC;IACH;IAEA,MAAMC,MAAM,GAAGhB,KAAK,CAACK,MAAM,CAACC,KAAK,CAAC,CAAC;IACnC,MAAMS,MAAM,GAAGzB,kBAAkB,CAAC0B,MAAM,CAAC;IAEzC,IAAID,MAAM,KAAKE,SAAS,EAAE;MACxB,OAAO;QACLL,MAAM,EAAEvB,eAAe,CAACwB,UAAU;QAClCC,aAAa,EAAER,KAAK,GAAG;MACzB,CAAC;IACH;IAEA,IAAIA,KAAK,GAAGS,MAAM,GAAGV,MAAM,CAACU,MAAM,EAAE;MAClC,OAAO;QACLH,MAAM,EAAEvB,eAAe,CAACwB,UAAU;QAClCC,aAAa,EAAER;MACjB,CAAC;IACH;IAEA,OAAO;MACLM,MAAM,EAAEvB,eAAe,CAAC6B,QAAQ;MAChCJ,aAAa,EAAER,KAAK,GAAGS,MAAM;MAC7BI,KAAK,EAAEd,MAAM,CAACe,KAAK,CAACd,KAAK,EAAEA,KAAK,GAAGS,MAAM;IAC3C,CAAC;EACH;AACF;AAEA,SAASZ,eAAe,EAAEb,kBAAkB,IAAI+B,gBAAgB","ignoreList":[]}
|
package/lib/module/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { MeasurementTypeKey } from "@ovok/core";
|
|
4
|
+
import { CaseType } from "../../../types/case-type.js";
|
|
5
|
+
import { IntegratedDevices } from "../../../types/integrated-devices.js";
|
|
6
|
+
import { hexToByte } from "../../../utils/hex-to-byte.js";
|
|
7
|
+
import { BTManagedDevice } from "../bt-managed-device.js";
|
|
8
|
+
const LEGACY_SERVICE = "00001523-1212-efde-1523-785feabcd123";
|
|
9
|
+
const LEGACY_CHARACTERISTIC = "00001524-1212-efde-1523-785feabcd123";
|
|
10
|
+
const BGM_SERVICE = "0003cdd0-0000-1000-8000-00805f9b0131";
|
|
11
|
+
const BGM_CHARACTERISTIC = "0003cdd1-0000-1000-8000-00805f9b0131";
|
|
12
|
+
const GLUCOSE_REQUEST = "512600000000a31a";
|
|
13
|
+
const servicesFor = device => {
|
|
14
|
+
const isBgm = device === IntegratedDevices.BGM;
|
|
15
|
+
return [{
|
|
16
|
+
uuid: isBgm ? BGM_SERVICE : LEGACY_SERVICE,
|
|
17
|
+
monitorUuids: [{
|
|
18
|
+
uuid: isBgm ? BGM_CHARACTERISTIC : LEGACY_CHARACTERISTIC,
|
|
19
|
+
parsingModel: {
|
|
20
|
+
caseValuePosition: [isBgm ? 9 : 1],
|
|
21
|
+
cases: [...(isBgm ? ["00", "0b", "10", "11", "18", "22", "33", "55"] : ["46", ...(device === IntegratedDevices.GLUCOCHECK ? ["50"] : [])]).map(caseValue => ({
|
|
22
|
+
caseType: CaseType.OTHER,
|
|
23
|
+
caseValue,
|
|
24
|
+
parseDefinitions: []
|
|
25
|
+
})), {
|
|
26
|
+
measurementTypeKey: MeasurementTypeKey.bloodGlucose,
|
|
27
|
+
caseType: CaseType.RESULT,
|
|
28
|
+
caseValue: isBgm ? "44" : "26",
|
|
29
|
+
parseDefinitions: [{
|
|
30
|
+
name: "bloodGlucose",
|
|
31
|
+
parseType: "custom",
|
|
32
|
+
byteIndexes: isBgm ? [10, 11] : [3, 2],
|
|
33
|
+
parseReference: 16,
|
|
34
|
+
customParserDefinition: value => {
|
|
35
|
+
if (isBgm) {
|
|
36
|
+
return hexToByte(value.slice(0, 2)) * 100 + hexToByte(value.slice(2, 4));
|
|
37
|
+
}
|
|
38
|
+
const raw = parseInt(value, 16);
|
|
39
|
+
return device === IntegratedDevices.TAIDOC_GLUCOSE ? Number((raw * 18).toFixed(2)) : raw;
|
|
40
|
+
}
|
|
41
|
+
}]
|
|
42
|
+
}]
|
|
43
|
+
}
|
|
44
|
+
}],
|
|
45
|
+
...(isBgm ? {} : {
|
|
46
|
+
writeUuid: {
|
|
47
|
+
uuid: LEGACY_CHARACTERISTIC,
|
|
48
|
+
mainCommandUuid: GLUCOSE_REQUEST
|
|
49
|
+
}
|
|
50
|
+
})
|
|
51
|
+
}];
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/** Decodes the legacy TaiDoc, GlucoCheck Gold and TeleBGM glucose protocols. */
|
|
55
|
+
export class BloodGlucoseDevice extends BTManagedDevice {
|
|
56
|
+
stuckDataTimeout = 60_000;
|
|
57
|
+
constructor(device, params) {
|
|
58
|
+
super(device, params);
|
|
59
|
+
this.mainServices = servicesFor(params.deviceName);
|
|
60
|
+
}
|
|
61
|
+
validatePackage = pkg => pkg.length >= (this.deviceData.name === IntegratedDevices.BGM ? 12 : 8);
|
|
62
|
+
handleSuccessResult(result) {
|
|
63
|
+
if (result.caseType !== CaseType.RESULT || result.bloodGlucose === 0) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
this.onResult?.(result);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=blood-glucose.device.js.map
|
package/lib/module/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["MeasurementTypeKey","CaseType","IntegratedDevices","hexToByte","BTManagedDevice","LEGACY_SERVICE","LEGACY_CHARACTERISTIC","BGM_SERVICE","BGM_CHARACTERISTIC","GLUCOSE_REQUEST","servicesFor","device","isBgm","BGM","uuid","monitorUuids","parsingModel","caseValuePosition","cases","GLUCOCHECK","map","caseValue","caseType","OTHER","parseDefinitions","measurementTypeKey","bloodGlucose","RESULT","name","parseType","byteIndexes","parseReference","customParserDefinition","value","slice","raw","parseInt","TAIDOC_GLUCOSE","Number","toFixed","writeUuid","mainCommandUuid","BloodGlucoseDevice","stuckDataTimeout","constructor","params","mainServices","deviceName","validatePackage","pkg","length","deviceData","handleSuccessResult","result","onResult"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/blood-glucose/blood-glucose.device.ts"],"mappings":";;AAAA,SAAkCA,kBAAkB,QAAQ,YAAY;AAGxE,SAASC,QAAQ,QAAQ,6BAA0B;AAGnD,SAASC,iBAAiB,QAAQ,sCAAmC;AAGrE,SAASC,SAAS,QAAQ,+BAA4B;AACtD,SAASC,eAAe,QAAQ,yBAAsB;AAEtD,MAAMC,cAAc,GAAG,sCAAsC;AAC7D,MAAMC,qBAAqB,GAAG,sCAAsC;AACpE,MAAMC,WAAW,GAAG,sCAAsC;AAC1D,MAAMC,kBAAkB,GAAG,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CH = /^boso medicus [0-9a-f]{6}$/i;
|
|
|
16
16
|
* the profile's user/status bytes without inventing a boso-specific wire format.
|
|
17
17
|
*/
|
|
18
18
|
const bosoMedicusMonitor = params => standardBloodPressureDevice({
|
|
19
|
-
id: params.id,
|
|
19
|
+
id: params.id ?? "boso-medicus-system",
|
|
20
20
|
nameMatch: params.nameMatch ?? BOSO_MEDICUS_NAME_MATCH,
|
|
21
21
|
...(params.stuckDataTimeoutMs === undefined ? {} : {
|
|
22
22
|
stuckDataTimeoutMs: params.stuckDataTimeoutMs
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["standardBloodPressureDevice","BOSO_MEDICUS_NAME_MATCH","bosoMedicusMonitor","params","id","nameMatch","stuckDataTimeoutMs","undefined"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/boso/boso.medicus.ts"],"mappings":";;AACA,SAASA,2BAA2B,QAAQ,2CAAwC;;AAEpF;AACA;AACA;AACA;AACA;AACA,MAAMC,uBAAuB,GAAG,6BAA6B;AAc7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,kBAAkB,GACtBC,MAAyB,IAEzBH,2BAA2B,CAAC;EAC1BI,EAAE,EAAED,MAAM,CAACC,EAAE;
|
|
1
|
+
{"version":3,"names":["standardBloodPressureDevice","BOSO_MEDICUS_NAME_MATCH","bosoMedicusMonitor","params","id","nameMatch","stuckDataTimeoutMs","undefined"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/boso/boso.medicus.ts"],"mappings":";;AACA,SAASA,2BAA2B,QAAQ,2CAAwC;;AAEpF;AACA;AACA;AACA;AACA;AACA,MAAMC,uBAAuB,GAAG,6BAA6B;AAc7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,kBAAkB,GACtBC,MAAyB,IAEzBH,2BAA2B,CAAC;EAC1BI,EAAE,EAAED,MAAM,CAACC,EAAE,IAAI,qBAAqB;EACtCC,SAAS,EAAEF,MAAM,CAACE,SAAS,IAAIJ,uBAAuB;EACtD,IAAIE,MAAM,CAACG,kBAAkB,KAAKC,SAAS,GACvC,CAAC,CAAC,GACF;IAAED,kBAAkB,EAAEH,MAAM,CAACG;EAAmB,CAAC;AACvD,CAAC,CAAC;AAEJ,SAASL,uBAAuB,EAAEC,kBAAkB","ignoreList":[]}
|
|
@@ -79,6 +79,9 @@ export class BTCommandWriter {
|
|
|
79
79
|
* for - worse than sending nothing, because it would be answered.
|
|
80
80
|
*/
|
|
81
81
|
writeCommand = async command => {
|
|
82
|
+
if (command.delayBeforeWriteMs && command.delayBeforeWriteMs > 0) {
|
|
83
|
+
await new Promise(resolve => setTimeout(resolve, command.delayBeforeWriteMs));
|
|
84
|
+
}
|
|
82
85
|
for (const chunk of this.chunksOf(command.frame)) {
|
|
83
86
|
const written = await this.writeChunk(command, chunk);
|
|
84
87
|
if (!written) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["slog","sentryLogger","hexToBase64","MAX_WRITE_ATTEMPTS","DEFAULT_ATT_MTU","ATT_WRITE_HEADER_BYTES","BTCommandWriter","pendingWrites","Promise","resolve","mtu","constructor","device","onError","useNegotiatedMtu","Number","isInteger","reset","send","commands","then","writeInOrder","catch","error","command","writeCommand","chunk","chunksOf","frame","written","writeChunk","writeTo","value","withoutResponse","writeCharacteristicWithoutResponseForService","serviceUuid","characteristicUuid","writeCharacteristicWithResponseForService","size","Math","max","chunks","start","length","push","slice","attempt","isConnected","join","Error","message","deviceName","name"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/bt-command-writer.ts"],"mappings":";;AAEA,SAASA,IAAI,QAAQ,iCAA8B;AACnD,SAASC,YAAY,QAAQ,yCAAsC;AAEnE,SAASC,WAAW,QAAQ,+BAA4B;AAExD,MAAMC,kBAAkB,GAAG,CAAC;;AAE5B;AACA,MAAMC,eAAe,GAAG,EAAE;;AAE1B;AACA,MAAMC,sBAAsB,GAAG,CAAC;;AAEhC;AACA;AACA;AACA;AACA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,CAACC,QAAQ,
|
|
1
|
+
{"version":3,"names":["slog","sentryLogger","hexToBase64","MAX_WRITE_ATTEMPTS","DEFAULT_ATT_MTU","ATT_WRITE_HEADER_BYTES","BTCommandWriter","pendingWrites","Promise","resolve","mtu","constructor","device","onError","useNegotiatedMtu","Number","isInteger","reset","send","commands","then","writeInOrder","catch","error","command","writeCommand","delayBeforeWriteMs","setTimeout","chunk","chunksOf","frame","written","writeChunk","writeTo","value","withoutResponse","writeCharacteristicWithoutResponseForService","serviceUuid","characteristicUuid","writeCharacteristicWithResponseForService","size","Math","max","chunks","start","length","push","slice","attempt","isConnected","join","Error","message","deviceName","name"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/bt-command-writer.ts"],"mappings":";;AAEA,SAASA,IAAI,QAAQ,iCAA8B;AACnD,SAASC,YAAY,QAAQ,yCAAsC;AAEnE,SAASC,WAAW,QAAQ,+BAA4B;AAExD,MAAMC,kBAAkB,GAAG,CAAC;;AAE5B;AACA,MAAMC,eAAe,GAAG,EAAE;;AAE1B;AACA,MAAMC,sBAAsB,GAAG,CAAC;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,eAAe,CAAC;EACnBC,aAAa,GAAkBC,OAAO,CAACC,OAAO,CAAC,CAAC;EAChDC,GAAG,GAAGN,eAAe;EAEtBO,WAAWA,CACCC,MAAc,EACdC,OAA2C,EAC5D;IAAA,KAFiBD,MAAc,GAAdA,MAAc;IAAA,KACdC,OAA2C,GAA3CA,OAA2C;EAC3D;;EAEH;AACF;AACA;AACA;AACA;AACA;AACA;EACSC,gBAAgB,GAAIJ,GAAY,IAAW;IAChD,IAAI,OAAOA,GAAG,KAAK,QAAQ,IAAIK,MAAM,CAACC,SAAS,CAACN,GAAG,CAAC,IAAIA,GAAG,GAAG,IAAI,CAACA,GAAG,EAAE;MACtE,IAAI,CAACA,GAAG,GAAGA,GAAG;IAChB;EACF,CAAC;;EAED;EACOO,KAAK,GAA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,+BAA+B,EAAE;UACrDsB,KAAK,EAAEA,KAAK,YAAY4B,KAAK,GAAG5B,KAAK,CAAC6B,OAAO,GAAG7B,KAAK;UACrD8B,UAAU,EAAE,IAAI,CAACzC,MAAM,CAAC0C;QAC1B,CAAC,CAAC;QAEF,IAAIN,OAAO,KAAK7C,kBAAkB,EAAE;UAClCH,IAAI,CAACuB,KAAK,EAAE,8CAA8C,EAAE;YAC1D8B,UAAU,EAAE,IAAI,CAACzC,MAAM,CAAC0C;UAC1B,CAAC,CAAC;QACJ;MACF;IACF;IAEA,OAAO,KAAK;EACd,CAAC;AACH","ignoreList":[]}
|
|
@@ -20,7 +20,7 @@ export class BTConnectionHandler {
|
|
|
20
20
|
this.callbacks.onStatusChanged?.(DeviceStatus.CONNECTED);
|
|
21
21
|
await this.device.discoverAllServicesAndCharacteristics();
|
|
22
22
|
this.onDisconnectSubscription = this.device.onDisconnected(this.onDeviceDisconnected);
|
|
23
|
-
this.subscribeToAllCharacteristics();
|
|
23
|
+
await this.subscribeToAllCharacteristics();
|
|
24
24
|
} catch (error) {
|
|
25
25
|
sentryLogger("error", "BT_MANAGER: Error connecting to device", {
|
|
26
26
|
error: error instanceof Error ? error.message : error,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["sentryLogger","DeviceStatus","base64ToHex","BTCommandWriter","BTConnectionHandler","characteristicSubscriptions","constructor","device","mainServices","callbacks","preferredMtu","writer","onError","connect","connectWithRetries","requestPreferredMtu","onStatusChanged","CONNECTED","discoverAllServicesAndCharacteristics","onDisconnectSubscription","onDisconnected","onDeviceDisconnected","subscribeToAllCharacteristics","error","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","onDataReceived","push","initialCommands"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/bt-connection-handler.ts"],"mappings":";;AAEA,SAASA,YAAY,QAAQ,yCAAsC;AAEnE,SAASC,YAAY,QAAQ,8BAA2B;AAExD,SAASC,WAAW,QAAQ,+BAA4B;AAExD,SAASC,eAAe,QAAQ,wBAAqB;AAWrD,OAAO,MAAMC,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,IAAIR,eAAe,CAACI,MAAM,EAAEE,SAAS,CAACG,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,CAACN,SAAS,CAACO,eAAe,GAAGf,YAAY,CAACgB,SAAS,CAAC;MAExD,MAAM,IAAI,CAACV,MAAM,CAACW,qCAAqC,CAAC,CAAC;MAEzD,IAAI,CAACC,wBAAwB,GAAG,IAAI,CAACZ,MAAM,CAACa,cAAc,CACxD,IAAI,CAACC,oBACP,CAAC;MAED,IAAI,CAACC,6BAA6B,CAAC,CAAC;
|
|
1
|
+
{"version":3,"names":["sentryLogger","DeviceStatus","base64ToHex","BTCommandWriter","BTConnectionHandler","characteristicSubscriptions","constructor","device","mainServices","callbacks","preferredMtu","writer","onError","connect","connectWithRetries","requestPreferredMtu","onStatusChanged","CONNECTED","discoverAllServicesAndCharacteristics","onDisconnectSubscription","onDisconnected","onDeviceDisconnected","subscribeToAllCharacteristics","error","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","onDataReceived","push","initialCommands"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/bt-connection-handler.ts"],"mappings":";;AAEA,SAASA,YAAY,QAAQ,yCAAsC;AAEnE,SAASC,YAAY,QAAQ,8BAA2B;AAExD,SAASC,WAAW,QAAQ,+BAA4B;AAExD,SAASC,eAAe,QAAQ,wBAAqB;AAWrD,OAAO,MAAMC,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,IAAIR,eAAe,CAACI,MAAM,EAAEE,SAAS,CAACG,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,CAACN,SAAS,CAACO,eAAe,GAAGf,YAAY,CAACgB,SAAS,CAAC;MAExD,MAAM,IAAI,CAACV,MAAM,CAACW,qCAAqC,CAAC,CAAC;MAEzD,IAAI,CAACC,wBAAwB,GAAG,IAAI,CAACZ,MAAM,CAACa,cAAc,CACxD,IAAI,CAACC,oBACP,CAAC;MAED,MAA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