@ovok/native 1.16.1-rc.3 → 1.16.1-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/modules/bt-management/components/android-bluetooth-foreground-service.js +3 -1
- package/lib/commonjs/modules/bt-management/components/android-bluetooth-foreground-service.js.map +1 -1
- package/lib/commonjs/modules/bt-management/components/bluetooth-device-picker.js +9 -141
- package/lib/commonjs/modules/bt-management/components/bluetooth-device-picker.js.map +1 -1
- package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js +1 -0
- package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
- package/lib/commonjs/modules/bt-management/components/device-picker-sheet.js +160 -0
- package/lib/commonjs/modules/bt-management/components/device-picker-sheet.js.map +1 -0
- package/lib/commonjs/modules/bt-management/hooks/runtime-context.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/use-bluetooth-permission.js +2 -1
- package/lib/commonjs/modules/bt-management/hooks/use-bluetooth-permission.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/use-measurements.js +1 -1
- package/lib/commonjs/modules/bt-management/hooks/use-measurements.js.map +1 -1
- package/lib/commonjs/modules/bt-management/index.js +12 -0
- package/lib/commonjs/modules/bt-management/index.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/bt-manager.js +50 -0
- 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 +3 -0
- package/lib/commonjs/modules/bt-management/services/custom/define-custom-device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-command-writer.js +4 -2
- package/lib/commonjs/modules/bt-management/services/devices/bt-command-writer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js +97 -28
- package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-current-time.js +59 -0
- package/lib/commonjs/modules/bt-management/services/devices/bt-current-time.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/bt-device-information.js +18 -37
- package/lib/commonjs/modules/bt-management/services/devices/bt-device-information.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js +31 -3
- package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-notification-readiness.js +68 -0
- package/lib/commonjs/modules/bt-management/services/devices/bt-notification-readiness.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/bt-pairing-retry.js +70 -0
- package/lib/commonjs/modules/bt-management/services/devices/bt-pairing-retry.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js +14 -0
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.blood-pressure-status.js +4 -7
- package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.blood-pressure-status.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.decorators.js +106 -0
- package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.decorators.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js +38 -31
- package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.frame.js +41 -0
- package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.frame.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-details.js +77 -0
- package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-details.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-frame.js +49 -0
- package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-frame.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-racp.js +89 -0
- package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-racp.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.js +35 -42
- package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js +22 -24
- package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/record-cursor.js +70 -0
- package/lib/commonjs/modules/bt-management/services/record-cursor.js.map +1 -0
- package/lib/commonjs/modules/bt-management/testing/fake-ble-manager.js +8 -0
- package/lib/commonjs/modules/bt-management/testing/fake-ble-manager.js.map +1 -1
- package/lib/commonjs/modules/bt-management/types/glucose-record-details.js +2 -0
- package/lib/commonjs/modules/bt-management/types/glucose-record-details.js.map +1 -0
- package/lib/commonjs/modules/bt-management/utils/bluetooth-permission-list.js +19 -0
- package/lib/commonjs/modules/bt-management/utils/bluetooth-permission-list.js.map +1 -0
- package/lib/commonjs/modules/bt-management/utils/device-user.js +22 -0
- package/lib/commonjs/modules/bt-management/utils/device-user.js.map +1 -0
- package/lib/commonjs/modules/bt-management/utils/kpa-to-mmhg.js +9 -0
- package/lib/commonjs/modules/bt-management/utils/kpa-to-mmhg.js.map +1 -0
- package/lib/commonjs/modules/bt-management/utils/result-identity.js +26 -35
- package/lib/commonjs/modules/bt-management/utils/result-identity.js.map +1 -1
- package/lib/commonjs/modules/bt-management/utils/rr-interval.js +16 -0
- package/lib/commonjs/modules/bt-management/utils/rr-interval.js.map +1 -0
- package/lib/commonjs/modules/bt-management/utils/temperature-type.js +15 -0
- package/lib/commonjs/modules/bt-management/utils/temperature-type.js.map +1 -0
- package/lib/commonjs/modules/bt-management/utils/wait.js +10 -0
- package/lib/commonjs/modules/bt-management/utils/wait.js.map +1 -0
- package/lib/commonjs/modules/next/background-sync/index.js +28 -0
- package/lib/commonjs/modules/next/background-sync/index.js.map +1 -0
- package/lib/commonjs/modules/next/background-sync/offline-measurement-background-sync.js +63 -0
- package/lib/commonjs/modules/next/background-sync/offline-measurement-background-sync.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/auto-connect.js +32 -0
- package/lib/commonjs/modules/next/bluetooth/auto-connect.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-errors.js +33 -0
- package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-errors.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-link.js +162 -0
- package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-link.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-scanner.js +75 -0
- package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-scanner.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/ble-plx/built-in-devices.js +34 -0
- package/lib/commonjs/modules/next/bluetooth/ble-plx/built-in-devices.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/ble-plx/legacy-driver.js +67 -0
- package/lib/commonjs/modules/next/bluetooth/ble-plx/legacy-driver.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/connections.js +114 -0
- package/lib/commonjs/modules/next/bluetooth/connections.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/daily-total-day.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/devices.js +41 -0
- package/lib/commonjs/modules/next/bluetooth/devices.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/driver.js +30 -20
- package/lib/commonjs/modules/next/bluetooth/driver.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/errors.js +26 -0
- package/lib/commonjs/modules/next/bluetooth/errors.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/index.js +122 -11
- package/lib/commonjs/modules/next/bluetooth/index.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/link.js +0 -103
- package/lib/commonjs/modules/next/bluetooth/link.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/paired.js +50 -0
- package/lib/commonjs/modules/next/bluetooth/paired.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/permissions.js +2 -0
- package/lib/commonjs/modules/next/bluetooth/permissions.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/react/bluetooth-device-picker.js +44 -0
- package/lib/commonjs/modules/next/bluetooth/react/bluetooth-device-picker.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/react/context.js +54 -0
- package/lib/commonjs/modules/next/bluetooth/react/context.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/react/hooks.js +86 -0
- package/lib/commonjs/modules/next/bluetooth/react/hooks.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/react-native/create-bluetooth-runtime.js +28 -0
- package/lib/commonjs/modules/next/bluetooth/react-native/create-bluetooth-runtime.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/react-native/os-permissions.js +32 -0
- package/lib/commonjs/modules/next/bluetooth/react-native/os-permissions.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/react-native/ovok-sink.js +43 -0
- package/lib/commonjs/modules/next/bluetooth/react-native/ovok-sink.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/readings.js +93 -0
- package/lib/commonjs/modules/next/bluetooth/readings.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/result-policy.js +15 -2
- package/lib/commonjs/modules/next/bluetooth/result-policy.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/runtime.js +223 -0
- package/lib/commonjs/modules/next/bluetooth/runtime.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/scan-loop.js +82 -0
- package/lib/commonjs/modules/next/bluetooth/scan-loop.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/sig-profiles.js +46 -13
- package/lib/commonjs/modules/next/bluetooth/sig-profiles.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/sink.js +6 -0
- package/lib/commonjs/modules/next/bluetooth/sink.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/snapshot.js +6 -0
- package/lib/commonjs/modules/next/bluetooth/snapshot.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/stable-hash.js +42 -0
- package/lib/commonjs/modules/next/bluetooth/stable-hash.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/store.js +61 -0
- package/lib/commonjs/modules/next/bluetooth/store.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/transport.js +6 -0
- package/lib/commonjs/modules/next/bluetooth/transport.js.map +1 -0
- package/lib/commonjs/modules/next/data-sync/index.js +17 -0
- package/lib/commonjs/modules/next/data-sync/index.js.map +1 -0
- package/lib/module/modules/bt-management/components/android-bluetooth-foreground-service.js +3 -1
- package/lib/module/modules/bt-management/components/android-bluetooth-foreground-service.js.map +1 -1
- package/lib/module/modules/bt-management/components/bluetooth-device-picker.js +9 -141
- package/lib/module/modules/bt-management/components/bluetooth-device-picker.js.map +1 -1
- package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js +1 -0
- package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
- package/lib/module/modules/bt-management/components/device-picker-sheet.js +154 -0
- package/lib/module/modules/bt-management/components/device-picker-sheet.js.map +1 -0
- package/lib/module/modules/bt-management/hooks/runtime-context.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/use-bluetooth-permission.js +4 -3
- package/lib/module/modules/bt-management/hooks/use-bluetooth-permission.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/use-measurements.js +1 -1
- package/lib/module/modules/bt-management/hooks/use-measurements.js.map +1 -1
- package/lib/module/modules/bt-management/index.js +1 -0
- package/lib/module/modules/bt-management/index.js.map +1 -1
- package/lib/module/modules/bt-management/services/bt-manager.js +50 -0
- 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 +3 -0
- package/lib/module/modules/bt-management/services/custom/define-custom-device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-command-writer.js +4 -2
- package/lib/module/modules/bt-management/services/devices/bt-command-writer.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js +97 -28
- package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-current-time.js +55 -0
- package/lib/module/modules/bt-management/services/devices/bt-current-time.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/bt-device-information.js +18 -37
- package/lib/module/modules/bt-management/services/devices/bt-device-information.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-managed-device.js +33 -5
- package/lib/module/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-notification-readiness.js +65 -0
- package/lib/module/modules/bt-management/services/devices/bt-notification-readiness.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/bt-pairing-retry.js +65 -0
- package/lib/module/modules/bt-management/services/devices/bt-pairing-retry.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/custom/custom.device.js +14 -0
- package/lib/module/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.blood-pressure-status.js +1 -4
- package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.blood-pressure-status.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.decorators.js +99 -0
- package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.decorators.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js +38 -31
- package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.frame.js +35 -0
- package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.frame.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-details.js +72 -0
- package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-details.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-frame.js +40 -0
- package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-frame.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-racp.js +85 -0
- package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-racp.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.js +25 -32
- package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js +18 -20
- package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js.map +1 -1
- package/lib/module/modules/bt-management/services/record-cursor.js +66 -0
- package/lib/module/modules/bt-management/services/record-cursor.js.map +1 -0
- package/lib/module/modules/bt-management/testing/fake-ble-manager.js +8 -0
- package/lib/module/modules/bt-management/testing/fake-ble-manager.js.map +1 -1
- package/lib/module/modules/bt-management/types/custom-device-definition.js +4 -0
- package/lib/module/modules/bt-management/types/custom-device-definition.js.map +1 -1
- package/lib/module/modules/bt-management/types/glucose-record-details.js +2 -0
- package/lib/module/modules/bt-management/types/glucose-record-details.js.map +1 -0
- package/lib/module/modules/bt-management/utils/bluetooth-permission-list.js +14 -0
- package/lib/module/modules/bt-management/utils/bluetooth-permission-list.js.map +1 -0
- package/lib/module/modules/bt-management/utils/device-user.js +17 -0
- package/lib/module/modules/bt-management/utils/device-user.js.map +1 -0
- package/lib/module/modules/bt-management/utils/kpa-to-mmhg.js +6 -0
- package/lib/module/modules/bt-management/utils/kpa-to-mmhg.js.map +1 -0
- package/lib/module/modules/bt-management/utils/result-identity.js +23 -33
- package/lib/module/modules/bt-management/utils/result-identity.js.map +1 -1
- package/lib/module/modules/bt-management/utils/rr-interval.js +12 -0
- package/lib/module/modules/bt-management/utils/rr-interval.js.map +1 -0
- package/lib/module/modules/bt-management/utils/temperature-type.js +11 -0
- package/lib/module/modules/bt-management/utils/temperature-type.js.map +1 -0
- package/lib/module/modules/bt-management/utils/wait.js +5 -0
- package/lib/module/modules/bt-management/utils/wait.js.map +1 -0
- package/lib/module/modules/next/background-sync/index.js +12 -0
- package/lib/module/modules/next/background-sync/index.js.map +1 -0
- package/lib/module/modules/next/background-sync/offline-measurement-background-sync.js +55 -0
- package/lib/module/modules/next/background-sync/offline-measurement-background-sync.js.map +1 -0
- package/lib/module/modules/next/bluetooth/auto-connect.js +28 -0
- package/lib/module/modules/next/bluetooth/auto-connect.js.map +1 -0
- package/lib/module/modules/next/bluetooth/ble-plx/ble-errors.js +28 -0
- package/lib/module/modules/next/bluetooth/ble-plx/ble-errors.js.map +1 -0
- package/lib/module/modules/next/bluetooth/ble-plx/ble-link.js +159 -0
- package/lib/module/modules/next/bluetooth/ble-plx/ble-link.js.map +1 -0
- package/lib/module/modules/next/bluetooth/ble-plx/ble-scanner.js +69 -0
- package/lib/module/modules/next/bluetooth/ble-plx/ble-scanner.js.map +1 -0
- package/lib/module/modules/next/bluetooth/ble-plx/built-in-devices.js +31 -0
- package/lib/module/modules/next/bluetooth/ble-plx/built-in-devices.js.map +1 -0
- package/lib/module/modules/next/bluetooth/ble-plx/legacy-driver.js +63 -0
- package/lib/module/modules/next/bluetooth/ble-plx/legacy-driver.js.map +1 -0
- package/lib/module/modules/next/bluetooth/connections.js +110 -0
- package/lib/module/modules/next/bluetooth/connections.js.map +1 -0
- package/lib/module/modules/next/bluetooth/daily-total-day.js.map +1 -0
- package/lib/module/modules/next/bluetooth/devices.js +37 -0
- package/lib/module/modules/next/bluetooth/devices.js.map +1 -0
- package/lib/module/modules/next/bluetooth/driver.js +29 -20
- package/lib/module/modules/next/bluetooth/driver.js.map +1 -1
- package/lib/module/modules/next/bluetooth/errors.js +21 -0
- package/lib/module/modules/next/bluetooth/errors.js.map +1 -0
- package/lib/module/modules/next/bluetooth/index.js +22 -4
- package/lib/module/modules/next/bluetooth/index.js.map +1 -1
- package/lib/module/modules/next/bluetooth/link.js +0 -101
- package/lib/module/modules/next/bluetooth/link.js.map +1 -1
- package/lib/module/modules/next/bluetooth/paired.js +46 -0
- package/lib/module/modules/next/bluetooth/paired.js.map +1 -0
- package/lib/module/modules/next/bluetooth/permissions.js +2 -0
- package/lib/module/modules/next/bluetooth/permissions.js.map +1 -0
- package/lib/module/modules/next/bluetooth/react/bluetooth-device-picker.js +39 -0
- package/lib/module/modules/next/bluetooth/react/bluetooth-device-picker.js.map +1 -0
- package/lib/module/modules/next/bluetooth/react/context.js +48 -0
- package/lib/module/modules/next/bluetooth/react/context.js.map +1 -0
- package/lib/module/modules/next/bluetooth/react/hooks.js +76 -0
- package/lib/module/modules/next/bluetooth/react/hooks.js.map +1 -0
- package/lib/module/modules/next/bluetooth/react-native/create-bluetooth-runtime.js +25 -0
- package/lib/module/modules/next/bluetooth/react-native/create-bluetooth-runtime.js.map +1 -0
- package/lib/module/modules/next/bluetooth/react-native/os-permissions.js +28 -0
- package/lib/module/modules/next/bluetooth/react-native/os-permissions.js.map +1 -0
- package/lib/module/modules/next/bluetooth/react-native/ovok-sink.js +39 -0
- package/lib/module/modules/next/bluetooth/react-native/ovok-sink.js.map +1 -0
- package/lib/module/modules/next/bluetooth/readings.js +89 -0
- package/lib/module/modules/next/bluetooth/readings.js.map +1 -0
- package/lib/module/modules/next/bluetooth/result-policy.js +14 -2
- package/lib/module/modules/next/bluetooth/result-policy.js.map +1 -1
- package/lib/module/modules/next/bluetooth/runtime.js +220 -0
- package/lib/module/modules/next/bluetooth/runtime.js.map +1 -0
- package/lib/module/modules/next/bluetooth/scan-loop.js +78 -0
- package/lib/module/modules/next/bluetooth/scan-loop.js.map +1 -0
- package/lib/module/modules/next/bluetooth/sig-profiles.js +44 -11
- package/lib/module/modules/next/bluetooth/sig-profiles.js.map +1 -1
- package/lib/module/modules/next/bluetooth/sink.js +4 -0
- package/lib/module/modules/next/bluetooth/sink.js.map +1 -0
- package/lib/module/modules/next/bluetooth/snapshot.js +4 -0
- package/lib/module/modules/next/bluetooth/snapshot.js.map +1 -0
- package/lib/module/modules/next/bluetooth/stable-hash.js +37 -0
- package/lib/module/modules/next/bluetooth/stable-hash.js.map +1 -0
- package/lib/module/modules/next/bluetooth/store.js +57 -0
- package/lib/module/modules/next/bluetooth/store.js.map +1 -0
- package/lib/module/modules/next/bluetooth/transport.js +4 -0
- package/lib/module/modules/next/bluetooth/transport.js.map +1 -0
- package/lib/module/modules/next/data-sync/index.js +11 -0
- package/lib/module/modules/next/data-sync/index.js.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/hooks/use-sign-in.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/components/android-bluetooth-foreground-service.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/components/bluetooth-device-picker.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/components/bluetooth-device-picker.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/components/device-picker-sheet.d.ts +25 -0
- package/lib/typescript/commonjs/src/modules/bt-management/components/device-picker-sheet.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/runtime-context.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/runtime-context.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-bluetooth-permission.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-measurements.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts +20 -0
- 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 +2 -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/devices/bt-command-writer.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-command-writer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-connection-handler.d.ts +14 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-connection-handler.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-current-time.d.ts +11 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-current-time.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-device-information.d.ts +2 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-device-information.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts +11 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-notification-readiness.d.ts +15 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-notification-readiness.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-pairing-retry.d.ts +21 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-pairing-retry.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts +2 -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/standard-gatt/standard-gatt.blood-pressure-status.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.decorators.d.ts +11 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.decorators.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts +5 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.frame.d.ts +10 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.frame.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-details.d.ts +7 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-details.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-frame.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-frame.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-racp.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-racp.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts +2 -0
- 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/record-cursor.d.ts +21 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/record-cursor.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/testing/fake-ble-manager.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/command-sequencer.d.ts +6 -2
- package/lib/typescript/commonjs/src/modules/bt-management/types/command-sequencer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/create-device-params.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/create-device-params.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-definition.d.ts +14 -1
- 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/glucose-record-details.d.ts +33 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/glucose-record-details.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/result-callback.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/result-callback.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/result-policy.d.ts +6 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/result-policy.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/utils/bluetooth-permission-list.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/bluetooth-permission-list.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/device-user.d.ts +6 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/device-user.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/kpa-to-mmhg.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/kpa-to-mmhg.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/result-identity.d.ts +5 -4
- package/lib/typescript/commonjs/src/modules/bt-management/utils/result-identity.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/utils/rr-interval.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/rr-interval.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/temperature-type.d.ts +7 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/temperature-type.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/wait.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/wait.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/services/managers/sync-progress-manager.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/next/background-sync/index.d.ts +10 -0
- package/lib/typescript/commonjs/src/modules/next/background-sync/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/background-sync/offline-measurement-background-sync.d.ts +22 -0
- package/lib/typescript/commonjs/src/modules/next/background-sync/offline-measurement-background-sync.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/auto-connect.d.ts +10 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/auto-connect.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-errors.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-errors.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-link.d.ts +6 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-link.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-scanner.d.ts +10 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-scanner.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts +6 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/connections.d.ts +25 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/connections.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/daily-total-day.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/devices.d.ts +30 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/devices.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/driver.d.ts +27 -20
- package/lib/typescript/commonjs/src/modules/next/bluetooth/driver.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/errors.d.ts +17 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/errors.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/index.d.ts +34 -5
- package/lib/typescript/commonjs/src/modules/next/bluetooth/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/link.d.ts +14 -5
- package/lib/typescript/commonjs/src/modules/next/bluetooth/link.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/paired.d.ts +18 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/paired.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/permissions.d.ts +13 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/permissions.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/react/bluetooth-device-picker.d.ts +35 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/react/bluetooth-device-picker.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/react/context.d.ts +30 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/react/context.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/react/hooks.d.ts +47 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/react/hooks.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/react-native/create-bluetooth-runtime.d.ts +21 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/react-native/create-bluetooth-runtime.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/react-native/os-permissions.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/react-native/os-permissions.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/react-native/ovok-sink.d.ts +6 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/react-native/ovok-sink.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/readings.d.ts +21 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/readings.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/result-policy.d.ts +9 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/result-policy.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/runtime.d.ts +87 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/runtime.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/scan-loop.d.ts +23 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/scan-loop.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/sig-profiles.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/sink.d.ts +20 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/sink.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/snapshot.d.ts +72 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/snapshot.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/stable-hash.d.ts +6 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/stable-hash.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/store.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/store.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/transport.d.ts +31 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/transport.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/data-sync/index.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/next/data-sync/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/hooks/use-sign-in.d.ts +1 -1
- package/lib/typescript/module/src/modules/bt-management/components/android-bluetooth-foreground-service.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/components/bluetooth-device-picker.d.ts +1 -1
- package/lib/typescript/module/src/modules/bt-management/components/bluetooth-device-picker.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/components/device-picker-sheet.d.ts +25 -0
- package/lib/typescript/module/src/modules/bt-management/components/device-picker-sheet.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/runtime-context.d.ts +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/runtime-context.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/use-bluetooth-permission.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/use-measurements.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/index.d.ts +1 -0
- package/lib/typescript/module/src/modules/bt-management/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts +20 -0
- 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 +2 -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/devices/bt-command-writer.d.ts +3 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-command-writer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-connection-handler.d.ts +14 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-connection-handler.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-current-time.d.ts +11 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-current-time.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-device-information.d.ts +2 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-device-information.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts +11 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-notification-readiness.d.ts +15 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-notification-readiness.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-pairing-retry.d.ts +21 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-pairing-retry.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts +2 -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/standard-gatt/standard-gatt.blood-pressure-status.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.decorators.d.ts +11 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.decorators.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts +5 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.frame.d.ts +10 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.frame.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-details.d.ts +7 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-details.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-frame.d.ts +16 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-frame.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-racp.d.ts +8 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-racp.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts +2 -0
- 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/record-cursor.d.ts +21 -0
- package/lib/typescript/module/src/modules/bt-management/services/record-cursor.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/testing/fake-ble-manager.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/command-sequencer.d.ts +6 -2
- package/lib/typescript/module/src/modules/bt-management/types/command-sequencer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/create-device-params.d.ts +3 -0
- package/lib/typescript/module/src/modules/bt-management/types/create-device-params.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/custom-device-definition.d.ts +14 -1
- 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/glucose-record-details.d.ts +33 -0
- package/lib/typescript/module/src/modules/bt-management/types/glucose-record-details.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/result-callback.d.ts +2 -0
- package/lib/typescript/module/src/modules/bt-management/types/result-callback.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/result-policy.d.ts +6 -0
- package/lib/typescript/module/src/modules/bt-management/types/result-policy.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/utils/bluetooth-permission-list.d.ts +4 -0
- package/lib/typescript/module/src/modules/bt-management/utils/bluetooth-permission-list.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/utils/device-user.d.ts +6 -0
- package/lib/typescript/module/src/modules/bt-management/utils/device-user.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/utils/kpa-to-mmhg.d.ts +4 -0
- package/lib/typescript/module/src/modules/bt-management/utils/kpa-to-mmhg.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/utils/result-identity.d.ts +5 -4
- package/lib/typescript/module/src/modules/bt-management/utils/result-identity.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/utils/rr-interval.d.ts +4 -0
- package/lib/typescript/module/src/modules/bt-management/utils/rr-interval.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/utils/temperature-type.d.ts +7 -0
- package/lib/typescript/module/src/modules/bt-management/utils/temperature-type.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/utils/wait.d.ts +3 -0
- package/lib/typescript/module/src/modules/bt-management/utils/wait.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/data-sync/services/managers/sync-progress-manager.d.ts +1 -1
- package/lib/typescript/module/src/modules/next/background-sync/index.d.ts +10 -0
- package/lib/typescript/module/src/modules/next/background-sync/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/background-sync/offline-measurement-background-sync.d.ts +22 -0
- package/lib/typescript/module/src/modules/next/background-sync/offline-measurement-background-sync.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/auto-connect.d.ts +10 -0
- package/lib/typescript/module/src/modules/next/bluetooth/auto-connect.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-errors.d.ts +4 -0
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-errors.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-link.d.ts +6 -0
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-link.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-scanner.d.ts +10 -0
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-scanner.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts +6 -0
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts +8 -0
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/connections.d.ts +25 -0
- package/lib/typescript/module/src/modules/next/bluetooth/connections.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/daily-total-day.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/devices.d.ts +30 -0
- package/lib/typescript/module/src/modules/next/bluetooth/devices.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/driver.d.ts +27 -20
- package/lib/typescript/module/src/modules/next/bluetooth/driver.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/errors.d.ts +17 -0
- package/lib/typescript/module/src/modules/next/bluetooth/errors.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/index.d.ts +34 -5
- package/lib/typescript/module/src/modules/next/bluetooth/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/link.d.ts +14 -5
- package/lib/typescript/module/src/modules/next/bluetooth/link.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/paired.d.ts +18 -0
- package/lib/typescript/module/src/modules/next/bluetooth/paired.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/permissions.d.ts +13 -0
- package/lib/typescript/module/src/modules/next/bluetooth/permissions.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/react/bluetooth-device-picker.d.ts +35 -0
- package/lib/typescript/module/src/modules/next/bluetooth/react/bluetooth-device-picker.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/react/context.d.ts +30 -0
- package/lib/typescript/module/src/modules/next/bluetooth/react/context.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/react/hooks.d.ts +47 -0
- package/lib/typescript/module/src/modules/next/bluetooth/react/hooks.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/react-native/create-bluetooth-runtime.d.ts +21 -0
- package/lib/typescript/module/src/modules/next/bluetooth/react-native/create-bluetooth-runtime.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/react-native/os-permissions.d.ts +5 -0
- package/lib/typescript/module/src/modules/next/bluetooth/react-native/os-permissions.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/react-native/ovok-sink.d.ts +6 -0
- package/lib/typescript/module/src/modules/next/bluetooth/react-native/ovok-sink.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/readings.d.ts +21 -0
- package/lib/typescript/module/src/modules/next/bluetooth/readings.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/result-policy.d.ts +9 -1
- package/lib/typescript/module/src/modules/next/bluetooth/result-policy.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/runtime.d.ts +87 -0
- package/lib/typescript/module/src/modules/next/bluetooth/runtime.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/scan-loop.d.ts +23 -0
- package/lib/typescript/module/src/modules/next/bluetooth/scan-loop.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/sig-profiles.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/sink.d.ts +20 -0
- package/lib/typescript/module/src/modules/next/bluetooth/sink.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/snapshot.d.ts +72 -0
- package/lib/typescript/module/src/modules/next/bluetooth/snapshot.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/stable-hash.d.ts +6 -0
- package/lib/typescript/module/src/modules/next/bluetooth/stable-hash.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/store.d.ts +16 -0
- package/lib/typescript/module/src/modules/next/bluetooth/store.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/transport.d.ts +31 -0
- package/lib/typescript/module/src/modules/next/bluetooth/transport.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/data-sync/index.d.ts +9 -0
- package/lib/typescript/module/src/modules/next/data-sync/index.d.ts.map +1 -0
- package/package.json +12 -2
- package/lib/commonjs/modules/bt-management/utils/daily-total-day.js.map +0 -1
- package/lib/commonjs/modules/next/bluetooth/drivers.js +0 -20
- package/lib/commonjs/modules/next/bluetooth/drivers.js.map +0 -1
- package/lib/commonjs/modules/next/bluetooth/legacy-driver.js +0 -55
- package/lib/commonjs/modules/next/bluetooth/legacy-driver.js.map +0 -1
- package/lib/module/modules/bt-management/utils/daily-total-day.js.map +0 -1
- package/lib/module/modules/next/bluetooth/drivers.js +0 -17
- package/lib/module/modules/next/bluetooth/drivers.js.map +0 -1
- package/lib/module/modules/next/bluetooth/legacy-driver.js +0 -51
- package/lib/module/modules/next/bluetooth/legacy-driver.js.map +0 -1
- package/lib/typescript/commonjs/src/modules/bt-management/utils/daily-total-day.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/drivers.d.ts +0 -7
- package/lib/typescript/commonjs/src/modules/next/bluetooth/drivers.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/legacy-driver.d.ts +0 -8
- package/lib/typescript/commonjs/src/modules/next/bluetooth/legacy-driver.d.ts.map +0 -1
- package/lib/typescript/module/src/modules/bt-management/utils/daily-total-day.d.ts.map +0 -1
- package/lib/typescript/module/src/modules/next/bluetooth/drivers.d.ts +0 -7
- package/lib/typescript/module/src/modules/next/bluetooth/drivers.d.ts.map +0 -1
- package/lib/typescript/module/src/modules/next/bluetooth/legacy-driver.d.ts +0 -8
- package/lib/typescript/module/src/modules/next/bluetooth/legacy-driver.d.ts.map +0 -1
- /package/lib/commonjs/modules/{bt-management/utils → next/bluetooth}/daily-total-day.js +0 -0
- /package/lib/module/modules/{bt-management/utils → next/bluetooth}/daily-total-day.js +0 -0
- /package/lib/typescript/commonjs/src/modules/{bt-management/utils → next/bluetooth}/daily-total-day.d.ts +0 -0
- /package/lib/typescript/module/src/modules/{bt-management/utils → next/bluetooth}/daily-total-day.d.ts +0 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.awaitNotificationsEnabled = void 0;
|
|
7
|
+
var _sentryLogger = require("../../../helpers/utils/sentry-logger.js");
|
|
8
|
+
var _bluetoothError = require("../../types/bluetooth-error.js");
|
|
9
|
+
var _base64ToHex = require("../../utils/base-64-to-hex.js");
|
|
10
|
+
var _wait = require("../../utils/wait.js");
|
|
11
|
+
/** Client Characteristic Configuration descriptor, where a device keeps whether notifications are on. */
|
|
12
|
+
const CCCD_UUID = "00002902-0000-1000-8000-00805f9b34fb";
|
|
13
|
+
|
|
14
|
+
/** Bit 0 enables notifications and bit 1 indications. */
|
|
15
|
+
const NOTIFICATIONS_OR_INDICATIONS = 0x03;
|
|
16
|
+
const CCCD_POLL_ATTEMPTS = 10;
|
|
17
|
+
const CCCD_POLL_INTERVAL_MS = 100;
|
|
18
|
+
|
|
19
|
+
/** For platforms that cannot read the descriptor, which is how long the write usually takes. */
|
|
20
|
+
const UNREADABLE_CCCD_SETTLE_MS = 300;
|
|
21
|
+
|
|
22
|
+
/** A characteristic whose notifications were just requested. */
|
|
23
|
+
|
|
24
|
+
const isEnabled = cccdValue => {
|
|
25
|
+
const [firstByte] = cccdValue ? (0, _base64ToHex.base64ToHex)(cccdValue) : [];
|
|
26
|
+
return (Number.parseInt(firstByte ?? "", 16) & NOTIFICATIONS_OR_INDICATIONS) !== 0;
|
|
27
|
+
};
|
|
28
|
+
const isNotificationsEnabled = async (device, {
|
|
29
|
+
serviceUuid,
|
|
30
|
+
characteristicUuid
|
|
31
|
+
}) => {
|
|
32
|
+
for (let attempt = 1;; attempt += 1) {
|
|
33
|
+
const descriptor = await device.readDescriptorForService(serviceUuid, characteristicUuid, CCCD_UUID);
|
|
34
|
+
if (isEnabled(descriptor.value)) {
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
if (attempt === CCCD_POLL_ATTEMPTS) {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
await (0, _wait.wait)(CCCD_POLL_INTERVAL_MS);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Resolves once the device reports notifications on for every characteristic, because
|
|
46
|
+
* `monitorCharacteristicForService` returns before its descriptor write completes.
|
|
47
|
+
* A platform that cannot read the descriptor gets a fixed settle time instead.
|
|
48
|
+
*/
|
|
49
|
+
const awaitNotificationsEnabled = async (device, characteristics) => {
|
|
50
|
+
if (characteristics.length === 0 || typeof device.readDescriptorForService !== "function") {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
try {
|
|
54
|
+
const enabled = await Promise.all(characteristics.map(characteristic => isNotificationsEnabled(device, characteristic)));
|
|
55
|
+
if (!enabled.every(Boolean)) {
|
|
56
|
+
(0, _sentryLogger.sentryLogger)("info", "DEVICE: Notifications not confirmed before the first command", {
|
|
57
|
+
characteristics: characteristics.length
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
} catch (error) {
|
|
61
|
+
(0, _sentryLogger.sentryLogger)("info", "DEVICE: Notification state unreadable, waiting a fixed time", {
|
|
62
|
+
errorCode: (0, _bluetoothError.toBluetoothError)(error).code
|
|
63
|
+
});
|
|
64
|
+
await (0, _wait.wait)(UNREADABLE_CCCD_SETTLE_MS);
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
exports.awaitNotificationsEnabled = awaitNotificationsEnabled;
|
|
68
|
+
//# sourceMappingURL=bt-notification-readiness.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_sentryLogger","require","_bluetoothError","_base64ToHex","_wait","CCCD_UUID","NOTIFICATIONS_OR_INDICATIONS","CCCD_POLL_ATTEMPTS","CCCD_POLL_INTERVAL_MS","UNREADABLE_CCCD_SETTLE_MS","isEnabled","cccdValue","firstByte","base64ToHex","Number","parseInt","isNotificationsEnabled","device","serviceUuid","characteristicUuid","attempt","descriptor","readDescriptorForService","value","wait","awaitNotificationsEnabled","characteristics","length","enabled","Promise","all","map","characteristic","every","Boolean","sentryLogger","error","errorCode","toBluetoothError","code","exports"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/bt-notification-readiness.ts"],"mappings":";;;;;;AAEA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAEA;AACA,MAAMI,SAAS,GAAG,sCAAsC;;AAExD;AACA,MAAMC,4BAA4B,GAAG,IAAI;AAEzC,MAAMC,kBAAkB,GAAG,EAAE;AAC7B,MAAMC,qBAAqB,GAAG,GAAG;;AAEjC;AACA,MAAMC,yBAAyB,GAAG,GAAG;;AAErC;;AAMA,MAAMC,SAAS,GAAIC,SAAoC,IAAc;EACnE,MAAM,CAACC,SAAS,CAAC,GAAGD,SAAS,GAAG,IAAAE,wBAAW,EAACF,SAAS,CAAC,GAAG,EAAE;EAE3D,OAAO,CAACG,MAAM,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AAC,CAACG;IACrC,CAAC,CAAC;IACF,MAAM,IAAAf,UAAI,EAACf,yBAAyB,CAAC;EACvC;AACF,CAAC;AAAC+B,OAAA,CAAAf,yBAAA,GAAAA,yBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.runOnce = exports.isPairingRequired = exports.BTPairingRetry = void 0;
|
|
7
|
+
var _sentryLogger = require("../../../helpers/utils/sentry-logger.js");
|
|
8
|
+
var _bluetoothError = require("../../types/bluetooth-error.js");
|
|
9
|
+
var _wait = require("../../utils/wait.js");
|
|
10
|
+
/** How long the user has to finish the system pairing before the step is given up. */
|
|
11
|
+
const PAIRING_WINDOW_MS = 30_000;
|
|
12
|
+
|
|
13
|
+
/** ble-plx cannot report the bond state, so the step itself is tried again at this interval. */
|
|
14
|
+
const PAIRING_RETRY_INTERVAL_MS = 3_000;
|
|
15
|
+
|
|
16
|
+
/** Runs `operation`; when the device needs pairing for it, runs it again once the user has paired. */
|
|
17
|
+
|
|
18
|
+
const isPairingRequired = error => (0, _bluetoothError.toBluetoothError)(error).code === _bluetoothError.BluetoothErrorCode.PAIRING_REQUIRED;
|
|
19
|
+
exports.isPairingRequired = isPairingRequired;
|
|
20
|
+
const runOnce = operation => operation();
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Keeps the link while the system pairing (raised by the encrypted access itself) runs,
|
|
24
|
+
* then retries the step that needed it. After a wait ran out, later steps fail at once.
|
|
25
|
+
*/
|
|
26
|
+
exports.runOnce = runOnce;
|
|
27
|
+
class BTPairingRetry {
|
|
28
|
+
abandoned = false;
|
|
29
|
+
constructor(device, onPairingRequired) {
|
|
30
|
+
this.device = device;
|
|
31
|
+
this.onPairingRequired = onPairingRequired;
|
|
32
|
+
}
|
|
33
|
+
run = async operation => {
|
|
34
|
+
try {
|
|
35
|
+
return await operation();
|
|
36
|
+
} catch (error) {
|
|
37
|
+
if (this.abandoned || !isPairingRequired(error)) {
|
|
38
|
+
throw error;
|
|
39
|
+
}
|
|
40
|
+
this.onPairingRequired();
|
|
41
|
+
return this.retryUntilPaired(operation, error);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
retryUntilPaired = async (operation, firstError) => {
|
|
45
|
+
const deadline = Date.now() + PAIRING_WINDOW_MS;
|
|
46
|
+
let lastError = firstError;
|
|
47
|
+
while (Date.now() < deadline) {
|
|
48
|
+
await (0, _wait.wait)(PAIRING_RETRY_INTERVAL_MS);
|
|
49
|
+
if (!(await this.stillConnected())) {
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
try {
|
|
53
|
+
return await operation();
|
|
54
|
+
} catch (error) {
|
|
55
|
+
if (!isPairingRequired(error)) {
|
|
56
|
+
throw error;
|
|
57
|
+
}
|
|
58
|
+
lastError = error;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
this.abandoned = true;
|
|
62
|
+
(0, _sentryLogger.sentryLogger)("info", "DEVICE: Pairing did not finish, giving up the step", {
|
|
63
|
+
errorCode: _bluetoothError.BluetoothErrorCode.PAIRING_REQUIRED
|
|
64
|
+
});
|
|
65
|
+
throw lastError;
|
|
66
|
+
};
|
|
67
|
+
stillConnected = () => this.device.isConnected().catch(() => false);
|
|
68
|
+
}
|
|
69
|
+
exports.BTPairingRetry = BTPairingRetry;
|
|
70
|
+
//# sourceMappingURL=bt-pairing-retry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_sentryLogger","require","_bluetoothError","_wait","PAIRING_WINDOW_MS","PAIRING_RETRY_INTERVAL_MS","isPairingRequired","error","toBluetoothError","code","BluetoothErrorCode","PAIRING_REQUIRED","exports","runOnce","operation","BTPairingRetry","abandoned","constructor","device","onPairingRequired","run","retryUntilPaired","firstError","deadline","Date","now","lastError","wait","stillConnected","sentryLogger","errorCode","isConnected","catch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AE1B,OAAOE,IAAI,CAACC,GAAG,CAAC,CAAC,GAAGF,QAAQ,EAAE;MAC5B,MAAM,IAAAI,UAAI,EAACtB,yBAAyB,CAAC;MAErC,IAAI,EAAE,MAAM,IAAI,CAACuB,cAAc,CAAC,CAAC,CAAC,EAAE;QAClC;MACF;MAEA,IAAI;QACF,OAAO,MAAMd,SAAS,CAAC,CAAC;MAC1B,CAAC,CAAC,OAAOP,KAAK,EAAE;QACd,IAAI,CAACD,iBAAiB,CAACC,KAAK,CAAC,EAAE;UAC7B,MAAMA,KAAK;QACb;QAEAmB,SAAS,GAAGnB,KAAK;MACnB;IACF;IAEA,IAAI,CAACS,SAAS,GAAG,IAAI;IACrB,IAAAa,0BAAY,EAAC,MAAM,EAAE,oDAAoD,EAAE;MACzEC,SAAS,EAAEpB,kCAAkB,CAACC;IAChC,CAAC,CAAC;IAEF,MAAMe,SAAS;EACjB,CAAC;EAEOE,cAAc,GAAGA,CAAA,KACvB,IAAI,CAACV,MAAM,CAACa,WAAW,CAAC,CAAC,CAACC,KAAK,CAAC,MAAM,KAAK,CAAC;AAChD;AAACpB,OAAA,CAAAG,cAAA,GAAAA,cAAA","ignoreList":[]}
|
|
@@ -49,16 +49,30 @@ class CustomDevice extends _btManagedDevice.BTManagedDevice {
|
|
|
49
49
|
this.frameReader = definition.frameReader;
|
|
50
50
|
this.stuckDataTimeout = definition.stuckDataTimeout;
|
|
51
51
|
this.reportsBondedEvent = definition.reportsBondedEvent === true;
|
|
52
|
+
this.syncsCurrentTime = definition.clockSync === "unknown";
|
|
52
53
|
if (definition.preferredMtu !== undefined) {
|
|
53
54
|
this.preferredMtu = definition.preferredMtu;
|
|
54
55
|
}
|
|
55
56
|
this.declareLepuProtocol(definition, params.clockSync);
|
|
56
57
|
this.declareTmbProtocol(definition, params.clockSync);
|
|
58
|
+
this.declareSequencerFactory(definition, params);
|
|
57
59
|
definition.frames.forEach((frame, uuid) => {
|
|
58
60
|
this.validators.set(uuid, (0, _createFrameValidator.createFrameValidator)(frame));
|
|
59
61
|
});
|
|
60
62
|
}
|
|
61
63
|
|
|
64
|
+
/** Gives a declaration that computes its commands at connect time the context it needs to do so. */
|
|
65
|
+
declareSequencerFactory(definition, params) {
|
|
66
|
+
const create = definition.createCommandSequencer;
|
|
67
|
+
if (!create) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
this.createCommandSequencer = () => create({
|
|
71
|
+
deviceId: this.device.id,
|
|
72
|
+
recordCursorStorage: params.recordCursorStorage
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
|
|
62
76
|
/** Gives a TMB declaration its length-prefixed reader and history command sequence. */
|
|
63
77
|
declareTmbProtocol(definition, clockSync) {
|
|
64
78
|
const tmb = definition.tmb;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_next","require","_caseType","_createFrameValidator","_parseMeasurement","_rejectCustomReading","_bp2Files","_btManagedDevice","_lepuCommandBuilder","_lepuEcgTransfer","_lepuFrameReader","_tmbCommandSequencer","_tmbFrameReader","_viatomBp3Files","_viatomEcgFiles","_customLepuSequencer","CustomDevice","BTManagedDevice","reportedHistoryIds","Set","validators","Map","sessionAggregates","constructor","device","params","definition","oneReadingPerConnection","frameHandler","createFrameHandler","sessionPolicy","deviceData","clockSync","deliveredFileNames","deliveredEcgFileNames","selectedLepu","lepu","selectLepu","manufacturerData","undefined","mainServices","manufacturerDataProtocol","filter","service","uuid","write","serviceUuid","frameReader","stuckDataTimeout","reportsBondedEvent","preferredMtu","declareLepuProtocol","declareTmbProtocol","frames","forEach","frame","set","createFrameValidator","tmb","TmbFrameReader","createCommandSequencer","TmbCommandSequencer","protocol","LepuFrameReader","startBytes","fileTransfer","clear","LepuEcgTransferSequencer","characteristicUuid","builder","LepuCommandBuilder","rejectEncryptionAtBytes","expectedDeviceTypes","onIdentified","onRefused","onIdentityRefused","onFile","reportViatomEcgFile","reportViatomBp2File","reportViatomBp3File","skipFiles","acceptFile","name","ecgFileDecoder","test","pollCommand","pollIntervalMs","afterTransfer","build","onError","reason","Error","onProgress","progress","onConnectionEvent","kind","current","receivedBytes","total","totalBytes","createLepuSequencer","file","decoded","decodeViatomEcgRecording","content","samples","length","onResult","measurementTypeKey","MeasurementTypeKey","ecg","caseType","CaseType","RESULT","diagramPoints","duration","recordedAt","recordedAtFromViatomFileName","recordingId","decodeBP2File","reportHistoryOnce","decodeViatomBp3File","has","add","info","recordLepuIdentity","id","validatePackage","pkg","validate","get","String","toLowerCase","handleDependentResult","data","parsingCase","requiresStream","isMeasuring","OTHER","handleFrame","parsedData","handlerOnly","captureSessionSample","STREAM","shouldReportDependentResult","reportFrame","error","_data","handleSuccessResult","successResult","collectedValues","emit","reading","handleMeasurementEnd","policy","aggregates","values","sessionStartedAt","aggregate","count","minSamples","summary","sample","Object","fromEntries","sums","entries","map","sessionAverage","decorateReading","value","decimals","fields","Math","trunc","Number","toFixed","measurements","frameRecordedAt","Date","measurement","createMeasurement","rejection","measurementRejection","policyFor","key","existing","readingFields","fieldNames","recordOffset","decorate","repeated","repeatedRecords","report","records","floor","from","recordBytes","record","parseMeasurement","discard","reportMeasurement","discardedReadingError","parsedFields","rejectCustomReading","find","message","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/custom/custom.device.ts"],"mappings":";;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AAGA,IAAAC,SAAA,GAAAD,OAAA;AAcA,IAAAE,qBAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,oBAAA,GAAAJ,OAAA;AAIA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,gBAAA,GAAAN,OAAA;AACA,IAAAO,mBAAA,GAAAP,OAAA;AAEA,IAAAQ,gBAAA,GAAAR,OAAA;AAEA,IAAAS,gBAAA,GAAAT,OAAA;AACA,IAAAU,oBAAA,GAAAV,OAAA;AACA,IAAAW,eAAA,GAAAX,OAAA;AACA,IAAAY,eAAA,GAAAZ,OAAA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I,CAAC6B,iBAAiB,CAACzC,UAAU,EAAEwC,WAAW,CAAC;IAC/D,MAAME,SAAS,GAAG,IAAI,CAACC,oBAAoB,CAAC/B,OAAO,EAAE4B,WAAW,CAAC;IAEjE,IAAIE,SAAS,EAAE;MACb,IAAI,CAACkB,OAAO,CAAClB,SAAS,EAAE9B,OAAO,CAAC;MAEhC;IACF;IAEA,IAAI,CAACD,IAAI,CAAC,IAAI,CAACkB,eAAe,CAACjB,OAAO,EAAEjG,KAAK,EAAEsI,YAAY,CAAC,CAAC;EAC/D;EAEQR,iBAAiBA,CACvBzC,UAAwB,EACxBwC,WAA6B,EACf;IACd,MAAM5B,OAAO,GAAG;MACdzC,QAAQ,EAAE6B,UAAU,CAAC7B,QAAQ;MAC7BH,kBAAkB,EAAEwE,WAAW,CAACxE;IAClC,CAAiB;IAEjB,MAAM+E,aAAa,GAAGnC,OAAiD;IACvE,MAAMmD,YAAY,GAAG/D,UAAoD;IAEzEwC,WAAW,CAACQ,UAAU,CAACtI,OAAO,CAAE4B,IAAI,IAAK;MACvCyG,aAAa,CAACzG,IAAI,CAAC,GAAGyH,YAAY,CAACzH,IAAI,CAAC;IAC1C,CAAC,CAAC;IAEF,OAAOsE,OAAO;EAChB;EAEQ+B,oBAAoBA,CAC1B/B,OAAqB,EACrB4B,WAA6B,EACT;IACpB,OAAOA,WAAW,CAACQ,UAAU,CAC1BrB,GAAG,CAAErF,IAAI,IACR,IAAA0H,wCAAmB,EACjB,IAAI,CAAClL,UAAU,CAACkJ,MAAM,EACtBQ,WAAW,CAACxE,kBAAkB,EAC9B1B,IAAI,EACHsE,OAAO,CAA4CtE,IAAI,CAC1D,CACF,CAAC,CACA2H,IAAI,CAAEC,OAAO,IAAKA,OAAO,KAAKvK,SAAS,CAAC;EAC7C;AACF;AAACwK,OAAA,CAAA/L,YAAA,GAAAA,YAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_next","require","_caseType","_createFrameValidator","_parseMeasurement","_rejectCustomReading","_bp2Files","_btManagedDevice","_lepuCommandBuilder","_lepuEcgTransfer","_lepuFrameReader","_tmbCommandSequencer","_tmbFrameReader","_viatomBp3Files","_viatomEcgFiles","_customLepuSequencer","CustomDevice","BTManagedDevice","reportedHistoryIds","Set","validators","Map","sessionAggregates","constructor","device","params","definition","oneReadingPerConnection","frameHandler","createFrameHandler","sessionPolicy","deviceData","clockSync","deliveredFileNames","deliveredEcgFileNames","selectedLepu","lepu","selectLepu","manufacturerData","undefined","mainServices","manufacturerDataProtocol","filter","service","uuid","write","serviceUuid","frameReader","stuckDataTimeout","reportsBondedEvent","syncsCurrentTime","preferredMtu","declareLepuProtocol","declareTmbProtocol","declareSequencerFactory","frames","forEach","frame","set","createFrameValidator","create","createCommandSequencer","deviceId","id","recordCursorStorage","tmb","TmbFrameReader","TmbCommandSequencer","protocol","LepuFrameReader","startBytes","fileTransfer","clear","LepuEcgTransferSequencer","characteristicUuid","builder","LepuCommandBuilder","rejectEncryptionAtBytes","expectedDeviceTypes","onIdentified","onRefused","onIdentityRefused","onFile","reportViatomEcgFile","reportViatomBp2File","reportViatomBp3File","skipFiles","acceptFile","name","ecgFileDecoder","test","pollCommand","pollIntervalMs","afterTransfer","build","onError","reason","Error","onProgress","progress","onConnectionEvent","kind","current","receivedBytes","total","totalBytes","createLepuSequencer","file","decoded","decodeViatomEcgRecording","content","samples","length","onResult","measurementTypeKey","MeasurementTypeKey","ecg","caseType","CaseType","RESULT","diagramPoints","duration","recordedAt","recordedAtFromViatomFileName","recordingId","decodeBP2File","reportHistoryOnce","decodeViatomBp3File","has","add","info","recordLepuIdentity","validatePackage","pkg","validate","get","String","toLowerCase","handleDependentResult","data","parsingCase","requiresStream","isMeasuring","OTHER","handleFrame","parsedData","handlerOnly","captureSessionSample","STREAM","shouldReportDependentResult","reportFrame","error","_data","handleSuccessResult","successResult","collectedValues","emit","reading","handleMeasurementEnd","policy","aggregates","values","sessionStartedAt","aggregate","count","minSamples","summary","sample","Object","fromEntries","sums","entries","map","sessionAverage","decorateReading","value","decimals","fields","Math","trunc","Number","toFixed","measurements","frameRecordedAt","Date","measurement","createMeasurement","rejection","measurementRejection","policyFor","key","existing","readingFields","fieldNames","recordOffset","decorate","repeated","repeatedRecords","report","records","floor","from","recordBytes","record","parseMeasurement","discard","reportMeasurement","discardedReadingError","parsedFields","rejectCustomReading","find","message","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/custom/custom.device.ts"],"mappings":";;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AAGA,IAAAC,SAAA,GAAAD,OAAA;AAcA,IAAAE,qBAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,oBAAA,GAAAJ,OAAA;AAIA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,gBAAA,GAAAN,OAAA;AACA,IAAAO,mBAAA,GAAAP,OAAA;AAEA,IAAAQ,gBAAA,GAAAR,OAAA;AAEA,IAAAS,gBAAA,GAAAT,OAAA;AACA,IAAAU,oBAAA,GAAAV,OAAA;AACA,IAAAW,eAAA,GAAAX,OAAA;AACA,IAAAY,eAAA,GAAAZ,OAAA;AACA,IAAAa,eAAA,GAAAb,OAAA;AAKA,IAAAc,oBAAA,GAAAd,OAAA;AAvCA;;AAsDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMe,YAAY,SAASC,gCAAe,CAAiB;EAOxDC,kBAAkB,GAAG,IAAIC,GAAG,CAAS,CAAC;EAC7BC,UAAU,GAAG,IAAIC,GAAG,CAAsC,CAAC;EAE3DC,iBAAiB,GAAG,IAAID,GAAG,CAA2B,CAAC;EAGxEE,WAAWA,CACTC,MAAc,EACdC,MAA0C,EAC1CC,UAAkC,EAClC;IACA,KAAK,CAACF,MAAM,EAAE;MACZ,GAAGC,MAAM;MACTE,uBAAuB,EACrBF,MAAM,CAACE,uBAAuB,IAAID,UAAU,CAACC;IACjD,CAAC,CAAC;IAEF,IAAI,CAACD,UAAU,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,oBAAoB,CAAC/B,OAAO,EAAE4B,WAAW,CAAC;IAEjE,IAAIE,SAAS,EAAE;MACb,IAAI,CAACkB,OAAO,CAAClB,SAAS,EAAE9B,OAAO,CAAC;MAEhC;IACF;IAEA,IAAI,CAACD,IAAI,CAAC,IAAI,CAACkB,eAAe,CAACjB,OAAO,EAAEpG,KAAK,EAAEyI,YAAY,CAAC,CAAC;EAC/D;EAEQR,iBAAiBA,CACvBzC,UAAwB,EACxBwC,WAA6B,EACf;IACd,MAAM5B,OAAO,GAAG;MACdxC,QAAQ,EAAE4B,UAAU,CAAC5B,QAAQ;MAC7BH,kBAAkB,EAAEuE,WAAW,CAACvE;IAClC,CAAiB;IAEjB,MAAM8E,aAAa,GAAGnC,OAAiD;IACvE,MAAMmD,YAAY,GAAG/D,UAAoD;IAEzEwC,WAAW,CAACQ,UAAU,CAACzI,OAAO,CAAEgC,IAAI,IAAK;MACvCwG,aAAa,CAACxG,IAAI,CAAC,GAAGwH,YAAY,CAACxH,IAAI,CAAC;IAC1C,CAAC,CAAC;IAEF,OAAOqE,OAAO;EAChB;EAEQ+B,oBAAoBA,CAC1B/B,OAAqB,EACrB4B,WAA6B,EACT;IACpB,OAAOA,WAAW,CAACQ,UAAU,CAC1BrB,GAAG,CAAEpF,IAAI,IACR,IAAAyH,wCAAmB,EACjB,IAAI,CAACvL,UAAU,CAACuJ,MAAM,EACtBQ,WAAW,CAACvE,kBAAkB,EAC9B1B,IAAI,EACHqE,OAAO,CAA4CrE,IAAI,CAC1D,CACF,CAAC,CACA0H,IAAI,CAAEC,OAAO,IAAKA,OAAO,KAAK5K,SAAS,CAAC;EAC7C;AACF;AAAC6K,OAAA,CAAApM,YAAA,GAAAA,YAAA","ignoreList":[]}
|
|
@@ -4,12 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.bloodPressureStatusFromFrame = void 0;
|
|
7
|
-
|
|
8
|
-
const value = Number.parseInt(frame[index + offset] ?? "", 16);
|
|
9
|
-
return Number.isInteger(value) && value >= 0 && value <= 0xff ? value : undefined;
|
|
10
|
-
};
|
|
7
|
+
var _standardGattFrame = require("./standard-gatt.frame.js");
|
|
11
8
|
const bloodPressureStatusFromFrame = (frame, recordOffset = 0) => {
|
|
12
|
-
const flags = byteAt(frame, 0, recordOffset);
|
|
9
|
+
const flags = (0, _standardGattFrame.byteAt)(frame, 0, recordOffset);
|
|
13
10
|
if (flags === undefined || (flags & 0x10) === 0) {
|
|
14
11
|
return undefined;
|
|
15
12
|
}
|
|
@@ -23,8 +20,8 @@ const bloodPressureStatusFromFrame = (frame, recordOffset = 0) => {
|
|
|
23
20
|
if ((flags & 0x08) !== 0) {
|
|
24
21
|
cursor += 1;
|
|
25
22
|
}
|
|
26
|
-
const statusLow = byteAt(frame, cursor, recordOffset);
|
|
27
|
-
const statusHigh = byteAt(frame, cursor + 1, recordOffset);
|
|
23
|
+
const statusLow = (0, _standardGattFrame.byteAt)(frame, cursor, recordOffset);
|
|
24
|
+
const statusHigh = (0, _standardGattFrame.byteAt)(frame, cursor + 1, recordOffset);
|
|
28
25
|
return statusLow !== undefined && statusHigh !== undefined ? statusLow | statusHigh << 8 : undefined;
|
|
29
26
|
};
|
|
30
27
|
exports.bloodPressureStatusFromFrame = bloodPressureStatusFromFrame;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_standardGattFrame","require","bloodPressureStatusFromFrame","frame","recordOffset","flags","byteAt","undefined","cursor","statusLow","statusHigh","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/standard-gatt/standard-gatt.blood-pressure-status.ts"],"mappings":";;;;;;AAAA,IAAAA,kBAAA,GAAAC,OAAA;AAEA,MAAMC,4BAA4B,GAAGA,CACnCC,KAAwB,EACxBC,YAAY,GAAG,CAAC,KACO;EACvB,MAAMC,KAAK,GAAG,IAAAC,yBAAM,EAACH,KAAK,EAAE,CAAC,EAAEC,YAAY,CAAC;EAE5C,IAAIC,KAAK,KAAKE,SAAS,IAAI,CAACF,KAAK,GAAG,IAAI,MAAM,CAAC,EAAE;IAC/C,OAAOE,SAAS;EAClB;EAEA,IAAIC,MAAM,GAAG,CAAC;EAEd,IAAI,CAACH,KAAK,GAAG,IAAI,MAAM,CAAC,EAAE;IACxBG,MAAM,IAAI,CAAC;EACb;EAEA,IAAI,CAACH,KAAK,GAAG,IAAI,MAAM,CAAC,EAAE;IACxBG,MAAM,IAAI,CAAC;EACb;EAEA,IAAI,CAACH,KAAK,GAAG,IAAI,MAAM,CAAC,EAAE;IACxBG,MAAM,IAAI,CAAC;EACb;EAEA,MAAMC,SAAS,GAAG,IAAAH,yBAAM,EAACH,KAAK,EAAEK,MAAM,EAAEJ,YAAY,CAAC;EACrD,MAAMM,UAAU,GAAG,IAAAJ,yBAAM,EAACH,KAAK,EAAEK,MAAM,GAAG,CAAC,EAAEJ,YAAY,CAAC;EAE1D,OAAOK,SAAS,KAAKF,SAAS,IAAIG,UAAU,KAAKH,SAAS,GACtDE,SAAS,GAAIC,UAAU,IAAI,CAAE,GAC7BH,SAAS;AACf,CAAC;AAACI,OAAA,CAAAT,4BAAA,GAAAA,4BAAA","ignoreList":[]}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.decorateWeightReading = exports.decorateThermometerReading = exports.decoratePulseOximeterReading = exports.decorateHeartRateReading = void 0;
|
|
7
|
+
var _deviceUser = require("../../../utils/device-user.js");
|
|
8
|
+
var _rrInterval = require("../../../utils/rr-interval.js");
|
|
9
|
+
var _temperatureType = require("../../../utils/temperature-type.js");
|
|
10
|
+
var _standardGattFrame = require("./standard-gatt.frame.js");
|
|
11
|
+
const TEMPERATURE_TIMESTAMP = 0x02;
|
|
12
|
+
const TEMPERATURE_TYPE = 0x04;
|
|
13
|
+
const TEMPERATURE_FIELDS_INDEX = 5;
|
|
14
|
+
const WEIGHT_TIMESTAMP = 0x02;
|
|
15
|
+
const WEIGHT_USER = 0x04;
|
|
16
|
+
const WEIGHT_FIELDS_INDEX = 3;
|
|
17
|
+
|
|
18
|
+
/** The weight a scale sends when the measurement failed. */
|
|
19
|
+
const WEIGHT_UNSUCCESSFUL = 0xffff;
|
|
20
|
+
const PULSE_OXIMETER_TIMESTAMP = 0x01;
|
|
21
|
+
const PULSE_OXIMETER_FIELDS_INDEX = 5;
|
|
22
|
+
const HEART_RATE_UINT16 = 0x01;
|
|
23
|
+
const HEART_RATE_ENERGY_EXPENDED = 0x08;
|
|
24
|
+
const HEART_RATE_RR_INTERVALS = 0x10;
|
|
25
|
+
const HEART_RATE_FLAGS_BYTES = 1;
|
|
26
|
+
const UINT8_BYTES = 1;
|
|
27
|
+
const UINT16_BYTES = 2;
|
|
28
|
+
|
|
29
|
+
/** Where the optional fields start once the fixed ones and the timestamp are accounted for. */
|
|
30
|
+
const afterTimestamp = (flags, timestampFlag, fieldsIndex) => flags & timestampFlag ? fieldsIndex + _standardGattFrame.DATE_TIME_BYTES : fieldsIndex;
|
|
31
|
+
const littleEndian16 = (frame, index, offset) => {
|
|
32
|
+
const low = (0, _standardGattFrame.byteAt)(frame, index, offset);
|
|
33
|
+
const high = (0, _standardGattFrame.byteAt)(frame, index + 1, offset);
|
|
34
|
+
return low === undefined || high === undefined ? undefined : low | high << 8;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** Temperature Measurement 0x2A1C: the device's own timestamp and where on the body it measured. */
|
|
38
|
+
const decorateThermometerReading = (reading, frame, recordOffset = 0) => {
|
|
39
|
+
const flags = frame && (0, _standardGattFrame.byteAt)(frame, 0, recordOffset);
|
|
40
|
+
if (!frame || flags === undefined) {
|
|
41
|
+
return reading;
|
|
42
|
+
}
|
|
43
|
+
const typeCode = flags & TEMPERATURE_TYPE ? (0, _standardGattFrame.byteAt)(frame, afterTimestamp(flags, TEMPERATURE_TIMESTAMP, TEMPERATURE_FIELDS_INDEX), recordOffset) : undefined;
|
|
44
|
+
return (0, _standardGattFrame.withDefinedMetadata)(reading, {
|
|
45
|
+
recordedAt: flags & TEMPERATURE_TIMESTAMP ? (0, _standardGattFrame.dateTimeAt)(frame, TEMPERATURE_FIELDS_INDEX, recordOffset) : undefined,
|
|
46
|
+
temperatureType: typeCode === undefined ? undefined : (0, _temperatureType.temperatureTypeFromCode)(typeCode)
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/** Weight Measurement 0x2A9D: withholds an unsuccessful weight, adds the timestamp and the device user. */
|
|
51
|
+
exports.decorateThermometerReading = decorateThermometerReading;
|
|
52
|
+
const decorateWeightReading = (reading, frame, recordOffset = 0) => {
|
|
53
|
+
const flags = frame && (0, _standardGattFrame.byteAt)(frame, 0, recordOffset);
|
|
54
|
+
if (!frame || flags === undefined) {
|
|
55
|
+
return reading;
|
|
56
|
+
}
|
|
57
|
+
if (littleEndian16(frame, 1, recordOffset) === WEIGHT_UNSUCCESSFUL) {
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
const userId = flags & WEIGHT_USER ? (0, _standardGattFrame.byteAt)(frame, afterTimestamp(flags, WEIGHT_TIMESTAMP, WEIGHT_FIELDS_INDEX), recordOffset) : undefined;
|
|
61
|
+
return (0, _standardGattFrame.withDefinedMetadata)(reading, {
|
|
62
|
+
recordedAt: flags & WEIGHT_TIMESTAMP ? (0, _standardGattFrame.dateTimeAt)(frame, WEIGHT_FIELDS_INDEX, recordOffset) : undefined,
|
|
63
|
+
memorySlot: userId === undefined ? undefined : (0, _deviceUser.memorySlotForDeviceUser)(userId)
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
/** PLX Spot-Check Measurement 0x2A5E: the device's own timestamp. */
|
|
68
|
+
exports.decorateWeightReading = decorateWeightReading;
|
|
69
|
+
const decoratePulseOximeterReading = (reading, frame, recordOffset = 0) => {
|
|
70
|
+
const flags = frame && (0, _standardGattFrame.byteAt)(frame, 0, recordOffset);
|
|
71
|
+
if (!frame || flags === undefined || !(flags & PULSE_OXIMETER_TIMESTAMP)) {
|
|
72
|
+
return reading;
|
|
73
|
+
}
|
|
74
|
+
return (0, _standardGattFrame.withDefinedMetadata)(reading, {
|
|
75
|
+
recordedAt: (0, _standardGattFrame.dateTimeAt)(frame, PULSE_OXIMETER_FIELDS_INDEX, recordOffset)
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
/** The RR intervals a Heart Rate Measurement carries, in milliseconds and in the order sent. */
|
|
80
|
+
exports.decoratePulseOximeterReading = decoratePulseOximeterReading;
|
|
81
|
+
const rrIntervalsFromHeartRateFrame = (frame, flags, recordOffset) => {
|
|
82
|
+
const rrIntervals = [];
|
|
83
|
+
let index = HEART_RATE_FLAGS_BYTES + (flags & HEART_RATE_UINT16 ? UINT16_BYTES : UINT8_BYTES) + (flags & HEART_RATE_ENERGY_EXPENDED ? UINT16_BYTES : 0);
|
|
84
|
+
let counts = littleEndian16(frame, index, recordOffset);
|
|
85
|
+
while (counts !== undefined) {
|
|
86
|
+
rrIntervals.push((0, _rrInterval.rrIntervalMilliseconds)(counts));
|
|
87
|
+
index += UINT16_BYTES;
|
|
88
|
+
counts = littleEndian16(frame, index, recordOffset);
|
|
89
|
+
}
|
|
90
|
+
return rrIntervals;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
/** Heart Rate Measurement 0x2A37: the RR intervals, when the strap sends them. */
|
|
94
|
+
const decorateHeartRateReading = (reading, frame, recordOffset = 0) => {
|
|
95
|
+
const flags = frame && (0, _standardGattFrame.byteAt)(frame, 0, recordOffset);
|
|
96
|
+
if (!frame || flags === undefined || !(flags & HEART_RATE_RR_INTERVALS)) {
|
|
97
|
+
return reading;
|
|
98
|
+
}
|
|
99
|
+
const rrIntervals = rrIntervalsFromHeartRateFrame(frame, flags, recordOffset);
|
|
100
|
+
return rrIntervals.length > 0 ? {
|
|
101
|
+
...reading,
|
|
102
|
+
rrIntervals
|
|
103
|
+
} : reading;
|
|
104
|
+
};
|
|
105
|
+
exports.decorateHeartRateReading = decorateHeartRateReading;
|
|
106
|
+
//# sourceMappingURL=standard-gatt.decorators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_deviceUser","require","_rrInterval","_temperatureType","_standardGattFrame","TEMPERATURE_TIMESTAMP","TEMPERATURE_TYPE","TEMPERATURE_FIELDS_INDEX","WEIGHT_TIMESTAMP","WEIGHT_USER","WEIGHT_FIELDS_INDEX","WEIGHT_UNSUCCESSFUL","PULSE_OXIMETER_TIMESTAMP","PULSE_OXIMETER_FIELDS_INDEX","HEART_RATE_UINT16","HEART_RATE_ENERGY_EXPENDED","HEART_RATE_RR_INTERVALS","HEART_RATE_FLAGS_BYTES","UINT8_BYTES","UINT16_BYTES","afterTimestamp","flags","timestampFlag","fieldsIndex","DATE_TIME_BYTES","littleEndian16","frame","index","offset","low","byteAt","high","undefined","decorateThermometerReading","reading","recordOffset","typeCode","withDefinedMetadata","recordedAt","dateTimeAt","temperatureType","temperatureTypeFromCode","exports","decorateWeightReading","userId","memorySlot","memorySlotForDeviceUser","decoratePulseOximeterReading","rrIntervalsFromHeartRateFrame","rrIntervals","counts","push","rrIntervalMilliseconds","decorateHeartRateReading","length"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/standard-gatt/standard-gatt.decorators.ts"],"mappings":";;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,gBAAA,GAAAF,OAAA;AAEA,IAAAG,kBAAA,GAAAH,OAAA;AAOA,MAAMI,qBAAqB,GAAG,IAAI;AAClC,MAAMC,gBAAgB,GAAG,IAAI;AAC7B,MAAMC,wBAAwB,GAAG,CAAC;AAElC,MAAMC,gBAAgB,GAAG,IAAI;AAC7B,MAAMC,WAAW,GAAG,IAAI;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CAAC,KACb;EACH,MAAMd,KAAK,GAAGK,KAAK,IAAI,IAAAI,yBAAM,EAACJ,KAAK,EAAE,CAAC,EAAES,YAAY,CAAC;EAErD,IAAI,CAACT,KAAK,IAAIL,KAAK,KAAKW,SAAS,IAAI,EAAEX,KAAK,GAAGL,uBAAuB,CAAC,EAAE;IACvE,OAAOkB,OAAO;EAChB;EAEA,MAAMe,WAAW,GAAGD,6BAA6B,CAACtB,KAAK,EAAEL,KAAK,EAAEc,YAAY,CAAC;EAE7E,OAAOc,WAAW,CAACK,MAAM,GAAG,CAAC,GAAG;IAAE,GAAGpB,OAAO;IAAEe;EAAY,CAAC,GAAGf,OAAO;AACvE,CAAC;AAACQ,OAAA,CAAAW,wBAAA,GAAAA,wBAAA","ignoreList":[]}
|
package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js
CHANGED
|
@@ -13,6 +13,8 @@ Object.defineProperty(exports, "standardGlucoseDevice", {
|
|
|
13
13
|
exports.standardWeightScaleDevice = exports.standardThermometerDevice = exports.standardPulseOximeterDevice = exports.standardHeartRateDevice = void 0;
|
|
14
14
|
var _next = require("@ovok/core/next");
|
|
15
15
|
var _bytesToHex = require("../../../utils/bytes-to-hex.js");
|
|
16
|
+
var _kpaToMmhg = require("../../../utils/kpa-to-mmhg.js");
|
|
17
|
+
var _standardGattDecorators = require("./standard-gatt.decorators.js");
|
|
16
18
|
var _standardGattGlucose = require("./standard-gatt.glucose.js");
|
|
17
19
|
var _standardGattProfile = require("./standard-gatt.profile.js");
|
|
18
20
|
/* eslint-disable max-lines */
|
|
@@ -28,12 +30,20 @@ var _standardGattProfile = require("./standard-gatt.profile.js");
|
|
|
28
30
|
* every vendor names its hardware differently. A product declares the profile and supplies
|
|
29
31
|
* the name its own hardware advertises.
|
|
30
32
|
*
|
|
31
|
-
* Values are little-endian, as the specification requires.
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* such a device yields no reading rather than one that is quietly wrong.
|
|
33
|
+
* Values are little-endian, as the specification requires. A device may report in kPa,
|
|
34
|
+
* Fahrenheit or pounds; each field is then declared with the scale and offset that convert
|
|
35
|
+
* it to the catalog's canonical unit.
|
|
35
36
|
*/
|
|
36
37
|
|
|
38
|
+
const BLOOD_PRESSURE_KPA = 0x01;
|
|
39
|
+
const BLOOD_PRESSURE_TIMESTAMP = 0x02;
|
|
40
|
+
const BLOOD_PRESSURE_PULSE = 0x04;
|
|
41
|
+
|
|
42
|
+
/** Bits 0-4 are defined: kPa, timestamp, pulse, user id and measurement status. */
|
|
43
|
+
const BLOOD_PRESSURE_FLAGS = Array.from({
|
|
44
|
+
length: 32
|
|
45
|
+
}, (_, flags) => flags);
|
|
46
|
+
|
|
37
47
|
/**
|
|
38
48
|
* Blood Pressure Service 0x1810, Blood Pressure Measurement 0x2A35.
|
|
39
49
|
*
|
|
@@ -43,8 +53,8 @@ var _standardGattProfile = require("./standard-gatt.profile.js");
|
|
|
43
53
|
* declares the length it needs. A device that reports no pulse still decodes, because the
|
|
44
54
|
* flags value it sends selects a case that never looks for one.
|
|
45
55
|
*
|
|
46
|
-
* Bit 3 (user id
|
|
47
|
-
*
|
|
56
|
+
* Bit 3 (user id) and bit 4 (measurement status) follow the pulse, so neither moves it.
|
|
57
|
+
* Bit 0 says the pressures are in kPa, which is converted to whole mmHg.
|
|
48
58
|
*/
|
|
49
59
|
/** Bit 2 set, bit 1 clear: the pulse follows the mean pressure. */
|
|
50
60
|
const pulseAfterMeanPressure = {
|
|
@@ -57,35 +67,25 @@ const pulseAfterTimestamp = {
|
|
|
57
67
|
fields: [(0, _standardGattProfile.littleEndian)("heartRate", [14, 15], "bpm", "sfloat")],
|
|
58
68
|
minLengthBytes: 16
|
|
59
69
|
};
|
|
70
|
+
const pressureInKpa = (name, byteIndexes) => ({
|
|
71
|
+
...(0, _standardGattProfile.littleEndian)(name, byteIndexes, "mmHg", "sfloat"),
|
|
72
|
+
scale: _kpaToMmhg.KPA_TO_MMHG,
|
|
73
|
+
decimals: 0
|
|
74
|
+
});
|
|
75
|
+
const pressuresInKpa = [pressureInKpa("systolic", [1, 2]), pressureInKpa("diastolic", [3, 4])];
|
|
60
76
|
|
|
61
77
|
/** Declares a Bluetooth SIG blood pressure profile device. */
|
|
62
|
-
const standardBloodPressureDevice = params => (0, _standardGattProfile.declareProfile)({
|
|
63
|
-
...params,
|
|
64
|
-
decorateReading: (reading, frame, recordOffset) => {
|
|
65
|
-
const decorated = (0, _standardGattProfile.decorateBloodPressureReading)(reading, frame, recordOffset);
|
|
66
|
-
if (!decorated) {
|
|
67
|
-
return null;
|
|
68
|
-
}
|
|
69
|
-
return params.decorateReading ? params.decorateReading(decorated, frame, recordOffset) : decorated;
|
|
70
|
-
}
|
|
71
|
-
}, {
|
|
78
|
+
const standardBloodPressureDevice = params => (0, _standardGattProfile.declareProfile)(params, {
|
|
72
79
|
service: "1810",
|
|
73
80
|
characteristic: "2a35",
|
|
74
81
|
minLengthBytes: 7,
|
|
75
82
|
measurementTypeKey: _next.MeasurementTypeKey.bloodPressure,
|
|
76
|
-
|
|
77
|
-
selectors:
|
|
83
|
+
decorateReading: _standardGattProfile.decorateBloodPressureReading,
|
|
84
|
+
selectors: BLOOD_PRESSURE_FLAGS.map(_bytesToHex.byteToHex),
|
|
85
|
+
/** mmHg; the kPa shapes override it in `fieldsBySelector`. */
|
|
78
86
|
fields: [(0, _standardGattProfile.littleEndian)("systolic", [1, 2], "mmHg", "sfloat"), (0, _standardGattProfile.littleEndian)("diastolic", [3, 4], "mmHg", "sfloat")],
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
"0c": pulseAfterMeanPressure,
|
|
82
|
-
"14": pulseAfterMeanPressure,
|
|
83
|
-
"1c": pulseAfterMeanPressure,
|
|
84
|
-
"06": pulseAfterTimestamp,
|
|
85
|
-
"0e": pulseAfterTimestamp,
|
|
86
|
-
"16": pulseAfterTimestamp,
|
|
87
|
-
"1e": pulseAfterTimestamp
|
|
88
|
-
}
|
|
87
|
+
fieldsBySelector: Object.fromEntries(BLOOD_PRESSURE_FLAGS.filter(flags => flags & BLOOD_PRESSURE_KPA).map(flags => [(0, _bytesToHex.byteToHex)(flags), pressuresInKpa])),
|
|
88
|
+
optionalFields: Object.fromEntries(BLOOD_PRESSURE_FLAGS.filter(flags => flags & BLOOD_PRESSURE_PULSE).map(flags => [(0, _bytesToHex.byteToHex)(flags), flags & BLOOD_PRESSURE_TIMESTAMP ? pulseAfterTimestamp : pulseAfterMeanPressure]))
|
|
89
89
|
});
|
|
90
90
|
|
|
91
91
|
/** Health Thermometer Service 0x1809, Temperature Measurement 0x2A1C. */
|
|
@@ -95,6 +95,7 @@ const standardThermometerDevice = params => (0, _standardGattProfile.declareProf
|
|
|
95
95
|
characteristic: "2a1c",
|
|
96
96
|
minLengthBytes: 5,
|
|
97
97
|
measurementTypeKey: _next.MeasurementTypeKey.temperature,
|
|
98
|
+
decorateReading: _standardGattDecorators.decorateThermometerReading,
|
|
98
99
|
/** All combinations of Fahrenheit, timestamp and temperature type flags. */
|
|
99
100
|
selectors: ["00", "02", "04", "06", "01", "03", "05", "07"],
|
|
100
101
|
fields: [(0, _standardGattProfile.littleEndian)("bodyTemp", [1, 2, 3, 4], "Cel", "float")],
|
|
@@ -134,12 +135,14 @@ const WEIGHT_KG_PER_COUNT = 0.005;
|
|
|
134
135
|
* Weight Scale Service 0x181D, Weight Measurement 0x2A9D.
|
|
135
136
|
*
|
|
136
137
|
* The reading is a scaled integer rather than a float, so the resolution is applied here.
|
|
138
|
+
* A weight of 0xFFFF means the measurement failed, so it yields no reading.
|
|
137
139
|
*/
|
|
138
140
|
const standardWeightScaleDevice = params => (0, _standardGattProfile.declareProfile)(params, {
|
|
139
141
|
service: "181d",
|
|
140
142
|
characteristic: "2a9d",
|
|
141
143
|
minLengthBytes: 3,
|
|
142
144
|
measurementTypeKey: _next.MeasurementTypeKey.bodyWeight,
|
|
145
|
+
decorateReading: _standardGattDecorators.decorateWeightReading,
|
|
143
146
|
/** Unit, timestamp, user-id and BMI/height flags may all follow the value. */
|
|
144
147
|
selectors: Array.from({
|
|
145
148
|
length: 16
|
|
@@ -165,7 +168,8 @@ const standardWeightScaleDevice = params => (0, _standardGattProfile.declareProf
|
|
|
165
168
|
* Pulse Oximeter Service 0x1822, PLX Spot-Check Measurement 0x2A5E.
|
|
166
169
|
*
|
|
167
170
|
* Saturation and pulse rate are both required by the catalog, which matches the
|
|
168
|
-
* specification: a spot-check measurement always carries both
|
|
171
|
+
* specification: a spot-check measurement always carries both, at bytes 1-4 whatever the
|
|
172
|
+
* flags say, so every flags value selects the same fields. The optional ones follow them.
|
|
169
173
|
*/
|
|
170
174
|
exports.standardWeightScaleDevice = standardWeightScaleDevice;
|
|
171
175
|
const standardPulseOximeterDevice = params => (0, _standardGattProfile.declareProfile)(params, {
|
|
@@ -173,7 +177,8 @@ const standardPulseOximeterDevice = params => (0, _standardGattProfile.declarePr
|
|
|
173
177
|
characteristic: "2a5e",
|
|
174
178
|
minLengthBytes: 5,
|
|
175
179
|
measurementTypeKey: _next.MeasurementTypeKey.bloodOxygenPulseRate,
|
|
176
|
-
|
|
180
|
+
decorateReading: _standardGattDecorators.decoratePulseOximeterReading,
|
|
181
|
+
selectors: ["*"],
|
|
177
182
|
fields: [(0, _standardGattProfile.littleEndian)("bloodOxygen", [1, 2], "%", "sfloat"), (0, _standardGattProfile.littleEndian)("pulseRate", [3, 4], "bpm", "sfloat")]
|
|
178
183
|
});
|
|
179
184
|
|
|
@@ -190,13 +195,15 @@ const UINT16_HEART_RATE_FLAGS = HEART_RATE_FLAGS.filter(flags => (flags & 0x01)
|
|
|
190
195
|
* Heart Rate Service 0x180D, Heart Rate Measurement 0x2A37.
|
|
191
196
|
*
|
|
192
197
|
* Both heart-rate layouts are declared. A contact-not-detected frame is idle, so it cannot
|
|
193
|
-
* become a false reading while the strap is off the body.
|
|
198
|
+
* become a false reading while the strap is off the body. RR intervals, a list of any
|
|
199
|
+
* length, are read from the frame by the decorator and reported as `rrIntervals`.
|
|
194
200
|
*/
|
|
195
201
|
const standardHeartRateDevice = params => (0, _standardGattProfile.declareProfile)(params, {
|
|
196
202
|
service: "180d",
|
|
197
203
|
characteristic: "2a37",
|
|
198
204
|
minLengthBytes: 2,
|
|
199
205
|
measurementTypeKey: _next.MeasurementTypeKey.heartRate,
|
|
206
|
+
decorateReading: _standardGattDecorators.decorateHeartRateReading,
|
|
200
207
|
selectors: HEART_RATE_FLAGS.map(_bytesToHex.byteToHex),
|
|
201
208
|
fields: [{
|
|
202
209
|
name: "heartRate",
|