@ovok/native 1.10.10 → 1.10.12
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 +20 -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-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-standard-variants.js +6 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-standard-variants.js.map +1 -1
- 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-a6-variants.js +107 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-transtek-a6-variants.js.map +1 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-variants.js +10 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-variants.js.map +1 -1
- 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 +5 -37
- package/lib/commonjs/modules/bt-device/constants/supported-devices.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/built-in-measurement-types.js +86 -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 +6 -1
- package/lib/commonjs/modules/bt-management/constants/device-variants.js.map +1 -1
- package/lib/commonjs/modules/bt-management/constants/integrated-devices-map.js +1 -1
- package/lib/commonjs/modules/bt-management/constants/integrated-devices-map.js.map +1 -1
- package/lib/commonjs/modules/bt-management/constants/standard-device-variants.js +5 -0
- package/lib/commonjs/modules/bt-management/constants/standard-device-variants.js.map +1 -1
- 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-a6-device-variants.js +89 -0
- package/lib/commonjs/modules/bt-management/constants/transtek-a6-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/core/resolve-device-key.js +6 -0
- package/lib/commonjs/modules/bt-management/core/resolve-device-key.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/background-sync/background-service-uuids.js +18 -0
- package/lib/commonjs/modules/bt-management/services/background-sync/background-service-uuids.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/device-classes.js +27 -1
- package/lib/commonjs/modules/bt-management/services/device-classes.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/device-creator.js +5 -3
- package/lib/commonjs/modules/bt-management/services/device-creator.js.map +1 -1
- 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 +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj-70b.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js +7 -25
- 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-data-processor.js +3 -2
- 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 +7 -2
- 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/jumper/jumper.device.js +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/jumper/jumper.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/live-oximeter.sequencer.js +10 -6
- package/lib/commonjs/modules/bt-management/services/devices/live-oximeter.sequencer.js.map +1 -1
- 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/a6-scale.device.js +50 -0
- package/lib/commonjs/modules/bt-management/services/devices/transtek/a6-scale.device.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/transtek/a6-scale.measurements.js +78 -0
- package/lib/commonjs/modules/bt-management/services/devices/transtek/a6-scale.measurements.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/transtek/a6-scale.protocol.js +134 -0
- package/lib/commonjs/modules/bt-management/services/devices/transtek/a6-scale.protocol.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/transtek/a6-scale.sequencer.js +102 -0
- package/lib/commonjs/modules/bt-management/services/devices/transtek/a6-scale.sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/transtek/mambo-a5.device.js +51 -0
- package/lib/commonjs/modules/bt-management/services/devices/transtek/mambo-a5.device.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/transtek/mambo-a5.measurements.js +48 -0
- package/lib/commonjs/modules/bt-management/services/devices/transtek/mambo-a5.measurements.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/transtek/mambo-a5.protocol.js +181 -0
- package/lib/commonjs/modules/bt-management/services/devices/transtek/mambo-a5.protocol.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/transtek/mambo-a5.sequencer.js +73 -0
- package/lib/commonjs/modules/bt-management/services/devices/transtek/mambo-a5.sequencer.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/clock-sync.js +2 -0
- package/lib/commonjs/modules/bt-management/types/clock-sync.js.map +1 -1
- package/lib/commonjs/modules/bt-management/types/integrated-devices.js +19 -0
- package/lib/commonjs/modules/bt-management/types/integrated-devices.js.map +1 -1
- package/lib/module/modules/bt-device/constants/device-instruction-pdfs.js +20 -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-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-standard-variants.js +6 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-standard-variants.js.map +1 -1
- 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-a6-variants.js +105 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-transtek-a6-variants.js.map +1 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-variants.js +10 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-variants.js.map +1 -1
- 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 +5 -37
- package/lib/module/modules/bt-device/constants/supported-devices.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/built-in-measurement-types.js +84 -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 +6 -1
- package/lib/module/modules/bt-management/constants/device-variants.js.map +1 -1
- package/lib/module/modules/bt-management/constants/integrated-devices-map.js +1 -1
- package/lib/module/modules/bt-management/constants/integrated-devices-map.js.map +1 -1
- package/lib/module/modules/bt-management/constants/standard-device-variants.js +5 -0
- package/lib/module/modules/bt-management/constants/standard-device-variants.js.map +1 -1
- 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-a6-device-variants.js +87 -0
- package/lib/module/modules/bt-management/constants/transtek-a6-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/core/resolve-device-key.js +6 -0
- package/lib/module/modules/bt-management/core/resolve-device-key.js.map +1 -1
- package/lib/module/modules/bt-management/services/background-sync/background-service-uuids.js +18 -0
- package/lib/module/modules/bt-management/services/background-sync/background-service-uuids.js.map +1 -1
- package/lib/module/modules/bt-management/services/device-classes.js +27 -1
- package/lib/module/modules/bt-management/services/device-classes.js.map +1 -1
- package/lib/module/modules/bt-management/services/device-creator.js +5 -3
- package/lib/module/modules/bt-management/services/device-creator.js.map +1 -1
- 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 +2 -2
- package/lib/module/modules/bt-management/services/devices/aoj/aoj-70b.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js +6 -24
- 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-data-processor.js +3 -2
- 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 +7 -2
- 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/jumper/jumper.device.js +2 -2
- package/lib/module/modules/bt-management/services/devices/jumper/jumper.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/live-oximeter.sequencer.js +10 -6
- package/lib/module/modules/bt-management/services/devices/live-oximeter.sequencer.js.map +1 -1
- 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/a6-scale.device.js +45 -0
- package/lib/module/modules/bt-management/services/devices/transtek/a6-scale.device.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/transtek/a6-scale.measurements.js +73 -0
- package/lib/module/modules/bt-management/services/devices/transtek/a6-scale.measurements.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/transtek/a6-scale.protocol.js +121 -0
- package/lib/module/modules/bt-management/services/devices/transtek/a6-scale.protocol.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/transtek/a6-scale.sequencer.js +97 -0
- package/lib/module/modules/bt-management/services/devices/transtek/a6-scale.sequencer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/transtek/mambo-a5.device.js +46 -0
- package/lib/module/modules/bt-management/services/devices/transtek/mambo-a5.device.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/transtek/mambo-a5.measurements.js +43 -0
- package/lib/module/modules/bt-management/services/devices/transtek/mambo-a5.measurements.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/transtek/mambo-a5.protocol.js +174 -0
- package/lib/module/modules/bt-management/services/devices/transtek/mambo-a5.protocol.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/transtek/mambo-a5.sequencer.js +68 -0
- package/lib/module/modules/bt-management/services/devices/transtek/mambo-a5.sequencer.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/clock-sync.js +2 -0
- package/lib/module/modules/bt-management/types/clock-sync.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 +19 -0
- package/lib/module/modules/bt-management/types/integrated-devices.js.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/hooks/use-sign-in.d.ts +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-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-standard-variants.d.ts.map +1 -1
- 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-a6-variants.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-transtek-a6-variants.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-variants.d.ts.map +1 -1
- 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.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/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.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/constants/integrated-devices-map.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/constants/standard-device-variants.d.ts.map +1 -1
- 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-a6-device-variants.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/bt-management/constants/transtek-a6-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/core/resolve-device-key.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/device-classes.d.ts +26 -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-creator.d.ts.map +1 -1
- 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/blood-glucose/blood-glucose.device.d.ts.map +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/jumper/jumper.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/live-oximeter.sequencer.d.ts +6 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/live-oximeter.sequencer.d.ts.map +1 -1
- 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/a6-scale.device.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/a6-scale.device.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/a6-scale.measurements.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/a6-scale.measurements.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/a6-scale.protocol.d.ts +22 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/a6-scale.protocol.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/a6-scale.sequencer.d.ts +28 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/a6-scale.sequencer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/mambo-a5.device.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/mambo-a5.device.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/mambo-a5.measurements.d.ts +6 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/mambo-a5.measurements.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/mambo-a5.protocol.d.ts +18 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/mambo-a5.protocol.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/mambo-a5.sequencer.d.ts +21 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/mambo-a5.sequencer.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/clock-sync.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-data.d.ts +1 -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 +20 -1
- 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/frame-reader.d.ts +2 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/frame-reader.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/integrated-devices.d.ts +20 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/integrated-devices.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/auth/hooks/use-sign-in.d.ts +1 -1
- package/lib/typescript/module/src/modules/bt-device/constants/device-instruction-pdfs.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-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-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-standard-variants.d.ts.map +1 -1
- 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-a6-variants.d.ts +5 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-transtek-a6-variants.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-variants.d.ts.map +1 -1
- 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.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/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.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/constants/integrated-devices-map.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/constants/standard-device-variants.d.ts.map +1 -1
- 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-a6-device-variants.d.ts +5 -0
- package/lib/typescript/module/src/modules/bt-management/constants/transtek-a6-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/core/resolve-device-key.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/device-classes.d.ts +26 -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-creator.d.ts.map +1 -1
- 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/blood-glucose/blood-glucose.device.d.ts.map +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/jumper/jumper.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/live-oximeter.sequencer.d.ts +6 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/live-oximeter.sequencer.d.ts.map +1 -1
- 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/a6-scale.device.d.ts +16 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/a6-scale.device.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/a6-scale.measurements.d.ts +5 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/a6-scale.measurements.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/a6-scale.protocol.d.ts +22 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/a6-scale.protocol.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/a6-scale.sequencer.d.ts +28 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/a6-scale.sequencer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/mambo-a5.device.d.ts +16 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/mambo-a5.device.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/mambo-a5.measurements.d.ts +6 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/mambo-a5.measurements.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/mambo-a5.protocol.d.ts +18 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/mambo-a5.protocol.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/mambo-a5.sequencer.d.ts +21 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/mambo-a5.sequencer.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/clock-sync.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/device-data.d.ts +1 -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 +20 -1
- 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/frame-reader.d.ts +2 -1
- package/lib/typescript/module/src/modules/bt-management/types/frame-reader.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/integrated-devices.d.ts +20 -1
- package/lib/typescript/module/src/modules/bt-management/types/integrated-devices.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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MeasurementTypeKey","CaseType","hexToByte","SETTLE_MS","AOJ_VALUES","header","length","JUMPER_VALUES","readOximeterData","frame","isValuesFrame","undefined","pulseRate","bloodOxygen","perfusionIndex","LiveOximeterSequencer","constructor","params","initialCommands","isNormalDisconnect","commandTimeoutMs","latest","onCommandTimeout","onResult","caseType","RESULT","measurementTypeKey","bloodOxygenPulseRate","commandProgress","values","recordedAt","Date","nextCommand"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/live-oximeter.sequencer.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,YAAY;AAE/C,SAASC,QAAQ,QAAQ,0BAAuB;AAGhD,SAASC,SAAS,QAAQ,4BAAyB;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,SAAS,GAAG,KAAK;;
|
|
1
|
+
{"version":3,"names":["MeasurementTypeKey","CaseType","hexToByte","SETTLE_MS","AOJ_VALUES","header","length","JUMPER_VALUES","readOximeterData","frame","isValuesFrame","fieldOrder","undefined","first","second","pulseRate","bloodOxygen","perfusionIndex","LiveOximeterSequencer","constructor","params","initialCommands","isNormalDisconnect","commandTimeoutMs","latest","onCommandTimeout","onResult","caseType","RESULT","measurementTypeKey","bloodOxygenPulseRate","commandProgress","values","readValues","recordedAt","Date","nextCommand"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/live-oximeter.sequencer.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,YAAY;AAE/C,SAASC,QAAQ,QAAQ,0BAAuB;AAGhD,SAASC,SAAS,QAAQ,4BAAyB;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,SAAS,GAAG,KAAK;;AAWvB;;AAGA;;AAGA;AACA,MAAMC,UAAyB,GAAGA,CAACC,MAAM,EAAEC,MAAM,KAAKD,MAAM,KAAK,IAAI,IAAIC,MAAM,IAAI,CAAC;;AAEpF;AACA,MAAMC,aAA4B,GAAGA,CAACF,MAAM,EAAEC,MAAM,KAAK,CAACD,MAAM,GAAG,IAAI,MAAM,CAAC,IAAIC,MAAM,KAAK,CAAC;;AAE9F;AACA,MAAME,gBAAgB,GAAGA,CACvBC,KAAwB,EACxBC,a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E1B,IAAI,CAACA,MAAM,GAAGZ,SAAS;IAEvB,IAAIY,MAAM,EAAE;MACV,IAAI,CAACJ,MAAM,CAACM,QAAQ,CAAC;QACnBC,QAAQ,EAAE1B,QAAQ,CAAC2B,MAAM;QACzBC,kBAAkB,EAAE7B,kBAAkB,CAAC8B,oBAAoB;QAC3D,GAAGN;MACL,CAAC,CAAC;IACJ;IAEA,OAAO,CAAC,CAAC;EACX,CAAC;;EAED;EACOO,eAAe,GAAItB,KAAwB,IAAyC;IACzF,MAAMuB,MAAM,GAAG,IAAI,CAACZ,MAAM,CAACa,UAAU,CAACxB,KAAK,CAAC;IAE5C,IAAI,CAACuB,MAAM,EAAE;MACX,OAAO,SAAS;IAClB;IAEA,IAAI,CAACR,MAAM,GAAG;MAAE,GAAGQ,MAAM;MAAEE,UAAU,EAAE,IAAIC,IAAI,CAAC;IAAE,CAAC;IAEnD,OAAO,SAAS;EAClB,CAAC;EAEMC,WAAW,GAAGA,CAAA,KAAiBxB,SAAS;AACjD;AAGA,SAASR,UAAU,EAAEG,aAAa,EAAEW,qBAAqB,EAAEV,gBAAgB","ignoreList":[]}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { IntegratedDevices } from "../../../types/integrated-devices.js";
|
|
4
|
+
import { BTManagedDevice } from "../bt-managed-device.js";
|
|
5
|
+
import { TAIDOC_CHARACTERISTIC, TAIDOC_SERVICE, TaidocFrameReader } from "./taidoc.protocol.js";
|
|
6
|
+
import { TaidocSequencer } from "./taidoc.sequencer.js";
|
|
7
|
+
const KIND = {
|
|
8
|
+
[IntegratedDevices.TAIDOC_MULTI]: "multi",
|
|
9
|
+
[IntegratedDevices.TAIDOC_BPM]: "bpm",
|
|
10
|
+
[IntegratedDevices.TAIDOC_THERMOMETER]: "thermometer",
|
|
11
|
+
[IntegratedDevices.TAIDOC_OXIMETER]: "oximeter",
|
|
12
|
+
[IntegratedDevices.TAIDOC_SCALE]: "scale"
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/** The sequencer decodes records itself; the declarative parser only passes frames on. */
|
|
16
|
+
const passThrough = {
|
|
17
|
+
caseValuePosition: [],
|
|
18
|
+
cases: []
|
|
19
|
+
};
|
|
20
|
+
const taidocMainServices = [{
|
|
21
|
+
uuid: TAIDOC_SERVICE,
|
|
22
|
+
monitorUuids: [{
|
|
23
|
+
uuid: TAIDOC_CHARACTERISTIC,
|
|
24
|
+
parsingModel: passThrough
|
|
25
|
+
}]
|
|
26
|
+
}];
|
|
27
|
+
|
|
28
|
+
/** TaiDoc and FORA meters on the 0x51 command protocol: history download of every device user. */
|
|
29
|
+
class TaidocDeviceClass extends BTManagedDevice {
|
|
30
|
+
mainServices = taidocMainServices;
|
|
31
|
+
stuckDataTimeout = 90_000;
|
|
32
|
+
onStreamStart = undefined;
|
|
33
|
+
constructor(device, params) {
|
|
34
|
+
super(device, params);
|
|
35
|
+
this.frameReader = new TaidocFrameReader();
|
|
36
|
+
this.createCommandSequencer = () => new TaidocSequencer({
|
|
37
|
+
kind: KIND[params.deviceName],
|
|
38
|
+
onResult: result => this.onResult?.(result)
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
handleSuccessResult() {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
export { TaidocDeviceClass as TaidocDevice };
|
|
46
|
+
//# sourceMappingURL=taidoc.device.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["IntegratedDevices","BTManagedDevice","TAIDOC_CHARACTERISTIC","TAIDOC_SERVICE","TaidocFrameReader","TaidocSequencer","KIND","TAIDOC_MULTI","TAIDOC_BPM","TAIDOC_THERMOMETER","TAIDOC_OXIMETER","TAIDOC_SCALE","passThrough","caseValuePosition","cases","taidocMainServices","uuid","monitorUuids","parsingModel","TaidocDeviceClass","mainServices","stuckDataTimeout","onStreamStart","undefined","constructor","device","params","frameReader","createCommandSequencer","kind","deviceName","onResult","result","handleSuccessResult","TaidocDevice"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/taidoc/taidoc.device.ts"],"mappings":";;AAIA,SAASA,iBAAiB,QAAQ,sCAAmC;AAGrE,SAASC,eAAe,QAAQ,yBAAsB;AAEtD,SAASC,qBAAqB,EAAEC,cAAc,EAAEC,iBAAiB,QAAQ,sBAAmB;AAE5F,SAASC,eAAe,QAAQ,uBAAoB;AASpD,MAAMC,IAAsC,GAAG;EAC7C,CAACN,iBAAiB,CAACO,YAAY,GAAG,OAAO;EACzC,CAACP,iBAAiB,CAACQ,UAAU,GAAG,KAAK;EACrC,CAACR,iBAAiB,CAACS,kBAAkB,GAAG,aAAa;EACrD,CAACT,iBAAiB,CAACU,eAAe,GAAG,UAAU;EAC/C,CAACV,iBAAiB,CAACW,YAAY,GAAG;AACpC,CAAC;;AAED;AACA,MAAMC,WAAW,GAAG;EAAEC,iBAAiB,EAAE,EAAE;EAAEC,KAAK,EAAE;AAAG,CAAC;AAExD,MAAMC,kBAA8B,GAAG,CACrC;EACEC,IAAI,EAAEb,cAAc;EACpBc,YAAY,EAAE,CAAC;IAAED,IAAI,EAAEd,qBAAqB;IAAEgB,YAAY,EAAEN;EAAY,CAAC;AAC3E,CAAC,CACF;;AAED;AACA,MAAMO,iBAAiB,SAASlB,eAAe,CAAe;EAClDmB,YAAY,GAAGL,kBAAkB;EACjCM,gBAAgB,GAAG,MAAM;EACzBC,aAAa,GAAGC,SAAS;EAE5BC,WAAWA,CAACC,MAAc,EAAEC,MAAwC,EAAE;IAC3E,KAAK,CAACD,MAAM,EAAEC,MAAM,CAAC;IACrB,IAAI,CAACC,WAAW,GAAG,IAAIvB,iBAAiB,CAAC,CAAC;IAC1C,IAAI,CAACwB,sBAAsB,GAAG,MAC5B,IAAIvB,eAAe,CAAC;MAClBwB,IAAI,EAAEvB,IAAI,CAACoB,MAAM,CAACI,UAAU,CAAC;MAC7BC,QAAQ,EAAGC,MAAM,IACf,IAAI,CAACD,QAAQ,GACXC,MAGF;IACJ,CAAC,CAAC;EACN;EAEUC,mBAAmBA,CAAA,EAAS;IACpC;EACF;AACF;AAEA,SAASd,iBAAiB,IAAIe,YAAY","ignoreList":[]}
|
|
@@ -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.protocol.ts"],"mappings":";;AAAA;;AAGA,SAASA,eAAe,QAAQ,qCAAkC;AAElE,SAASC,SAAS,QAAQ,+BAA4B;;AAEtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,cAAc,GAAG,sCAAsC;AACpE,OAAO,MAAMC,qBAAqB,GAAG,sCAAsC;AAE3E,OAAO,MAAMC,MAAM,GAAG;EACpBC,MAAM,EAAE,IAAI;EACZC,UAAU,EAAE,IAAI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AAQ,IAAIkD,GAAG,KAAKjD,UAAU,IAAKY,GAAG,CAACR,KAAK,CAAC4C,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK5C,KAAK,CAACgC,MAAM,GAAG,CAAC,CAAC,EAAE;MAC7F,OAAO;QAAEO,MAAM,EAAEjE,eAAe,CAACwE,OAAO;QAAEL,aAAa,EAAEL,KAAK,GAAG;MAAE,CAAC;IACtE;IAEA,OAAO;MAAEG,MAAM,EAAEjE,eAAe,CAACyE,QAAQ;MAAEN,aAAa,EAAEL,KAAK,GAAGJ,MAAM;MAAE1B,KAAK,EAAEqC;IAAS,CAAC;EAC7F;AACF;;AAEA;AACA;AACA;AACA;AACA,MAAMK,gBAAqC,GAAG,IAAIC,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAEvF,OAAO,MAAMC,QAAQ,GAAIrE,KAAwB,IAC/CmE,gBAAgB,CAACG,GAAG,CAAC9C,MAAM,CAACxB,KAAK,EAAE,CAAC,CAAC,GAAIwB,MAAM,CAACxB,KAAK,EAAE,CAAC,CAAC,IAAI,CAAE,CAAC,GAAG,CAAC,GAAG,CAAC;;AAE1E;AACA,OAAO,MAAMuE,SAAS,GAAI9C,KAAwB,IAChDD,MAAM,CAACC,KAAK,EAAE,CAAC,CAAC,GAAID,MAAM,CAACC,KAAK,EAAE,CAAC,CAAC,IAAI,CAAE","ignoreList":[]}
|
|
@@ -0,0 +1,168 @@
|
|
|
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,CAACK,IAAI,EAAEF,UAAU,CAAC,GAAG,IAAI,MAAM,CAAC;;AAEzC;AACA;AACA;AACA;AACA,OAAO,MAAMG,cAAc,GAAID,IAAuB,IAAuB;EAC3E,MAAME,IAAI,GAAGP,MAAM,CAACK,IAAI,EAAE,CAAC,CAAC,GAAIL,MAAM,CAACK,IAAI,EAAE,CAAC,CAAC,IAAI,CAAE;EACrD,MAAMG,IAAI,GAAGD,IAAI,IAAI,CAAC;EACtB,MAAME,KAAK,GAAI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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,M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AAI,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,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { MeasurementTypeKey } from "@ovok/core";
|
|
4
|
+
import { BTManagedDevice } from "../bt-managed-device.js";
|
|
5
|
+
import { A6_SCALE_NOTIFY, A6_SCALE_SERVICE, A6_SCALE_WRITE, A6ScaleFrameReader } from "./a6-scale.protocol.js";
|
|
6
|
+
import { A6ScaleSequencer } from "./a6-scale.sequencer.js";
|
|
7
|
+
const acceptNothing = {
|
|
8
|
+
caseValuePosition: [],
|
|
9
|
+
cases: []
|
|
10
|
+
};
|
|
11
|
+
const mainServices = [{
|
|
12
|
+
uuid: A6_SCALE_SERVICE,
|
|
13
|
+
monitorUuids: [{
|
|
14
|
+
uuid: A6_SCALE_NOTIFY,
|
|
15
|
+
parsingModel: acceptNothing
|
|
16
|
+
}],
|
|
17
|
+
writeUuid: {
|
|
18
|
+
uuid: A6_SCALE_WRITE,
|
|
19
|
+
mainCommandUuid: "0007"
|
|
20
|
+
}
|
|
21
|
+
}];
|
|
22
|
+
|
|
23
|
+
/** Transtek GBS-2012-B body scale using the A6 command protocol. */
|
|
24
|
+
export class TranstekA6ScaleDevice extends BTManagedDevice {
|
|
25
|
+
mainServices = mainServices;
|
|
26
|
+
stuckDataTimeout = 60_000;
|
|
27
|
+
onStreamStart = undefined;
|
|
28
|
+
getSupportedMeasurementTypeKeys() {
|
|
29
|
+
return [MeasurementTypeKey.bodyWeight];
|
|
30
|
+
}
|
|
31
|
+
constructor(device, params) {
|
|
32
|
+
super(device, params);
|
|
33
|
+
this.frameReader = new A6ScaleFrameReader();
|
|
34
|
+
this.createCommandSequencer = () => new A6ScaleSequencer({
|
|
35
|
+
deviceId: device.id,
|
|
36
|
+
manufacturerData: device.manufacturerData,
|
|
37
|
+
clockSync: params.clockSync,
|
|
38
|
+
onResult: result => this.onResult?.(result)
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
handleSuccessResult() {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=a6-scale.device.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["MeasurementTypeKey","BTManagedDevice","A6_SCALE_NOTIFY","A6_SCALE_SERVICE","A6_SCALE_WRITE","A6ScaleFrameReader","A6ScaleSequencer","acceptNothing","caseValuePosition","cases","mainServices","uuid","monitorUuids","parsingModel","writeUuid","mainCommandUuid","TranstekA6ScaleDevice","stuckDataTimeout","onStreamStart","undefined","getSupportedMeasurementTypeKeys","bodyWeight","constructor","device","params","frameReader","createCommandSequencer","deviceId","id","manufacturerData","clockSync","onResult","result","handleSuccessResult"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/transtek/a6-scale.device.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,YAAY;AAQ/C,SAASC,eAAe,QAAQ,yBAAsB;AAEtD,SACEC,eAAe,EACfC,gBAAgB,EAChBC,cAAc,EACdC,kBAAkB,QACb,wBAAqB;AAC5B,SAASC,gBAAgB,QAAQ,yBAAsB;AAEvD,MAAMC,aAAa,GAAG;EAAEC,iBAAiB,EAAE,EAAE;EAAEC,KAAK,EAAE;AAAG,CAAC;AAE1D,MAAMC,YAAwB,GAAG,CAC/B;EACEC,IAAI,EAAER,gBAAgB;EACtBS,YAAY,EAAE,CAAC;IAAED,IAAI,EAAET,eAAe;IAAEW,YAAY,EAAEN;EAAc,CAAC,CAAC;EACtEO,SAAS,EAAE;IAAEH,IAAI,EAAEP,cAAc;IAAEW,eAAe,EAAE;EAAO;AAC7D,CAAC,CACF;;AAED;AACA,OAAO,MAAMC,qBAAqB,SAASf,eAAe,CAA8B;EAC5ES,YAAY,GAAGA,YAAY;EAC3BO,gBAAgB,GAAG,MAAM;EACzBC,aAAa,GAAGC,SAAS;EAEhBC,+BAA+BA,CAAA,EAAyB;IACzE,OAAO,CAACpB,kBAAkB,CAACqB,UAAU,CAAC;EACxC;EAEOC,WAAWA,CAChBC,MAAc,EACdC,MAAuD,EACvD;IACA,KAAK,CAACD,MAAM,EAAEC,MAAM,CAAC;IACrB,IAAI,CAACC,WAAW,GAAG,IAAIpB,kBAAkB,CAAC,CAAC;IAC3C,IAAI,CAACqB,sBAAsB,GAAG,MAC5B,IAAIpB,gBAAgB,CAAC;MACnBqB,QAAQ,EAAEJ,MAAM,CAACK,EAAE;MACnBC,gBAAgB,EAAEN,MAAM,CAACM,gBAAgB;MACzCC,SAAS,EAAEN,MAAM,CAACM,SAAS;MAC3BC,QAAQ,EAAGC,MAAM,IACf,IAAI,CAACD,QAAQ,GACXC,MAGF;IACJ,CAAC,CAAC;EACN;EAEUC,mBAAmBA,CAAA,EAAS;IACpC;EACF;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { readA6Uint } from "./a6-scale.protocol.js";
|
|
4
|
+
const hexBytes = bytes => bytes.map(value => (value & 0xff).toString(16).padStart(2, "0"));
|
|
5
|
+
export const parseA6Weight = body => {
|
|
6
|
+
if (body.length < 8) {
|
|
7
|
+
return undefined;
|
|
8
|
+
}
|
|
9
|
+
const encoded = hexBytes(body);
|
|
10
|
+
const flags = readA6Uint(encoded, 2, 4);
|
|
11
|
+
const unit = flags & 0x03;
|
|
12
|
+
const bodyWeight = readA6Uint(encoded, 6, 2) / 100;
|
|
13
|
+
let offset = 8;
|
|
14
|
+
let utcSeconds;
|
|
15
|
+
let recordedAt;
|
|
16
|
+
if ((flags & 0x04) !== 0) {
|
|
17
|
+
offset += 1;
|
|
18
|
+
}
|
|
19
|
+
if ((flags & 0x08) !== 0) {
|
|
20
|
+
if (body.length < offset + 4) {
|
|
21
|
+
return undefined;
|
|
22
|
+
}
|
|
23
|
+
utcSeconds = readA6Uint(encoded, offset, 4);
|
|
24
|
+
offset += 4;
|
|
25
|
+
}
|
|
26
|
+
if ((flags & 0x10) !== 0) {
|
|
27
|
+
offset += 1;
|
|
28
|
+
}
|
|
29
|
+
if ((flags & 0x20) !== 0) {
|
|
30
|
+
if (body.length < offset + 7) {
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
33
|
+
const year = 2000 + readA6Uint(encoded, offset, 2);
|
|
34
|
+
const month = body[offset + 2] ?? 0;
|
|
35
|
+
const day = body[offset + 3] ?? 0;
|
|
36
|
+
const hour = body[offset + 4] ?? 0;
|
|
37
|
+
const minute = body[offset + 5] ?? 0;
|
|
38
|
+
const second = body[offset + 6] ?? 0;
|
|
39
|
+
const date = new Date(0);
|
|
40
|
+
date.setFullYear(year, month - 1, day);
|
|
41
|
+
date.setHours(hour, minute, second, 0);
|
|
42
|
+
offset += 7;
|
|
43
|
+
if (date.getFullYear() === year && date.getMonth() === month - 1 && date.getDate() === day && date.getHours() === hour && date.getMinutes() === minute && date.getSeconds() === second) {
|
|
44
|
+
recordedAt = date;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
if ((flags & 0x4000) !== 0) {
|
|
48
|
+
offset += 2;
|
|
49
|
+
}
|
|
50
|
+
if ((flags & 0x10000) !== 0) {
|
|
51
|
+
offset += 1;
|
|
52
|
+
}
|
|
53
|
+
if ((flags & 0x20000) !== 0) {
|
|
54
|
+
offset += 2;
|
|
55
|
+
}
|
|
56
|
+
const knownFlags = 0x3c03f;
|
|
57
|
+
if (body.length < offset || (flags & ~knownFlags) !== 0 || unit !== 0 || bodyWeight <= 0 || bodyWeight > 500) {
|
|
58
|
+
return undefined;
|
|
59
|
+
}
|
|
60
|
+
if (!recordedAt && utcSeconds !== undefined && utcSeconds > 0) {
|
|
61
|
+
const date = new Date(utcSeconds * 1000);
|
|
62
|
+
if (!Number.isNaN(date.getTime())) {
|
|
63
|
+
recordedAt = date;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
bodyWeight,
|
|
68
|
+
...(recordedAt ? {
|
|
69
|
+
recordedAt
|
|
70
|
+
} : {})
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
//# sourceMappingURL=a6-scale.measurements.js.map
|