@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,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/* eslint-disable import/group-exports */
|
|
4
|
+
|
|
5
|
+
import { FrameReadStatus } from "../../../types/frame-read-status.js";
|
|
6
|
+
import { hexToByte } from "../../../utils/hex-to-byte.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* TaiDoc's "0x51" command protocol, shared by its glucose meters, blood-pressure monitors,
|
|
10
|
+
* thermometers, pulse oximeters and scales. Layouts are from MedM Health Diary 3.12.11's
|
|
11
|
+
* `CTaiDocCommandDevice` and its per-driver subclasses.
|
|
12
|
+
*
|
|
13
|
+
* A frame is `51 cmd d0 d1 d2 d3 end cs`: `end` is A3 from the app and A5 from the device, and
|
|
14
|
+
* `cs` is the 8-bit sum of every byte before it. The scale's record and set-user frames are
|
|
15
|
+
* variable, `51 cmd LL data[LL] end cs`. One characteristic is both written and notified, so
|
|
16
|
+
* the device echoes every command back; an A3-terminated frame is that echo.
|
|
17
|
+
*/
|
|
18
|
+
export const TAIDOC_SERVICE = "00001523-1212-efde-1523-785feabcd123";
|
|
19
|
+
export const TAIDOC_CHARACTERISTIC = "00001524-1212-efde-1523-785feabcd123";
|
|
20
|
+
export const TAIDOC = {
|
|
21
|
+
wakeUp: 0x22,
|
|
22
|
+
deviceTime: 0x23,
|
|
23
|
+
model: 0x24,
|
|
24
|
+
readingTime: 0x25,
|
|
25
|
+
readingResult: 0x26,
|
|
26
|
+
serial1: 0x27,
|
|
27
|
+
serial2: 0x28,
|
|
28
|
+
oximeterAfterTime: 0x29,
|
|
29
|
+
readingCount: 0x2b,
|
|
30
|
+
setTime: 0x33,
|
|
31
|
+
shutdown: 0x50,
|
|
32
|
+
wakeNotice: 0x54,
|
|
33
|
+
weightRecord: 0x71,
|
|
34
|
+
setUser: 0x72,
|
|
35
|
+
busy: 0xe0
|
|
36
|
+
};
|
|
37
|
+
const START = 0x51;
|
|
38
|
+
const HOST_END = 0xa3;
|
|
39
|
+
const DEVICE_END = 0xa5;
|
|
40
|
+
const FIXED_FRAME_BYTES = 8;
|
|
41
|
+
const VARIABLE_COMMANDS = [TAIDOC.weightRecord, TAIDOC.setUser];
|
|
42
|
+
const toHex = bytes => bytes.map(value => (value & 0xff).toString(16).padStart(2, "0"));
|
|
43
|
+
const byteAt = (frame, index) => hexToByte(frame[index] ?? "00");
|
|
44
|
+
const sum = bytes => bytes.reduce((total, value) => total + value, 0) & 0xff;
|
|
45
|
+
const withChecksum = bytes => toHex([...bytes, sum(bytes)]);
|
|
46
|
+
export const commandOf = frame => byteAt(frame, 1);
|
|
47
|
+
|
|
48
|
+
/** `51 cmd a b c d A3 cs`. */
|
|
49
|
+
export const taidocCommand = (command, a = 0, b = 0, c = 0, d = 0) => withChecksum([START, command, a, b, c, d, HOST_END]);
|
|
50
|
+
export const readingCountCommand = user => taidocCommand(TAIDOC.readingCount, user);
|
|
51
|
+
export const readingCommand = (command, index, user) => taidocCommand(command, index & 0xff, index >> 8 & 0xff, 0, user);
|
|
52
|
+
|
|
53
|
+
/** `date16 = yy << 9 | month << 5 | day`, then minute and hour; the meter keeps local time. */
|
|
54
|
+
export const setTimeCommand = now => {
|
|
55
|
+
const date = now.getFullYear() % 100 << 9 | now.getMonth() + 1 << 5 | now.getDate();
|
|
56
|
+
return taidocCommand(TAIDOC.setTime, date & 0xff, date >> 8, now.getMinutes(), now.getHours());
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/** The scale's record request, `51 71 02 idxLo idxHi A3 cs`. */
|
|
60
|
+
export const weightRecordCommand = index => withChecksum([START, TAIDOC.weightRecord, 2, index & 0xff, index >> 8 & 0xff, HOST_END]);
|
|
61
|
+
|
|
62
|
+
/** The app's own command, echoed back on the shared characteristic. */
|
|
63
|
+
export const isHostFrame = frame => byteAt(frame, frame.length - 2) === HOST_END;
|
|
64
|
+
|
|
65
|
+
/** Isolates 0x51 frames whatever the notification boundaries, skipping noise to the next start. */
|
|
66
|
+
export class TaidocFrameReader {
|
|
67
|
+
readFrame(buffer) {
|
|
68
|
+
const start = buffer.findIndex(byte => hexToByte(byte) === START);
|
|
69
|
+
if (start === -1) {
|
|
70
|
+
return {
|
|
71
|
+
status: FrameReadStatus.INCOMPLETE,
|
|
72
|
+
consumedBytes: buffer.length
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
if (start + 3 > buffer.length) {
|
|
76
|
+
return {
|
|
77
|
+
status: FrameReadStatus.INCOMPLETE,
|
|
78
|
+
consumedBytes: start
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
const length = VARIABLE_COMMANDS.includes(byteAt(buffer, start + 1)) ? byteAt(buffer, start + 2) + 5 : FIXED_FRAME_BYTES;
|
|
82
|
+
if (start + length > buffer.length) {
|
|
83
|
+
return {
|
|
84
|
+
status: FrameReadStatus.INCOMPLETE,
|
|
85
|
+
consumedBytes: start
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
const received = buffer.slice(start, start + length);
|
|
89
|
+
const bytes = received.map(byte => hexToByte(byte));
|
|
90
|
+
const end = bytes[length - 2];
|
|
91
|
+
if (end !== HOST_END && end !== DEVICE_END || sum(bytes.slice(0, -1)) !== bytes[length - 1]) {
|
|
92
|
+
return {
|
|
93
|
+
status: FrameReadStatus.CORRUPT,
|
|
94
|
+
consumedBytes: start + 1
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
return {
|
|
98
|
+
status: FrameReadStatus.COMPLETE,
|
|
99
|
+
consumedBytes: start + length,
|
|
100
|
+
frame: received
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Device users by the project code of the 0x24 answer (`d0 | d1 << 8`), from
|
|
107
|
+
* `CTaiDocBTM::OnProjectCode`. Any other code is a single-user meter.
|
|
108
|
+
*/
|
|
109
|
+
const MULTI_USER_CODES = new Set([0x3128, 0x3132, 0x3252, 0x3261]);
|
|
110
|
+
export const usersFor = model => MULTI_USER_CODES.has(byteAt(model, 2) | byteAt(model, 3) << 8) ? 4 : 1;
|
|
111
|
+
|
|
112
|
+
/** The 0x2B answer: the current user's record count, little-endian. */
|
|
113
|
+
export const readCount = frame => byteAt(frame, 2) | byteAt(frame, 3) << 8;
|
|
114
|
+
//# sourceMappingURL=taidoc.protocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["FrameReadStatus","hexToByte","TAIDOC_SERVICE","TAIDOC_CHARACTERISTIC","TAIDOC","wakeUp","deviceTime","model","readingTime","readingResult","serial1","serial2","oximeterAfterTime","readingCount","setTime","shutdown","wakeNotice","weightRecord","setUser","busy","START","HOST_END","DEVICE_END","FIXED_FRAME_BYTES","VARIABLE_COMMANDS","toHex","bytes","map","value","toString","padStart","byteAt","frame","index","sum","reduce","total","withChecksum","commandOf","taidocCommand","command","a","b","c","d","readingCountCommand","user","readingCommand","setTimeCommand","now","date","getFullYear","getMonth","getDate","getMinutes","getHours","weightRecordCommand","isHostFrame","length","TaidocFrameReader","readFrame","buffer","start","findIndex","byte","status","INCOMPLETE","consumedBytes","includes","received","slice","end","CORRUPT","COMPLETE","MULTI_USER_CODES","Set","usersFor","has","readCount"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/taidoc/taidoc.prot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 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/* eslint-disable import/group-exports */
|
|
4
|
+
import { MeasurementTypeKey } from "@ovok/core";
|
|
5
|
+
import { hexToByte } from "../../../utils/hex-to-byte.js";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* TaiDoc record layouts, from MedM Health Diary 3.12.11's `CTaiDocBTM`, `CTaiDocTM`,
|
|
9
|
+
* `CTaiDoc_8255` and `CTaiDocW` parsers. A record is the 0x25 answer (its time and flags) and
|
|
10
|
+
* the 0x26 answer (its values); the scale's 0x71 record carries both.
|
|
11
|
+
*/
|
|
12
|
+
const byteAt = (frame, index) => hexToByte(frame[index] ?? "00");
|
|
13
|
+
|
|
14
|
+
/** The 0x25 answer's flags byte: bits 0-5 minute, 6 irregular pulse, 7 blood-pressure record. */
|
|
15
|
+
const FLAGS_BYTE = 4;
|
|
16
|
+
export const isBloodPressureRecord = time => (byteAt(time, FLAGS_BYTE) & 0x80) !== 0;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* The record time in a 0x25 answer: `date16` as in set time, minute and hour. A year byte past
|
|
20
|
+
* 2069 is MedM's "clock not valid", and such a record is dropped rather than given today's date.
|
|
21
|
+
*/
|
|
22
|
+
export const readRecordTime = time => {
|
|
23
|
+
const date = byteAt(time, 2) | byteAt(time, 3) << 8;
|
|
24
|
+
const year = date >> 9;
|
|
25
|
+
const month = date >> 5 & 0x0f;
|
|
26
|
+
const day = date & 0x1f;
|
|
27
|
+
if (year > 69 || month < 1 || month > 12 || day < 1) {
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
30
|
+
return new Date(2000 + year, month - 1, day, byteAt(time, 5) & 0x1f, byteAt(time, FLAGS_BYTE) & 0x3f);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/** 0x26 blood pressure: systolic, mean arterial pressure, diastolic, pulse. */
|
|
34
|
+
export const readBloodPressure = (time, result) => {
|
|
35
|
+
const systolic = byteAt(result, 2);
|
|
36
|
+
const diastolic = byteAt(result, 4);
|
|
37
|
+
if (systolic === 0 || diastolic === 0) {
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
systolic,
|
|
42
|
+
diastolic,
|
|
43
|
+
heartRate: byteAt(result, 5),
|
|
44
|
+
...((byteAt(time, FLAGS_BYTE) & 0x40) !== 0 ? {
|
|
45
|
+
irregularHeartbeat: true
|
|
46
|
+
} : {})
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Frame byte 5 of the 0x26 stored result is d3: bits 6-7 the meal flag, where `11` marks a
|
|
52
|
+
* control-solution test, and on multi-parameter meters bits 2-5 the parameter - 0 glucose;
|
|
53
|
+
* 6 haematocrit, 7 ketone, 8 uric acid, 9 cholesterol, 11 haemoglobin, 12 lactate,
|
|
54
|
+
* 13 triglycerides. Single-parameter TaiDoc meters keep the strip code in bits 2-5 instead,
|
|
55
|
+
* so this check holds only for multi-parameter ones.
|
|
56
|
+
*/
|
|
57
|
+
const CONTROL_SOLUTION_FLAG = 0b11;
|
|
58
|
+
const GLUCOSE_PARAMETER = 0;
|
|
59
|
+
|
|
60
|
+
/** A stored TaiDoc result is a patient glucose reading, not another analyte or a control test. */
|
|
61
|
+
export const isPatientGlucoseRecord = result => {
|
|
62
|
+
const flags = byteAt(result, 5);
|
|
63
|
+
return flags >> 6 !== CONTROL_SOLUTION_FLAG && (flags >> 2 & 0x0f) === GLUCOSE_PARAMETER;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* 0x26 glucose, mg/dL little-endian in d0-d1. The meters on this parser are glucose-only or
|
|
68
|
+
* BP+glucose, whose bits 2-5 may hold a strip code, so only control-solution tests are dropped.
|
|
69
|
+
*/
|
|
70
|
+
export const readGlucose = result => {
|
|
71
|
+
const bloodGlucose = byteAt(result, 2) | byteAt(result, 3) << 8;
|
|
72
|
+
return bloodGlucose > 0 && byteAt(result, 5) >> 6 !== CONTROL_SOLUTION_FLAG ? bloodGlucose : undefined;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
/** 0x26 temperature, tenths of a degree Celsius; above 60.0 is MedM's object (surface) mode. */
|
|
76
|
+
export const readTemperature = result => {
|
|
77
|
+
const tenths = byteAt(result, 2) | byteAt(result, 3) << 8;
|
|
78
|
+
return tenths > 0 && tenths <= 600 ? tenths / 10 : undefined;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
/** 0x26 pulse oximetry: SpO2 % in d0-d1, pulse in d3. */
|
|
82
|
+
export const readOximeter = result => {
|
|
83
|
+
const bloodOxygen = byteAt(result, 2) | byteAt(result, 3) << 8;
|
|
84
|
+
const pulseRate = byteAt(result, 5);
|
|
85
|
+
return bloodOxygen > 0 && bloodOxygen <= 100 && pulseRate > 0 ? {
|
|
86
|
+
bloodOxygen,
|
|
87
|
+
pulseRate
|
|
88
|
+
} : undefined;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* The scale's 34-byte 0x71 record: yy MM dd hh mm at 4-8, user at 9, a unit selector at 15 and
|
|
93
|
+
* the weight in tenths, big-endian, at 16. Selector 1 puts the weight in a second slot in a unit
|
|
94
|
+
* MedM does not name, so it is dropped rather than guessed. Body composition is not decoded:
|
|
95
|
+
* which quantity each of its fields carries is not known.
|
|
96
|
+
*/
|
|
97
|
+
export const readWeight = record => {
|
|
98
|
+
const year = byteAt(record, 4);
|
|
99
|
+
const month = byteAt(record, 5);
|
|
100
|
+
const selector = byteAt(record, 0x0f);
|
|
101
|
+
const tenths = byteAt(record, 0x10) << 8 | byteAt(record, 0x11);
|
|
102
|
+
if (record.length !== 34 || selector !== 0 && selector !== 2 || tenths === 0 || year > 69 || month < 1 || month > 12) {
|
|
103
|
+
return undefined;
|
|
104
|
+
}
|
|
105
|
+
return {
|
|
106
|
+
bodyWeight: tenths / 10,
|
|
107
|
+
recordedAt: new Date(2000 + year, month - 1, byteAt(record, 6), byteAt(record, 7), byteAt(record, 8)),
|
|
108
|
+
user: byteAt(record, 9)
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
/** What the 0x26 record holds: `multi` is glucose or blood pressure by the type bit, `bpm` always blood pressure. */
|
|
113
|
+
|
|
114
|
+
const readValues = (kind, time, result) => {
|
|
115
|
+
if (kind === "bpm" || kind === "multi" && isBloodPressureRecord(time)) {
|
|
116
|
+
const reading = readBloodPressure(time, result);
|
|
117
|
+
return reading && {
|
|
118
|
+
measurementTypeKey: MeasurementTypeKey.bloodPressure,
|
|
119
|
+
...reading
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
if (kind === "multi") {
|
|
123
|
+
const bloodGlucose = readGlucose(result);
|
|
124
|
+
return bloodGlucose === undefined ? undefined : {
|
|
125
|
+
measurementTypeKey: MeasurementTypeKey.bloodGlucose,
|
|
126
|
+
bloodGlucose
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
if (kind === "thermometer") {
|
|
130
|
+
const bodyTemp = readTemperature(result);
|
|
131
|
+
return bodyTemp === undefined ? undefined : {
|
|
132
|
+
measurementTypeKey: MeasurementTypeKey.temperature,
|
|
133
|
+
bodyTemp
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
const reading = kind === "oximeter" ? readOximeter(result) : undefined;
|
|
137
|
+
return reading && {
|
|
138
|
+
measurementTypeKey: MeasurementTypeKey.bloodOxygenPulseRate,
|
|
139
|
+
...reading
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
/** One 0x25/0x26 record pair as a result, or undefined when it is invalid or not a reading. */
|
|
144
|
+
export const decodeRecord = (kind, time, result, user) => {
|
|
145
|
+
const recordedAt = readRecordTime(time);
|
|
146
|
+
const values = recordedAt && readValues(kind, time, result);
|
|
147
|
+
return values && {
|
|
148
|
+
...values,
|
|
149
|
+
recordedAt,
|
|
150
|
+
...(user > 0 ? {
|
|
151
|
+
memorySlot: user
|
|
152
|
+
} : {})
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
/** The scale's 0x71 record as a result. */
|
|
157
|
+
export const decodeWeightRecord = record => {
|
|
158
|
+
const weight = readWeight(record);
|
|
159
|
+
return weight && {
|
|
160
|
+
measurementTypeKey: MeasurementTypeKey.bodyWeight,
|
|
161
|
+
bodyWeight: weight.bodyWeight,
|
|
162
|
+
recordedAt: weight.recordedAt,
|
|
163
|
+
...(weight.user > 0 ? {
|
|
164
|
+
memorySlot: weight.user
|
|
165
|
+
} : {})
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
//# sourceMappingURL=taidoc.records.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["MeasurementTypeKey","hexToByte","byteAt","frame","index","FLAGS_BYTE","isBloodPressureRecord","time","readRecordTime","date","year","month","day","undefined","Date","readBloodPressure","result","systolic","diastolic","heartRate","irregularHeartbeat","CONTROL_SOLUTION_FLAG","GLUCOSE_PARAMETER","isPatientGlucoseRecord","flags","readGlucose","bloodGlucose","readTemperature","tenths","readOximeter","bloodOxygen","pulseRate","readWeight","record","selector","length","bodyWeight","recordedAt","user","readValues","kind","reading","measurementTypeKey","bloodPressure","bodyTemp","temperature","bloodOxygenPulseRate","decodeRecord","values","memorySlot","decodeWeightRecord","weight"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/taidoc/taidoc.records.ts"],"mappings":";;AAAA;AACA,SAASA,kBAAkB,QAAQ,YAAY;AAE/C,SAASC,SAAS,QAAQ,+BAA4B;;AAEtD;AACA;AACA;AACA;AACA;AACA,MAAMC,MAAM,GAAGA,CAACC,KAAwB,EAAEC,KAAa,KACrDH,SAAS,CAACE,KAAK,CAACC,KAAK,CAAC,IAAI,IAAI,CAAC;;AAEjC;AACA,MAAMC,UAAU,GAAG,CAAC;AAEpB,OAAO,MAAMC,qBAAqB,GAAIC,IAAuB,IAC3D,CAACL,MAAM,CAAC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AG;MAAEW,UAAU,EAAEX;IAAK,CAAC,GAAG,CAAC,CAAC;EAAE,CAAC;AACvF,CAAC;;AAED;AACA,OAAO,MAAMY,kBAAkB,GAAIjB,MAAyB,IAA0C;EACpG,MAAMkB,MAAM,GAAGnB,UAAU,CAACC,MAAM,CAAC;EAEjC,OACEkB,MAAM,IAAI;IACRT,kBAAkB,EAAE1C,kBAAkB,CAACoC,UAAU;IACjDA,UAAU,EAAEe,MAAM,CAACf,UAAU;IAC7BC,UAAU,EAAEc,MAAM,CAACd,UAAU;IAC7B,IAAIc,MAAM,CAACb,IAAI,GAAG,CAAC,GAAG;MAAEW,UAAU,EAAEE,MAAM,CAACb;IAAK,CAAC,GAAG,CAAC,CAAC;EACxD,CAAC;AAEL,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { CaseType } from "../../../types/case-type.js";
|
|
4
|
+
import { commandOf, isHostFrame, readCount, readingCommand, readingCountCommand, setTimeCommand, TAIDOC, TAIDOC_CHARACTERISTIC, TAIDOC_SERVICE, taidocCommand, usersFor, weightRecordCommand } from "./taidoc.protocol.js";
|
|
5
|
+
import { decodeRecord, decodeWeightRecord } from "./taidoc.records.js";
|
|
6
|
+
|
|
7
|
+
/** MedM's wait after connecting before the first command: 1.5 s, 3 s for the 8255, 8 s for the cuff. */
|
|
8
|
+
const START_DELAY_MS = {
|
|
9
|
+
multi: 1_500,
|
|
10
|
+
bpm: 8_000,
|
|
11
|
+
thermometer: 1_500,
|
|
12
|
+
oximeter: 3_000,
|
|
13
|
+
scale: 1_500
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/** The scale paces its record requests 250 ms apart. */
|
|
17
|
+
const SCALE_RECORD_DELAY_MS = 250;
|
|
18
|
+
const RESPONSE_TIMEOUT_MS = 3_000;
|
|
19
|
+
const RETRIES = 3;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* MedM's history session: model, serial, device time, set time, then for every device user the
|
|
23
|
+
* record count and each record by index (record time 0x25, then result 0x26; the scale's 0x71
|
|
24
|
+
* carries both). It ends with power off 0x50; the clear-memory command 0x52 is never sent.
|
|
25
|
+
*/
|
|
26
|
+
class TaidocSequencer {
|
|
27
|
+
retries = RETRIES;
|
|
28
|
+
ended = false;
|
|
29
|
+
user = 0;
|
|
30
|
+
maxUser = 0;
|
|
31
|
+
count = 0;
|
|
32
|
+
index = 0;
|
|
33
|
+
recordTime = [];
|
|
34
|
+
constructor(params) {
|
|
35
|
+
this.params = params;
|
|
36
|
+
}
|
|
37
|
+
initialCommands = () => [this.send(taidocCommand(TAIDOC.model), START_DELAY_MS[this.params.kind])];
|
|
38
|
+
isHistoryTransfer = () => true;
|
|
39
|
+
isNormalDisconnect = () => this.ended;
|
|
40
|
+
commandTimeoutMs = () => this.ended ? undefined : RESPONSE_TIMEOUT_MS;
|
|
41
|
+
onCommandTimeout = () => {
|
|
42
|
+
if (this.retries === 0 || !this.last) {
|
|
43
|
+
return {
|
|
44
|
+
terminal: true
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
this.retries -= 1;
|
|
48
|
+
return {
|
|
49
|
+
commands: [this.last]
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
commandProgress = frame => isHostFrame(frame) ? "ignored" : "complete";
|
|
53
|
+
nextCommand = frame => {
|
|
54
|
+
if (isHostFrame(frame) || this.ended) {
|
|
55
|
+
return undefined;
|
|
56
|
+
}
|
|
57
|
+
this.retries = RETRIES;
|
|
58
|
+
switch (commandOf(frame)) {
|
|
59
|
+
case TAIDOC.busy:
|
|
60
|
+
return this.last && [this.last];
|
|
61
|
+
case TAIDOC.wakeUp:
|
|
62
|
+
case TAIDOC.wakeNotice:
|
|
63
|
+
return [this.send(taidocCommand(TAIDOC.model))];
|
|
64
|
+
case TAIDOC.model:
|
|
65
|
+
{
|
|
66
|
+
const users = usersFor(frame);
|
|
67
|
+
this.user = users > 1 ? 1 : 0;
|
|
68
|
+
this.maxUser = users > 1 ? users : 0;
|
|
69
|
+
return [this.send(taidocCommand(TAIDOC.serial1))];
|
|
70
|
+
}
|
|
71
|
+
case TAIDOC.serial1:
|
|
72
|
+
return [this.send(taidocCommand(TAIDOC.serial2))];
|
|
73
|
+
case TAIDOC.serial2:
|
|
74
|
+
return [this.send(taidocCommand(TAIDOC.deviceTime))];
|
|
75
|
+
case TAIDOC.deviceTime:
|
|
76
|
+
return [this.send(setTimeCommand(this.now()))];
|
|
77
|
+
case TAIDOC.setTime:
|
|
78
|
+
return [this.send(this.params.kind === "oximeter" ? taidocCommand(TAIDOC.oximeterAfterTime) : readingCountCommand(this.user))];
|
|
79
|
+
case TAIDOC.oximeterAfterTime:
|
|
80
|
+
return [this.send(readingCountCommand(this.user))];
|
|
81
|
+
case TAIDOC.readingCount:
|
|
82
|
+
this.count = readCount(frame);
|
|
83
|
+
this.index = 0;
|
|
84
|
+
return this.nextReading();
|
|
85
|
+
case TAIDOC.readingTime:
|
|
86
|
+
this.recordTime = frame;
|
|
87
|
+
return [this.send(readingCommand(TAIDOC.readingResult, this.index - 1, this.user))];
|
|
88
|
+
case TAIDOC.readingResult:
|
|
89
|
+
this.report(decodeRecord(this.params.kind, this.recordTime, frame, this.user));
|
|
90
|
+
return this.nextReading();
|
|
91
|
+
case TAIDOC.weightRecord:
|
|
92
|
+
this.report(decodeWeightRecord(frame));
|
|
93
|
+
return this.nextReading();
|
|
94
|
+
default:
|
|
95
|
+
return undefined;
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
/** Requests the next index, then the next user's count, then powers the device off. */
|
|
100
|
+
nextReading = () => {
|
|
101
|
+
if (this.index < this.count) {
|
|
102
|
+
const index = this.index;
|
|
103
|
+
this.index += 1;
|
|
104
|
+
return [this.params.kind === "scale" ? this.send(weightRecordCommand(index), SCALE_RECORD_DELAY_MS) : this.send(readingCommand(TAIDOC.readingTime, index, this.user))];
|
|
105
|
+
}
|
|
106
|
+
if (this.user < this.maxUser) {
|
|
107
|
+
this.user += 1;
|
|
108
|
+
return [this.send(readingCountCommand(this.user))];
|
|
109
|
+
}
|
|
110
|
+
this.ended = true;
|
|
111
|
+
return [this.send(taidocCommand(TAIDOC.shutdown))];
|
|
112
|
+
};
|
|
113
|
+
report = reading => {
|
|
114
|
+
if (reading) {
|
|
115
|
+
this.params.onResult({
|
|
116
|
+
caseType: CaseType.RESULT,
|
|
117
|
+
...reading
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
now = () => this.params.now?.() ?? new Date();
|
|
122
|
+
send = (frame, delayBeforeWriteMs) => {
|
|
123
|
+
// A re-send goes out at once: the start delay only settles the link after connecting.
|
|
124
|
+
this.last = {
|
|
125
|
+
serviceUuid: TAIDOC_SERVICE,
|
|
126
|
+
characteristicUuid: TAIDOC_CHARACTERISTIC,
|
|
127
|
+
frame
|
|
128
|
+
};
|
|
129
|
+
return delayBeforeWriteMs ? {
|
|
130
|
+
...this.last,
|
|
131
|
+
delayBeforeWriteMs
|
|
132
|
+
} : this.last;
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
export { TaidocSequencer };
|
|
136
|
+
//# sourceMappingURL=taidoc.sequencer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["CaseType","commandOf","isHostFrame","readCount","readingCommand","readingCountCommand","setTimeCommand","TAIDOC","TAIDOC_CHARACTERISTIC","TAIDOC_SERVICE","taidocCommand","usersFor","weightRecordCommand","decodeRecord","decodeWeightRecord","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","model","kind","isHistoryTransfer","isNormalDisconnect","commandTimeoutMs","undefined","onCommandTimeout","last","terminal","commands","commandProgress","frame","nextCommand","busy","wakeUp","wakeNotice","users","serial1","serial2","deviceTime","now","setTime","oximeterAfterTime","readingCount","nextReading","readingTime","readingResult","report","weightRecord","shutdown","reading","onResult","caseType","RESULT","Date","delayBeforeWriteMs","serviceUuid","characteristicUuid"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/taidoc/taidoc.sequencer.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,6BAA0B;AAInD,SACEC,SAAS,EACTC,WAAW,EACXC,SAAS,EACTC,cAAc,EACdC,mBAAmB,EACnBC,cAAc,EACdC,MAAM,EACNC,qBAAqB,EACrBC,cAAc,EACdC,aAAa,EACbC,QAAQ,EACRC,mBAAmB,QACd,sBAAmB;AAC1B,SAASC,YAAY,EAAEC,kBAAkB,QAAoB,qBAAkB;;AAE/E;AACA,MAAMC,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,CAAC;EACXC,KAAK,GAAG,CAAC;EACTC,KAAK,GAAG,CAAC;EACTC,UAAU,GAAsB,EAAE;EAEnCC,WAAWA,CACCC,MAIhB,EACD;IAAA,KALiBA,MAIhB,GAJgBA,MAIhB;EACA;EAEIC,eAAe,GAAGA,CAAA,KAAgC,CACvD,IAAI,CAACC,IAAI,CAACzB,aAAa,CAACH,MAAM,CAAC6B,KAAK,CAAC,EAAErB,cAAc,CAAC,IAAI,CAACkB,MAAM,CAACI,IAAI,CAAC,CAAC,CACzE;EAEMC,iBAAiB,GAAGA,CAAA,KAAe,IAAI;EAEvCC,kBA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AAC;EACpD,CAAC;EAEOF,MAAM,GAAIG,OAA4C,IAAW;IACvE,IAAIA,OAAO,EAAE;MACX,IAAI,CAACjC,MAAM,CAACkC,QAAQ,CAAC;QAAEC,QAAQ,EAAEpE,QAAQ,CAACqE,MAAM;QAAE,GAAGH;MAAQ,CAAC,CAAC;IACjE;EACF,CAAC;EAEOV,GAAG,GAAGA,CAAA,KAAY,IAAI,CAACvB,MAAM,CAACuB,GAAG,GAAG,CAAC,IAAI,IAAIc,IAAI,CAAC,CAAC;EAEnDnC,IAAI,GAAGA,CAACY,KAAwB,EAAEwB,kBAA2B,KAAoB;IACvF;IACA,IAAI,CAAC5B,IAAI,GAAG;MAAE6B,WAAW,EAAE/D,cAAc;MAAEgE,kBAAkB,EAAEjE,qBAAqB;MAAEuC;IAAM,CAAC;IAE7F,OAAOwB,kBAAkB,GAAG;MAAE,GAAG,IAAI,CAAC5B,IAAI;MAAE4B;IAAmB,CAAC,GAAG,IAAI,CAAC5B,IAAI;EAC9E,CAAC;AACH;AAEA,SAASnB,eAAe","ignoreList":[]}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { IntegratedDevices } from "../../../types/integrated-devices.js";
|
|
4
|
+
import { loadDeviceSecret } from "../../device-secrets.js";
|
|
5
|
+
import { BTManagedDevice } from "../bt-managed-device.js";
|
|
6
|
+
import { TRANSTEK_CHARACTERISTICS, TRANSTEK_SERVICES } from "./transtek-command.protocol.js";
|
|
7
|
+
import { TranstekCommandSequencer } from "./transtek-command.sequencer.js";
|
|
8
|
+
/** The sequencer decodes records itself; the declarative parser only has to pass frames on. */
|
|
9
|
+
const passThrough = {
|
|
10
|
+
caseValuePosition: [],
|
|
11
|
+
cases: []
|
|
12
|
+
};
|
|
13
|
+
const service = (uuid, data, optional) => ({
|
|
14
|
+
uuid,
|
|
15
|
+
optional,
|
|
16
|
+
monitorUuids: [{
|
|
17
|
+
uuid: TRANSTEK_CHARACTERISTICS.answer,
|
|
18
|
+
parsingModel: passThrough
|
|
19
|
+
}, {
|
|
20
|
+
uuid: data,
|
|
21
|
+
parsingModel: passThrough
|
|
22
|
+
}]
|
|
23
|
+
});
|
|
24
|
+
const SERVICES_BY_KIND = {
|
|
25
|
+
"blood-pressure": [service(TRANSTEK_SERVICES.bloodPressureA2, TRANSTEK_CHARACTERISTICS.bloodPressure, true), service(TRANSTEK_SERVICES.bloodPressureA3, TRANSTEK_CHARACTERISTICS.bloodPressure, true)],
|
|
26
|
+
scale: [service(TRANSTEK_SERVICES.scaleA2, TRANSTEK_CHARACTERISTICS.weightA2, true), service(TRANSTEK_SERVICES.scaleA3, TRANSTEK_CHARACTERISTICS.weightA3, true)],
|
|
27
|
+
tracker: [service(TRANSTEK_SERVICES.tracker, TRANSTEK_CHARACTERISTICS.tracker, false)]
|
|
28
|
+
};
|
|
29
|
+
const KIND = {
|
|
30
|
+
[IntegratedDevices.TRANSTEK_BPM]: "blood-pressure",
|
|
31
|
+
[IntegratedDevices.TRANSTEK_SCALE]: "scale",
|
|
32
|
+
[IntegratedDevices.TRANSTEK_SCALE_1525]: "scale",
|
|
33
|
+
[IntegratedDevices.TRANSTEK_TRACKER]: "tracker"
|
|
34
|
+
};
|
|
35
|
+
const secretKey = device => `transtek-password:${device.id}`;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Transtek's white-label blood-pressure monitors, scales and 405A0 activity tracker, on the
|
|
39
|
+
* "command" protocol (A2/A3). See `TranstekCommandSequencer` for the session.
|
|
40
|
+
*/
|
|
41
|
+
class TranstekCommandDevice extends BTManagedDevice {
|
|
42
|
+
stuckDataTimeout = 60_000;
|
|
43
|
+
onStreamStart = undefined;
|
|
44
|
+
constructor(device, params) {
|
|
45
|
+
super(device, params);
|
|
46
|
+
const kind = KIND[params.deviceName];
|
|
47
|
+
this.mainServices = SERVICES_BY_KIND[kind];
|
|
48
|
+
|
|
49
|
+
// The random-number reply has to be answered at once, so the stored password is loaded early.
|
|
50
|
+
void loadDeviceSecret(secretKey(device));
|
|
51
|
+
this.createCommandSequencer = () => new TranstekCommandSequencer({
|
|
52
|
+
kind,
|
|
53
|
+
secretKey: secretKey(device),
|
|
54
|
+
heightInCentimetres: params.deviceName === IntegratedDevices.TRANSTEK_SCALE_1525,
|
|
55
|
+
onResult: result => this.onResult?.(result),
|
|
56
|
+
onError: error => this.onError?.(error)
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/** No framing: every notification is one whole message. */
|
|
61
|
+
validatePackage = () => true;
|
|
62
|
+
handleSuccessResult() {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
export { TranstekCommandDevice };
|
|
67
|
+
//# sourceMappingURL=transtek-command.device.js.map
|
package/lib/module/modules/bt-management/services/devices/transtek/transtek-command.device.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["IntegratedDevices","loadDeviceSecret","BTManagedDevice","TRANSTEK_CHARACTERISTICS","TRANSTEK_SERVICES","TranstekCommandSequencer","passThrough","caseValuePosition","cases","service","uuid","data","optional","monitorUuids","answer","parsingModel","SERVICES_BY_KIND","bloodPressureA2","bloodPressure","bloodPressureA3","scale","scaleA2","weightA2","scaleA3","weightA3","tracker","KIND","TRANSTEK_BPM","TRANSTEK_SCALE","TRANSTEK_SCALE_1525","TRANSTEK_TRACKER","secretKey","device","id","TranstekCommandDevice","stuckDataTimeout","onStreamStart","undefined","constructor","params","kind","deviceName","mainServices","createCommandSequencer","heightInCentimetres","onResult","result","onError","error","validatePackage","handleSuccessResult"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/transtek/transtek-command.device.ts"],"mappings":";;AAIA,SAASA,iBAAiB,QAAQ,sCAAmC;AAGrE,SAASC,gBAAgB,QAAQ,yBAAsB;AACvD,SAASC,eAAe,QAAQ,yBAAsB;AAEtD,SACEC,wBAAwB,EACxBC,iBAAiB,QACZ,gCAA6B;AACpC,SAASC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AM,CAACC,EAAE,EAAE;;AAE9E;AACA;AACA;AACA;AACA,MAAMC,qBAAqB,SAAShC,eAAe,CAAiB;EAExDiC,gBAAgB,GAAG,MAAM;EACzBC,aAAa,GAAGC,SAAS;EAE5BC,WAAWA,CAACN,MAAc,EAAEO,MAA0C,EAAE;IAC7E,KAAK,CAACP,MAAM,EAAEO,MAAM,CAAC;IAErB,MAAMC,IAAI,GAAGd,IAAI,CAACa,MAAM,CAACE,UAAU,CAAC;IAEpC,IAAI,CAACC,YAAY,GAAG1B,gBAAgB,CAACwB,IAAI,CAAC;;IAE1C;IACA,KAAKvC,gBAAgB,CAAC8B,SAAS,CAACC,MAAM,CAAC,CAAC;IAExC,IAAI,CAACW,sBAAsB,GAAG,MAC5B,IAAItC,wBAAwB,CAAC;MAC3BmC,IAAI;MACJT,SAAS,EAAEA,SAAS,CAACC,MAAM,CAAC;MAC5BY,mBAAmB,EACjBL,MAAM,CAACE,UAAU,KAAKzC,iBAAiB,CAAC6B,mBAAmB;MAC7DgB,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;AAEA,SAAShB,qBAAqB","ignoreList":[]}
|
package/lib/module/modules/bt-management/services/devices/transtek/transtek-command.protocol.js
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/* eslint-disable import/group-exports */
|
|
4
|
+
|
|
5
|
+
import { hexToByte } from "../../../utils/hex-to-byte.js";
|
|
6
|
+
import { le32FromHex } from "../../../utils/le-32-from-hex.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The Transtek / LifeSense "command" protocol (generations A2 and A3) spoken by Transtek's
|
|
10
|
+
* white-label blood-pressure monitors, scales and the 405A0 activity tracker.
|
|
11
|
+
*
|
|
12
|
+
* Layouts are from MedM Health Diary 3.12.11's `CTranstekCommandDevice` family. There is no
|
|
13
|
+
* framing: one notification is one message, every integer is little-endian, and the device
|
|
14
|
+
* never acknowledges a command - the app moves on by timers.
|
|
15
|
+
*
|
|
16
|
+
* Generation is picked by which primary service the device has: A2 or A3 for each kind.
|
|
17
|
+
*/
|
|
18
|
+
const sig16 = assigned => `0000${assigned}-0000-1000-8000-00805f9b34fb`;
|
|
19
|
+
export const TRANSTEK_SERVICES = {
|
|
20
|
+
bloodPressureA2: sig16("7809"),
|
|
21
|
+
bloodPressureA3: sig16("7889"),
|
|
22
|
+
scaleA2: sig16("7802"),
|
|
23
|
+
scaleA3: sig16("7892"),
|
|
24
|
+
tracker: sig16("7801")
|
|
25
|
+
};
|
|
26
|
+
export const TRANSTEK_CHARACTERISTICS = {
|
|
27
|
+
command: sig16("8a81"),
|
|
28
|
+
answer: sig16("8a82"),
|
|
29
|
+
bloodPressure: sig16("8a91"),
|
|
30
|
+
weightA2: sig16("8a21"),
|
|
31
|
+
weightA3: sig16("8a24"),
|
|
32
|
+
tracker: sig16("8a11")
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/** Device-to-app opcodes on the answer characteristic. */
|
|
36
|
+
export const ANSWER = {
|
|
37
|
+
password: 0xa0,
|
|
38
|
+
random: 0xa1,
|
|
39
|
+
userCount: 0x83,
|
|
40
|
+
userInfo: 0xc0
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/** Seconds since this local wall-clock instant are how both directions carry time. */
|
|
44
|
+
const EPOCH_UTC_MS = Date.UTC(2010, 0, 1);
|
|
45
|
+
const toHex = bytes => bytes.map(value => (value & 0xff).toString(16).padStart(2, "0"));
|
|
46
|
+
const le32 = value => [value & 0xff, value >>> 8 & 0xff, value >>> 16 & 0xff, value >>> 24 & 0xff];
|
|
47
|
+
export const u32 = (frame, index) => le32FromHex([...frame], index) >>> 0;
|
|
48
|
+
export const u16 = (frame, index) => hexToByte(frame[index] ?? "00") | hexToByte(frame[index + 1] ?? "00") << 8;
|
|
49
|
+
export const opcode = frame => hexToByte(frame[0] ?? "00");
|
|
50
|
+
|
|
51
|
+
/** A device timestamp, read as the phone's local wall-clock time. */
|
|
52
|
+
export const transtekTime = seconds => {
|
|
53
|
+
const wall = new Date(EPOCH_UTC_MS + seconds * 1000);
|
|
54
|
+
return new Date(wall.getUTCFullYear(), wall.getUTCMonth(), wall.getUTCDate(), wall.getUTCHours(), wall.getUTCMinutes(), wall.getUTCSeconds());
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/** The phone's local wall-clock time as device seconds; the device has no timezone. */
|
|
58
|
+
export const transtekSeconds = now => Math.floor((Date.UTC(now.getFullYear(), now.getMonth(), now.getDate(), now.getHours(), now.getMinutes(), now.getSeconds()) - EPOCH_UTC_MS) / 1000);
|
|
59
|
+
export const readPassword = frame => u32(frame, 1);
|
|
60
|
+
export const readRandom = frame => u32(frame, 1);
|
|
61
|
+
|
|
62
|
+
/** `21 FF 00 00 UU`: sent after the pairing password. */
|
|
63
|
+
export const accountIdCommand = user => toHex([0x21, 0xff, 0x00, 0x00, user]);
|
|
64
|
+
|
|
65
|
+
/** `20` + (password XOR random): proves this phone holds the device's password. */
|
|
66
|
+
export const verificationCommand = (password, random) => toHex([0x20, ...le32((password ^ random) >>> 0)]);
|
|
67
|
+
export const setTimeCommand = now => toHex([0x02, ...le32(transtekSeconds(now))]);
|
|
68
|
+
|
|
69
|
+
/** `22`: the app is done with this session. */
|
|
70
|
+
export const endSessionCommand = () => toHex([0x22]);
|
|
71
|
+
|
|
72
|
+
/** `03 UU` + an 18-byte, space-padded user name (A3 pairing). */
|
|
73
|
+
export const bindUserCommand = (user, name) => {
|
|
74
|
+
const bytes = Array.from(name.slice(0, 18), char => char.charCodeAt(0) & 0x7f);
|
|
75
|
+
return toHex([0x03, user, ...bytes, ...Array(18 - bytes.length).fill(0x20)]);
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* `51`: the A3 scale's user profile. The SDK has no patient profile, so it sends the same
|
|
80
|
+
* defaults MedM falls back to - male, 30 years, 175 cm, kilograms, no goal. They feed only
|
|
81
|
+
* the scale's own body-composition estimate, never the weight.
|
|
82
|
+
*/
|
|
83
|
+
export const scaleProfileCommand = (user, heightInCentimetres) => {
|
|
84
|
+
const heightCm = 175;
|
|
85
|
+
const height = heightInCentimetres ? [heightCm & 0xff, 0xe0 + (heightCm >> 8)] : [heightCm * 10 & 0xff, 0xd0 | heightCm * 10 >> 8];
|
|
86
|
+
return toHex([0x51, 0x17, user, 0x01, 30, ...height, 0x00, 0x00, 0x00, 0x00, 0x00]);
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
/** `40 00`: tracker configuration, leaving stored data in place. */
|
|
90
|
+
export const trackerConfigurationCommand = () => toHex([0x40, 0x00]);
|
|
91
|
+
|
|
92
|
+
/** `05`: tracker user data - 70 kg and 1.75 m, the same defaults as the scale profile. */
|
|
93
|
+
export const trackerUserDataCommand = () => toHex([0x05, 0x0a, 0x00, ...[7000 & 0xff, 7000 >> 8], 0x00, 0xfe, 175 & 0xff, 0xe0]);
|
|
94
|
+
//# sourceMappingURL=transtek-command.protocol.js.map
|
package/lib/module/modules/bt-management/services/devices/transtek/transtek-command.protocol.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["hexToByte","le32FromHex","sig16","assigned","TRANSTEK_SERVICES","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","u16","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":";;AAAA;;AAEA,SAASA,SAAS,QAAQ,+BAA4B;AACtD,SAASC,WAAW,QAAQ,kCAA+B;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,KAAK,GAAIC,QAAgB,IAC7B,OAAOA,QAAQ,8BAA8B;AAE/C,OAAO,MAAMC,iBAAiB,GAAG;EAC/BC,eAAe,EAAEH,KAAK,CAAC,MAAM,CAAC;EAC9BI,eAAe,EAAEJ,KAAK,CAAC,MAAM,CAAC;EAC9BK,OAAO,EAAEL,KAAK,CAAC,MAAM,CAAC;EACtBM,OAAO,EAAEN,KAAK,CAAC,MAAM,CAAC;EACtBO,OAAO,EAAEP,KAAK,CAAC,MAAM;AACvB,CAAU;AAEV,OAAO,MAAMQ,wBAAwB,GAAG;EACtCC,OAAO,EAAET,KAAK,CAAC,MAAM,CAAC;EACtBU,MAAM,EAAEV,KAAK,CAAC,MAAM,CAAC;EACrBW,aAAa,EAAEX,KAAK,CAAC,MAAM,CAAC;EAC5BY,QAAQ,EAAEZ,KAAK,CAAC,MAAM,CAAC;EACvBa,QAAQ,EAAEb,KAAK,CAAC,MAAM,CAAC;EACvBO,OAAO,EAAEP,KAAK,CAAC,MAAM;AACvB,CAAU;;AAEV;AACA,OAAO,MAAMc,MAAM,GAAG;EACpBC,QAAQ,EAAE,IAAI;EACdC,MAAM,EAAE,IAAI;EACZC,SAAS,EAAE,IAAI;EACfC,QAAQ,EAAE;AACZ,CAAU;;AAEV;AACA,MAAMC,YAAY,GAAGC,IAAI,CAACC,GAAG,CAAC,IAA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