@ovok/native 1.10.9 → 1.10.11
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 +34 -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-and-medical-variants.js +47 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-and-medical-variants.js.map +1 -0
- 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-cofoe-variants.js +119 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-cofoe-variants.js.map +1 -0
- 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 +1007 -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-taidoc-variants.js +173 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-taidoc-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 +320 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-variants.js.map +1 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-yonker-variants.js +113 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-yonker-variants.js.map +1 -0
- package/lib/commonjs/modules/bt-device/constants/supported-devices.js +58 -27
- 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/and-medical-device-variants.js +39 -0
- package/lib/commonjs/modules/bt-management/constants/and-medical-device-variants.js.map +1 -0
- 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/built-in-measurement-types.js +84 -0
- package/lib/commonjs/modules/bt-management/constants/built-in-measurement-types.js.map +1 -0
- package/lib/commonjs/modules/bt-management/constants/cofoe-device-variants.js +101 -0
- package/lib/commonjs/modules/bt-management/constants/cofoe-device-variants.js.map +1 -0
- package/lib/commonjs/modules/bt-management/constants/device-variants.js +256 -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 +807 -0
- package/lib/commonjs/modules/bt-management/constants/standard-device-variants.js.map +1 -0
- package/lib/commonjs/modules/bt-management/constants/taidoc-device-variants.js +144 -0
- package/lib/commonjs/modules/bt-management/constants/taidoc-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/constants/yonker-device-variants.js +93 -0
- package/lib/commonjs/modules/bt-management/constants/yonker-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 +33 -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 +44 -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/and-medical/and-medical.device.js +61 -0
- package/lib/commonjs/modules/bt-management/services/devices/and-medical/and-medical.device.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/and-medical/and-medical.protocol.js +113 -0
- package/lib/commonjs/modules/bt-management/services/devices/and-medical/and-medical.protocol.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/and-medical/and-medical.sequencer.js +77 -0
- package/lib/commonjs/modules/bt-management/services/devices/and-medical/and-medical.sequencer.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 +12 -7
- 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 +19 -3
- package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe-bp.sequencer.js +86 -0
- package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe-bp.sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe-glucose.sequencer.js +155 -0
- package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe-glucose.sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe-thermometer.sequencer.js +33 -0
- package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe-thermometer.sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe.device.js +87 -0
- package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe.device.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe.protocol.js +185 -0
- package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe.protocol.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe.records.js +86 -0
- package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe.records.js.map +1 -0
- 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 +89 -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/taidoc/taidoc.device.js +50 -0
- package/lib/commonjs/modules/bt-management/services/devices/taidoc/taidoc.device.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/taidoc/taidoc.protocol.js +127 -0
- package/lib/commonjs/modules/bt-management/services/devices/taidoc/taidoc.protocol.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/taidoc/taidoc.records.js +181 -0
- package/lib/commonjs/modules/bt-management/services/devices/taidoc/taidoc.records.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/taidoc/taidoc.sequencer.js +139 -0
- package/lib/commonjs/modules/bt-management/services/devices/taidoc/taidoc.sequencer.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/services/devices/yonker/yonker.device.js +90 -0
- package/lib/commonjs/modules/bt-management/services/devices/yonker/yonker.device.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/yonker/yonker.protocol.js +202 -0
- package/lib/commonjs/modules/bt-management/services/devices/yonker/yonker.protocol.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/yonker/yonker.sequencer.js +137 -0
- package/lib/commonjs/modules/bt-management/services/devices/yonker/yonker.sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/types/integrated-devices.js +33 -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 +34 -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-and-medical-variants.js +45 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-and-medical-variants.js.map +1 -0
- 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-cofoe-variants.js +117 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-cofoe-variants.js.map +1 -0
- 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 +1005 -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-taidoc-variants.js +171 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-taidoc-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 +317 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-variants.js.map +1 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-yonker-variants.js +111 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-yonker-variants.js.map +1 -0
- package/lib/module/modules/bt-device/constants/supported-devices.js +59 -28
- 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/and-medical-device-variants.js +37 -0
- package/lib/module/modules/bt-management/constants/and-medical-device-variants.js.map +1 -0
- 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/built-in-measurement-types.js +82 -0
- package/lib/module/modules/bt-management/constants/built-in-measurement-types.js.map +1 -0
- package/lib/module/modules/bt-management/constants/cofoe-device-variants.js +99 -0
- package/lib/module/modules/bt-management/constants/cofoe-device-variants.js.map +1 -0
- package/lib/module/modules/bt-management/constants/device-variants.js +253 -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 +804 -0
- package/lib/module/modules/bt-management/constants/standard-device-variants.js.map +1 -0
- package/lib/module/modules/bt-management/constants/taidoc-device-variants.js +142 -0
- package/lib/module/modules/bt-management/constants/taidoc-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/constants/yonker-device-variants.js +91 -0
- package/lib/module/modules/bt-management/constants/yonker-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 +33 -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 +44 -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/and-medical/and-medical.device.js +57 -0
- package/lib/module/modules/bt-management/services/devices/and-medical/and-medical.device.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/and-medical/and-medical.protocol.js +106 -0
- package/lib/module/modules/bt-management/services/devices/and-medical/and-medical.protocol.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/and-medical/and-medical.sequencer.js +74 -0
- package/lib/module/modules/bt-management/services/devices/and-medical/and-medical.sequencer.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 +12 -7
- 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 +19 -3
- package/lib/module/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/cofoe/cofoe-bp.sequencer.js +82 -0
- package/lib/module/modules/bt-management/services/devices/cofoe/cofoe-bp.sequencer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/cofoe/cofoe-glucose.sequencer.js +148 -0
- package/lib/module/modules/bt-management/services/devices/cofoe/cofoe-glucose.sequencer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/cofoe/cofoe-thermometer.sequencer.js +30 -0
- package/lib/module/modules/bt-management/services/devices/cofoe/cofoe-thermometer.sequencer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/cofoe/cofoe.device.js +83 -0
- package/lib/module/modules/bt-management/services/devices/cofoe/cofoe.device.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/cofoe/cofoe.protocol.js +173 -0
- package/lib/module/modules/bt-management/services/devices/cofoe/cofoe.protocol.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/cofoe/cofoe.records.js +78 -0
- package/lib/module/modules/bt-management/services/devices/cofoe/cofoe.records.js.map +1 -0
- 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 +83 -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/taidoc/taidoc.device.js +46 -0
- package/lib/module/modules/bt-management/services/devices/taidoc/taidoc.device.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/taidoc/taidoc.protocol.js +114 -0
- package/lib/module/modules/bt-management/services/devices/taidoc/taidoc.protocol.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/taidoc/taidoc.records.js +168 -0
- package/lib/module/modules/bt-management/services/devices/taidoc/taidoc.records.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/taidoc/taidoc.sequencer.js +136 -0
- package/lib/module/modules/bt-management/services/devices/taidoc/taidoc.sequencer.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/services/devices/yonker/yonker.device.js +86 -0
- package/lib/module/modules/bt-management/services/devices/yonker/yonker.device.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/yonker/yonker.protocol.js +186 -0
- package/lib/module/modules/bt-management/services/devices/yonker/yonker.protocol.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/yonker/yonker.sequencer.js +133 -0
- package/lib/module/modules/bt-management/services/devices/yonker/yonker.sequencer.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 +33 -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-and-medical-variants.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-and-medical-variants.d.ts.map +1 -0
- 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-cofoe-variants.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-cofoe-variants.d.ts.map +1 -0
- 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-taidoc-variants.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-taidoc-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-device-catalog-yonker-variants.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-yonker-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/and-medical-device-variants.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/bt-management/constants/and-medical-device-variants.d.ts.map +1 -0
- 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/built-in-measurement-types.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/bt-management/constants/built-in-measurement-types.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/constants/cofoe-device-variants.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/bt-management/constants/cofoe-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/taidoc-device-variants.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/bt-management/constants/taidoc-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/constants/yonker-device-variants.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/bt-management/constants/yonker-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 +43 -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/and-medical/and-medical.device.d.ts +18 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/and-medical/and-medical.device.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/and-medical/and-medical.protocol.d.ts +30 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/and-medical/and-medical.protocol.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/and-medical/and-medical.sequencer.d.ts +26 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/and-medical/and-medical.sequencer.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 +4 -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/cofoe/cofoe-bp.sequencer.d.ts +32 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/cofoe/cofoe-bp.sequencer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/cofoe/cofoe-glucose.sequencer.d.ts +46 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/cofoe/cofoe-glucose.sequencer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/cofoe/cofoe-thermometer.sequencer.d.ts +15 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/cofoe/cofoe-thermometer.sequencer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/cofoe/cofoe.device.d.ts +18 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/cofoe/cofoe.device.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/cofoe/cofoe.protocol.d.ts +75 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/cofoe/cofoe.protocol.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/cofoe/cofoe.records.d.ts +22 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/cofoe/cofoe.records.d.ts.map +1 -0
- 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 +37 -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/taidoc/taidoc.device.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/taidoc/taidoc.device.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/taidoc/taidoc.protocol.d.ts +50 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/taidoc/taidoc.protocol.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/taidoc/taidoc.records.d.ts +40 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/taidoc/taidoc.records.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/taidoc/taidoc.sequencer.d.ts +38 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/taidoc/taidoc.sequencer.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/services/devices/yonker/yonker.device.d.ts +21 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/yonker/yonker.device.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/yonker/yonker.protocol.d.ts +62 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/yonker/yonker.protocol.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/yonker/yonker.sequencer.d.ts +46 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/yonker/yonker.sequencer.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 +6 -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 +33 -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 +34 -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/commonjs/src/modules/data-sync/utils/get-samples-from-health.d.ts +2 -2
- 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-and-medical-variants.d.ts +5 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-and-medical-variants.d.ts.map +1 -0
- 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-cofoe-variants.d.ts +5 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-cofoe-variants.d.ts.map +1 -0
- 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-taidoc-variants.d.ts +5 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-taidoc-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-device-catalog-yonker-variants.d.ts +5 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-yonker-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/and-medical-device-variants.d.ts +5 -0
- package/lib/typescript/module/src/modules/bt-management/constants/and-medical-device-variants.d.ts.map +1 -0
- 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/built-in-measurement-types.d.ts +9 -0
- package/lib/typescript/module/src/modules/bt-management/constants/built-in-measurement-types.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/constants/cofoe-device-variants.d.ts +5 -0
- package/lib/typescript/module/src/modules/bt-management/constants/cofoe-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/taidoc-device-variants.d.ts +5 -0
- package/lib/typescript/module/src/modules/bt-management/constants/taidoc-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/constants/yonker-device-variants.d.ts +5 -0
- package/lib/typescript/module/src/modules/bt-management/constants/yonker-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 +43 -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/and-medical/and-medical.device.d.ts +18 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/and-medical/and-medical.device.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/and-medical/and-medical.protocol.d.ts +30 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/and-medical/and-medical.protocol.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/and-medical/and-medical.sequencer.d.ts +26 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/and-medical/and-medical.sequencer.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 +4 -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/cofoe/cofoe-bp.sequencer.d.ts +32 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/cofoe/cofoe-bp.sequencer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/cofoe/cofoe-glucose.sequencer.d.ts +46 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/cofoe/cofoe-glucose.sequencer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/cofoe/cofoe-thermometer.sequencer.d.ts +15 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/cofoe/cofoe-thermometer.sequencer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/cofoe/cofoe.device.d.ts +18 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/cofoe/cofoe.device.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/cofoe/cofoe.protocol.d.ts +75 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/cofoe/cofoe.protocol.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/cofoe/cofoe.records.d.ts +22 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/cofoe/cofoe.records.d.ts.map +1 -0
- 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 +37 -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/taidoc/taidoc.device.d.ts +16 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/taidoc/taidoc.device.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/taidoc/taidoc.protocol.d.ts +50 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/taidoc/taidoc.protocol.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/taidoc/taidoc.records.d.ts +40 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/taidoc/taidoc.records.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/taidoc/taidoc.sequencer.d.ts +38 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/taidoc/taidoc.sequencer.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/services/devices/yonker/yonker.device.d.ts +21 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/yonker/yonker.device.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/yonker/yonker.protocol.d.ts +62 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/yonker/yonker.protocol.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/yonker/yonker.sequencer.d.ts +46 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/yonker/yonker.sequencer.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 +6 -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 +33 -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 +34 -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/lib/typescript/module/src/modules/data-sync/utils/get-samples-from-health.d.ts +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TaidocSequencer = void 0;
|
|
7
|
+
var _caseType = require("../../../types/case-type.js");
|
|
8
|
+
var _taidocProtocol = require("./taidoc.protocol.js");
|
|
9
|
+
var _taidocRecords = require("./taidoc.records.js");
|
|
10
|
+
/** MedM's wait after connecting before the first command: 1.5 s, 3 s for the 8255, 8 s for the cuff. */
|
|
11
|
+
const START_DELAY_MS = {
|
|
12
|
+
multi: 1_500,
|
|
13
|
+
bpm: 8_000,
|
|
14
|
+
thermometer: 1_500,
|
|
15
|
+
oximeter: 3_000,
|
|
16
|
+
scale: 1_500
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** The scale paces its record requests 250 ms apart. */
|
|
20
|
+
const SCALE_RECORD_DELAY_MS = 250;
|
|
21
|
+
const RESPONSE_TIMEOUT_MS = 3_000;
|
|
22
|
+
const RETRIES = 3;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* MedM's history session: model, serial, device time, set time, then for every device user the
|
|
26
|
+
* record count and each record by index (record time 0x25, then result 0x26; the scale's 0x71
|
|
27
|
+
* carries both). It ends with power off 0x50; the clear-memory command 0x52 is never sent.
|
|
28
|
+
*/
|
|
29
|
+
class TaidocSequencer {
|
|
30
|
+
retries = RETRIES;
|
|
31
|
+
ended = false;
|
|
32
|
+
user = 0;
|
|
33
|
+
maxUser = 0;
|
|
34
|
+
count = 0;
|
|
35
|
+
index = 0;
|
|
36
|
+
recordTime = [];
|
|
37
|
+
constructor(params) {
|
|
38
|
+
this.params = params;
|
|
39
|
+
}
|
|
40
|
+
initialCommands = () => [this.send((0, _taidocProtocol.taidocCommand)(_taidocProtocol.TAIDOC.model), START_DELAY_MS[this.params.kind])];
|
|
41
|
+
isHistoryTransfer = () => true;
|
|
42
|
+
isNormalDisconnect = () => this.ended;
|
|
43
|
+
commandTimeoutMs = () => this.ended ? undefined : RESPONSE_TIMEOUT_MS;
|
|
44
|
+
onCommandTimeout = () => {
|
|
45
|
+
if (this.retries === 0 || !this.last) {
|
|
46
|
+
return {
|
|
47
|
+
terminal: true
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
this.retries -= 1;
|
|
51
|
+
return {
|
|
52
|
+
commands: [this.last]
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
commandProgress = frame => (0, _taidocProtocol.isHostFrame)(frame) ? "ignored" : "complete";
|
|
56
|
+
nextCommand = frame => {
|
|
57
|
+
if ((0, _taidocProtocol.isHostFrame)(frame) || this.ended) {
|
|
58
|
+
return undefined;
|
|
59
|
+
}
|
|
60
|
+
this.retries = RETRIES;
|
|
61
|
+
switch ((0, _taidocProtocol.commandOf)(frame)) {
|
|
62
|
+
case _taidocProtocol.TAIDOC.busy:
|
|
63
|
+
return this.last && [this.last];
|
|
64
|
+
case _taidocProtocol.TAIDOC.wakeUp:
|
|
65
|
+
case _taidocProtocol.TAIDOC.wakeNotice:
|
|
66
|
+
return [this.send((0, _taidocProtocol.taidocCommand)(_taidocProtocol.TAIDOC.model))];
|
|
67
|
+
case _taidocProtocol.TAIDOC.model:
|
|
68
|
+
{
|
|
69
|
+
const users = (0, _taidocProtocol.usersFor)(frame);
|
|
70
|
+
this.user = users > 1 ? 1 : 0;
|
|
71
|
+
this.maxUser = users > 1 ? users : 0;
|
|
72
|
+
return [this.send((0, _taidocProtocol.taidocCommand)(_taidocProtocol.TAIDOC.serial1))];
|
|
73
|
+
}
|
|
74
|
+
case _taidocProtocol.TAIDOC.serial1:
|
|
75
|
+
return [this.send((0, _taidocProtocol.taidocCommand)(_taidocProtocol.TAIDOC.serial2))];
|
|
76
|
+
case _taidocProtocol.TAIDOC.serial2:
|
|
77
|
+
return [this.send((0, _taidocProtocol.taidocCommand)(_taidocProtocol.TAIDOC.deviceTime))];
|
|
78
|
+
case _taidocProtocol.TAIDOC.deviceTime:
|
|
79
|
+
return [this.send((0, _taidocProtocol.setTimeCommand)(this.now()))];
|
|
80
|
+
case _taidocProtocol.TAIDOC.setTime:
|
|
81
|
+
return [this.send(this.params.kind === "oximeter" ? (0, _taidocProtocol.taidocCommand)(_taidocProtocol.TAIDOC.oximeterAfterTime) : (0, _taidocProtocol.readingCountCommand)(this.user))];
|
|
82
|
+
case _taidocProtocol.TAIDOC.oximeterAfterTime:
|
|
83
|
+
return [this.send((0, _taidocProtocol.readingCountCommand)(this.user))];
|
|
84
|
+
case _taidocProtocol.TAIDOC.readingCount:
|
|
85
|
+
this.count = (0, _taidocProtocol.readCount)(frame);
|
|
86
|
+
this.index = 0;
|
|
87
|
+
return this.nextReading();
|
|
88
|
+
case _taidocProtocol.TAIDOC.readingTime:
|
|
89
|
+
this.recordTime = frame;
|
|
90
|
+
return [this.send((0, _taidocProtocol.readingCommand)(_taidocProtocol.TAIDOC.readingResult, this.index - 1, this.user))];
|
|
91
|
+
case _taidocProtocol.TAIDOC.readingResult:
|
|
92
|
+
this.report((0, _taidocRecords.decodeRecord)(this.params.kind, this.recordTime, frame, this.user));
|
|
93
|
+
return this.nextReading();
|
|
94
|
+
case _taidocProtocol.TAIDOC.weightRecord:
|
|
95
|
+
this.report((0, _taidocRecords.decodeWeightRecord)(frame));
|
|
96
|
+
return this.nextReading();
|
|
97
|
+
default:
|
|
98
|
+
return undefined;
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
/** Requests the next index, then the next user's count, then powers the device off. */
|
|
103
|
+
nextReading = () => {
|
|
104
|
+
if (this.index < this.count) {
|
|
105
|
+
const index = this.index;
|
|
106
|
+
this.index += 1;
|
|
107
|
+
return [this.params.kind === "scale" ? this.send((0, _taidocProtocol.weightRecordCommand)(index), SCALE_RECORD_DELAY_MS) : this.send((0, _taidocProtocol.readingCommand)(_taidocProtocol.TAIDOC.readingTime, index, this.user))];
|
|
108
|
+
}
|
|
109
|
+
if (this.user < this.maxUser) {
|
|
110
|
+
this.user += 1;
|
|
111
|
+
return [this.send((0, _taidocProtocol.readingCountCommand)(this.user))];
|
|
112
|
+
}
|
|
113
|
+
this.ended = true;
|
|
114
|
+
return [this.send((0, _taidocProtocol.taidocCommand)(_taidocProtocol.TAIDOC.shutdown))];
|
|
115
|
+
};
|
|
116
|
+
report = reading => {
|
|
117
|
+
if (reading) {
|
|
118
|
+
this.params.onResult({
|
|
119
|
+
caseType: _caseType.CaseType.RESULT,
|
|
120
|
+
...reading
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
now = () => this.params.now?.() ?? new Date();
|
|
125
|
+
send = (frame, delayBeforeWriteMs) => {
|
|
126
|
+
// A re-send goes out at once: the start delay only settles the link after connecting.
|
|
127
|
+
this.last = {
|
|
128
|
+
serviceUuid: _taidocProtocol.TAIDOC_SERVICE,
|
|
129
|
+
characteristicUuid: _taidocProtocol.TAIDOC_CHARACTERISTIC,
|
|
130
|
+
frame
|
|
131
|
+
};
|
|
132
|
+
return delayBeforeWriteMs ? {
|
|
133
|
+
...this.last,
|
|
134
|
+
delayBeforeWriteMs
|
|
135
|
+
} : this.last;
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
exports.TaidocSequencer = TaidocSequencer;
|
|
139
|
+
//# sourceMappingURL=taidoc.sequencer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_caseType","require","_taidocProtocol","_taidocRecords","START_DELAY_MS","multi","bpm","thermometer","oximeter","scale","SCALE_RECORD_DELAY_MS","RESPONSE_TIMEOUT_MS","RETRIES","TaidocSequencer","retries","ended","user","maxUser","count","index","recordTime","constructor","params","initialCommands","send","taidocCommand","TAIDOC","model","kind","isHistoryTransfer","isNormalDisconnect","commandTimeoutMs","undefined","onCommandTimeout","last","terminal","commands","commandProgress","frame","isHostFrame","nextCommand","commandOf","busy","wakeUp","wakeNotice","users","usersFor","serial1","serial2","deviceTime","setTimeCommand","now","setTime","oximeterAfterTime","readingCountCommand","readingCount","readCount","nextReading","readingTime","readingCommand","readingResult","report","decodeRecord","weightRecord","decodeWeightRecord","weightRecordCommand","shutdown","reading","onResult","caseType","CaseType","RESULT","Date","delayBeforeWriteMs","serviceUuid","TAIDOC_SERVICE","characteristicUuid","TAIDOC_CHARACTERISTIC","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/taidoc/taidoc.sequencer.ts"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAIA,IAAAC,eAAA,GAAAD,OAAA;AAcA,IAAAE,cAAA,GAAAF,OAAA;AAEA;AACA,MAAMG,cAA0C,GAAG;EACjDC,KAAK,EAAE,KAAK;EACZC,GAAG,EAAE,KAAK;EACVC,WAAW,EAAE,KAAK;EAClBC,QAAQ,EAAE,KAAK;EACfC,KAAK,EAAE;AACT,CAAC;;AAED;AACA,MAAMC,qBAAqB,GAAG,GAAG;AACjC,MAAMC,mBAAmB,GAAG,KAAK;AACjC,MAAMC,OAAO,GAAG,CAAC;;AAEjB;AACA;AACA;AACA;AACA;AACA,MAAMC,eAAe,CAA6B;EAExCC,OAAO,GAAGF,OAAO;EACjBG,KAAK,GAAG,KAAK;EACbC,IAAI,GAAG,CAAC;EACRC,OAAO,GAAG,CAA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-management/services/devices/transtek/transtek-command.device.js
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TranstekCommandDevice = void 0;
|
|
7
|
+
var _integratedDevices = require("../../../types/integrated-devices.js");
|
|
8
|
+
var _deviceSecrets = require("../../device-secrets.js");
|
|
9
|
+
var _btManagedDevice = require("../bt-managed-device.js");
|
|
10
|
+
var _transtekCommandProtocol = require("./transtek-command.protocol.js");
|
|
11
|
+
var _transtekCommandSequencer = require("./transtek-command.sequencer.js");
|
|
12
|
+
/** The sequencer decodes records itself; the declarative parser only has to pass frames on. */
|
|
13
|
+
const passThrough = {
|
|
14
|
+
caseValuePosition: [],
|
|
15
|
+
cases: []
|
|
16
|
+
};
|
|
17
|
+
const service = (uuid, data, optional) => ({
|
|
18
|
+
uuid,
|
|
19
|
+
optional,
|
|
20
|
+
monitorUuids: [{
|
|
21
|
+
uuid: _transtekCommandProtocol.TRANSTEK_CHARACTERISTICS.answer,
|
|
22
|
+
parsingModel: passThrough
|
|
23
|
+
}, {
|
|
24
|
+
uuid: data,
|
|
25
|
+
parsingModel: passThrough
|
|
26
|
+
}]
|
|
27
|
+
});
|
|
28
|
+
const SERVICES_BY_KIND = {
|
|
29
|
+
"blood-pressure": [service(_transtekCommandProtocol.TRANSTEK_SERVICES.bloodPressureA2, _transtekCommandProtocol.TRANSTEK_CHARACTERISTICS.bloodPressure, true), service(_transtekCommandProtocol.TRANSTEK_SERVICES.bloodPressureA3, _transtekCommandProtocol.TRANSTEK_CHARACTERISTICS.bloodPressure, true)],
|
|
30
|
+
scale: [service(_transtekCommandProtocol.TRANSTEK_SERVICES.scaleA2, _transtekCommandProtocol.TRANSTEK_CHARACTERISTICS.weightA2, true), service(_transtekCommandProtocol.TRANSTEK_SERVICES.scaleA3, _transtekCommandProtocol.TRANSTEK_CHARACTERISTICS.weightA3, true)],
|
|
31
|
+
tracker: [service(_transtekCommandProtocol.TRANSTEK_SERVICES.tracker, _transtekCommandProtocol.TRANSTEK_CHARACTERISTICS.tracker, false)]
|
|
32
|
+
};
|
|
33
|
+
const KIND = {
|
|
34
|
+
[_integratedDevices.IntegratedDevices.TRANSTEK_BPM]: "blood-pressure",
|
|
35
|
+
[_integratedDevices.IntegratedDevices.TRANSTEK_SCALE]: "scale",
|
|
36
|
+
[_integratedDevices.IntegratedDevices.TRANSTEK_SCALE_1525]: "scale",
|
|
37
|
+
[_integratedDevices.IntegratedDevices.TRANSTEK_TRACKER]: "tracker"
|
|
38
|
+
};
|
|
39
|
+
const secretKey = device => `transtek-password:${device.id}`;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Transtek's white-label blood-pressure monitors, scales and 405A0 activity tracker, on the
|
|
43
|
+
* "command" protocol (A2/A3). See `TranstekCommandSequencer` for the session.
|
|
44
|
+
*/
|
|
45
|
+
class TranstekCommandDevice extends _btManagedDevice.BTManagedDevice {
|
|
46
|
+
stuckDataTimeout = 60_000;
|
|
47
|
+
onStreamStart = undefined;
|
|
48
|
+
constructor(device, params) {
|
|
49
|
+
super(device, params);
|
|
50
|
+
const kind = KIND[params.deviceName];
|
|
51
|
+
this.mainServices = SERVICES_BY_KIND[kind];
|
|
52
|
+
|
|
53
|
+
// The random-number reply has to be answered at once, so the stored password is loaded early.
|
|
54
|
+
void (0, _deviceSecrets.loadDeviceSecret)(secretKey(device));
|
|
55
|
+
this.createCommandSequencer = () => new _transtekCommandSequencer.TranstekCommandSequencer({
|
|
56
|
+
kind,
|
|
57
|
+
secretKey: secretKey(device),
|
|
58
|
+
heightInCentimetres: params.deviceName === _integratedDevices.IntegratedDevices.TRANSTEK_SCALE_1525,
|
|
59
|
+
onResult: result => this.onResult?.(result),
|
|
60
|
+
onError: error => this.onError?.(error)
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/** No framing: every notification is one whole message. */
|
|
65
|
+
validatePackage = () => true;
|
|
66
|
+
handleSuccessResult() {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
exports.TranstekCommandDevice = TranstekCommandDevice;
|
|
71
|
+
//# sourceMappingURL=transtek-command.device.js.map
|
package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.device.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_integratedDevices","require","_deviceSecrets","_btManagedDevice","_transtekCommandProtocol","_transtekCommandSequencer","passThrough","caseValuePosition","cases","service","uuid","data","optional","monitorUuids","TRANSTEK_CHARACTERISTICS","answer","parsingModel","SERVICES_BY_KIND","TRANSTEK_SERVICES","bloodPressureA2","bloodPressure","bloodPressureA3","scale","scaleA2","weightA2","scaleA3","weightA3","tracker","KIND","IntegratedDevices","TRANSTEK_BPM","TRANSTEK_SCALE","TRANSTEK_SCALE_1525","TRANSTEK_TRACKER","secretKey","device","id","TranstekCommandDevice","BTManagedDevice","stuckDataTimeout","onStreamStart","undefined","constructor","params","kind","deviceName","mainServices","loadDeviceSecret","createCommandSequencer","TranstekCommandSequencer","heightInCentimetres","onResult","result","onError","error","validatePackage","handleSuccessResult","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/transtek/transtek-command.device.ts"],"mappings":";;;;;;AAIA,IAAAA,kBAAA,GAAAC,OAAA;AAGA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,gBAAA,GAAAF,OAAA;AAEA,IAAAG,wBAAA,GAAAH,OAAA;AAIA,IAAAI,yBAAA,GAAAJ,OAAA;AASA;AACA,MAAMK,WAAW,GAAG;EAAEC,iBAAiB,EAAE,EAAE;EAAEC,KAAK,EAAE;AAAG,CAAC;AAExD,MAAMC,OAAO,GAAGA,CAACC,IAAY,EAAEC,IAAY,EAAEC,QAAiB,MAAgB;EAC5EF,IAAI;EACJE,QAAQ;EACRC,YAAY,EAAE,CACZ;IAAEH,IAAI,EA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E,UAAU,CAAC;IAEpC,IAAI,CAACC,YAAY,GAAG7B,gBAAgB,CAAC2B,IAAI,CAAC;;IAE1C;IACA,KAAK,IAAAG,+BAAgB,EAACb,SAAS,CAACC,MAAM,CAAC,CAAC;IAExC,IAAI,CAACa,sBAAsB,GAAG,MAC5B,IAAIC,kDAAwB,CAAC;MAC3BL,IAAI;MACJV,SAAS,EAAEA,SAAS,CAACC,MAAM,CAAC;MAC5Be,mBAAmB,EACjBP,MAAM,CAACE,UAAU,KAAKhB,oCAAiB,CAACG,mBAAmB;MAC7DmB,QAAQ,EAAGC,MAAM,IACf,IAAI,CAACD,QAAQ,GACXC,MAGF,CAAC;MACHC,OAAO,EAAGC,KAAK,IAAK,IAAI,CAACD,OAAO,GAAGC,KAAK;IAC1C,CAAC,CAAC;EACN;;EAEA;EACUC,eAAe,GAAGA,CAAA,KAAe,IAAI;EAErCC,mBAAmBA,CAAA,EAAS;IACpC;EACF;AACF;AAACC,OAAA,CAAApB,qBAAA,GAAAA,qBAAA","ignoreList":[]}
|
package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.protocol.js
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.verificationCommand = exports.u32 = exports.u16 = exports.transtekTime = exports.transtekSeconds = exports.trackerUserDataCommand = exports.trackerConfigurationCommand = exports.setTimeCommand = exports.scaleProfileCommand = exports.readRandom = exports.readPassword = exports.opcode = exports.endSessionCommand = exports.bindUserCommand = exports.accountIdCommand = exports.TRANSTEK_SERVICES = exports.TRANSTEK_CHARACTERISTICS = exports.ANSWER = void 0;
|
|
7
|
+
var _hexToByte = require("../../../utils/hex-to-byte.js");
|
|
8
|
+
var _le32FromHex = require("../../../utils/le-32-from-hex.js");
|
|
9
|
+
/* eslint-disable import/group-exports */
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* The Transtek / LifeSense "command" protocol (generations A2 and A3) spoken by Transtek's
|
|
13
|
+
* white-label blood-pressure monitors, scales and the 405A0 activity tracker.
|
|
14
|
+
*
|
|
15
|
+
* Layouts are from MedM Health Diary 3.12.11's `CTranstekCommandDevice` family. There is no
|
|
16
|
+
* framing: one notification is one message, every integer is little-endian, and the device
|
|
17
|
+
* never acknowledges a command - the app moves on by timers.
|
|
18
|
+
*
|
|
19
|
+
* Generation is picked by which primary service the device has: A2 or A3 for each kind.
|
|
20
|
+
*/
|
|
21
|
+
const sig16 = assigned => `0000${assigned}-0000-1000-8000-00805f9b34fb`;
|
|
22
|
+
const TRANSTEK_SERVICES = exports.TRANSTEK_SERVICES = {
|
|
23
|
+
bloodPressureA2: sig16("7809"),
|
|
24
|
+
bloodPressureA3: sig16("7889"),
|
|
25
|
+
scaleA2: sig16("7802"),
|
|
26
|
+
scaleA3: sig16("7892"),
|
|
27
|
+
tracker: sig16("7801")
|
|
28
|
+
};
|
|
29
|
+
const TRANSTEK_CHARACTERISTICS = exports.TRANSTEK_CHARACTERISTICS = {
|
|
30
|
+
command: sig16("8a81"),
|
|
31
|
+
answer: sig16("8a82"),
|
|
32
|
+
bloodPressure: sig16("8a91"),
|
|
33
|
+
weightA2: sig16("8a21"),
|
|
34
|
+
weightA3: sig16("8a24"),
|
|
35
|
+
tracker: sig16("8a11")
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/** Device-to-app opcodes on the answer characteristic. */
|
|
39
|
+
const ANSWER = exports.ANSWER = {
|
|
40
|
+
password: 0xa0,
|
|
41
|
+
random: 0xa1,
|
|
42
|
+
userCount: 0x83,
|
|
43
|
+
userInfo: 0xc0
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/** Seconds since this local wall-clock instant are how both directions carry time. */
|
|
47
|
+
const EPOCH_UTC_MS = Date.UTC(2010, 0, 1);
|
|
48
|
+
const toHex = bytes => bytes.map(value => (value & 0xff).toString(16).padStart(2, "0"));
|
|
49
|
+
const le32 = value => [value & 0xff, value >>> 8 & 0xff, value >>> 16 & 0xff, value >>> 24 & 0xff];
|
|
50
|
+
const u32 = (frame, index) => (0, _le32FromHex.le32FromHex)([...frame], index) >>> 0;
|
|
51
|
+
exports.u32 = u32;
|
|
52
|
+
const u16 = (frame, index) => (0, _hexToByte.hexToByte)(frame[index] ?? "00") | (0, _hexToByte.hexToByte)(frame[index + 1] ?? "00") << 8;
|
|
53
|
+
exports.u16 = u16;
|
|
54
|
+
const opcode = frame => (0, _hexToByte.hexToByte)(frame[0] ?? "00");
|
|
55
|
+
|
|
56
|
+
/** A device timestamp, read as the phone's local wall-clock time. */
|
|
57
|
+
exports.opcode = opcode;
|
|
58
|
+
const transtekTime = seconds => {
|
|
59
|
+
const wall = new Date(EPOCH_UTC_MS + seconds * 1000);
|
|
60
|
+
return new Date(wall.getUTCFullYear(), wall.getUTCMonth(), wall.getUTCDate(), wall.getUTCHours(), wall.getUTCMinutes(), wall.getUTCSeconds());
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/** The phone's local wall-clock time as device seconds; the device has no timezone. */
|
|
64
|
+
exports.transtekTime = transtekTime;
|
|
65
|
+
const transtekSeconds = now => Math.floor((Date.UTC(now.getFullYear(), now.getMonth(), now.getDate(), now.getHours(), now.getMinutes(), now.getSeconds()) - EPOCH_UTC_MS) / 1000);
|
|
66
|
+
exports.transtekSeconds = transtekSeconds;
|
|
67
|
+
const readPassword = frame => u32(frame, 1);
|
|
68
|
+
exports.readPassword = readPassword;
|
|
69
|
+
const readRandom = frame => u32(frame, 1);
|
|
70
|
+
|
|
71
|
+
/** `21 FF 00 00 UU`: sent after the pairing password. */
|
|
72
|
+
exports.readRandom = readRandom;
|
|
73
|
+
const accountIdCommand = user => toHex([0x21, 0xff, 0x00, 0x00, user]);
|
|
74
|
+
|
|
75
|
+
/** `20` + (password XOR random): proves this phone holds the device's password. */
|
|
76
|
+
exports.accountIdCommand = accountIdCommand;
|
|
77
|
+
const verificationCommand = (password, random) => toHex([0x20, ...le32((password ^ random) >>> 0)]);
|
|
78
|
+
exports.verificationCommand = verificationCommand;
|
|
79
|
+
const setTimeCommand = now => toHex([0x02, ...le32(transtekSeconds(now))]);
|
|
80
|
+
|
|
81
|
+
/** `22`: the app is done with this session. */
|
|
82
|
+
exports.setTimeCommand = setTimeCommand;
|
|
83
|
+
const endSessionCommand = () => toHex([0x22]);
|
|
84
|
+
|
|
85
|
+
/** `03 UU` + an 18-byte, space-padded user name (A3 pairing). */
|
|
86
|
+
exports.endSessionCommand = endSessionCommand;
|
|
87
|
+
const bindUserCommand = (user, name) => {
|
|
88
|
+
const bytes = Array.from(name.slice(0, 18), char => char.charCodeAt(0) & 0x7f);
|
|
89
|
+
return toHex([0x03, user, ...bytes, ...Array(18 - bytes.length).fill(0x20)]);
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* `51`: the A3 scale's user profile. The SDK has no patient profile, so it sends the same
|
|
94
|
+
* defaults MedM falls back to - male, 30 years, 175 cm, kilograms, no goal. They feed only
|
|
95
|
+
* the scale's own body-composition estimate, never the weight.
|
|
96
|
+
*/
|
|
97
|
+
exports.bindUserCommand = bindUserCommand;
|
|
98
|
+
const scaleProfileCommand = (user, heightInCentimetres) => {
|
|
99
|
+
const heightCm = 175;
|
|
100
|
+
const height = heightInCentimetres ? [heightCm & 0xff, 0xe0 + (heightCm >> 8)] : [heightCm * 10 & 0xff, 0xd0 | heightCm * 10 >> 8];
|
|
101
|
+
return toHex([0x51, 0x17, user, 0x01, 30, ...height, 0x00, 0x00, 0x00, 0x00, 0x00]);
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
/** `40 00`: tracker configuration, leaving stored data in place. */
|
|
105
|
+
exports.scaleProfileCommand = scaleProfileCommand;
|
|
106
|
+
const trackerConfigurationCommand = () => toHex([0x40, 0x00]);
|
|
107
|
+
|
|
108
|
+
/** `05`: tracker user data - 70 kg and 1.75 m, the same defaults as the scale profile. */
|
|
109
|
+
exports.trackerConfigurationCommand = trackerConfigurationCommand;
|
|
110
|
+
const trackerUserDataCommand = () => toHex([0x05, 0x0a, 0x00, ...[7000 & 0xff, 7000 >> 8], 0x00, 0xfe, 175 & 0xff, 0xe0]);
|
|
111
|
+
exports.trackerUserDataCommand = trackerUserDataCommand;
|
|
112
|
+
//# sourceMappingURL=transtek-command.protocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_hexToByte","require","_le32FromHex","sig16","assigned","TRANSTEK_SERVICES","exports","bloodPressureA2","bloodPressureA3","scaleA2","scaleA3","tracker","TRANSTEK_CHARACTERISTICS","command","answer","bloodPressure","weightA2","weightA3","ANSWER","password","random","userCount","userInfo","EPOCH_UTC_MS","Date","UTC","toHex","bytes","map","value","toString","padStart","le32","u32","frame","index","le32FromHex","u16","hexToByte","opcode","transtekTime","seconds","wall","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","transtekSeconds","now","Math","floor","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","readPassword","readRandom","accountIdCommand","user","verificationCommand","setTimeCommand","endSessionCommand","bindUserCommand","name","Array","from","slice","char","charCodeAt","length","fill","scaleProfileCommand","heightInCentimetres","heightCm","height","trackerConfigurationCommand","trackerUserDataCommand"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/transtek/transtek-command.protocol.ts"],"mappings":";;;;;;AAEA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAHA;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAME,KAAK,GAAIC,QAAgB,IAC7B,OAAOA,QAAQ,8BAA8B;AAExC,MAAMC,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAG;EAC/BE,eAAe,EAAEJ,KAAK,CAAC,MAAM,CAAC;EAC9BK,eAAe,EAAEL,KAAK,CAAC,MAAM,CAAC;EAC9BM,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AA,GAAAA,sBAAA","ignoreList":[]}
|
package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.records.js
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.readWeight = exports.readTrackerSteps = exports.readBloodPressure = exports.decodeTranstekRecord = void 0;
|
|
7
|
+
var _core = require("@ovok/core");
|
|
8
|
+
var _decodeMedicalFloat = require("../../../utils/decode-medical-float.js");
|
|
9
|
+
var _hexToByte = require("../../../utils/hex-to-byte.js");
|
|
10
|
+
var _transtekCommandProtocol = require("./transtek-command.protocol.js");
|
|
11
|
+
/* eslint-disable import/group-exports */
|
|
12
|
+
|
|
13
|
+
/** Record layouts for the Transtek command protocol's measurement characteristics. */
|
|
14
|
+
|
|
15
|
+
const POUND_IN_KG = 0.45359237;
|
|
16
|
+
const DAY_MS = 86_400_000;
|
|
17
|
+
const YEAR_MS = 365 * DAY_MS;
|
|
18
|
+
|
|
19
|
+
/** MedM drops records more than a day ahead of the phone: the device clock was wrong. */
|
|
20
|
+
const isFromFuture = recordedAt => recordedAt.getTime() > Date.now() + DAY_MS;
|
|
21
|
+
/** Characteristic 8A91, sixteen bytes at fixed offsets; MedM ignores the kPa flag. */
|
|
22
|
+
const readBloodPressure = (frame, shiftUser) => {
|
|
23
|
+
if (frame.length < 16) {
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
const flags = (0, _transtekCommandProtocol.opcode)(frame);
|
|
27
|
+
const status = (0, _transtekCommandProtocol.u16)(frame, 14);
|
|
28
|
+
const recordedAt = (0, _transtekCommandProtocol.transtekTime)((0, _transtekCommandProtocol.u32)(frame, 7));
|
|
29
|
+
if (isFromFuture(recordedAt)) {
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
systolic: (0, _transtekCommandProtocol.u16)(frame, 1),
|
|
34
|
+
diastolic: (0, _transtekCommandProtocol.u16)(frame, 3),
|
|
35
|
+
recordedAt,
|
|
36
|
+
heartRate: (0, _transtekCommandProtocol.u16)(frame, 11),
|
|
37
|
+
memorySlot: (0, _hexToByte.hexToByte)(frame[13] ?? "00") + (shiftUser ? 1 : 0),
|
|
38
|
+
irregularHeartbeat: (flags & 0x10) !== 0 && (status & 0x04) !== 0
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Characteristic 8A21 (A2) or 8A24 (A3): an IEEE-11073 FLOAT in kilograms and a status byte
|
|
44
|
+
* that must say the reading is stable or complete. Frames are 11, 15 or 19+ bytes long.
|
|
45
|
+
*/
|
|
46
|
+
exports.readBloodPressure = readBloodPressure;
|
|
47
|
+
const readWeight = frame => {
|
|
48
|
+
const length = frame.length;
|
|
49
|
+
if (!(length > 18 || length === 11 || length === 15)) {
|
|
50
|
+
return undefined;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Only status bit 0 set with code 4 ("complete") is a finished weight. MedM also keeps
|
|
54
|
+
// "unstable" frames, tagged; those are the values a scale shows while someone steps on,
|
|
55
|
+
// so they are not reported here.
|
|
56
|
+
const status = (0, _hexToByte.hexToByte)(frame[Math.min(length, 19) - 1] ?? "00");
|
|
57
|
+
if ((status & 0x01) !== 1 || (status >> 1 & 0x07) !== 4) {
|
|
58
|
+
return undefined;
|
|
59
|
+
}
|
|
60
|
+
const value = (0, _decodeMedicalFloat.decodeMedicalFloat)((0, _transtekCommandProtocol.u32)(frame, 1), 8, 24);
|
|
61
|
+
const recordedAt = (0, _transtekCommandProtocol.transtekTime)((0, _transtekCommandProtocol.u32)(frame, 5));
|
|
62
|
+
if (value === undefined || value <= 0 || isFromFuture(recordedAt)) {
|
|
63
|
+
return undefined;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// A scale set to pounds flags it (bit 5). MedM reads a value with at most one decimal as
|
|
67
|
+
// kilograms and one with two as already in pounds; the SDK follows it.
|
|
68
|
+
const pounds = ((0, _transtekCommandProtocol.opcode)(frame) & 0x20) !== 0 && Math.round(value * 100) % 10 !== 0;
|
|
69
|
+
return {
|
|
70
|
+
bodyWeight: Math.round((pounds ? value * POUND_IN_KG : value) * 100) / 100,
|
|
71
|
+
recordedAt
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Characteristic 8A11: nineteen bytes starting `7E`, with the day's cumulative step count.
|
|
77
|
+
*
|
|
78
|
+
* Only the live record is a reading: stored points (stamped at :59) are earlier running
|
|
79
|
+
* totals and the day's statistic (23:59:59), so reporting them as well would count the same
|
|
80
|
+
* steps again. A record dated outside the past year or after tomorrow is a clock that was
|
|
81
|
+
* never set.
|
|
82
|
+
*/
|
|
83
|
+
exports.readWeight = readWeight;
|
|
84
|
+
const readTrackerSteps = frame => {
|
|
85
|
+
if (frame.length !== 19 || (0, _transtekCommandProtocol.opcode)(frame) !== 0x7e) {
|
|
86
|
+
return undefined;
|
|
87
|
+
}
|
|
88
|
+
const recordedAt = (0, _transtekCommandProtocol.transtekTime)((0, _transtekCommandProtocol.u32)(frame, 4));
|
|
89
|
+
if (recordedAt.getSeconds() === 59 || isFromFuture(recordedAt) || Date.now() - recordedAt.getTime() > YEAR_MS) {
|
|
90
|
+
return undefined;
|
|
91
|
+
}
|
|
92
|
+
return {
|
|
93
|
+
stepCount: (0, _hexToByte.hexToByte)(frame[1] ?? "00") | (0, _hexToByte.hexToByte)(frame[2] ?? "00") << 8 | (0, _hexToByte.hexToByte)(frame[3] ?? "00") << 16,
|
|
94
|
+
recordedAt
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
/** Decodes a record by the characteristic it arrived on; anything else is not a reading. */
|
|
99
|
+
exports.readTrackerSteps = readTrackerSteps;
|
|
100
|
+
const decodeTranstekRecord = (frame, characteristicUuid, shiftUser) => {
|
|
101
|
+
if (characteristicUuid === _transtekCommandProtocol.TRANSTEK_CHARACTERISTICS.bloodPressure) {
|
|
102
|
+
const reading = readBloodPressure(frame, shiftUser);
|
|
103
|
+
return reading && {
|
|
104
|
+
measurementTypeKey: _core.MeasurementTypeKey.bloodPressure,
|
|
105
|
+
systolic: reading.systolic,
|
|
106
|
+
diastolic: reading.diastolic,
|
|
107
|
+
heartRate: reading.heartRate,
|
|
108
|
+
recordedAt: reading.recordedAt,
|
|
109
|
+
memorySlot: reading.memorySlot,
|
|
110
|
+
...(reading.irregularHeartbeat ? {
|
|
111
|
+
irregularHeartbeat: true
|
|
112
|
+
} : {})
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
if (characteristicUuid === _transtekCommandProtocol.TRANSTEK_CHARACTERISTICS.weightA2 || characteristicUuid === _transtekCommandProtocol.TRANSTEK_CHARACTERISTICS.weightA3) {
|
|
116
|
+
const reading = readWeight(frame);
|
|
117
|
+
return reading && {
|
|
118
|
+
measurementTypeKey: _core.MeasurementTypeKey.bodyWeight,
|
|
119
|
+
...reading
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
if (characteristicUuid === _transtekCommandProtocol.TRANSTEK_CHARACTERISTICS.tracker) {
|
|
123
|
+
const reading = readTrackerSteps(frame);
|
|
124
|
+
return reading && {
|
|
125
|
+
measurementTypeKey: _core.MeasurementTypeKey.stepCount,
|
|
126
|
+
...reading
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
return undefined;
|
|
130
|
+
};
|
|
131
|
+
exports.decodeTranstekRecord = decodeTranstekRecord;
|
|
132
|
+
//# sourceMappingURL=transtek-command.records.js.map
|
package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.records.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_core","require","_decodeMedicalFloat","_hexToByte","_transtekCommandProtocol","POUND_IN_KG","DAY_MS","YEAR_MS","isFromFuture","recordedAt","getTime","Date","now","readBloodPressure","frame","shiftUser","length","undefined","flags","opcode","status","u16","transtekTime","u32","systolic","diastolic","heartRate","memorySlot","hexToByte","irregularHeartbeat","exports","readWeight","Math","min","value","decodeMedicalFloat","pounds","round","bodyWeight","readTrackerSteps","getSeconds","stepCount","decodeTranstekRecord","characteristicUuid","TRANSTEK_CHARACTERISTICS","bloodPressure","reading","measurementTypeKey","MeasurementTypeKey","weightA2","weightA3","tracker"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/transtek/transtek-command.records.ts"],"mappings":";;;;;;AAEA,IAAAA,KAAA,GAAAC,OAAA;AAEA,IAAAC,mBAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AAEA,IAAAG,wBAAA,GAAAH,OAAA;AAPA;;AAeA;;AAEA,MAAMI,WAAW,GAAG,UAAU;AAC9B,MAAMC,MAAM,GAAG,UAAU;AACzB,MAAMC,OAAO,GAAG,GAAG,GAAGD,MAAM;;AAE5B;AACA,MAAME,YAAY,GAAIC,UAAgB,IACpCA,UAAU,CAACC,OAAO,CAAC,CAAC,GAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,GAAGN,MAAM;AAW5C;AACO,MAAMO,iBAAiB,GAAGA,CAC/BC,KAAwB,EACxBC,SAAkB,KACoB;EACtC,IAAID,KAAK,CAACE,MAAM,GAAG,EAAE,EAAE;IACrB,OAAOC,SAAS;EAClB;EAEA,MAAMC,KAAK,GAAG,IAAAC,+BAAM,EAACL,KAAK,CAAC;EAC3B,MAAMM,MAAM,GAAG,IAAAC,4BAAG,EAACP,KAAK,EAAE,EAAE,CAAC;EAC7B,MAAML,UAAU,GAAG,IAAAa,qCAAY,EAAC,IAAAC,4BAAG,EAACT,KAAK,EAAE,CAAC,CAAC,CAAC;EAE9C,IAAIN,YAAY,CAACC,UAAU,CAAC,EAAE;IAC5B,OAAOQ,SAAS;EAClB;EAEA,OAAO;IACLO,QAAQ,EAAE,IAAAH,4BAAG,EAACP,KAAK,EAAE,CAAC,CAAC;IACvBW,SAAS,EAAE,I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js/modules/bt-management/services/devices/transtek/transtek-command.sequencer.js
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TranstekCommandSequencer = void 0;
|
|
7
|
+
var _caseType = require("../../../types/case-type.js");
|
|
8
|
+
var _deviceSecrets = require("../../device-secrets.js");
|
|
9
|
+
var _transtekCommandProtocol = require("./transtek-command.protocol.js");
|
|
10
|
+
var _transtekCommandRecords = require("./transtek-command.records.js");
|
|
11
|
+
var _transtekCommandSession = require("./transtek-command.session.js");
|
|
12
|
+
/**
|
|
13
|
+
* Drives the Transtek command protocol: the password handshake, the time, the A3 user binding,
|
|
14
|
+
* and the end of the session.
|
|
15
|
+
*
|
|
16
|
+
* The device never acknowledges a command, so every step after the verification code is sent
|
|
17
|
+
* with the pause MedM leaves between them rather than in answer to a frame.
|
|
18
|
+
*
|
|
19
|
+
* Pairing is the device's choice, not the app's: an unbound device opens with its password
|
|
20
|
+
* (`A0`), which is kept and used to answer every later connection's random number (`A1`).
|
|
21
|
+
*/
|
|
22
|
+
class TranstekCommandSequencer {
|
|
23
|
+
a3 = false;
|
|
24
|
+
pairing = false;
|
|
25
|
+
receiving = false;
|
|
26
|
+
ended = false;
|
|
27
|
+
recorded = false;
|
|
28
|
+
constructor(params) {
|
|
29
|
+
this.params = params;
|
|
30
|
+
this.serviceUuid = _transtekCommandSession.SERVICES[params.kind].a2;
|
|
31
|
+
}
|
|
32
|
+
onServicesDiscovered = serviceUuids => {
|
|
33
|
+
const a3 = _transtekCommandSession.SERVICES[this.params.kind].a3;
|
|
34
|
+
this.a3 = a3 !== undefined && serviceUuids.includes(a3);
|
|
35
|
+
this.serviceUuid = this.a3 && a3 ? a3 : _transtekCommandSession.SERVICES[this.params.kind].a2;
|
|
36
|
+
};
|
|
37
|
+
initialCommands = () => [];
|
|
38
|
+
|
|
39
|
+
/** The device may drop the link before the app ends the session; after a record that is normal. */
|
|
40
|
+
isNormalDisconnect = () => this.ended || this.recorded;
|
|
41
|
+
commandTimeoutMs = () => this.pendingRandom !== undefined ? _transtekCommandSession.SECRET_WAIT_MS : this.receiving ? _transtekCommandSession.END_AFTER_MS[this.params.kind] : undefined;
|
|
42
|
+
onCommandTimeout = () => {
|
|
43
|
+
if (this.pendingRandom !== undefined) {
|
|
44
|
+
const random = this.pendingRandom;
|
|
45
|
+
this.pendingRandom = undefined;
|
|
46
|
+
return {
|
|
47
|
+
commands: this.verify(random, true) ?? []
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
this.receiving = false;
|
|
51
|
+
this.ended = true;
|
|
52
|
+
return {
|
|
53
|
+
commands: [this.command((0, _transtekCommandProtocol.endSessionCommand)())]
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Answer-channel opcodes all have the top bit set; anything else is a record, and each one
|
|
59
|
+
* restarts the quiet period after which the session is ended. This runs before
|
|
60
|
+
* `nextCommand`, so it is where receiving starts.
|
|
61
|
+
*/
|
|
62
|
+
commandProgress = frame => {
|
|
63
|
+
// A random number that arrives before the stored password has loaded waits for it.
|
|
64
|
+
if ((0, _transtekCommandProtocol.opcode)(frame) === _transtekCommandProtocol.ANSWER.random && (0, _deviceSecrets.peekDeviceSecret)(this.params.secretKey) === undefined) {
|
|
65
|
+
return "partial";
|
|
66
|
+
}
|
|
67
|
+
if ((0, _transtekCommandProtocol.opcode)(frame) >= 0x80) {
|
|
68
|
+
return "complete";
|
|
69
|
+
}
|
|
70
|
+
this.receiving = !this.ended;
|
|
71
|
+
return "partial";
|
|
72
|
+
};
|
|
73
|
+
nextCommand = (frame, characteristicUuid) => {
|
|
74
|
+
if (characteristicUuid?.toLowerCase() === _transtekCommandProtocol.TRANSTEK_CHARACTERISTICS.answer) {
|
|
75
|
+
return this.answer(frame);
|
|
76
|
+
}
|
|
77
|
+
this.record(frame, characteristicUuid?.toLowerCase());
|
|
78
|
+
return undefined;
|
|
79
|
+
};
|
|
80
|
+
answer = frame => {
|
|
81
|
+
switch ((0, _transtekCommandProtocol.opcode)(frame)) {
|
|
82
|
+
case _transtekCommandProtocol.ANSWER.password:
|
|
83
|
+
this.pairing = true;
|
|
84
|
+
void (0, _deviceSecrets.saveDeviceSecret)(this.params.secretKey, String((0, _transtekCommandProtocol.readPassword)(frame))).then(stored => {
|
|
85
|
+
if (!stored) {
|
|
86
|
+
this.params.onError(new Error("Could not store this Transtek device's pairing password: it will need to be paired again after the app restarts."));
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
return [this.command((0, _transtekCommandProtocol.accountIdCommand)(_transtekCommandSession.USER))];
|
|
90
|
+
case _transtekCommandProtocol.ANSWER.random:
|
|
91
|
+
return this.verify((0, _transtekCommandProtocol.readRandom)(frame));
|
|
92
|
+
case _transtekCommandProtocol.ANSWER.userCount:
|
|
93
|
+
return this.pairing ? this.bindUser() : undefined;
|
|
94
|
+
case _transtekCommandProtocol.ANSWER.userInfo:
|
|
95
|
+
return this.params.kind === "scale" ? [this.command((0, _transtekCommandProtocol.scaleProfileCommand)(_transtekCommandSession.USER, this.params.heightInCentimetres === true)), this.endCommand()] : undefined;
|
|
96
|
+
default:
|
|
97
|
+
return undefined;
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
verify = (random, retried = false) => {
|
|
101
|
+
const password = Number((0, _deviceSecrets.peekDeviceSecret)(this.params.secretKey));
|
|
102
|
+
|
|
103
|
+
// Storage may still be answering; one short wait before calling the device unpaired.
|
|
104
|
+
if (!Number.isFinite(password) && !retried) {
|
|
105
|
+
this.pendingRandom = random;
|
|
106
|
+
return undefined;
|
|
107
|
+
}
|
|
108
|
+
if (!Number.isFinite(password)) {
|
|
109
|
+
this.params.onError(new Error("Transtek device is not paired with this phone: put it in pairing mode and connect again."));
|
|
110
|
+
return undefined;
|
|
111
|
+
}
|
|
112
|
+
return [this.command((0, _transtekCommandProtocol.verificationCommand)(password, random)), ...this.commands((0, _transtekCommandSession.stepsAfterVerification)(this.params.kind, this.a3, this.pairing, this.now()))];
|
|
113
|
+
};
|
|
114
|
+
bindUser = () => this.commands((0, _transtekCommandSession.stepsToBindUser)(this.params.kind, this.params.heightInCentimetres === true, this.now()));
|
|
115
|
+
commands = steps => steps.map(step => {
|
|
116
|
+
this.ended ||= step.endsSession === true;
|
|
117
|
+
return this.command(step.frame, step.delayMs);
|
|
118
|
+
});
|
|
119
|
+
record = (frame, characteristicUuid) => {
|
|
120
|
+
const reading = (0, _transtekCommandRecords.decodeTranstekRecord)(frame, characteristicUuid, this.params.shiftUser !== false);
|
|
121
|
+
if (!reading) {
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
this.recorded = true;
|
|
125
|
+
this.params.onResult({
|
|
126
|
+
caseType: _caseType.CaseType.RESULT,
|
|
127
|
+
...reading
|
|
128
|
+
});
|
|
129
|
+
};
|
|
130
|
+
now = () => this.params.now?.() ?? new Date();
|
|
131
|
+
endCommand = () => {
|
|
132
|
+
this.ended = true;
|
|
133
|
+
return this.command((0, _transtekCommandProtocol.endSessionCommand)());
|
|
134
|
+
};
|
|
135
|
+
command = (frame, delayBeforeWriteMs) => ({
|
|
136
|
+
serviceUuid: this.serviceUuid,
|
|
137
|
+
characteristicUuid: _transtekCommandProtocol.TRANSTEK_CHARACTERISTICS.command,
|
|
138
|
+
frame,
|
|
139
|
+
...(delayBeforeWriteMs ? {
|
|
140
|
+
delayBeforeWriteMs
|
|
141
|
+
} : {})
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
exports.TranstekCommandSequencer = TranstekCommandSequencer;
|
|
145
|
+
//# sourceMappingURL=transtek-command.sequencer.js.map
|