@ovok/native 1.10.9 → 1.10.10
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-device/constants/device-instruction-pdfs.js +16 -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-aoj-variants.js +137 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-aoj-variants.js.map +1 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-assets.js +15 -1
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-assets.js.map +1 -1
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-entries.js +3 -2
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-entries.js.map +1 -1
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-famidoc-variants.js +227 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-famidoc-variants.js.map +1 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-joytech-variants.js +95 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-joytech-variants.js.map +1 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-jumper-variants.js +149 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-jumper-variants.js.map +1 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-standard-variants.js +1001 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-standard-variants.js.map +1 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-transtek-variants.js +1093 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-transtek-variants.js.map +1 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-variants.js +312 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-variants.js.map +1 -0
- package/lib/commonjs/modules/bt-device/constants/supported-devices.js +75 -9
- 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 +2 -1
- package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
- package/lib/commonjs/modules/bt-management/constants/aoj-device-variants.js +112 -0
- package/lib/commonjs/modules/bt-management/constants/aoj-device-variants.js.map +1 -0
- package/lib/commonjs/modules/bt-management/constants/device-variants.js +252 -0
- package/lib/commonjs/modules/bt-management/constants/device-variants.js.map +1 -0
- package/lib/commonjs/modules/bt-management/constants/famidoc-device-variants.js +190 -0
- package/lib/commonjs/modules/bt-management/constants/famidoc-device-variants.js.map +1 -0
- package/lib/commonjs/modules/bt-management/constants/integrated-devices-map.js +9 -1
- package/lib/commonjs/modules/bt-management/constants/integrated-devices-map.js.map +1 -1
- package/lib/commonjs/modules/bt-management/constants/joytech-device-variants.js +80 -0
- package/lib/commonjs/modules/bt-management/constants/joytech-device-variants.js.map +1 -0
- package/lib/commonjs/modules/bt-management/constants/jumper-device-variants.js +115 -0
- package/lib/commonjs/modules/bt-management/constants/jumper-device-variants.js.map +1 -0
- package/lib/commonjs/modules/bt-management/constants/standard-device-variants.js +802 -0
- package/lib/commonjs/modules/bt-management/constants/standard-device-variants.js.map +1 -0
- package/lib/commonjs/modules/bt-management/constants/transtek-device-variants.js +890 -0
- package/lib/commonjs/modules/bt-management/constants/transtek-device-variants.js.map +1 -0
- package/lib/commonjs/modules/bt-management/index.js +20 -0
- package/lib/commonjs/modules/bt-management/index.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/background-sync/background-service-uuids.js +15 -0
- package/lib/commonjs/modules/bt-management/services/background-sync/background-service-uuids.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/custom/define-custom-device.js +7 -1
- package/lib/commonjs/modules/bt-management/services/custom/define-custom-device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/device-classes.js +22 -1
- package/lib/commonjs/modules/bt-management/services/device-classes.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/device-secrets.js +68 -0
- package/lib/commonjs/modules/bt-management/services/device-secrets.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj-70b.device.js +41 -0
- package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj-70b.device.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj-bp.device.js +45 -0
- package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj-bp.device.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj-bp.protocol.js +140 -0
- package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj-bp.protocol.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj-bp.sequencer.js +138 -0
- package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj-bp.sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js +24 -1
- package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js +27 -1
- 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 +4 -4
- package/lib/commonjs/modules/bt-management/services/devices/bt-data-processor.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js +12 -1
- 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.device.js +12 -4
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/famidoc/famidoc.device.js +49 -0
- package/lib/commonjs/modules/bt-management/services/devices/famidoc/famidoc.device.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/famidoc/famidoc.protocol.js +163 -0
- package/lib/commonjs/modules/bt-management/services/devices/famidoc/famidoc.protocol.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/famidoc/famidoc.sequencer.js +95 -0
- package/lib/commonjs/modules/bt-management/services/devices/famidoc/famidoc.sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/joytech/joytech.device.js +40 -0
- package/lib/commonjs/modules/bt-management/services/devices/joytech/joytech.device.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/joytech/joytech.protocol.js +162 -0
- package/lib/commonjs/modules/bt-management/services/devices/joytech/joytech.protocol.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/joytech/joytech.sequencer.js +63 -0
- package/lib/commonjs/modules/bt-management/services/devices/joytech/joytech.sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/jumper/jumper.device.js +56 -0
- package/lib/commonjs/modules/bt-management/services/devices/jumper/jumper.device.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/jumper/jumper.protocol.js +67 -0
- package/lib/commonjs/modules/bt-management/services/devices/jumper/jumper.protocol.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/jumper/jumper.sequencer.js +60 -0
- package/lib/commonjs/modules/bt-management/services/devices/jumper/jumper.sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/live-oximeter.sequencer.js +85 -0
- package/lib/commonjs/modules/bt-management/services/devices/live-oximeter.sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/polling-command-sequencer.js +22 -8
- package/lib/commonjs/modules/bt-management/services/devices/polling-command-sequencer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js +13 -2
- 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.glucose.js +153 -0
- package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.device.js +71 -0
- package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.device.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.protocol.js +112 -0
- package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.protocol.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.records.js +132 -0
- package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.records.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.sequencer.js +145 -0
- package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.session.js +91 -0
- package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.session.js.map +1 -0
- package/lib/commonjs/modules/bt-management/types/integrated-devices.js +15 -0
- package/lib/commonjs/modules/bt-management/types/integrated-devices.js.map +1 -1
- package/lib/commonjs/modules/bt-management/utils/device-title.js +5 -1
- package/lib/commonjs/modules/bt-management/utils/device-title.js.map +1 -1
- package/lib/module/modules/bt-device/constants/device-instruction-pdfs.js +16 -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-aoj-variants.js +135 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-aoj-variants.js.map +1 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-assets.js +15 -1
- package/lib/module/modules/bt-device/constants/supported-device-catalog-assets.js.map +1 -1
- package/lib/module/modules/bt-device/constants/supported-device-catalog-entries.js +3 -2
- package/lib/module/modules/bt-device/constants/supported-device-catalog-entries.js.map +1 -1
- package/lib/module/modules/bt-device/constants/supported-device-catalog-famidoc-variants.js +225 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-famidoc-variants.js.map +1 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-joytech-variants.js +93 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-joytech-variants.js.map +1 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-jumper-variants.js +147 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-jumper-variants.js.map +1 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-standard-variants.js +999 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-standard-variants.js.map +1 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-transtek-variants.js +1091 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-transtek-variants.js.map +1 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-variants.js +309 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-variants.js.map +1 -0
- package/lib/module/modules/bt-device/constants/supported-devices.js +76 -10
- 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 +2 -1
- package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
- package/lib/module/modules/bt-management/constants/aoj-device-variants.js +110 -0
- package/lib/module/modules/bt-management/constants/aoj-device-variants.js.map +1 -0
- package/lib/module/modules/bt-management/constants/device-variants.js +249 -0
- package/lib/module/modules/bt-management/constants/device-variants.js.map +1 -0
- package/lib/module/modules/bt-management/constants/famidoc-device-variants.js +188 -0
- package/lib/module/modules/bt-management/constants/famidoc-device-variants.js.map +1 -0
- package/lib/module/modules/bt-management/constants/integrated-devices-map.js +9 -1
- package/lib/module/modules/bt-management/constants/integrated-devices-map.js.map +1 -1
- package/lib/module/modules/bt-management/constants/joytech-device-variants.js +78 -0
- package/lib/module/modules/bt-management/constants/joytech-device-variants.js.map +1 -0
- package/lib/module/modules/bt-management/constants/jumper-device-variants.js +113 -0
- package/lib/module/modules/bt-management/constants/jumper-device-variants.js.map +1 -0
- package/lib/module/modules/bt-management/constants/standard-device-variants.js +799 -0
- package/lib/module/modules/bt-management/constants/standard-device-variants.js.map +1 -0
- package/lib/module/modules/bt-management/constants/transtek-device-variants.js +888 -0
- package/lib/module/modules/bt-management/constants/transtek-device-variants.js.map +1 -0
- package/lib/module/modules/bt-management/index.js +2 -0
- package/lib/module/modules/bt-management/index.js.map +1 -1
- package/lib/module/modules/bt-management/services/background-sync/background-service-uuids.js +15 -0
- package/lib/module/modules/bt-management/services/background-sync/background-service-uuids.js.map +1 -1
- package/lib/module/modules/bt-management/services/custom/define-custom-device.js +7 -1
- package/lib/module/modules/bt-management/services/custom/define-custom-device.js.map +1 -1
- package/lib/module/modules/bt-management/services/device-classes.js +22 -1
- package/lib/module/modules/bt-management/services/device-classes.js.map +1 -1
- package/lib/module/modules/bt-management/services/device-secrets.js +59 -0
- package/lib/module/modules/bt-management/services/device-secrets.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/aoj/aoj-70b.device.js +37 -0
- package/lib/module/modules/bt-management/services/devices/aoj/aoj-70b.device.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/aoj/aoj-bp.device.js +41 -0
- package/lib/module/modules/bt-management/services/devices/aoj/aoj-bp.device.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/aoj/aoj-bp.protocol.js +123 -0
- package/lib/module/modules/bt-management/services/devices/aoj/aoj-bp.protocol.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/aoj/aoj-bp.sequencer.js +134 -0
- package/lib/module/modules/bt-management/services/devices/aoj/aoj-bp.sequencer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js +24 -1
- package/lib/module/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js +27 -1
- 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 +4 -4
- package/lib/module/modules/bt-management/services/devices/bt-data-processor.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-managed-device.js +12 -1
- 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.device.js +12 -4
- package/lib/module/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/famidoc/famidoc.device.js +45 -0
- package/lib/module/modules/bt-management/services/devices/famidoc/famidoc.device.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/famidoc/famidoc.protocol.js +149 -0
- package/lib/module/modules/bt-management/services/devices/famidoc/famidoc.protocol.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/famidoc/famidoc.sequencer.js +91 -0
- package/lib/module/modules/bt-management/services/devices/famidoc/famidoc.sequencer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/joytech/joytech.device.js +36 -0
- package/lib/module/modules/bt-management/services/devices/joytech/joytech.device.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/joytech/joytech.protocol.js +150 -0
- package/lib/module/modules/bt-management/services/devices/joytech/joytech.protocol.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/joytech/joytech.sequencer.js +60 -0
- package/lib/module/modules/bt-management/services/devices/joytech/joytech.sequencer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/jumper/jumper.device.js +52 -0
- package/lib/module/modules/bt-management/services/devices/jumper/jumper.device.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/jumper/jumper.protocol.js +62 -0
- package/lib/module/modules/bt-management/services/devices/jumper/jumper.protocol.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/jumper/jumper.sequencer.js +57 -0
- package/lib/module/modules/bt-management/services/devices/jumper/jumper.sequencer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/live-oximeter.sequencer.js +79 -0
- package/lib/module/modules/bt-management/services/devices/live-oximeter.sequencer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/polling-command-sequencer.js +22 -8
- package/lib/module/modules/bt-management/services/devices/polling-command-sequencer.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js +6 -2
- 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.glucose.js +149 -0
- package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/transtek/transtek-command.device.js +67 -0
- package/lib/module/modules/bt-management/services/devices/transtek/transtek-command.device.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/transtek/transtek-command.protocol.js +94 -0
- package/lib/module/modules/bt-management/services/devices/transtek/transtek-command.protocol.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/transtek/transtek-command.records.js +125 -0
- package/lib/module/modules/bt-management/services/devices/transtek/transtek-command.records.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/transtek/transtek-command.sequencer.js +142 -0
- package/lib/module/modules/bt-management/services/devices/transtek/transtek-command.sequencer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/transtek/transtek-command.session.js +85 -0
- package/lib/module/modules/bt-management/services/devices/transtek/transtek-command.session.js.map +1 -0
- package/lib/module/modules/bt-management/types/custom-device-definition.js +2 -0
- package/lib/module/modules/bt-management/types/custom-device-definition.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 +15 -0
- package/lib/module/modules/bt-management/types/integrated-devices.js.map +1 -1
- package/lib/module/modules/bt-management/utils/device-title.js +5 -1
- package/lib/module/modules/bt-management/utils/device-title.js.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-aoj-variants.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-aoj-variants.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-assets.d.ts +15 -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-device-catalog-entries.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-famidoc-variants.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-famidoc-variants.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-joytech-variants.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-joytech-variants.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-jumper-variants.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-jumper-variants.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-standard-variants.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-standard-variants.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-transtek-variants.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-transtek-variants.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-variants.d.ts +15 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-variants.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-devices.d.ts +8 -0
- 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/aoj-device-variants.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/bt-management/constants/aoj-device-variants.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/constants/device-variants.d.ts +23 -0
- package/lib/typescript/commonjs/src/modules/bt-management/constants/device-variants.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/constants/famidoc-device-variants.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/bt-management/constants/famidoc-device-variants.d.ts.map +1 -0
- 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/joytech-device-variants.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/bt-management/constants/joytech-device-variants.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/constants/jumper-device-variants.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/bt-management/constants/jumper-device-variants.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/constants/standard-device-variants.d.ts +10 -0
- package/lib/typescript/commonjs/src/modules/bt-management/constants/standard-device-variants.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/constants/transtek-device-variants.d.ts +10 -0
- package/lib/typescript/commonjs/src/modules/bt-management/constants/transtek-device-variants.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/background-sync/background-service-uuids.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-classes.d.ts +21 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/device-classes.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/device-secrets.d.ts +22 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/device-secrets.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj-70b.device.d.ts +17 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj-70b.device.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj-bp.device.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj-bp.device.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj-bp.protocol.d.ts +54 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj-bp.protocol.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj-bp.sequencer.d.ts +36 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj-bp.sequencer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-connection-handler.d.ts +3 -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 +1 -1
- 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-managed-device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts +3 -2
- 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/famidoc/famidoc.device.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/famidoc/famidoc.device.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/famidoc/famidoc.protocol.d.ts +56 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/famidoc/famidoc.protocol.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/famidoc/famidoc.sequencer.d.ts +34 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/famidoc/famidoc.sequencer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/joytech/joytech.device.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/joytech/joytech.device.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/joytech/joytech.protocol.d.ts +43 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/joytech/joytech.protocol.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/joytech/joytech.sequencer.d.ts +23 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/joytech/joytech.sequencer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/jumper/jumper.device.d.ts +18 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/jumper/jumper.device.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/jumper/jumper.protocol.d.ts +32 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/jumper/jumper.protocol.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/jumper/jumper.sequencer.d.ts +22 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/jumper/jumper.sequencer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/live-oximeter.sequencer.d.ts +33 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/live-oximeter.sequencer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/polling-command-sequencer.d.ts +4 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/polling-command-sequencer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts +2 -1
- 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.glucose.d.ts +7 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/transtek-command.device.d.ts +21 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/transtek-command.device.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/transtek-command.protocol.d.ts +51 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/transtek-command.protocol.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/transtek-command.records.d.ts +33 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/transtek-command.records.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/transtek-command.sequencer.d.ts +49 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/transtek-command.sequencer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/transtek-command.session.d.ts +39 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/transtek-command.session.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/command-sequencer.d.ts +4 -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/custom-device-definition.d.ts +2 -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/custom-service-spec.d.ts +6 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-service-spec.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-data.d.ts +5 -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 +15 -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 +16 -1
- 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/service.type.d.ts +6 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/service.type.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/write-characteristic.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/write-characteristic.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/utils/device-title.d.ts +2 -1
- package/lib/typescript/commonjs/src/modules/bt-management/utils/device-title.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-aoj-variants.d.ts +5 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-aoj-variants.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-assets.d.ts +15 -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-device-catalog-entries.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-famidoc-variants.d.ts +5 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-famidoc-variants.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-joytech-variants.d.ts +5 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-joytech-variants.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-jumper-variants.d.ts +5 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-jumper-variants.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-standard-variants.d.ts +9 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-standard-variants.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-transtek-variants.d.ts +5 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-transtek-variants.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-variants.d.ts +15 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-variants.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-devices.d.ts +8 -0
- 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/aoj-device-variants.d.ts +5 -0
- package/lib/typescript/module/src/modules/bt-management/constants/aoj-device-variants.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/constants/device-variants.d.ts +23 -0
- package/lib/typescript/module/src/modules/bt-management/constants/device-variants.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/constants/famidoc-device-variants.d.ts +5 -0
- package/lib/typescript/module/src/modules/bt-management/constants/famidoc-device-variants.d.ts.map +1 -0
- 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/joytech-device-variants.d.ts +5 -0
- package/lib/typescript/module/src/modules/bt-management/constants/joytech-device-variants.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/constants/jumper-device-variants.d.ts +5 -0
- package/lib/typescript/module/src/modules/bt-management/constants/jumper-device-variants.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/constants/standard-device-variants.d.ts +10 -0
- package/lib/typescript/module/src/modules/bt-management/constants/standard-device-variants.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/constants/transtek-device-variants.d.ts +10 -0
- package/lib/typescript/module/src/modules/bt-management/constants/transtek-device-variants.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/bt-management/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/background-sync/background-service-uuids.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-classes.d.ts +21 -0
- package/lib/typescript/module/src/modules/bt-management/services/device-classes.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/device-secrets.d.ts +22 -0
- package/lib/typescript/module/src/modules/bt-management/services/device-secrets.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj-70b.device.d.ts +17 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj-70b.device.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj-bp.device.d.ts +16 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj-bp.device.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj-bp.protocol.d.ts +54 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj-bp.protocol.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj-bp.sequencer.d.ts +36 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj-bp.sequencer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-connection-handler.d.ts +3 -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 +1 -1
- 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-managed-device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts +3 -2
- 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/famidoc/famidoc.device.d.ts +16 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/famidoc/famidoc.device.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/famidoc/famidoc.protocol.d.ts +56 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/famidoc/famidoc.protocol.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/famidoc/famidoc.sequencer.d.ts +34 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/famidoc/famidoc.sequencer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/joytech/joytech.device.d.ts +16 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/joytech/joytech.device.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/joytech/joytech.protocol.d.ts +43 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/joytech/joytech.protocol.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/joytech/joytech.sequencer.d.ts +23 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/joytech/joytech.sequencer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/jumper/jumper.device.d.ts +18 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/jumper/jumper.device.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/jumper/jumper.protocol.d.ts +32 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/jumper/jumper.protocol.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/jumper/jumper.sequencer.d.ts +22 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/jumper/jumper.sequencer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/live-oximeter.sequencer.d.ts +33 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/live-oximeter.sequencer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/polling-command-sequencer.d.ts +4 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/polling-command-sequencer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts +2 -1
- 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.glucose.d.ts +7 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/transtek-command.device.d.ts +21 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/transtek-command.device.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/transtek-command.protocol.d.ts +51 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/transtek-command.protocol.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/transtek-command.records.d.ts +33 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/transtek-command.records.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/transtek-command.sequencer.d.ts +49 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/transtek-command.sequencer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/transtek-command.session.d.ts +39 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/transtek-command.session.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/command-sequencer.d.ts +4 -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/custom-device-definition.d.ts +2 -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/custom-service-spec.d.ts +6 -0
- package/lib/typescript/module/src/modules/bt-management/types/custom-service-spec.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/device-data.d.ts +5 -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 +15 -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 +16 -1
- 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/service.type.d.ts +6 -0
- package/lib/typescript/module/src/modules/bt-management/types/service.type.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/write-characteristic.d.ts +2 -0
- package/lib/typescript/module/src/modules/bt-management/types/write-characteristic.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/utils/device-title.d.ts +2 -1
- package/lib/typescript/module/src/modules/bt-management/utils/device-title.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.setTimeCommand = exports.readTemperatures = exports.readBloodPressure = exports.payloadOf = exports.getHistoryCommand = exports.frame = exports.commandOf = exports.ack = exports.JoytechFrameReader = exports.JOYTECH_COMMAND = exports.JOYTECH = exports.DEVICE_INFO_REPLY = exports.ACK_ONLY = void 0;
|
|
7
|
+
var _frameReadStatus = require("../../../types/frame-read-status.js");
|
|
8
|
+
var _hexToByte = require("../../../utils/hex-to-byte.js");
|
|
9
|
+
/* eslint-disable import/group-exports */
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Joytech (Sejoy) blood-pressure monitors and DET thermometers, from MedM Health Diary
|
|
13
|
+
* 3.12.11's `CSejoy_*` classes.
|
|
14
|
+
*
|
|
15
|
+
* Frames, both ways: `FA AA AA AF`, the whole frame's length (u16 big-endian), the command, the
|
|
16
|
+
* payload, the 8-bit sum of length, command and payload, then `F5 5F`. A reply to a device
|
|
17
|
+
* command adds 0x80 to it, wrapping - so the BP record command `83` is acknowledged as `03`.
|
|
18
|
+
*/
|
|
19
|
+
const sig16 = assigned => `0000${assigned}-0000-1000-8000-00805f9b34fb`;
|
|
20
|
+
const JOYTECH = exports.JOYTECH = {
|
|
21
|
+
service: sig16("fff0"),
|
|
22
|
+
notify: sig16("fff1"),
|
|
23
|
+
write: sig16("fff2")
|
|
24
|
+
};
|
|
25
|
+
const JOYTECH_COMMAND = exports.JOYTECH_COMMAND = {
|
|
26
|
+
bloodPressureRecord: 0x83,
|
|
27
|
+
temperatureRecords: 0x03,
|
|
28
|
+
setTimeRequest: 0x06,
|
|
29
|
+
deviceInfo: 0x19
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/** Device status commands MedM simply acknowledges. */
|
|
33
|
+
const ACK_ONLY = exports.ACK_ONLY = [0x04, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11];
|
|
34
|
+
const MAGIC = [0xfa, 0xaa, 0xaa, 0xaf];
|
|
35
|
+
const HEADER = 7;
|
|
36
|
+
const TAIL = 3;
|
|
37
|
+
const toHex = bytes => bytes.map(value => (value & 0xff).toString(16).padStart(2, "0"));
|
|
38
|
+
const frame = (command, payload = []) => {
|
|
39
|
+
const length = payload.length + HEADER + TAIL;
|
|
40
|
+
const covered = [length >> 8, length & 0xff, command & 0xff, ...payload];
|
|
41
|
+
const sum = covered.reduce((total, value) => total + value, 0) & 0xff;
|
|
42
|
+
return toHex([...MAGIC, ...covered, sum, 0xf5, 0x5f]);
|
|
43
|
+
};
|
|
44
|
+
exports.frame = frame;
|
|
45
|
+
const ack = command => frame(command + 0x80);
|
|
46
|
+
exports.ack = ack;
|
|
47
|
+
const timePayload = now => [now.getFullYear() - 2000 & 0xff, now.getMonth() + 1, now.getDate(), now.getHours(), now.getMinutes()];
|
|
48
|
+
|
|
49
|
+
/** Blood-pressure monitors take the time as command `04`, thermometers as `86`. */
|
|
50
|
+
const setTimeCommand = (now, thermometer) => frame(thermometer ? 0x86 : 0x04, timePayload(now));
|
|
51
|
+
exports.setTimeCommand = setTimeCommand;
|
|
52
|
+
const getHistoryCommand = () => frame(0x0a);
|
|
53
|
+
|
|
54
|
+
/** What MedM writes in answer to device info: four `FF` bytes, unframed. */
|
|
55
|
+
exports.getHistoryCommand = getHistoryCommand;
|
|
56
|
+
const DEVICE_INFO_REPLY = exports.DEVICE_INFO_REPLY = toHex([0xff, 0xff, 0xff, 0xff]);
|
|
57
|
+
const commandOf = received => (0, _hexToByte.hexToByte)(received[6] ?? "00");
|
|
58
|
+
exports.commandOf = commandOf;
|
|
59
|
+
const payloadOf = received => received.slice(HEADER, -TAIL).map(byte => (0, _hexToByte.hexToByte)(byte));
|
|
60
|
+
|
|
61
|
+
/** Isolates `FA AA AA AF … F5 5F` frames whatever the notification boundaries. */
|
|
62
|
+
exports.payloadOf = payloadOf;
|
|
63
|
+
class JoytechFrameReader {
|
|
64
|
+
readFrame(buffer) {
|
|
65
|
+
const values = buffer.map(byte => (0, _hexToByte.hexToByte)(byte));
|
|
66
|
+
const start = values.findIndex((_, index) => MAGIC.every((magic, offset) => index + offset >= values.length || values[index + offset] === magic));
|
|
67
|
+
if (start === -1) {
|
|
68
|
+
return {
|
|
69
|
+
status: _frameReadStatus.FrameReadStatus.INCOMPLETE,
|
|
70
|
+
consumedBytes: Math.max(0, values.length - 3)
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
if (start + HEADER > values.length) {
|
|
74
|
+
return {
|
|
75
|
+
status: _frameReadStatus.FrameReadStatus.INCOMPLETE,
|
|
76
|
+
consumedBytes: start
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
const length = (values[start + 4] ?? 0) << 8 | (values[start + 5] ?? 0);
|
|
80
|
+
if (length < HEADER + TAIL || length > 512) {
|
|
81
|
+
return {
|
|
82
|
+
status: _frameReadStatus.FrameReadStatus.CORRUPT,
|
|
83
|
+
consumedBytes: start + 1
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
if (start + length > values.length) {
|
|
87
|
+
return {
|
|
88
|
+
status: _frameReadStatus.FrameReadStatus.INCOMPLETE,
|
|
89
|
+
consumedBytes: start
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
const received = values.slice(start, start + length);
|
|
93
|
+
const sum = received.slice(4, length - TAIL).reduce((total, value) => total + value, 0) & 0xff;
|
|
94
|
+
if (received[length - 2] !== 0xf5 || received[length - 1] !== 0x5f || received[length - 3] !== sum) {
|
|
95
|
+
return {
|
|
96
|
+
status: _frameReadStatus.FrameReadStatus.CORRUPT,
|
|
97
|
+
consumedBytes: start + 1
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
return {
|
|
101
|
+
status: _frameReadStatus.FrameReadStatus.COMPLETE,
|
|
102
|
+
consumedBytes: start + length,
|
|
103
|
+
frame: buffer.slice(start, start + length)
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/** `YY MM DD hh mm`, local time; a zero year means the clock was never set. */
|
|
109
|
+
exports.JoytechFrameReader = JoytechFrameReader;
|
|
110
|
+
const readTime = (payload, at) => {
|
|
111
|
+
const year = payload[at] ?? 0;
|
|
112
|
+
return year === 0 ? undefined : new Date(2000 + year, (payload[at + 1] ?? 1) - 1, payload[at + 2] ?? 1, payload[at + 3] ?? 0, payload[at + 4] ?? 0);
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
/** AFib status codes; MedM tags `0x07` AFib alone and `0x7F` AFib with an irregular pulse. */
|
|
116
|
+
const AFIB_STATUS = [0x07, 0x7f];
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* `83`: systolic and diastolic (u16 big-endian, mmHg), pulse, rhythm status, time, device user.
|
|
120
|
+
* Status `0x00` is a normal rhythm, `0x07` AFib, `0x7F` both and any other value an irregular
|
|
121
|
+
* pulse. Monitors without AFib detection only ever send `0x00` or `0xFF`.
|
|
122
|
+
*/
|
|
123
|
+
const readBloodPressure = payload => {
|
|
124
|
+
const recordedAt = readTime(payload, 6);
|
|
125
|
+
if (payload.length < 12 || !recordedAt) {
|
|
126
|
+
return undefined;
|
|
127
|
+
}
|
|
128
|
+
const status = payload[5] ?? 0;
|
|
129
|
+
const user = payload[11] ?? 0;
|
|
130
|
+
return {
|
|
131
|
+
systolic: (payload[0] ?? 0) << 8 | (payload[1] ?? 0),
|
|
132
|
+
diastolic: (payload[2] ?? 0) << 8 | (payload[3] ?? 0),
|
|
133
|
+
heartRate: payload[4] ?? 0,
|
|
134
|
+
irregularHeartbeat: status !== 0x00 && status !== 0x07,
|
|
135
|
+
atrialFibrillation: AFIB_STATUS.includes(status),
|
|
136
|
+
recordedAt,
|
|
137
|
+
...(user > 0 ? {
|
|
138
|
+
memorySlot: user
|
|
139
|
+
} : {})
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* `03`: one or more eight-byte records - site (3 is skipped, as MedM does), temperature in
|
|
145
|
+
* hundredths of a degree Celsius (bit 15 ignored), time.
|
|
146
|
+
*/
|
|
147
|
+
exports.readBloodPressure = readBloodPressure;
|
|
148
|
+
const readTemperatures = payload => {
|
|
149
|
+
const records = [];
|
|
150
|
+
for (let at = 0; at + 8 <= payload.length; at += 8) {
|
|
151
|
+
const recordedAt = readTime(payload, at + 3);
|
|
152
|
+
if (payload[at] !== 3 && recordedAt) {
|
|
153
|
+
records.push({
|
|
154
|
+
bodyTemp: (((payload[at + 1] ?? 0) << 8 | (payload[at + 2] ?? 0)) & 0x7fff) / 100,
|
|
155
|
+
recordedAt
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
return records;
|
|
160
|
+
};
|
|
161
|
+
exports.readTemperatures = readTemperatures;
|
|
162
|
+
//# sourceMappingURL=joytech.protocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_frameReadStatus","require","_hexToByte","sig16","assigned","JOYTECH","exports","service","notify","write","JOYTECH_COMMAND","bloodPressureRecord","temperatureRecords","setTimeRequest","deviceInfo","ACK_ONLY","MAGIC","HEADER","TAIL","toHex","bytes","map","value","toString","padStart","frame","command","payload","length","covered","sum","reduce","total","ack","timePayload","now","getFullYear","getMonth","getDate","getHours","getMinutes","setTimeCommand","thermometer","getHistoryCommand","DEVICE_INFO_REPLY","commandOf","received","hexToByte","payloadOf","slice","byte","JoytechFrameReader","readFrame","buffer","values","start","findIndex","_","index","every","magic","offset","status","FrameReadStatus","INCOMPLETE","consumedBytes","Math","max","CORRUPT","COMPLETE","readTime","at","year","undefined","Date","AFIB_STATUS","readBloodPressure","recordedAt","user","systolic","diastolic","heartRate","irregularHeartbeat","atrialFibrillation","includes","memorySlot","readTemperatures","records","push","bodyTemp"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/joytech/joytech.protocol.ts"],"mappings":";;;;;;AAGA,IAAAA,gBAAA,GAAAC,OAAA;AAEA,IAAAC,UAAA,GAAAD,OAAA;AALA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAME,KAAK,GAAIC,QAAgB,IAC7B,OAAOA,QAAQ,8BAA8B;AAExC,MAAMC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AG;MAAEO,UAAU,EAAEP;IAAK,CAAC,GAAG,CAAC,CAAC;EAC1C,CAAC;AACH,CAAC;;AAED;AACA;AACA;AACA;AAHAxE,OAAA,CAAAsE,iBAAA,GAAAA,iBAAA;AAIO,MAAMU,gBAAgB,GAC3B3D,OAA0B,IACmB;EAC7C,MAAM4D,OAAiD,GAAG,EAAE;EAE5D,KAAK,IAAIhB,EAAE,GAAG,CAAC,EAAEA,EAAE,GAAG,CAAC,IAAI5C,OAAO,CAACC,MAAM,EAAE2C,EAAE,IAAI,CAAC,EAAE;IAClD,MAAMM,UAAU,GAAGP,QAAQ,CAAC3C,OAAO,EAAE4C,EAAE,GAAG,CAAC,CAAC;IAE5C,IAAI5C,OAAO,CAAC4C,EAAE,CAAC,KAAK,CAAC,IAAIM,UAAU,EAAE;MACnCU,OAAO,CAACC,IAAI,CAAC;QACXC,QAAQ,EAAE,CAAC,CAAE,CAAC9D,OAAO,CAAC4C,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAK5C,OAAO,CAAC4C,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,MAAM,IAAI,GAAG;QACnFM;MACF,CAAC,CAAC;IACJ;EACF;EAEA,OAAOU,OAAO;AAChB,CAAC;AAACjF,OAAA,CAAAgF,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.JoytechSequencer = void 0;
|
|
7
|
+
var _core = require("@ovok/core");
|
|
8
|
+
var _caseType = require("../../../types/case-type.js");
|
|
9
|
+
var _joytechProtocol = require("./joytech.protocol.js");
|
|
10
|
+
/**
|
|
11
|
+
* Sets the clock, asks for history (blood pressure), and acknowledges every record frame. The
|
|
12
|
+
* monitor waits a second after connecting before each of the first two commands, as MedM does.
|
|
13
|
+
*/
|
|
14
|
+
class JoytechSequencer {
|
|
15
|
+
recorded = false;
|
|
16
|
+
constructor(params) {
|
|
17
|
+
this.params = params;
|
|
18
|
+
}
|
|
19
|
+
initialCommands = () => this.params.thermometer ? [this.command((0, _joytechProtocol.setTimeCommand)(this.now(), true))] : [this.command((0, _joytechProtocol.setTimeCommand)(this.now(), false), 1_000), this.command((0, _joytechProtocol.getHistoryCommand)(), 1_000)];
|
|
20
|
+
isNormalDisconnect = () => this.recorded;
|
|
21
|
+
nextCommand = frame => {
|
|
22
|
+
const command = (0, _joytechProtocol.commandOf)(frame);
|
|
23
|
+
const dataCommand = this.params.thermometer ? _joytechProtocol.JOYTECH_COMMAND.temperatureRecords : _joytechProtocol.JOYTECH_COMMAND.bloodPressureRecord;
|
|
24
|
+
if (command === dataCommand) {
|
|
25
|
+
this.report((0, _joytechProtocol.payloadOf)(frame));
|
|
26
|
+
return [this.command((0, _joytechProtocol.ack)(command))];
|
|
27
|
+
}
|
|
28
|
+
if (command === _joytechProtocol.JOYTECH_COMMAND.setTimeRequest) {
|
|
29
|
+
return [this.command((0, _joytechProtocol.setTimeCommand)(this.now(), this.params.thermometer))];
|
|
30
|
+
}
|
|
31
|
+
if (command === _joytechProtocol.JOYTECH_COMMAND.deviceInfo) {
|
|
32
|
+
return [this.command(_joytechProtocol.DEVICE_INFO_REPLY)];
|
|
33
|
+
}
|
|
34
|
+
return _joytechProtocol.ACK_ONLY.includes(command) ? [this.command((0, _joytechProtocol.ack)(command))] : undefined;
|
|
35
|
+
};
|
|
36
|
+
report = payload => {
|
|
37
|
+
const readings = this.params.thermometer ? (0, _joytechProtocol.readTemperatures)(payload).map(reading => ({
|
|
38
|
+
measurementTypeKey: _core.MeasurementTypeKey.temperature,
|
|
39
|
+
...reading
|
|
40
|
+
})) : [(0, _joytechProtocol.readBloodPressure)(payload)].flatMap(reading => reading ? [{
|
|
41
|
+
measurementTypeKey: _core.MeasurementTypeKey.bloodPressure,
|
|
42
|
+
...reading
|
|
43
|
+
}] : []);
|
|
44
|
+
readings.forEach(reading => {
|
|
45
|
+
this.recorded = true;
|
|
46
|
+
this.params.onResult({
|
|
47
|
+
caseType: _caseType.CaseType.RESULT,
|
|
48
|
+
...reading
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
now = () => this.params.now?.() ?? new Date();
|
|
53
|
+
command = (frame, delayBeforeWriteMs) => ({
|
|
54
|
+
serviceUuid: _joytechProtocol.JOYTECH.service,
|
|
55
|
+
characteristicUuid: _joytechProtocol.JOYTECH.write,
|
|
56
|
+
frame,
|
|
57
|
+
...(delayBeforeWriteMs ? {
|
|
58
|
+
delayBeforeWriteMs
|
|
59
|
+
} : {})
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
exports.JoytechSequencer = JoytechSequencer;
|
|
63
|
+
//# sourceMappingURL=joytech.sequencer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_core","require","_caseType","_joytechProtocol","JoytechSequencer","recorded","constructor","params","initialCommands","thermometer","command","setTimeCommand","now","getHistoryCommand","isNormalDisconnect","nextCommand","frame","commandOf","dataCommand","JOYTECH_COMMAND","temperatureRecords","bloodPressureRecord","report","payloadOf","ack","setTimeRequest","deviceInfo","DEVICE_INFO_REPLY","ACK_ONLY","includes","undefined","payload","readings","readTemperatures","map","reading","measurementTypeKey","MeasurementTypeKey","temperature","readBloodPressure","flatMap","bloodPressure","forEach","onResult","caseType","CaseType","RESULT","Date","delayBeforeWriteMs","serviceUuid","JOYTECH","service","characteristicUuid","write","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/joytech/joytech.sequencer.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AAIA,IAAAE,gBAAA,GAAAF,OAAA;AAcA;AACA;AACA;AACA;AACA,MAAMG,gBAAgB,CAA6B;EACzCC,QAAQ,GAAG,KAAK;EAEjBC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AAA,GAAAA,gBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.JumperDevice = void 0;
|
|
7
|
+
var _integratedDevices = require("../../../types/integrated-devices.js");
|
|
8
|
+
var _btManagedDevice = require("../bt-managed-device.js");
|
|
9
|
+
var _liveOximeterSequencer = require("../live-oximeter.sequencer.js");
|
|
10
|
+
var _jumperProtocol = require("./jumper.protocol.js");
|
|
11
|
+
var _jumperSequencer = require("./jumper.sequencer.js");
|
|
12
|
+
const passThrough = {
|
|
13
|
+
caseValuePosition: [],
|
|
14
|
+
cases: []
|
|
15
|
+
};
|
|
16
|
+
const service = (uuid, notify, optional) => ({
|
|
17
|
+
uuid,
|
|
18
|
+
optional,
|
|
19
|
+
monitorUuids: [{
|
|
20
|
+
uuid: notify,
|
|
21
|
+
parsingModel: passThrough
|
|
22
|
+
}]
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
/** Each kind listens on Jumper's own service or, on some revisions, a 16-bit one. */
|
|
26
|
+
const SERVICES = {
|
|
27
|
+
[_integratedDevices.IntegratedDevices.JUMPER_OXIMETER]: [service(_jumperProtocol.JUMPER_SERVICE, _jumperProtocol.JUMPER_NOTIFY, true), service(_jumperProtocol.JUMPER_GATT.oximeterAlternate.service, _jumperProtocol.JUMPER_GATT.oximeterAlternate.notify, true)],
|
|
28
|
+
[_integratedDevices.IntegratedDevices.JUMPER_THERMOMETER]: [service(_jumperProtocol.JUMPER_SERVICE, _jumperProtocol.JUMPER_NOTIFY, true), service(_jumperProtocol.JUMPER_GATT.thermometerAlternate.service, _jumperProtocol.JUMPER_GATT.thermometerAlternate.notify, true)],
|
|
29
|
+
[_integratedDevices.IntegratedDevices.JUMPER_BPM]: [service(_jumperProtocol.JUMPER_GATT.bloodPressure.service, _jumperProtocol.JUMPER_GATT.bloodPressure.notify, false)]
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/** Jumper JPD-500D oximeters, HA120 blood-pressure monitors and FR302-family thermometers. */
|
|
33
|
+
class JumperDeviceClass extends _btManagedDevice.BTManagedDevice {
|
|
34
|
+
stuckDataTimeout = 120_000;
|
|
35
|
+
onStreamStart = undefined;
|
|
36
|
+
constructor(device, params) {
|
|
37
|
+
super(device, params);
|
|
38
|
+
this.mainServices = SERVICES[params.deviceName];
|
|
39
|
+
const onResult = result => this.onResult?.(result);
|
|
40
|
+
this.createCommandSequencer = () => params.deviceName === _integratedDevices.IntegratedDevices.JUMPER_OXIMETER ? new _liveOximeterSequencer.LiveOximeterSequencer({
|
|
41
|
+
isValuesFrame: _liveOximeterSequencer.JUMPER_VALUES,
|
|
42
|
+
onResult
|
|
43
|
+
}) : new _jumperSequencer.JumperSequencer({
|
|
44
|
+
kind: params.deviceName === _integratedDevices.IntegratedDevices.JUMPER_BPM ? "blood-pressure" : "thermometer",
|
|
45
|
+
onResult
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** One notification is one frame. */
|
|
50
|
+
validatePackage = () => true;
|
|
51
|
+
handleSuccessResult() {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.JumperDevice = JumperDeviceClass;
|
|
56
|
+
//# sourceMappingURL=jumper.device.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_integratedDevices","require","_btManagedDevice","_liveOximeterSequencer","_jumperProtocol","_jumperSequencer","passThrough","caseValuePosition","cases","service","uuid","notify","optional","monitorUuids","parsingModel","SERVICES","IntegratedDevices","JUMPER_OXIMETER","JUMPER_SERVICE","JUMPER_NOTIFY","JUMPER_GATT","oximeterAlternate","JUMPER_THERMOMETER","thermometerAlternate","JUMPER_BPM","bloodPressure","JumperDeviceClass","BTManagedDevice","stuckDataTimeout","onStreamStart","undefined","constructor","device","params","mainServices","deviceName","onResult","result","createCommandSequencer","LiveOximeterSequencer","isValuesFrame","JUMPER_VALUES","JumperSequencer","kind","validatePackage","handleSuccessResult","exports","JumperDevice"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/jumper/jumper.device.ts"],"mappings":";;;;;;AAIA,IAAAA,kBAAA,GAAAC,OAAA;AAGA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAF,OAAA;AAEA,IAAAG,eAAA,GAAAH,OAAA;AACA,IAAAI,gBAAA,GAAAJ,OAAA;AAOA,MAAMK,WAAW,GAAG;EAAEC,iBAAiB,EAAE,EAAE;EAAEC,KAAK,EAAE;AAAG,CAAC;AAExD,MAAMC,OAAO,GAAGA,CAACC,IAAY,EAAEC,MAAc,EAAEC,QAAiB,MAAgB;EAC9EF,IAAI;EACJE,QAAQ;EACRC,YAAY,EAAE,CAAC;IAAEH,IAAI,EAAEC,MAAM;IAAEG,YAAY,EAAER;EAAY,CAAC;AAC5D,CAAC,CAAC;;AAEF;AACA,MAAMS,QAA0C,GAAG;EACjD,CAACC,oCAAiB,CAACC,eAAe,GAAG,CACnCR,OAAO,CAACS,8BAAc,EAAEC,6BAAa,EAAE,IAAI,CAAC,EAC5CV,OAAO,CAACW,2BAAW,CAACC,iBAAiB,CAACZ,OAAO,EAAEW,2BAAW,CAACC,iBAAiB,CAACV,MAAM,EAAE,IAAI,CAAC,CAC3F;EACD,CAACK,oCAAiB,CAACM,kBAAkB,GAAG,CACtCb,OAAO,CAACS,8BAAc,EAAEC,6BAAa,EAAE,IAAI,CAAC,EAC5CV,OAAO,CAACW,2BAAW,CAACG,oBAAoB,CAACd,OAAO,EAAEW,2BAAW,CAACG,oBAAoB,CAACZ,MAAM,EAAE,IAAI,CAAC,CACjG;EACD,CAACK,oCAAiB,CAACQ,UAAU,GAAG,CAC9Bf,OAAO,CAACW,2BAAW,CAACK,aAAa,CAAChB,OAAO,EAAEW,2BAAW,CAACK,aAAa,CAACd,MAAM,EAAE,KAAK,CAAC;AAEvF,CAAC;;AAED;AACA,MAAMe,iBAAiB,SAASC,gCAAe,CAAe;EAElDC,gBAAgB,GAAG,OAAO;EAC1BC,aAAa,GAAGC,SAAS;EAE5BC,WAAWA,CAACC,MAAc,EAAEC,MAAwC,EAAE;IAC3E,KAAK,CAACD,MAAM,EAAEC,MAAM,CAAC;IACrB,IAAI,CAACC,YAAY,GAAGnB,QAAQ,CAACkB,MAAM,CAACE,UAAU,CAAC;IAE/C,MAAMC,QAAQ,GAAIC,MAA+B,IAC/C,IAAI,CAACD,QAAQ,GACXC,MACF,CAAC;IAEH,IAAI,CAACC,sBAAsB,GAAG,MAC5BL,MAAM,CAACE,UAAU,KAAKnB,oCAAiB,CAACC,eAAe,GACnD,IAAIsB,4CAAqB,CAAC;MAAEC,aAAa,EAAEC,oCAAa;MAAEL;IAAS,CAAC,CAAC,GACrE,IAAIM,gCAAe,CAAC;MAClBC,IAAI,EACFV,MAAM,CAACE,UAAU,KAAKnB,oCAAiB,CAACQ,UAAU,GAAG,gBAAgB,GAAG,aAAa;MACvFY;IACF,CAAC,CAAC;EACV;;EAEA;EACUQ,eAAe,GAAGA,CAAA,KAAe,IAAI;EAErCC,mBAAmBA,CAAA,EAAS;IACpC;EACF;AACF;AAACC,OAAA,CAAAC,YAAA,GAAArB,iBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.readHa120 = exports.readFr302 = exports.JUMPER_SERVICE = exports.JUMPER_NOTIFY = exports.JUMPER_GATT = void 0;
|
|
7
|
+
var _hexToByte = require("../../../utils/hex-to-byte.js");
|
|
8
|
+
/* eslint-disable import/group-exports */
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Jumper Medical devices and their rebrands, from MedM Health Diary 3.12.11's `CJumper_*`
|
|
12
|
+
* classes. All three kinds here only notify; the app never writes.
|
|
13
|
+
*/
|
|
14
|
+
const sig16 = assigned => `0000${assigned}-0000-1000-8000-00805f9b34fb`;
|
|
15
|
+
|
|
16
|
+
/** Jumper's own service and characteristic, used by the oximeter and thermometers. */
|
|
17
|
+
const JUMPER_SERVICE = exports.JUMPER_SERVICE = "cdeacb80-5235-4c07-8846-93a37ee6b86d";
|
|
18
|
+
const JUMPER_NOTIFY = exports.JUMPER_NOTIFY = "cdeacb81-5235-4c07-8846-93a37ee6b86d";
|
|
19
|
+
const JUMPER_GATT = exports.JUMPER_GATT = {
|
|
20
|
+
oximeterAlternate: {
|
|
21
|
+
service: sig16("fee0"),
|
|
22
|
+
notify: sig16("fee1")
|
|
23
|
+
},
|
|
24
|
+
thermometerAlternate: {
|
|
25
|
+
service: sig16("fff0"),
|
|
26
|
+
notify: sig16("fff3")
|
|
27
|
+
},
|
|
28
|
+
bloodPressure: {
|
|
29
|
+
service: sig16("fff0"),
|
|
30
|
+
notify: sig16("fff1")
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
const bytes = frame => frame.map(byte => (0, _hexToByte.hexToByte)(byte));
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* HA120 (and Medicare Lifesense MD1803, Oxiline Pressure X Pro, Alphamed U80N/U90): a single
|
|
37
|
+
* `FD FD FC SYS DIA PULSE [X] 0D 0A` frame per measurement, in mmHg, timed by the phone.
|
|
38
|
+
*/
|
|
39
|
+
const readHa120 = frame => {
|
|
40
|
+
const b = bytes(frame);
|
|
41
|
+
if (b.length !== 8 && b.length !== 9 || b[0] !== 0xfd || b[1] !== 0xfd || b[2] !== 0xfc || b[b.length - 2] !== 0x0d || b[b.length - 1] !== 0x0a) {
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
systolic: b[3] ?? 0,
|
|
46
|
+
diastolic: b[4] ?? 0,
|
|
47
|
+
heartRate: b[5] ?? 0
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* FR302 / FR409 thermometers (and Zewa, iProven, Kinetik, Medicare Lifesense rebrands):
|
|
53
|
+
* `AA 22|33 hi lo sum`, hundredths of a degree Celsius, timed by the phone.
|
|
54
|
+
*/
|
|
55
|
+
exports.readHa120 = readHa120;
|
|
56
|
+
const readFr302 = frame => {
|
|
57
|
+
const b = bytes(frame);
|
|
58
|
+
if (b.length !== 5 || b[0] !== 0xaa || b[1] !== 0x22 && b[1] !== 0x33) {
|
|
59
|
+
return undefined;
|
|
60
|
+
}
|
|
61
|
+
if (((b[0] ?? 0) + (b[1] ?? 0) + (b[2] ?? 0) + (b[3] ?? 0) & 0xff) !== b[4]) {
|
|
62
|
+
return undefined;
|
|
63
|
+
}
|
|
64
|
+
return ((b[2] ?? 0) << 8 | (b[3] ?? 0)) / 100;
|
|
65
|
+
};
|
|
66
|
+
exports.readFr302 = readFr302;
|
|
67
|
+
//# sourceMappingURL=jumper.protocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_hexToByte","require","sig16","assigned","JUMPER_SERVICE","exports","JUMPER_NOTIFY","JUMPER_GATT","oximeterAlternate","service","notify","thermometerAlternate","bloodPressure","bytes","frame","map","byte","hexToByte","readHa120","b","length","undefined","systolic","diastolic","heartRate","readFr302"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/jumper/jumper.protocol.ts"],"mappings":";;;;;;AAEA,IAAAA,UAAA,GAAAC,OAAA;AAFA;;AAIA;AACA;AACA;AACA;AACA,MAAMC,KAAK,GAAIC,QAAgB,IAC7B,OAAOA,QAAQ,8BAA8B;;AAE/C;AACO,MAAMC,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG,sCAAsC;AAC7D,MAAME,aAAa,GAAAD,OAAA,CAAAC,aAAA,GAAG,sCAAsC;AAE5D,MAAMC,WAAW,GAAAF,OAAA,CAAAE,WAAA,GAAG;EACzBC,iBAAiB,EAAE;IAAEC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zE,MAAMK,CAAC,GAAGN,KAAK,CAACC,KAAK,CAAC;EAEtB,IAAIK,CAAC,CAACC,MAAM,KAAK,CAAC,IAAID,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,IAAKA,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,IAAIA,CAAC,CAAC,CAAC,CAAC,KAAK,IAAK,EAAE;IACvE,OAAOE,SAAS;EAClB;EAEA,IAAI,CAAE,CAACF,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAKA,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAIA,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAIA,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,GAAI,IAAI,MAAMA,CAAC,CAAC,CAAC,CAAC,EAAE;IAC7E,OAAOE,SAAS;EAClB;EAEA,OAAO,CAAE,CAACF,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAKA,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,GAAG;AACjD,CAAC;AAACd,OAAA,CAAAoB,SAAA,GAAAA,SAAA","ignoreList":[]}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.JumperSequencer = void 0;
|
|
7
|
+
var _core = require("@ovok/core");
|
|
8
|
+
var _caseType = require("../../../types/case-type.js");
|
|
9
|
+
var _jumperProtocol = require("./jumper.protocol.js");
|
|
10
|
+
/** The thermometers repeat a reading; MedM drops repeats within 30 s. */
|
|
11
|
+
const REPEAT_WINDOW_MS = 30_000;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The Jumper HA120 blood-pressure monitor and FR302-family thermometers: the device pushes one
|
|
15
|
+
* frame per measurement and the app answers nothing.
|
|
16
|
+
*/
|
|
17
|
+
class JumperSequencer {
|
|
18
|
+
recorded = false;
|
|
19
|
+
constructor(params) {
|
|
20
|
+
this.params = params;
|
|
21
|
+
}
|
|
22
|
+
initialCommands = () => [];
|
|
23
|
+
isNormalDisconnect = () => this.recorded;
|
|
24
|
+
nextCommand = frame => {
|
|
25
|
+
const reading = this.params.kind === "blood-pressure" ? this.bloodPressure(frame) : this.temperature(frame);
|
|
26
|
+
if (reading) {
|
|
27
|
+
this.recorded = true;
|
|
28
|
+
this.params.onResult({
|
|
29
|
+
caseType: _caseType.CaseType.RESULT,
|
|
30
|
+
recordedAt: new Date(),
|
|
31
|
+
...reading
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
return undefined;
|
|
35
|
+
};
|
|
36
|
+
bloodPressure = frame => {
|
|
37
|
+
const reading = (0, _jumperProtocol.readHa120)(frame);
|
|
38
|
+
return reading && {
|
|
39
|
+
measurementTypeKey: _core.MeasurementTypeKey.bloodPressure,
|
|
40
|
+
...reading
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
temperature = frame => {
|
|
44
|
+
const bodyTemp = (0, _jumperProtocol.readFr302)(frame);
|
|
45
|
+
const now = Date.now();
|
|
46
|
+
if (bodyTemp === undefined || this.lastTemperature?.value === bodyTemp && now - this.lastTemperature.at < REPEAT_WINDOW_MS) {
|
|
47
|
+
return undefined;
|
|
48
|
+
}
|
|
49
|
+
this.lastTemperature = {
|
|
50
|
+
value: bodyTemp,
|
|
51
|
+
at: now
|
|
52
|
+
};
|
|
53
|
+
return {
|
|
54
|
+
measurementTypeKey: _core.MeasurementTypeKey.temperature,
|
|
55
|
+
bodyTemp
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
exports.JumperSequencer = JumperSequencer;
|
|
60
|
+
//# sourceMappingURL=jumper.sequencer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_core","require","_caseType","_jumperProtocol","REPEAT_WINDOW_MS","JumperSequencer","recorded","constructor","params","initialCommands","isNormalDisconnect","nextCommand","frame","reading","kind","bloodPressure","temperature","onResult","caseType","CaseType","RESULT","recordedAt","Date","undefined","readHa120","measurementTypeKey","MeasurementTypeKey","bodyTemp","readFr302","now","lastTemperature","value","at","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/jumper/jumper.sequencer.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AAIA,IAAAE,eAAA,GAAAF,OAAA;AAEA;AACA,MAAMG,gBAAgB,GAAG,MAAM;;AAE/B;AACA;AACA;AACA;AACA,MAAMC,eAAe,CAA6B;EACxCC,QAAQ,GAAG,KAAK;EAGjBC,WAAWA,CACCC,MAGhB,EACD;IAAA,KAJiBA,MAGhB,GAHgBA,MAGhB;EACA;EAEIC,eAAe,GAAGA,CAAA,KAAgC,EAAE;EAEpDC,kBAAkB,GAAGA,CAAA,KAAe,IAAI,CAACJ,QAAQ;EAEjDK,WAAW,GAAIC,KAAwB,IAAgB;IAC5D,MAAMC,OAAO,GACX,IAAI,CAACL,MAAM,CAACM,IAAI,KAAK,gBAAgB,GAAG,IAAI,CAACC,aAAa,CAACH,KAAK,CAAC,GAAG,IAAI,CAACI,WAAW,CAACJ,KAAK,CAAC;IAE7F,IAAIC,OAAO,EAAE;MACX,IAAI,CAACP,QAAQ,GAAG,IAAI;MACpB,IAAI,CAACE,MAAM,CAACS,QAAQ,CAAC;QAAEC,QAAQ,EAAEC,kBAAQ,CAACC,MAAM;QAAEC,UAAU,EAAE,IAAIC,IAAI,CAAC,CAAC;QAAE,GAAGT;MAAQ,CAAC,CAAC;IACzF;IAEA,OAAOU,SAAS;EAClB,CAAC;EAEOR,aAAa,GAAIH,KAAwB,IAA0C;IACzF,MAAMC,OAAO,GAAG,IAAAW,yBAAS,EAACZ,KAAK,CAAC;IAEhC,OAAOC,OAAO,IAAI;MAAEY,kBAAkB,EAAEC,wBAAkB,CAACX,aAAa;MAAE,GAAGF;IAAQ,CAAC;EACxF,CAAC;EAEOG,WAAW,GAAIJ,KAAwB,IAA0C;IACvF,MAAMe,QAAQ,GAAG,IAAAC,yBAAS,EAAChB,KAAK,CAAC;IACjC,MAAMiB,GAAG,GAAGP,IAAI,CAACO,GAAG,CAAC,CAAC;IAEtB,IACEF,QAAQ,KAAKJ,SAAS,IACrB,IAAI,CAACO,eAAe,EAAEC,KAAK,KAAKJ,QAAQ,IACvCE,GAAG,GAAG,IAAI,CAACC,eAAe,CAACE,EAAE,GAAG5B,gBAAiB,EACnD;MACA,OAAOmB,SAAS;IAClB;IAEA,IAAI,CAACO,eAAe,GAAG;MAAEC,KAAK,EAAEJ,QAAQ;MAAEK,EAAE,EAAEH;IAAI,CAAC;IAEnD,OAAO;MAAEJ,kBAAkB,EAAEC,wBAAkB,CAACV,WAAW;MAAEW;IAAS,CAAC;EACzE,CAAC;AACH;AAACM,OAAA,CAAA5B,eAAA,GAAAA,eAAA","ignoreList":[]}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.readOximeterData = exports.LiveOximeterSequencer = exports.JUMPER_VALUES = exports.AOJ_VALUES = void 0;
|
|
7
|
+
var _core = require("@ovok/core");
|
|
8
|
+
var _caseType = require("../../types/case-type.js");
|
|
9
|
+
var _hexToByte = require("../../utils/hex-to-byte.js");
|
|
10
|
+
/**
|
|
11
|
+
* Pulse oximeters that only notify live values - `PR SpO2 PI×10` after a header byte - with no
|
|
12
|
+
* stored records and no clock: the AOJ-70A/70B and Jumper JPD-500D families.
|
|
13
|
+
*
|
|
14
|
+
* A spot reading is the last valid saturation and pulse once valid values stop for a few
|
|
15
|
+
* seconds - the finger came out or the device went to sleep - which is also how MedM forms one.
|
|
16
|
+
*/
|
|
17
|
+
/** Quiet time after the last valid value before the spot reading is reported. */
|
|
18
|
+
const SETTLE_MS = 3_000;
|
|
19
|
+
|
|
20
|
+
/** Picks the values frame out of whatever else the device sends (waveform, status). */
|
|
21
|
+
|
|
22
|
+
/** AOJ-70: header exactly `81`, extra bytes ignored. */
|
|
23
|
+
const AOJ_VALUES = (header, length) => header === 0x81 && length >= 4;
|
|
24
|
+
|
|
25
|
+
/** Jumper JPD-500D: low nibble 1, exactly four bytes. */
|
|
26
|
+
exports.AOJ_VALUES = AOJ_VALUES;
|
|
27
|
+
const JUMPER_VALUES = (header, length) => (header & 0x0f) === 1 && length === 4;
|
|
28
|
+
|
|
29
|
+
/** Pulse rate counts at 1-254 bpm, SpO2 is invalid at 0 or 0x7F, PI 0 means none. */
|
|
30
|
+
exports.JUMPER_VALUES = JUMPER_VALUES;
|
|
31
|
+
const readOximeterData = (frame, isValuesFrame = AOJ_VALUES) => {
|
|
32
|
+
if (!isValuesFrame((0, _hexToByte.hexToByte)(frame[0] ?? "00"), frame.length)) {
|
|
33
|
+
return undefined;
|
|
34
|
+
}
|
|
35
|
+
const pulseRate = (0, _hexToByte.hexToByte)(frame[1] ?? "00");
|
|
36
|
+
const bloodOxygen = (0, _hexToByte.hexToByte)(frame[2] ?? "00");
|
|
37
|
+
const perfusionIndex = (0, _hexToByte.hexToByte)(frame[3] ?? "00");
|
|
38
|
+
if (pulseRate < 1 || pulseRate > 254 || bloodOxygen === 0 || bloodOxygen === 0x7f) {
|
|
39
|
+
return undefined;
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
bloodOxygen,
|
|
43
|
+
pulseRate,
|
|
44
|
+
...(perfusionIndex > 0 ? {
|
|
45
|
+
perfusionIndex: perfusionIndex / 10
|
|
46
|
+
} : {})
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
exports.readOximeterData = readOximeterData;
|
|
50
|
+
class LiveOximeterSequencer {
|
|
51
|
+
constructor(params) {
|
|
52
|
+
this.params = params;
|
|
53
|
+
}
|
|
54
|
+
initialCommands = () => [];
|
|
55
|
+
isNormalDisconnect = () => true;
|
|
56
|
+
commandTimeoutMs = () => this.latest ? SETTLE_MS : undefined;
|
|
57
|
+
onCommandTimeout = () => {
|
|
58
|
+
const latest = this.latest;
|
|
59
|
+
this.latest = undefined;
|
|
60
|
+
if (latest) {
|
|
61
|
+
this.params.onResult({
|
|
62
|
+
caseType: _caseType.CaseType.RESULT,
|
|
63
|
+
measurementTypeKey: _core.MeasurementTypeKey.bloodOxygenPulseRate,
|
|
64
|
+
...latest
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
return {};
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
/** A valid value restarts the settle time; anything else leaves it running. */
|
|
71
|
+
commandProgress = frame => {
|
|
72
|
+
const values = readOximeterData(frame, this.params.isValuesFrame);
|
|
73
|
+
if (!values) {
|
|
74
|
+
return "ignored";
|
|
75
|
+
}
|
|
76
|
+
this.latest = {
|
|
77
|
+
...values,
|
|
78
|
+
recordedAt: new Date()
|
|
79
|
+
};
|
|
80
|
+
return "partial";
|
|
81
|
+
};
|
|
82
|
+
nextCommand = () => undefined;
|
|
83
|
+
}
|
|
84
|
+
exports.LiveOximeterSequencer = LiveOximeterSequencer;
|
|
85
|
+
//# sourceMappingURL=live-oximeter.sequencer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_core","require","_caseType","_hexToByte","SETTLE_MS","AOJ_VALUES","header","length","exports","JUMPER_VALUES","readOximeterData","frame","isValuesFrame","hexToByte","undefined","pulseRate","bloodOxygen","perfusionIndex","LiveOximeterSequencer","constructor","params","initialCommands","isNormalDisconnect","commandTimeoutMs","latest","onCommandTimeout","onResult","caseType","CaseType","RESULT","measurementTypeKey","MeasurementTypeKey","bloodOxygenPulseRate","commandProgress","values","recordedAt","Date","nextCommand"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/live-oximeter.sequencer.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAEA,IAAAC,SAA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C;AACH,CAAC;AAACT,OAAA,CAAAE,gBAAA,GAAAA,gBAAA;AAEF,MAAMQ,qBAAqB,CAA6B;EAG/CC,WAAWA,CACCC,MAGhB,EACD;IAAA,KAJiBA,MAGhB,GAHgBA,MAGhB;EACA;EAEIC,eAAe,GAAGA,CAAA,KAAgC,EAAE;EAEpDC,kBAAkB,GAAGA,CAAA,KAAe,IAAI;EAExCC,gBAAgB,GAAGA,CAAA,KAA2B,IAAI,CAACC,MAAM,GAAGpB,SAAS,GAAGU,SAAU;EAElFW,gBAAgB,GAAGA,CAAA,KAA4B;IACpD,MAAMD,MAAM,GAAG,IAAI,CAACA,MAAM;IAE1B,IAAI,CAACA,MAAM,GAAGV,SAAS;IAEvB,IAAIU,MAAM,EAAE;MACV,IAAI,CAACJ,MAAM,CAACM,QAAQ,CAAC;QACnBC,QAAQ,EAAEC,kBAAQ,CAACC,MAAM;QACzBC,kBAAkB,EAAEC,wBAAkB,CAACC,oBAAoB;QAC3D,GAAGR;MACL,CAAC,CAAC;IACJ;IAEA,OAAO,CAAC,CAAC;EACX,CAAC;;EAED;EACOS,eAAe,GAAItB,KAAwB,IAAyC;IACzF,MAAMuB,MAAM,GAAGxB,gBAAgB,CAACC,KAAK,EAAE,IAAI,CAACS,MAAM,CAACR,aAAa,CAAC;IAEjE,IAAI,CAACsB,MAAM,EAAE;MACX,OAAO,SAAS;IAClB;IAEA,IAAI,CAACV,MAAM,GAAG;MAAE,GAAGU,MAAM;MAAEC,UAAU,EAAE,IAAIC,IAAI,CAAC;IAAE,CAAC;IAEnD,OAAO,SAAS;EAClB,CAAC;EAEMC,WAAW,GAAGA,CAAA,KAAiBvB,SAAS;AACjD;AAACN,OAAA,CAAAU,qBAAA,GAAAA,qBAAA","ignoreList":[]}
|
|
@@ -15,24 +15,38 @@ var _hexToBytes = require("../../utils/hex-to-bytes.js");
|
|
|
15
15
|
* device changing.
|
|
16
16
|
*/
|
|
17
17
|
class PollingCommandSequencer {
|
|
18
|
-
constructor(commands) {
|
|
18
|
+
constructor(commands, repeated = commands) {
|
|
19
19
|
this.commands = commands;
|
|
20
|
+
this.repeated = repeated;
|
|
20
21
|
}
|
|
21
22
|
initialCommands = () => this.commands;
|
|
22
|
-
nextCommand = () => this.
|
|
23
|
+
nextCommand = () => this.repeated;
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
/**
|
|
26
27
|
* Builds the polling policy a device's declared services already describe.
|
|
27
28
|
*
|
|
28
29
|
* A service without a write characteristic contributes nothing, so a listen-only device
|
|
29
|
-
* gets an empty policy and is never written to.
|
|
30
|
+
* gets an empty policy and is never written to. A write marked `onConnectOnly` goes out on
|
|
31
|
+
* connect and is not repeated.
|
|
30
32
|
*/
|
|
31
33
|
exports.PollingCommandSequencer = PollingCommandSequencer;
|
|
32
|
-
const pollingSequencerFor = services =>
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}] : [])
|
|
34
|
+
const pollingSequencerFor = services => {
|
|
35
|
+
const writes = services.flatMap(service => service.writeUuid ? [{
|
|
36
|
+
service,
|
|
37
|
+
write: service.writeUuid
|
|
38
|
+
}] : []);
|
|
39
|
+
const command = ({
|
|
40
|
+
service,
|
|
41
|
+
write
|
|
42
|
+
}) => ({
|
|
43
|
+
serviceUuid: service.uuid,
|
|
44
|
+
characteristicUuid: write.uuid,
|
|
45
|
+
frame: (0, _hexToBytes.hexToBytes)(write.mainCommandUuid)
|
|
46
|
+
});
|
|
47
|
+
return new PollingCommandSequencer(writes.map(command), writes.filter(({
|
|
48
|
+
write
|
|
49
|
+
}) => !write.onConnectOnly).map(command));
|
|
50
|
+
};
|
|
37
51
|
exports.pollingSequencerFor = pollingSequencerFor;
|
|
38
52
|
//# sourceMappingURL=polling-command-sequencer.js.map
|
package/lib/commonjs/modules/bt-management/services/devices/polling-command-sequencer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_hexToBytes","require","PollingCommandSequencer","constructor","commands","initialCommands","nextCommand","exports","pollingSequencerFor","services","flatMap","service","writeUuid","serviceUuid","uuid","characteristicUuid","frame","hexToBytes","mainCommandUuid"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/polling-command-sequencer.ts"],"mappings":";;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,uBAAuB,CAA6B;EACjDC,WAAWA,
|
|
1
|
+
{"version":3,"names":["_hexToBytes","require","PollingCommandSequencer","constructor","commands","repeated","initialCommands","nextCommand","exports","pollingSequencerFor","services","writes","flatMap","service","writeUuid","write","command","serviceUuid","uuid","characteristicUuid","frame","hexToBytes","mainCommandUuid","map","filter","onConnectOnly"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/polling-command-sequencer.ts"],"mappings":";;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,uBAAuB,CAA6B;EACjDC,WAAWA,CACCC,QAAkC,EAClCC,QAAkC,GAAGD,QAAQ,EAC9D;IAAA,KAFiBA,QAAkC,GAAlCA,QAAkC;IAAA,KAClCC,QAAkC,GAAlCA,QAAkC;EAClD;EAEIC,eAAe,GAAGA,CAAA,KAAgC,IAAI,CAACF,QAAQ;EAE/DG,WAAW,GAAGA,CAAA,KAAgC,IAAI,CAACF,QAAQ;AACpE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AANAG,OAAA,CAAAN,uBAAA,GAAAA,uBAAA;AAOA,MAAMO,mBAAmB,GACvBC,QAAuC,IACX;EAC5B,MAAMC,MAAM,GAAGD,QAAQ,CAACE,OAAO,CAAEC,OAAO,IACtCA,OAAO,CAACC,SAAS,GAAG,CAAC;IAAED,OAAO;IAAEE,KAAK,EAAEF,OAAO,CAACC;EAAU,CAAC,CAAC,GAAG,EAChE,CAAC;EAED,MAAME,OAAO,GAAGA,CAAC;IAAEH,OAAO;IAAEE;EAA+B,CAAC,MAAqB;IAC/EE,WAAW,EAAEJ,OAAO,CAACK,IAAI;IACzBC,kBAAkB,EAAEJ,KAAK,CAACG,IAAI;IAC9BE,KAAK,EAAE,IAAAC,sBAAU,EAACN,KAAK,CAACO,eAAe;EACzC,CAAC,CAAC;EAEF,OAAO,IAAIpB,uBAAuB,CAChCS,MAAM,CAACY,GAAG,CAACP,OAAO,CAAC,EACnBL,MAAM,CAACa,MAAM,CAAC,CAAC;IAAET;EAAM,CAAC,KAAK,CAACA,KAAK,CAACU,aAAa,CAAC,CAACF,GAAG,CAACP,OAAO,CAChE,CAAC;AACH,CAAC;AAACR,OAAA,CAAAC,mBAAA,GAAAA,mBAAA","ignoreList":[]}
|
package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js
CHANGED
|
@@ -3,8 +3,16 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.standardBloodPressureDevice = void 0;
|
|
7
|
+
Object.defineProperty(exports, "standardGlucoseDevice", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () {
|
|
10
|
+
return _standardGattGlucose.standardGlucoseDevice;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
exports.standardWeightScaleDevice = exports.standardThermometerDevice = exports.standardPulseOximeterDevice = exports.standardHeartRateDevice = void 0;
|
|
7
14
|
var _core = require("@ovok/core");
|
|
15
|
+
var _standardGattGlucose = require("./standard-gatt.glucose.js");
|
|
8
16
|
var _standardGattProfile = require("./standard-gatt.profile.js");
|
|
9
17
|
/* eslint-disable max-lines */
|
|
10
18
|
|
|
@@ -52,7 +60,10 @@ const standardBloodPressureDevice = params => (0, _standardGattProfile.declarePr
|
|
|
52
60
|
...params,
|
|
53
61
|
decorateReading: (reading, frame, recordOffset) => {
|
|
54
62
|
const decorated = (0, _standardGattProfile.decorateBloodPressureReading)(reading, frame, recordOffset);
|
|
55
|
-
|
|
63
|
+
if (!decorated) {
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
return params.decorateReading ? params.decorateReading(decorated, frame, recordOffset) : decorated;
|
|
56
67
|
}
|
|
57
68
|
}, {
|
|
58
69
|
service: "1810",
|