@ovok/native 1.4.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login-button.js +2 -2
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login-button.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login-button.js +2 -2
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login-button.js.map +1 -1
- package/lib/commonjs/modules/bt-device/constants/device-instruction-pdfs.js +2 -1
- package/lib/commonjs/modules/bt-device/constants/device-instruction-pdfs.js.map +1 -1
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-assets.js +3 -1
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-assets.js.map +1 -1
- package/lib/commonjs/modules/bt-device/constants/supported-devices.js +55 -13
- package/lib/commonjs/modules/bt-device/constants/supported-devices.js.map +1 -1
- package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js +13 -2
- package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
- package/lib/commonjs/modules/bt-management/constants/integrated-devices-map.js +1 -1
- package/lib/commonjs/modules/bt-management/constants/integrated-devices-map.js.map +1 -1
- package/lib/commonjs/modules/bt-management/constants/measurement-field-catalog.js +88 -0
- package/lib/commonjs/modules/bt-management/constants/measurement-field-catalog.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/bt-manager.js +2 -0
- package/lib/commonjs/modules/bt-management/services/bt-manager.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/custom/compile-case-fields.js +3 -1
- package/lib/commonjs/modules/bt-management/services/custom/compile-case-fields.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/custom/compile-custom-case.js +2 -0
- package/lib/commonjs/modules/bt-management/services/custom/compile-custom-case.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/custom/compile-custom-field.js +2 -1
- package/lib/commonjs/modules/bt-management/services/custom/compile-custom-field.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/custom/compile-custom-lepu.js +24 -0
- package/lib/commonjs/modules/bt-management/services/custom/compile-custom-lepu.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/custom/compile-custom-monitor.js +8 -1
- package/lib/commonjs/modules/bt-management/services/custom/compile-custom-monitor.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/custom/define-custom-device.js +4 -0
- package/lib/commonjs/modules/bt-management/services/custom/define-custom-device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/device-creator.js +10 -2
- package/lib/commonjs/modules/bt-management/services/device-creator.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj.thermometers.js +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj.thermometers.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js +9 -3
- package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-data-processor.js +5 -0
- package/lib/commonjs/modules/bt-management/services/devices/bt-data-processor.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-device-information.js +41 -0
- package/lib/commonjs/modules/bt-management/services/devices/bt-device-information.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js +30 -2
- package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js +6 -1
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js +20 -4
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/frame-parser.js +13 -1
- package/lib/commonjs/modules/bt-management/services/devices/frame-parser.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.command-builder.js +6 -3
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.command-builder.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-transfer.js +12 -3
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.identity-gate.js +84 -38
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.identity-gate.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.transports.js +11 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.transports.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/spo/oxyfit.device.js +18 -0
- package/lib/commonjs/modules/bt-management/services/devices/spo/oxyfit.device.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js +67 -11
- 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.profile.js +4 -2
- package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/uebe/mysense.device.js +78 -0
- package/lib/commonjs/modules/bt-management/services/devices/uebe/mysense.device.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/uebe/mysense.frame-reader.js +83 -0
- package/lib/commonjs/modules/bt-management/services/devices/uebe/mysense.frame-reader.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/uebe/mysense.sequencer.js +60 -0
- package/lib/commonjs/modules/bt-management/services/devices/uebe/mysense.sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-files.js +18 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-files.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js +4 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.oximeters.js +54 -39
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.oximeters.js.map +1 -1
- package/lib/commonjs/modules/bt-management/types/integrated-devices.js +1 -0
- package/lib/commonjs/modules/bt-management/types/integrated-devices.js.map +1 -1
- package/lib/commonjs/modules/bt-management/utils/create-custom-field-parser.js +3 -0
- package/lib/commonjs/modules/bt-management/utils/create-custom-field-parser.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/social-logins/apple-login-button.js +2 -2
- package/lib/module/modules/auth/sign-in/components/social-logins/apple-login-button.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/social-logins/google-login-button.js +2 -2
- package/lib/module/modules/auth/sign-in/components/social-logins/google-login-button.js.map +1 -1
- package/lib/module/modules/bt-device/constants/device-instruction-pdfs.js +2 -1
- package/lib/module/modules/bt-device/constants/device-instruction-pdfs.js.map +1 -1
- package/lib/module/modules/bt-device/constants/supported-device-catalog-assets.js +3 -1
- package/lib/module/modules/bt-device/constants/supported-device-catalog-assets.js.map +1 -1
- package/lib/module/modules/bt-device/constants/supported-devices.js +60 -18
- package/lib/module/modules/bt-device/constants/supported-devices.js.map +1 -1
- package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js +13 -2
- package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
- package/lib/module/modules/bt-management/constants/integrated-devices-map.js +1 -1
- package/lib/module/modules/bt-management/constants/integrated-devices-map.js.map +1 -1
- package/lib/module/modules/bt-management/constants/measurement-field-catalog.js +88 -0
- package/lib/module/modules/bt-management/constants/measurement-field-catalog.js.map +1 -1
- package/lib/module/modules/bt-management/services/bt-manager.js +2 -0
- package/lib/module/modules/bt-management/services/bt-manager.js.map +1 -1
- package/lib/module/modules/bt-management/services/custom/compile-case-fields.js +3 -1
- package/lib/module/modules/bt-management/services/custom/compile-case-fields.js.map +1 -1
- package/lib/module/modules/bt-management/services/custom/compile-custom-case.js +2 -0
- package/lib/module/modules/bt-management/services/custom/compile-custom-case.js.map +1 -1
- package/lib/module/modules/bt-management/services/custom/compile-custom-field.js +2 -1
- package/lib/module/modules/bt-management/services/custom/compile-custom-field.js.map +1 -1
- package/lib/module/modules/bt-management/services/custom/compile-custom-lepu.js +24 -0
- package/lib/module/modules/bt-management/services/custom/compile-custom-lepu.js.map +1 -1
- package/lib/module/modules/bt-management/services/custom/compile-custom-monitor.js +8 -1
- package/lib/module/modules/bt-management/services/custom/compile-custom-monitor.js.map +1 -1
- package/lib/module/modules/bt-management/services/custom/define-custom-device.js +4 -0
- package/lib/module/modules/bt-management/services/custom/define-custom-device.js.map +1 -1
- package/lib/module/modules/bt-management/services/device-creator.js +10 -2
- package/lib/module/modules/bt-management/services/device-creator.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/aoj/aoj.thermometers.js +1 -1
- package/lib/module/modules/bt-management/services/devices/aoj/aoj.thermometers.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js +9 -3
- package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-data-processor.js +5 -0
- package/lib/module/modules/bt-management/services/devices/bt-data-processor.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-device-information.js +37 -0
- package/lib/module/modules/bt-management/services/devices/bt-device-information.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/bt-managed-device.js +30 -2
- package/lib/module/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js +6 -1
- package/lib/module/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/custom/custom.device.js +22 -6
- package/lib/module/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/frame-parser.js +13 -1
- package/lib/module/modules/bt-management/services/devices/frame-parser.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.command-builder.js +6 -3
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.command-builder.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.js +12 -3
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.identity-gate.js +84 -38
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.identity-gate.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.transports.js +11 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.transports.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/spo/oxyfit.device.js +14 -0
- package/lib/module/modules/bt-management/services/devices/spo/oxyfit.device.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js +67 -11
- 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.profile.js +4 -2
- package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/uebe/mysense.device.js +73 -0
- package/lib/module/modules/bt-management/services/devices/uebe/mysense.device.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/uebe/mysense.frame-reader.js +78 -0
- package/lib/module/modules/bt-management/services/devices/uebe/mysense.frame-reader.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/uebe/mysense.sequencer.js +55 -0
- package/lib/module/modules/bt-management/services/devices/uebe/mysense.sequencer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-files.js +17 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-files.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js +4 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.oximeters.js +54 -39
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.oximeters.js.map +1 -1
- package/lib/module/modules/bt-management/types/device-measurement-map.js.map +1 -1
- package/lib/module/modules/bt-management/types/integrated-devices.js +1 -0
- package/lib/module/modules/bt-management/types/integrated-devices.js.map +1 -1
- package/lib/module/modules/bt-management/utils/create-custom-field-parser.js +3 -0
- package/lib/module/modules/bt-management/utils/create-custom-field-parser.js.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/apple-login-button.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/google-login-button.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-device/constants/device-instruction-pdfs.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-assets.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-assets.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-devices.d.ts +10 -1
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-devices.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/constants/integrated-devices-map.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/constants/measurement-field-catalog.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/bt-management/constants/measurement-field-catalog.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts +2 -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/compile-case-fields.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-case.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-field.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-lepu.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-monitor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/custom/define-custom-device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/device-creator.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-connection-handler.d.ts +6 -0
- 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-data-processor.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-data-processor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-device-information.d.ts +11 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-device-information.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts +3 -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/custom/custom-lepu-sequencer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts +3 -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/frame-parser.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/frame-parser.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.command-builder.d.ts +6 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.command-builder.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts +10 -51
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts +6 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/spo/oxyfit.device.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/spo/oxyfit.device.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts +2 -3
- 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.profile.d.ts +4 -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/devices/uebe/mysense.device.d.ts +15 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/uebe/mysense.device.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/uebe/mysense.frame-reader.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/uebe/mysense.frame-reader.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/uebe/mysense.sequencer.d.ts +17 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/uebe/mysense.sequencer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts +4 -7
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/btprovider-children-props.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/btprovider-children-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/command-sequencer.d.ts +2 -0
- 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 +2 -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 +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-definition.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-spec.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-spec.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-field-encoding.d.ts +2 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-field-encoding.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-lepu-spec.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-lepu-spec.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-data.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-data.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-measurement-map.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-measurement-map.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/integrated-devices.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/integrated-devices.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/parsing-case.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/parsing-case.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/utils/create-custom-field-parser.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/apple-login-button.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/google-login-button.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-device/constants/device-instruction-pdfs.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-assets.d.ts +3 -1
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-assets.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-device/constants/supported-devices.d.ts +10 -1
- package/lib/typescript/module/src/modules/bt-device/constants/supported-devices.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/constants/integrated-devices-map.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/constants/measurement-field-catalog.d.ts +4 -0
- package/lib/typescript/module/src/modules/bt-management/constants/measurement-field-catalog.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts +2 -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/compile-case-fields.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-case.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-field.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-lepu.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-monitor.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/custom/define-custom-device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/device-creator.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-connection-handler.d.ts +6 -0
- 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-data-processor.d.ts +2 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-data-processor.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-device-information.d.ts +11 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-device-information.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts +3 -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/custom/custom-lepu-sequencer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts +3 -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/frame-parser.d.ts +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/frame-parser.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.command-builder.d.ts +6 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.command-builder.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts +4 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts +10 -51
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts +6 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/spo/oxyfit.device.d.ts +9 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/spo/oxyfit.device.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts +2 -3
- 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.profile.d.ts +4 -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/devices/uebe/mysense.device.d.ts +15 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/uebe/mysense.device.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/uebe/mysense.frame-reader.d.ts +8 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/uebe/mysense.frame-reader.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/uebe/mysense.sequencer.d.ts +17 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/uebe/mysense.sequencer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts +3 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts +3 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts +4 -7
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/btprovider-children-props.d.ts +2 -0
- package/lib/typescript/module/src/modules/bt-management/types/btprovider-children-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/command-sequencer.d.ts +2 -0
- 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 +2 -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 +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/custom-device-definition.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/custom-device-spec.d.ts +2 -0
- package/lib/typescript/module/src/modules/bt-management/types/custom-device-spec.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/custom-field-encoding.d.ts +2 -1
- package/lib/typescript/module/src/modules/bt-management/types/custom-field-encoding.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/custom-lepu-spec.d.ts +8 -0
- package/lib/typescript/module/src/modules/bt-management/types/custom-lepu-spec.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/device-data.d.ts +2 -0
- package/lib/typescript/module/src/modules/bt-management/types/device-data.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/device-measurement-map.d.ts +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/device-measurement-map.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/integrated-devices.d.ts +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/integrated-devices.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/parsing-case.d.ts +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/parsing-case.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/utils/create-custom-field-parser.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_hexToByte","require","_lepuCommands","_lepuDeviceInfo","_lepuResponseType","COMMAND_INDEX","LepuIdentityGate","isIdentified","isRefused","constructor","params","initialCommands","commandFor","LepuCommand","GET_INFO","nextCommand","frame","undefined","poll","admit","hexToByte","isLepuSuccess","refuse","describeLepuResponseType","info","parseLepuDeviceInfo","onIdentified","pollCommand","isNarrowed","expectedDeviceTypes","length","includes","deviceType","branchCode","reason","onRefused","
|
|
1
|
+
{"version":3,"names":["_hexToByte","require","_lepuCommands","_lepuDeviceInfo","_lepuResponseType","COMMAND_INDEX","VIATOM_OXYGEN_INFO","LepuIdentityGate","isIdentified","isRefused","constructor","params","initialCommands","protocol","command","setClockBeforeInfo","commandFor","oxyClockPayload","pendingCommand","LepuCommand","GET_INFO","nextCommand","frame","nextViatomOxygenCommand","undefined","poll","admit","hexToByte","isLepuSuccess","refuse","describeLepuResponseType","info","parseLepuDeviceInfo","onIdentified","pollCommand","isNarrowed","expectedDeviceTypes","length","includes","deviceType","branchCode","reason","onRefused","payload","delayBeforeWriteMs","write","builder","build","writeWithoutResponse","withoutResponse","status","toString","padStart","parseViatomOxygenDeviceInfo","exports","now","Date","pad","value","String","JSON","stringify","SetTIME","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","Array","from","TextEncoder","encode","text","slice","map","byte","fromCharCode","join","replace","parse","Number","Model","isInteger","protocolMaxLength","Branch","serialNumber","SN","SerialNumber"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.identity-gate.ts"],"mappings":";;;;;;AAEA,IAAAA,UAAA,GAAAC,OAAA;AAGA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AA8BA,MAAMI,aAAa,GAAG,CAAC;AACv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,17 @@ const lepuTransports = exports.lepuTransports = {
|
|
|
110
110
|
const COMMAND_BYTE = 1;
|
|
111
111
|
const lepuDevice = params => {
|
|
112
112
|
const transport = lepuTransports[params.transport ?? "standard"];
|
|
113
|
+
const viatomOxygen = params.protocol === "viatom-oxygen";
|
|
113
114
|
return (0, _defineCustomDevice.defineCustomDevice)({
|
|
114
115
|
id: params.id ?? "lepu-device",
|
|
115
116
|
nameMatch: params.nameMatch,
|
|
117
|
+
matchByService: params.nameMatch === undefined,
|
|
116
118
|
stuckDataTimeoutMs: params.stuckDataTimeoutMs ?? DEFAULT_STUCK_TIMEOUT_MS,
|
|
117
119
|
preferredMtu: transport.preferredMtu,
|
|
118
120
|
lepu: {
|
|
119
|
-
|
|
121
|
+
protocol: params.protocol,
|
|
122
|
+
startBytes: [viatomOxygen ? "55" : START_BYTE],
|
|
123
|
+
requestStartByte: viatomOxygen ? "aa" : START_BYTE,
|
|
120
124
|
write: {
|
|
121
125
|
serviceUuid: transport.serviceUuid,
|
|
122
126
|
characteristicUuid: transport.writeUuid
|
|
@@ -127,6 +131,12 @@ const lepuDevice = params => {
|
|
|
127
131
|
}),
|
|
128
132
|
...(params.pollCommand === undefined ? {} : {
|
|
129
133
|
pollCommand: params.pollCommand
|
|
134
|
+
}),
|
|
135
|
+
...(params.writeWithoutResponse === undefined ? {} : {
|
|
136
|
+
writeWithoutResponse: params.writeWithoutResponse
|
|
137
|
+
}),
|
|
138
|
+
...(params.setClockBeforeInfo === undefined ? {} : {
|
|
139
|
+
setClockBeforeInfo: params.setClockBeforeInfo
|
|
130
140
|
})
|
|
131
141
|
},
|
|
132
142
|
services: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_defineCustomDevice","require","STANDARD_SERVICE","STANDARD_WRITE","STANDARD_NOTIFY","AW1_SERVICE","AW1_WRITE","AW1_NOTIFY","DING_SERVICE","DING_WRITE","DING_NOTIFY","AI_TELE_SERVICE","AI_TELE_WRITE","AI_TELE_NOTIFY","PREFERRED_MTU","MINIMUM_MTU","DEFAULT_STUCK_TIMEOUT_MS","START_BYTE","lepuTransports","exports","standard","serviceUuid","notifyUuid","writeUuid","preferredMtu","standardSmallMtu","aw1","ding","aiTele","COMMAND_BYTE","lepuDevice","params","transport","defineCustomDevice","id","nameMatch","stuckDataTimeoutMs","lepu","startBytes","write","characteristicUuid","expectedDeviceTypes","fileTransfer","
|
|
1
|
+
{"version":3,"names":["_defineCustomDevice","require","STANDARD_SERVICE","STANDARD_WRITE","STANDARD_NOTIFY","AW1_SERVICE","AW1_WRITE","AW1_NOTIFY","DING_SERVICE","DING_WRITE","DING_NOTIFY","AI_TELE_SERVICE","AI_TELE_WRITE","AI_TELE_NOTIFY","PREFERRED_MTU","MINIMUM_MTU","DEFAULT_STUCK_TIMEOUT_MS","START_BYTE","lepuTransports","exports","standard","serviceUuid","notifyUuid","writeUuid","preferredMtu","standardSmallMtu","aw1","ding","aiTele","COMMAND_BYTE","lepuDevice","params","transport","viatomOxygen","protocol","defineCustomDevice","id","nameMatch","matchByService","undefined","stuckDataTimeoutMs","lepu","startBytes","requestStartByte","write","characteristicUuid","expectedDeviceTypes","fileTransfer","pollCommand","writeWithoutResponse","setClockBeforeInfo","services","uuid","monitor","frame","minLengthBytes","caseSelectorBytes","cases"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.transports.ts"],"mappings":";;;;;;AAEA,IAAAA,mBAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,gBAAgB,GAAG,sCAAsC;AAC/D,MAAMC,cAAc,GAAG,sCAAsC;AAC7D,MAAMC,eAAe,GAAG,sCAAsC;;AAE9D;AACA,MAAMC,WAAW,GAAG,sCAAsC;AAC1D,MAAMC,SAAS,GAAG,sCAAsC;AAC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kB,KAAKX,SAAS,GACvC,CAAC,CAAC,GACF;QAAEW,kBAAkB,EAAEnB,MAAM,CAACmB;MAAmB,CAAC;IACvD,CAAC;IACDC,QAAQ,EAAE,CACR;MACEC,IAAI,EAAEpB,SAAS,CAACX,WAAW;MAC3BgC,OAAO,EAAE,CACP;QACED,IAAI,EAAEpB,SAAS,CAACV,UAAU;QAC1BgC,KAAK,EAAE;UAAEC,cAAc,EAAExB,MAAM,CAACwB;QAAe,CAAC;QAChDC,iBAAiB,EAAEzB,MAAM,CAACyB,iBAAiB,IAAI,CAAC3B,YAAY,CAAC;QAC7D4B,KAAK,EAAE1B,MAAM,CAAC0B;MAChB,CAAC;IAEL,CAAC;EAEL,CAAC,CAAC;AACJ,CAAC;AAACtC,OAAA,CAAAW,UAAA,GAAAA,UAAA","ignoreList":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.OxyfitDevice = void 0;
|
|
7
|
+
var _customDevice = require("../custom/custom.device.js");
|
|
8
|
+
var _viatomOximeters = require("../viatom/viatom.oximeters.js");
|
|
9
|
+
/** Keeps the legacy IntegratedDevices.SPO2 entry on the working Viatom protocol. */
|
|
10
|
+
class OxyfitDevice extends _customDevice.CustomDevice {
|
|
11
|
+
constructor(device, params) {
|
|
12
|
+
super(device, params, (0, _viatomOximeters.viatomOximeter)("Oxyfit", {
|
|
13
|
+
id: "integrated-oxyfit"
|
|
14
|
+
}));
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.OxyfitDevice = OxyfitDevice;
|
|
18
|
+
//# sourceMappingURL=oxyfit.device.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_customDevice","require","_viatomOximeters","OxyfitDevice","CustomDevice","constructor","device","params","viatomOximeter","id","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/spo/oxyfit.device.ts"],"mappings":";;;;;;AAKA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AAEA;AACO,MAAME,YAAY,SAASC,0BAAY,CAAC;EACtCC,WAAWA,CAChBC,MAAc,EACdC,MAAkD,EAClD;IACA,KAAK,CACHD,MAAM,EACNC,MAAM,EACN,IAAAC,+BAAc,EAAC,QAAQ,EAAE;MAAEC,EAAE,EAAE;IAAoB,CAAC,CACtD,CAAC;EACH;AACF;AAACC,OAAA,CAAAP,YAAA,GAAAA,YAAA","ignoreList":[]}
|
package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js
CHANGED
|
@@ -6,6 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.standardWeightScaleDevice = exports.standardThermometerDevice = exports.standardPulseOximeterDevice = exports.standardHeartRateDevice = exports.standardBloodPressureDevice = void 0;
|
|
7
7
|
var _core = require("@ovok/core");
|
|
8
8
|
var _standardGattProfile = require("./standard-gatt.profile.js");
|
|
9
|
+
/* eslint-disable max-lines */
|
|
10
|
+
|
|
9
11
|
/**
|
|
10
12
|
* Declarations for the Bluetooth SIG vital-signs profiles.
|
|
11
13
|
*
|
|
@@ -73,9 +75,35 @@ const standardThermometerDevice = params => (0, _standardGattProfile.declareProf
|
|
|
73
75
|
characteristic: "2a1c",
|
|
74
76
|
minLengthBytes: 5,
|
|
75
77
|
measurementTypeKey: _core.MeasurementTypeKey.temperature,
|
|
76
|
-
/**
|
|
77
|
-
selectors: ["00", "02"],
|
|
78
|
-
fields: [(0, _standardGattProfile.littleEndian)("bodyTemp", [1, 2, 3, 4], "Cel", "float")]
|
|
78
|
+
/** All combinations of Fahrenheit, timestamp and temperature type flags. */
|
|
79
|
+
selectors: ["00", "02", "04", "06", "01", "03", "05", "07"],
|
|
80
|
+
fields: [(0, _standardGattProfile.littleEndian)("bodyTemp", [1, 2, 3, 4], "Cel", "float")],
|
|
81
|
+
fieldsBySelector: {
|
|
82
|
+
"01": [{
|
|
83
|
+
...(0, _standardGattProfile.littleEndian)("bodyTemp", [1, 2, 3, 4], "Cel", "float"),
|
|
84
|
+
scale: 5 / 9,
|
|
85
|
+
offset: -160 / 9,
|
|
86
|
+
decimals: 2
|
|
87
|
+
}],
|
|
88
|
+
"03": [{
|
|
89
|
+
...(0, _standardGattProfile.littleEndian)("bodyTemp", [1, 2, 3, 4], "Cel", "float"),
|
|
90
|
+
scale: 5 / 9,
|
|
91
|
+
offset: -160 / 9,
|
|
92
|
+
decimals: 2
|
|
93
|
+
}],
|
|
94
|
+
"05": [{
|
|
95
|
+
...(0, _standardGattProfile.littleEndian)("bodyTemp", [1, 2, 3, 4], "Cel", "float"),
|
|
96
|
+
scale: 5 / 9,
|
|
97
|
+
offset: -160 / 9,
|
|
98
|
+
decimals: 2
|
|
99
|
+
}],
|
|
100
|
+
"07": [{
|
|
101
|
+
...(0, _standardGattProfile.littleEndian)("bodyTemp", [1, 2, 3, 4], "Cel", "float"),
|
|
102
|
+
scale: 5 / 9,
|
|
103
|
+
offset: -160 / 9,
|
|
104
|
+
decimals: 2
|
|
105
|
+
}]
|
|
106
|
+
}
|
|
79
107
|
});
|
|
80
108
|
|
|
81
109
|
/** The SI weight resolution the specification fixes at five grams per count. */
|
|
@@ -92,13 +120,25 @@ const standardWeightScaleDevice = params => (0, _standardGattProfile.declareProf
|
|
|
92
120
|
characteristic: "2a9d",
|
|
93
121
|
minLengthBytes: 3,
|
|
94
122
|
measurementTypeKey: _core.MeasurementTypeKey.bodyWeight,
|
|
95
|
-
/**
|
|
96
|
-
selectors:
|
|
123
|
+
/** Unit, timestamp, user-id and BMI/height flags may all follow the value. */
|
|
124
|
+
selectors: Array.from({
|
|
125
|
+
length: 16
|
|
126
|
+
}, (_, flags) => flags.toString(16).padStart(2, "0")),
|
|
97
127
|
fields: [{
|
|
98
128
|
...(0, _standardGattProfile.littleEndian)("bodyWeight", [1, 2], "kg", "uint"),
|
|
99
129
|
scale: WEIGHT_KG_PER_COUNT,
|
|
100
130
|
decimals: 3
|
|
101
|
-
}]
|
|
131
|
+
}],
|
|
132
|
+
fieldsBySelector: Object.fromEntries(Array.from({
|
|
133
|
+
length: 16
|
|
134
|
+
}, (_, flags) => {
|
|
135
|
+
const selector = flags.toString(16).padStart(2, "0");
|
|
136
|
+
return [selector, [{
|
|
137
|
+
...(0, _standardGattProfile.littleEndian)("bodyWeight", [1, 2], "kg", "uint"),
|
|
138
|
+
scale: flags & 1 ? 0.01 * 0.45359237 : WEIGHT_KG_PER_COUNT,
|
|
139
|
+
decimals: 3
|
|
140
|
+
}]];
|
|
141
|
+
}))
|
|
102
142
|
});
|
|
103
143
|
|
|
104
144
|
/**
|
|
@@ -120,9 +160,8 @@ const standardPulseOximeterDevice = params => (0, _standardGattProfile.declarePr
|
|
|
120
160
|
/**
|
|
121
161
|
* Heart Rate Service 0x180D, Heart Rate Measurement 0x2A37.
|
|
122
162
|
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
* is left out rather than made to displace it.
|
|
163
|
+
* Both heart-rate layouts are declared. A contact-not-detected frame is idle, so it cannot
|
|
164
|
+
* become a false reading while the strap is off the body.
|
|
126
165
|
*/
|
|
127
166
|
exports.standardPulseOximeterDevice = standardPulseOximeterDevice;
|
|
128
167
|
const standardHeartRateDevice = params => (0, _standardGattProfile.declareProfile)(params, {
|
|
@@ -130,13 +169,30 @@ const standardHeartRateDevice = params => (0, _standardGattProfile.declareProfil
|
|
|
130
169
|
characteristic: "2a37",
|
|
131
170
|
minLengthBytes: 2,
|
|
132
171
|
measurementTypeKey: _core.MeasurementTypeKey.heartRate,
|
|
133
|
-
selectors:
|
|
172
|
+
selectors: Array.from({
|
|
173
|
+
length: 32
|
|
174
|
+
}, (_, flags) => flags).filter(flags => (flags & 0x06) !== 0x04).map(flags => flags.toString(16).padStart(2, "0")),
|
|
134
175
|
fields: [{
|
|
135
176
|
name: "heartRate",
|
|
136
177
|
byteIndexes: [1],
|
|
137
178
|
encoding: "uint",
|
|
138
179
|
unit: "bpm"
|
|
139
|
-
}]
|
|
180
|
+
}],
|
|
181
|
+
fieldsBySelector: Object.fromEntries(Array.from({
|
|
182
|
+
length: 32
|
|
183
|
+
}, (_, flags) => flags).filter(flags => (flags & 0x01) === 0x01).filter(flags => (flags & 0x06) !== 0x04).map(flags => [flags.toString(16).padStart(2, "0"), [{
|
|
184
|
+
name: "heartRate",
|
|
185
|
+
byteIndexes: [1, 2],
|
|
186
|
+
byteOrder: "little",
|
|
187
|
+
encoding: "uint",
|
|
188
|
+
unit: "bpm"
|
|
189
|
+
}]])),
|
|
190
|
+
optionalFields: Object.fromEntries(Array.from({
|
|
191
|
+
length: 32
|
|
192
|
+
}, (_, flags) => flags).filter(flags => (flags & 0x01) === 0x01).filter(flags => (flags & 0x06) !== 0x04).map(flags => [flags.toString(16).padStart(2, "0"), {
|
|
193
|
+
fields: [],
|
|
194
|
+
minLengthBytes: 3
|
|
195
|
+
}]))
|
|
140
196
|
});
|
|
141
197
|
exports.standardHeartRateDevice = standardHeartRateDevice;
|
|
142
198
|
//# sourceMappingURL=standard-gatt.devices.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_core","require","_standardGattProfile","pulseAfterMeanPressure","fields","littleEndian","minLengthBytes","pulseAfterTimestamp","standardBloodPressureDevice","params","declareProfile","service","characteristic","measurementTypeKey","MeasurementTypeKey","bloodPressure","selectors","optionalFields","exports","standardThermometerDevice","temperature","WEIGHT_KG_PER_COUNT","standardWeightScaleDevice","bodyWeight","
|
|
1
|
+
{"version":3,"names":["_core","require","_standardGattProfile","pulseAfterMeanPressure","fields","littleEndian","minLengthBytes","pulseAfterTimestamp","standardBloodPressureDevice","params","declareProfile","service","characteristic","measurementTypeKey","MeasurementTypeKey","bloodPressure","selectors","optionalFields","exports","standardThermometerDevice","temperature","fieldsBySelector","scale","offset","decimals","WEIGHT_KG_PER_COUNT","standardWeightScaleDevice","bodyWeight","Array","from","length","_","flags","toString","padStart","Object","fromEntries","selector","standardPulseOximeterDevice","bloodOxygenPulseRate","standardHeartRateDevice","heartRate","filter","map","name","byteIndexes","encoding","unit","byteOrder"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.ts"],"mappings":";;;;;;AAEA,IAAAA,KAAA,GAAAC,OAAA;AAIA,IAAAC,oBAAA,GAAAD,OAAA;AANA;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAME,sBAAsB,GAAG;EAC7BC,MAAM,EAAE,CAAC,IAAAC,iCAAY,EAAC,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;EAC5DC,cAAc,EAAE;AAClB,CAAC;;AAED;AACA,MAAMC,mBAAmB,GAAG;EAC1BH,MAAM,EAAE,CAAC,IAAAC,iCAAY,EAAC,WAAW,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;EAC9DC,cAAc,EAAE;AAClB,CAAC;AAED,MAAME,2BAA2B,GAC/BC,MAA4B,IAE5B,IAAAC,mCAAc,EAACD,MAAM,EAAE;EACrBE,OAAO,EAAE,MAAM;EACfC,cAAc,EAAE,MAAM;EACtBN,cAAc,EAAE,CAAC;EACjBO,kBAAkB,EAAEC,wBAAkB,CAACC,aAAa;EAEpD;EACAC,SAAS,EAAE,CACT,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,CACL;EACDZ,MAAM,EAAE,CACN,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GAAG,IAAI,MAAM,IAAI,CAAC,CAC1CW,GAAG,CAAEX,KAAK,IAAK,CACdA,KAAK,CAACC,QAAQ,CAAC,EAAE,CAAC,CAACC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EACnC,CACE;IACEU,IAAI,EAAE,WAAW;IACjBC,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IACnBG,SAAS,EAAE,QAAiB;IAC5BF,QAAQ,EAAE,MAAe;IACzBC,IAAI,EAAE;EACR,CAAC,CACF,CACF,CACL,CAAC;EACD9B,cAAc,EAAEkB,MAAM,CAACC,WAAW,CAChCR,KAAK,CAACC,IAAI,CAAC;IAAEC,MAAM,EAAE;EAAG,CAAC,EAAE,CAACC,CAAC,EAAEC,KAAK,KAAKA,KAAK,CAAC,CAC5CU,MAAM,CAAEV,KAAK,IAAK,CAACA,KAAK,GAAG,IAAI,MAAM,IAAI,CAAC,CAC1CU,MAAM,CAAEV,KAAK,IAAK,CAACA,KAAK,GAAG,IAAI,MAAM,IAAI,CAAC,CAC1CW,GAAG,CAAEX,KAAK,IAAK,CAACA,KAAK,CAACC,QAAQ,CAAC,EAAE,CAAC,CAACC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE;IACpD9B,MAAM,EAAE,EAAE;IACVE,cAAc,EAAE;EAClB,CAAC,CAAC,CACN;AACF,CAAC,CAAC;AAACY,OAAA,CAAAsB,uBAAA,GAAAA,uBAAA","ignoreList":[]}
|
package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js
CHANGED
|
@@ -19,7 +19,8 @@ exports.sigUuid = sigUuid;
|
|
|
19
19
|
const declareProfile = (params, profile) => (0, _defineCustomDevice.defineCustomDevice)({
|
|
20
20
|
id: params.id ?? `standard-${profile.measurementTypeKey}`,
|
|
21
21
|
nameMatch: params.nameMatch,
|
|
22
|
-
matchByService:
|
|
22
|
+
matchByService: params.nameMatch === undefined,
|
|
23
|
+
oneReadingPerConnection: params.oneReadingPerConnection,
|
|
23
24
|
stuckDataTimeoutMs: params.stuckDataTimeoutMs ?? SPOT_CHECK_TIMEOUT_MS,
|
|
24
25
|
services: [{
|
|
25
26
|
uuid: sigUuid(profile.service),
|
|
@@ -31,11 +32,12 @@ const declareProfile = (params, profile) => (0, _defineCustomDevice.defineCustom
|
|
|
31
32
|
caseSelectorBytes: [0],
|
|
32
33
|
cases: profile.selectors.map(selector => {
|
|
33
34
|
const optional = profile.optionalFields?.[selector];
|
|
35
|
+
const fields = profile.fieldsBySelector?.[selector] ?? profile.fields;
|
|
34
36
|
return {
|
|
35
37
|
selector,
|
|
36
38
|
kind: "result",
|
|
37
39
|
measurementTypeKey: profile.measurementTypeKey,
|
|
38
|
-
fields: [...
|
|
40
|
+
fields: [...fields, ...(optional?.fields ?? [])],
|
|
39
41
|
...(optional ? {
|
|
40
42
|
minLengthBytes: optional.minLengthBytes
|
|
41
43
|
} : {})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_defineCustomDevice","require","SPOT_CHECK_TIMEOUT_MS","sigUuid","assigned","exports","declareProfile","params","profile","defineCustomDevice","id","measurementTypeKey","nameMatch","matchByService","stuckDataTimeoutMs","services","uuid","service","monitor","characteristic","frame","minLengthBytes","caseSelectorBytes","cases","selectors","map","selector","optional","optionalFields","
|
|
1
|
+
{"version":3,"names":["_defineCustomDevice","require","SPOT_CHECK_TIMEOUT_MS","sigUuid","assigned","exports","declareProfile","params","profile","defineCustomDevice","id","measurementTypeKey","nameMatch","matchByService","undefined","oneReadingPerConnection","stuckDataTimeoutMs","services","uuid","service","monitor","characteristic","frame","minLengthBytes","caseSelectorBytes","cases","selectors","map","selector","optional","optionalFields","fields","fieldsBySelector","kind","littleEndian","name","byteIndexes","unit","encoding","byteOrder"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.ts"],"mappings":";;;;;;AAIA,IAAAA,mBAAA,GAAAC,OAAA;AAEA;AACA,MAAMC,qB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ACR;YAAEN,cAAc,EAAEM,QAAQ,CAACN;UAAe,CAAC,GAC3C,CAAC,CAAC;QACR,CAAC;MACH,CAAC;IACH,CAAC;EAEL,CAAC;AAEL,CAAC,CAAC;AAAClB,OAAA,CAAAC,cAAA,GAAAA,cAAA;AAEL,MAAM4B,YAAY,GAAGA,CACnBC,IAAY,EACZC,WAAqB,EACrBC,IAAY,EACZC,QAAqC,MAChB;EACrBH,IAAI;EACJC,WAAW;EACXG,SAAS,EAAE,QAAQ;EACnBD,QAAQ;EACRD;AACF,CAAC,CAAC;AAAChC,OAAA,CAAA6B,YAAA,GAAAA,YAAA","ignoreList":[]}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.MySenseDevice = void 0;
|
|
7
|
+
var _core = require("@ovok/core");
|
|
8
|
+
var _defineCustomDevice = require("../../custom/define-custom-device.js");
|
|
9
|
+
var _customDevice = require("../custom/custom.device.js");
|
|
10
|
+
var _mysenseFrameReader = require("./mysense.frame-reader.js");
|
|
11
|
+
var _mysenseSequencer = require("./mysense.sequencer.js");
|
|
12
|
+
const SERVICE = "0000fff0-0000-1000-8000-00805f9b34fb";
|
|
13
|
+
const NOTIFY = "0000fff1-0000-1000-8000-00805f9b34fb";
|
|
14
|
+
const definition = (0, _defineCustomDevice.defineCustomDevice)({
|
|
15
|
+
id: "cyclotest-mysense",
|
|
16
|
+
nameMatch: "mySense",
|
|
17
|
+
stuckDataTimeoutMs: 30_000,
|
|
18
|
+
services: [{
|
|
19
|
+
uuid: SERVICE,
|
|
20
|
+
monitor: [{
|
|
21
|
+
uuid: NOTIFY,
|
|
22
|
+
frame: {
|
|
23
|
+
minLengthBytes: 17
|
|
24
|
+
},
|
|
25
|
+
caseSelectorBytes: [4],
|
|
26
|
+
cases: [{
|
|
27
|
+
selector: "a1",
|
|
28
|
+
kind: "idle",
|
|
29
|
+
minLengthBytes: 20,
|
|
30
|
+
description: "mySense greeting"
|
|
31
|
+
}, {
|
|
32
|
+
selector: "a3",
|
|
33
|
+
kind: "result",
|
|
34
|
+
minLengthBytes: 17,
|
|
35
|
+
repeatedRecords: {
|
|
36
|
+
recordBytes: 9,
|
|
37
|
+
from: 8
|
|
38
|
+
},
|
|
39
|
+
measurementTypeKey: _core.MeasurementTypeKey.temperature,
|
|
40
|
+
description: "mySense stored temperature history",
|
|
41
|
+
fields: [{
|
|
42
|
+
name: "bodyTemp",
|
|
43
|
+
byteIndexes: [5, 6],
|
|
44
|
+
encoding: "decimal-pair",
|
|
45
|
+
unit: "Cel",
|
|
46
|
+
decimals: 2
|
|
47
|
+
}]
|
|
48
|
+
}]
|
|
49
|
+
}]
|
|
50
|
+
}]
|
|
51
|
+
});
|
|
52
|
+
class MySenseDevice extends _customDevice.CustomDevice {
|
|
53
|
+
reportedHistory = false;
|
|
54
|
+
constructor(device, params) {
|
|
55
|
+
super(device, params, definition);
|
|
56
|
+
this.frameReader = new _mysenseFrameReader.MySenseFrameReader();
|
|
57
|
+
this.createCommandSequencer = () => {
|
|
58
|
+
this.reportedHistory = false;
|
|
59
|
+
return new _mysenseSequencer.MySenseSequencer({
|
|
60
|
+
onGreeting: frame => {
|
|
61
|
+
this.deviceData.sn = frame.slice(5, 11).join(":");
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
shouldReportDependentResult = data => {
|
|
67
|
+
if (data.parsingCase.caseValue !== "a3") {
|
|
68
|
+
return true;
|
|
69
|
+
}
|
|
70
|
+
if (this.reportedHistory) {
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
this.reportedHistory = true;
|
|
74
|
+
return true;
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
exports.MySenseDevice = MySenseDevice;
|
|
78
|
+
//# sourceMappingURL=mysense.device.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_core","require","_defineCustomDevice","_customDevice","_mysenseFrameReader","_mysenseSequencer","SERVICE","NOTIFY","definition","defineCustomDevice","id","nameMatch","stuckDataTimeoutMs","services","uuid","monitor","frame","minLengthBytes","caseSelectorBytes","cases","selector","kind","description","repeatedRecords","recordBytes","from","measurementTypeKey","MeasurementTypeKey","temperature","fields","name","byteIndexes","encoding","unit","decimals","MySenseDevice","CustomDevice","reportedHistory","constructor","device","params","frameReader","MySenseFrameReader","createCommandSequencer","MySenseSequencer","onGreeting","deviceData","sn","slice","join","shouldReportDependentResult","data","parsingCase","caseValue","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/uebe/mysense.device.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAQA,IAAAC,mBAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AAEA,IAAAG,mBAAA,GAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAJ,OAAA;AAEA,MAAMK,OAAO,GAAG,sCAAsC;AACtD,MAAMC,MAAM,GAAG,sCAAsC;AAMrD,MAAMC,UAAU,GAAG,IAAAC,sCAAkB,EAAC;EACpCC,EAAE,EAAE,mBAAmB;EACvBC,SAAS,EAAE,SAAS;EACpBC,kBAAkB,EAAE,MAAM;EAC1BC,QAAQ,EAAE,CACR;IACEC,IAAI,EAAER,OAAO;IACbS,OAAO,EAAE,CACP;MACED,IAAI,EAAEP,MAAM;MACZS,KAAK,EAAE;QAAEC,cAAc,EAAE;MAAG,CAAC;MAC7BC,iBAAiB,EAAE,CAAC,CAAC,CAAC;MACtBC,KAAK,EAAE,CACL;QACEC,QAAQ,EAAE,IAAI;QACdC,IAAI,EAAE,MAAM;QACZJ,cAAc,EAAE,EAAE;QAClBK,WAAW,EAAE;MACf,CAAC,EACD;QACEF,QAAQ,EAAE,IAAI;QACdC,IAAI,EAAE,QAAQ;QACdJ,cAAc,EAAE,EAAE;QAClBM,eAAe,EAA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|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.MySenseFrameReader = void 0;
|
|
7
|
+
var _frameReadStatus = require("../../../types/frame-read-status.js");
|
|
8
|
+
var _hexToByte = require("../../../utils/hex-to-byte.js");
|
|
9
|
+
const START = "4d";
|
|
10
|
+
const HEADER_BYTES = 4;
|
|
11
|
+
const MAX_FRAME_BYTES = 512;
|
|
12
|
+
const A3 = 0xa3;
|
|
13
|
+
const byteAt = (frame, index) => (0, _hexToByte.hexToByte)(frame[index] ?? "0");
|
|
14
|
+
|
|
15
|
+
/** Reads mySense frames by their big-endian length, independent of notification boundaries. */
|
|
16
|
+
class MySenseFrameReader {
|
|
17
|
+
readFrame(buffer) {
|
|
18
|
+
const start = buffer.findIndex(byte => byte.toLowerCase() === START);
|
|
19
|
+
if (start === -1) {
|
|
20
|
+
return {
|
|
21
|
+
status: _frameReadStatus.FrameReadStatus.INCOMPLETE,
|
|
22
|
+
consumedBytes: Math.max(0, buffer.length - 1)
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
if (start + HEADER_BYTES > buffer.length) {
|
|
26
|
+
return {
|
|
27
|
+
status: _frameReadStatus.FrameReadStatus.INCOMPLETE,
|
|
28
|
+
consumedBytes: start
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
const payloadLength = byteAt(buffer, start + 2) << 8 | byteAt(buffer, start + 3);
|
|
32
|
+
const frameLength = HEADER_BYTES + payloadLength;
|
|
33
|
+
if (payloadLength < 2 || frameLength > MAX_FRAME_BYTES) {
|
|
34
|
+
return {
|
|
35
|
+
status: _frameReadStatus.FrameReadStatus.CORRUPT,
|
|
36
|
+
consumedBytes: start + 1
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
if (start + frameLength > buffer.length) {
|
|
40
|
+
return {
|
|
41
|
+
status: _frameReadStatus.FrameReadStatus.INCOMPLETE,
|
|
42
|
+
consumedBytes: start
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
const frame = buffer.slice(start, start + frameLength);
|
|
46
|
+
if (!this.isValid(frame)) {
|
|
47
|
+
return {
|
|
48
|
+
status: _frameReadStatus.FrameReadStatus.CORRUPT,
|
|
49
|
+
consumedBytes: start + 1
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
status: _frameReadStatus.FrameReadStatus.COMPLETE,
|
|
54
|
+
consumedBytes: start + frameLength,
|
|
55
|
+
frame
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
isValid(frame) {
|
|
59
|
+
const declared = byteAt(frame, frame.length - 1);
|
|
60
|
+
const actual = frame.slice(0, -1).reduce((sum, _, index, bytes) => sum + byteAt(bytes, index) & 0xff, 0);
|
|
61
|
+
if (declared !== actual) {
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
if (byteAt(frame, 4) !== A3) {
|
|
65
|
+
return true;
|
|
66
|
+
}
|
|
67
|
+
const count = byteAt(frame, 6) << 8 | byteAt(frame, 7);
|
|
68
|
+
const recordsStart = 8;
|
|
69
|
+
if (frame.length !== recordsStart + count * 9 + 1) {
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
for (let record = 0; record < count; record++) {
|
|
73
|
+
const from = recordsStart + record * 9;
|
|
74
|
+
const recordSum = frame.slice(from, from + 8).reduce((sum, _, index, bytes) => sum + byteAt(bytes, index) & 0xff, 0);
|
|
75
|
+
if (recordSum !== byteAt(frame, from + 8)) {
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return true;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
exports.MySenseFrameReader = MySenseFrameReader;
|
|
83
|
+
//# sourceMappingURL=mysense.frame-reader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_frameReadStatus","require","_hexToByte","START","HEADER_BYTES","MAX_FRAME_BYTES","A3","byteAt","frame","index","hexToByte","MySenseFrameReader","readFrame","buffer","start","findIndex","byte","toLowerCase","status","FrameReadStatus","INCOMPLETE","consumedBytes","Math","max","length","payloadLength","frameLength","CORRUPT","slice","isValid","COMPLETE","declared","actual","reduce","sum","_","bytes","count","recordsStart","record","from","recordSum","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/uebe/mysense.frame-reader.ts"],"mappings":";;;;;;AACA,IAAAA,gBAAA,GAAAC,OAAA;AAEA,IAAAC,UAAA,GAAAD,OAAA;AAEA,MAAME,KAAK,GAAG,IAAI;AAClB,MAAMC,YAAY,GAAG,CAAC;AACtB,MAAMC,eAAe,GAAG,GAAG;AAC3B,MAAMC,EAAE,GAAG,IAAI;AAEf,MAAMC,MAAM,GAAGA,CAACC,KAAwB,EAAEC,KAAa,KACrD,IAAAC,oBAAS,EAACF,KAAK,CAACC,KAAK,CAAC,IAAI,GAAG,CAAC;;AAEhC;AACO,MAAME,kBAAkB,CAAwB;EAC9CC,SAASA,CAACC,MAAyB,EAAmB;IAC3D,MAAMC,KAAK,GAAGD,MAAM,CAACE,SAAS,CAAEC,IAAI,IAAKA,IAAI,CAACC,WAAW,CAAC,CAAC,KAAKd,KAAK,CAAC;IAEtE,IAAIW,KAAK,KAAK,CAAC,CAAC,EAAE;MAChB,OAAO;QACLI,MAAM,EAAEC,gCAAe,CAACC,UAAU;QAClCC,aAAa,EAAEC,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEV,MAAM,CAACW,MAAM,GAAG,CAAC;MAC9C,CAAC;IACH;IAEA,IAAIV,KAAK,GAAGV,YAAY,GAAGS,MAAM,CAACW,MAAM,EAAE;MACxC,OAAO;QAAEN,MAAM,EAAEC,gCAAe,CAACC,UAAU;QAAEC,aAAa,EAAEP;MAAM,CAAC;IACrE;IAEA,MAAMW,aAAa,GAAIlB,MAAM,CAACM,MAAM,EAAEC,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,GAAIP,MAA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AEA,IAAIzB,MAAM,CAACC,KAAK,EAAE,CAAC,CAAC,KAAKF,EAAE,EAAE;MAC3B,OAAO,IAAI;IACb;IAEA,MAAM+B,KAAK,GAAI9B,MAAM,CAACC,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,GAAID,MAAM,CAACC,KAAK,EAAE,CAAC,CAAC;IACxD,MAAM8B,YAAY,GAAG,CAAC;IAEtB,IAAI9B,KAAK,CAACgB,MAAM,KAAKc,YAAY,GAAGD,KAAK,GAAG,CAAC,GAAG,CAAC,EAAE;MACjD,OAAO,KAAK;IACd;IAEA,KAAK,IAAIE,MAAM,GAAG,CAAC,EAAEA,MAAM,GAAGF,KAAK,EAAEE,MAAM,EAAE,EAAE;MAC7C,MAAMC,IAAI,GAAGF,YAAY,GAAGC,MAAM,GAAG,CAAC;MAEtC,MAAME,SAAS,GAAGjC,KAAK,CACpBoB,KAAK,CAACY,IAAI,EAAEA,IAAI,GAAG,CAAC,CAAC,CACrBP,MAAM,CAAC,CAACC,GAAG,EAAEC,CAAC,EAAE1B,KAAK,EAAE2B,KAAK,KAAMF,GAAG,GAAG3B,MAAM,CAAC6B,KAAK,EAAE3B,KAAK,CAAC,GAAI,IAAI,EAAE,CAAC,CAAC;MAE3E,IAAIgC,SAAS,KAAKlC,MAAM,CAACC,KAAK,EAAEgC,IAAI,GAAG,CAAC,CAAC,EAAE;QACzC,OAAO,KAAK;MACd;IACF;IAEA,OAAO,IAAI;EACb;AACF;AAACE,OAAA,CAAA/B,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.MySenseSequencer = void 0;
|
|
7
|
+
var _hexToByte = require("../../../utils/hex-to-byte.js");
|
|
8
|
+
const SERVICE = "0000fff0-0000-1000-8000-00805f9b34fb";
|
|
9
|
+
const WRITE = "0000fff2-0000-1000-8000-00805f9b34fb";
|
|
10
|
+
const START = 0x4d;
|
|
11
|
+
const DEVICE_ROLE = 0x61;
|
|
12
|
+
const APP_ROLE = 0xfc;
|
|
13
|
+
const REQUEST = 0xa1;
|
|
14
|
+
const HISTORY = 0xa3;
|
|
15
|
+
const byte = value => (value & 0xff).toString(16).padStart(2, "0");
|
|
16
|
+
const frameFor = (role, opcode, data) => {
|
|
17
|
+
const length = 1 + data.length + 1;
|
|
18
|
+
const frame = [START, role, length >> 8 & 0xff, length & 0xff, opcode, ...data];
|
|
19
|
+
const sum = frame.reduce((total, value) => total + value & 0xff, 0);
|
|
20
|
+
return [...frame, sum].map(byte);
|
|
21
|
+
};
|
|
22
|
+
const nowData = () => {
|
|
23
|
+
const now = new Date();
|
|
24
|
+
return [now.getFullYear() % 100, now.getMonth() + 1, now.getDate(), now.getHours(), now.getMinutes(), 0x0f];
|
|
25
|
+
};
|
|
26
|
+
/** Answers the greeting, then acknowledges each valid history frame exactly once. */
|
|
27
|
+
class MySenseSequencer {
|
|
28
|
+
normalDisconnect = false;
|
|
29
|
+
constructor(params) {
|
|
30
|
+
this.params = params;
|
|
31
|
+
}
|
|
32
|
+
initialCommands = () => [];
|
|
33
|
+
nextCommand = frame => {
|
|
34
|
+
if ((0, _hexToByte.hexToByte)(frame[0] ?? "0") !== START || (0, _hexToByte.hexToByte)(frame[1] ?? "0") !== DEVICE_ROLE) {
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
37
|
+
switch ((0, _hexToByte.hexToByte)(frame[4] ?? "0")) {
|
|
38
|
+
case REQUEST:
|
|
39
|
+
this.params.onGreeting(frame);
|
|
40
|
+
this.normalDisconnect = true;
|
|
41
|
+
return [this.commandFor(frameFor(APP_ROLE, REQUEST, nowData()))];
|
|
42
|
+
case HISTORY:
|
|
43
|
+
{
|
|
44
|
+
const count = (0, _hexToByte.hexToByte)(frame[6] ?? "0") << 8 | (0, _hexToByte.hexToByte)(frame[7] ?? "0");
|
|
45
|
+
this.normalDisconnect = true;
|
|
46
|
+
return [this.commandFor(frameFor(APP_ROLE, HISTORY, [count >> 8, count & 0xff]))];
|
|
47
|
+
}
|
|
48
|
+
default:
|
|
49
|
+
return undefined;
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
isNormalDisconnect = () => this.normalDisconnect;
|
|
53
|
+
commandFor = frame => ({
|
|
54
|
+
serviceUuid: SERVICE,
|
|
55
|
+
characteristicUuid: WRITE,
|
|
56
|
+
frame
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
exports.MySenseSequencer = MySenseSequencer;
|
|
60
|
+
//# sourceMappingURL=mysense.sequencer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_hexToByte","require","SERVICE","WRITE","START","DEVICE_ROLE","APP_ROLE","REQUEST","HISTORY","byte","value","toString","padStart","frameFor","role","opcode","data","length","frame","sum","reduce","total","map","nowData","now","Date","getFullYear","getMonth","getDate","getHours","getMinutes","MySenseSequencer","normalDisconnect","constructor","params","initialCommands","nextCommand","hexToByte","undefined","onGreeting","commandFor","count","isNormalDisconnect","serviceUuid","characteristicUuid","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/uebe/mysense.sequencer.ts"],"mappings":";;;;;;AAEA,IAAAA,UAAA,GAAAC,OAAA;AAEA,MAAMC,OAAO,GAAG,sCAAsC;AACtD,MAAMC,KAAK,GAAG,sCAAsC;AACpD,MAAMC,KAAK,GAAG,IAAI;AAClB,MAAMC,WAAW,GAAG,IAAI;AACxB,MAAMC,QAAQ,GAAG,IAAI;AACrB,MAAMC,OAAO,GAAG,IAAI;AACpB,MAAMC,OAAO,GAAG,IAAI;AAEpB,MAAMC,IAAI,GAAIC,KAAa,IAAa,CAACA,KAAK,GAAG,IAAI,EAAEC,QAAQ,CAAC,EAAE,CAAC,CAACC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC;AAEpF,MAAMC,QAAQ,GAAGA,CAACC,I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,SAAS;IAClB;IAEA,QAAQ,IAAAD,oBAAS,EAACnB,KAAK,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC;MAChC,KAAKX,OAAO;QACV,IAAI,CAAC2B,MAAM,CAACK,UAAU,CAACrB,KAAK,CAAC;QAC7B,IAAI,CAACc,gBAAgB,GAAG,IAAI;QAE5B,OAAO,CAAC,IAAI,CAACQ,UAAU,CAAC3B,QAAQ,CAACP,QAAQ,EAAEC,OAAO,EAAEgB,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;MAElE,KAAKf,OAAO;QAAE;UACZ,MAAMiC,KAAK,GAAI,IAAAJ,oBAAS,EAACnB,KAAK,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,GAAI,IAAAmB,oBAAS,EAACnB,KAAK,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC;UAE5E,IAAI,CAACc,gBAAgB,GAAG,IAAI;UAE5B,OAAO,CACL,IAAI,CAACQ,UAAU,CAAC3B,QAAQ,CAACP,QAAQ,EAAEE,OAAO,EAAE,CAACiC,KAAK,IAAI,CAAC,EAAEA,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,CACzE;QACH;MAEA;QACE,OAAOH,SAAS;IACpB;EACF,CAAC;EAEMI,kBAAkB,GAAGA,CAAA,KAAe,IAAI,CAACV,gBAAgB;EAExDQ,UAAU,GAAItB,KAAwB,KAAqB;IACjEyB,WAAW,EAAEzC,OAAO;IACpB0C,kBAAkB,EAAEzC,KAAK;IACzBe;EACF,CAAC,CAAC;AACJ;AAAC2B,OAAA,CAAAd,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
|
@@ -3,10 +3,27 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.decodeViatomEcgRecording = exports.VIATOM_ECG_SAMPLE_RATE_HZ = exports.VIATOM_ECG_MILLIVOLTS_PER_COUNT = void 0;
|
|
6
|
+
exports.recordedAtFromViatomFileName = exports.decodeViatomEcgRecording = exports.VIATOM_ECG_SAMPLE_RATE_HZ = exports.VIATOM_ECG_MILLIVOLTS_PER_COUNT = void 0;
|
|
7
7
|
var _hexToByte = require("../../../utils/hex-to-byte.js");
|
|
8
8
|
const VIATOM_ECG_SAMPLE_RATE_HZ = exports.VIATOM_ECG_SAMPLE_RATE_HZ = 125;
|
|
9
9
|
const VIATOM_ECG_MILLIVOLTS_PER_COUNT = exports.VIATOM_ECG_MILLIVOLTS_PER_COUNT = 0.002467;
|
|
10
|
+
const validDate = (year, month, day, hour, minute, second) => {
|
|
11
|
+
const date = new Date(year, month - 1, day, hour, minute, second, 0);
|
|
12
|
+
return date.getFullYear() === year && date.getMonth() === month - 1 && date.getDate() === day && date.getHours() === hour && date.getMinutes() === minute && date.getSeconds() === second ? date : undefined;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/** Reads the recording time encoded in the ER file name, when present. */
|
|
16
|
+
const recordedAtFromViatomFileName = name => {
|
|
17
|
+
const digits = name.match(/\d{14}|\d{12}/)?.[0];
|
|
18
|
+
if (!digits) {
|
|
19
|
+
return undefined;
|
|
20
|
+
}
|
|
21
|
+
if (digits.length === 14) {
|
|
22
|
+
return validDate(Number(digits.slice(0, 4)), Number(digits.slice(4, 6)), Number(digits.slice(6, 8)), Number(digits.slice(8, 10)), Number(digits.slice(10, 12)), Number(digits.slice(12, 14)));
|
|
23
|
+
}
|
|
24
|
+
return validDate(2000 + Number(digits.slice(0, 2)), Number(digits.slice(2, 4)), Number(digits.slice(4, 6)), Number(digits.slice(6, 8)), Number(digits.slice(8, 10)), Number(digits.slice(10, 12)));
|
|
25
|
+
};
|
|
26
|
+
exports.recordedAtFromViatomFileName = recordedAtFromViatomFileName;
|
|
10
27
|
const readUInt32LittleEndian = (bytes, from) => (0, _hexToByte.hexToByte)(bytes[from] ?? "0") | (0, _hexToByte.hexToByte)(bytes[from + 1] ?? "0") << 8 | (0, _hexToByte.hexToByte)(bytes[from + 2] ?? "0") << 16 | (0, _hexToByte.hexToByte)(bytes[from + 3] ?? "0") << 24;
|
|
11
28
|
|
|
12
29
|
/** Decodes the official ER1/ER2 file container and its signed ECG samples. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_hexToByte","require","VIATOM_ECG_SAMPLE_RATE_HZ","exports","VIATOM_ECG_MILLIVOLTS_PER_COUNT","readUInt32LittleEndian","bytes","from","hexToByte","decodeViatomEcgRecording","content","
|
|
1
|
+
{"version":3,"names":["_hexToByte","require","VIATOM_ECG_SAMPLE_RATE_HZ","exports","VIATOM_ECG_MILLIVOLTS_PER_COUNT","validDate","year","month","day","hour","minute","second","date","Date","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","undefined","recordedAtFromViatomFileName","name","digits","match","length","Number","slice","readUInt32LittleEndian","bytes","from","hexToByte","decodeViatomEcgRecording","content","samples","duration","waveStart","waveEnd","index","raw","signed","push","recordedSeconds"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.ecg-files.ts"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAEA,MAAMC,yBAAyB,GAAAC,OAAA,CAAAD,yBAAA,GAAG,GAAG;AACrC,MAAME,+BAA+B,GAAAD,OAAA,CAAAC,+BAAA,GAAG,QAAQ;AAEhD,MAAMC,SAAS,GAAGA,CAChBC,IAAY,EACZC,KAAa,EACbC,GAAW,EACXC,IAAY,EACZC,MAAc,EACdC,MAAc,KACO;EACrB,MAAMC,IAAI,GAAG,IAAIC,IAAI,CAACP,IAAI,EAAEC,KAAK,GAAG,CAAC,EAAEC,GAAG,EAAEC,IAAI,EAAEC,MAAM,EAAEC,MAAM,EAAE,CAAC,CAAC;EAEpE,OAAOC,IAAI,CAACE,WAAW,CAAC,CAAC,KAAKR,IAAI,IAChCM,IAAI,CAACG,QAAQ,CAAC,CAAC,KAAKR,KAAK,GAAG,CAAC,IAC7BK,IAAI,CAACI,OAAO,CAAC,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MAAM,GAAGD,GAAG,GAAG,MAAM,GAAGA,GAAG,GAAG,OAAO,GAAGA,GAAG;IAEjDL,OAAO,CAACO,IAAI,CAACD,MAAM,GAAGpC,+BAA+B,CAAC;EACxD;EAEA,MAAMsC,eAAe,GAAGd,sBAAsB,CAACK,OAAO,EAAEA,OAAO,CAACR,MAAM,GAAG,EAAE,CAAC;EAE5E,OAAO;IACLS,OAAO;IACPC,QAAQ,EAAEO,eAAe,IAAIR,OAAO,CAACT,MAAM,GAAGvB;EAChD,CAAC;AACH,CAAC;AAACC,OAAA,CAAA6B,wBAAA,GAAAA,wBAAA","ignoreList":[]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.er3Recorder = exports.er2Recorder = exports.er1Recorder = exports.ER2_MODEL_NAMES = exports.ER1_MODEL_NAMES = void 0;
|
|
6
|
+
exports.er3Recorder = exports.er2Recorder = exports.er1Recorder = exports.ER3_MODEL_NAMES = exports.ER2_MODEL_NAMES = exports.ER1_MODEL_NAMES = void 0;
|
|
7
7
|
var _core = require("@ovok/core");
|
|
8
8
|
var _lepuNameMatch = require("../lepu/lepu.name-match.js");
|
|
9
9
|
var _lepuTransports = require("../lepu/lepu.transports.js");
|
|
@@ -111,4 +111,7 @@ const ER1_MODEL_NAMES = exports.ER1_MODEL_NAMES = ["ER1", "ER1-H", "ER1-L", "ER1
|
|
|
111
111
|
|
|
112
112
|
/** The names the ER2 recorders advertise, all of them on the small-MTU link. */
|
|
113
113
|
const ER2_MODEL_NAMES = exports.ER2_MODEL_NAMES = ["ER2", "ER2-S", "HHM2", "HHM3", "LP ER2"];
|
|
114
|
+
|
|
115
|
+
/** The ER3 is identified separately from the ER1/ER2 opcode family. */
|
|
116
|
+
const ER3_MODEL_NAMES = exports.ER3_MODEL_NAMES = ["ER3"];
|
|
114
117
|
//# sourceMappingURL=viatom.ecg-recorders.js.map
|