@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
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { IntegratedDevices } from "../../../types/integrated-devices.js";
|
|
4
|
+
import { BTManagedDevice } from "../bt-managed-device.js";
|
|
5
|
+
import { AND_MEDICAL } from "./and-medical.protocol.js";
|
|
6
|
+
import { AndMedicalSequencer } from "./and-medical.sequencer.js";
|
|
7
|
+
const noCases = {
|
|
8
|
+
caseValuePosition: [],
|
|
9
|
+
cases: []
|
|
10
|
+
};
|
|
11
|
+
const monitorServices = [{
|
|
12
|
+
uuid: AND_MEDICAL.bloodPressureService,
|
|
13
|
+
monitorUuids: [{
|
|
14
|
+
uuid: AND_MEDICAL.bloodPressureMeasurement,
|
|
15
|
+
parsingModel: noCases
|
|
16
|
+
}]
|
|
17
|
+
}];
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* MedM enables the record indication just after the clock write; the SDK subscribes every
|
|
21
|
+
* declared characteristic at discovery, so here it is enabled just before it.
|
|
22
|
+
*/
|
|
23
|
+
const scaleServices = [{
|
|
24
|
+
uuid: AND_MEDICAL.scaleService,
|
|
25
|
+
monitorUuids: [{
|
|
26
|
+
uuid: AND_MEDICAL.scaleRecord,
|
|
27
|
+
parsingModel: noCases
|
|
28
|
+
}]
|
|
29
|
+
}];
|
|
30
|
+
const KIND = {
|
|
31
|
+
[IntegratedDevices.AND_BPM]: "bpm",
|
|
32
|
+
[IntegratedDevices.AND_BPM_CTS]: "bpmCts",
|
|
33
|
+
[IntegratedDevices.AND_SCALE]: "scale"
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/** A&D Medical blood-pressure monitors and the UC-352BLE scale. */
|
|
37
|
+
class AndMedicalDeviceClass extends BTManagedDevice {
|
|
38
|
+
stuckDataTimeout = 90_000;
|
|
39
|
+
onStreamStart = undefined;
|
|
40
|
+
constructor(device, params) {
|
|
41
|
+
super(device, params);
|
|
42
|
+
const kind = KIND[params.deviceName];
|
|
43
|
+
this.mainServices = kind === "scale" ? scaleServices : monitorServices;
|
|
44
|
+
this.createCommandSequencer = () => new AndMedicalSequencer({
|
|
45
|
+
kind,
|
|
46
|
+
onResult: result => this.onResult?.(result)
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** One indication is one record. */
|
|
51
|
+
validatePackage = () => true;
|
|
52
|
+
handleSuccessResult() {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
export { AndMedicalDeviceClass as AndMedicalDevice };
|
|
57
|
+
//# sourceMappingURL=and-medical.device.js.map
|
package/lib/module/modules/bt-management/services/devices/and-medical/and-medical.device.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["IntegratedDevices","BTManagedDevice","AND_MEDICAL","AndMedicalSequencer","noCases","caseValuePosition","cases","monitorServices","uuid","bloodPressureService","monitorUuids","bloodPressureMeasurement","parsingModel","scaleServices","scaleService","scaleRecord","KIND","AND_BPM","AND_BPM_CTS","AND_SCALE","AndMedicalDeviceClass","stuckDataTimeout","onStreamStart","undefined","constructor","device","params","kind","deviceName","mainServices","createCommandSequencer","onResult","result","validatePackage","handleSuccessResult","AndMedicalDevice"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/and-medical/and-medical.device.ts"],"mappings":";;AAIA,SAASA,iBAAiB,QAAQ,sCAAmC;AAGrE,SAASC,eAAe,QAAQ,yBAAsB;AAEtD,SAASC,WAAW,QAAQ,2BAAwB;AACpD,SAAyBC,mBAAmB,QAAQ,4BAAyB;AAO7E,MAAMC,OAAO,GAAG;EAAEC,iBAAiB,EAAE,EAAE;EAAEC,KAAK,EAAE;AAAG,CAAC;AAEpD,MAAMC,eAA2B,GAAG,CAClC;EACEC,IAAI,EAAEN,WAAW,CAACO,oBAAoB;EACtCC,YAAY,EAAE,CAAC;IAAEF,IAAI,EAAEN,WAAW,CAACS,wBAAwB;IAAEC,YAAY,EAAER;EAAQ,CAAC;AACtF,CAAC,CACF;;AAED;AACA;AACA;AACA;AACA,MAAMS,aAAyB,GAAG,CAChC;EACEL,IAAI,EAAEN,WAAW,CAACY,YAAY;EAC9BJ,YAAY,EAAE,CAAC;IAAEF,IAAI,EAAEN,WAAW,CAACa,WAAW;IAAEH,YAAY,EAAER;EAAQ,CAAC;AACzE,CAAC,CACF;AAED,MAAMY,IAA8C,GAAG;EACrD,CAAChB,iBAAiB,CAACiB,OAAO,GAAG,KAAK;EAClC,CAACjB,iBAAiB,CAACkB,WAAW,GAAG,QAAQ;EACzC,CAAClB,iBAAiB,CAACmB,SAAS,GAAG;AACjC,CAAC;;AAED;AACA,MAAMC,qBAAqB,SAASnB,eAAe,CAAmB;EAE1DoB,gBAAgB,GAAG,MAAM;EACzBC,aAAa,GAAGC,SAAS;EAE5BC,WAAWA,CAACC,MAAc,EAAEC,MAA4C,EAAE;IAC/E,KAAK,CAACD,MAAM,EAAEC,MAAM,CAAC;IACrB,MAAMC,IAAI,GAAGX,IAAI,CAACU,MAAM,CAACE,UAAU,CAAC;IAEpC,IAAI,CAACC,YAAY,GAAGF,IAAI,KAAK,OAAO,GAAGd,aAAa,GAAGN,eAAe;IACtE,IAAI,CAACuB,sBAAsB,GAAG,MAC5B,IAAI3B,mBAAmB,CAAC;MACtBwB,IAAI;MACJI,QAAQ,EAAGC,MAAM,IACf,IAAI,CAACD,QAAQ,GACXC,MACF;IACJ,CAAC,CAAC;EACN;;EAEA;EACUC,eAAe,GAAGA,CAAA,KAAe,IAAI;EAErCC,mBAAmBA,CAAA,EAAS;IACpC;EACF;AACF;AAEA,SAASd,qBAAqB,IAAIe,gBAAgB","ignoreList":[]}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/* eslint-disable import/group-exports */
|
|
4
|
+
|
|
5
|
+
import { decodeMedicalFloat } from "../../../utils/decode-medical-float.js";
|
|
6
|
+
import { hexToByte } from "../../../utils/hex-to-byte.js";
|
|
7
|
+
import { bloodPressureStatusFromFrame, recordedAtFromBloodPressureFrame } from "../standard-gatt/standard-gatt.profile.js";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* A&D Medical (UA-651/656/1200BLE monitors, UC-352BLE scale), from MedM Health Diary 3.12.11's
|
|
11
|
+
* `CAND_*` classes.
|
|
12
|
+
*
|
|
13
|
+
* The monitors are the SIG Blood Pressure profile plus a clock write a second after connecting:
|
|
14
|
+
* a 7-byte SIG Date Time to 0x1810/0x2A08, or the same bytes to Current Time 0x1805/0x2A2B on
|
|
15
|
+
* the UA-1200BLE/UB-1100BLE. The scale takes A&D command frames (`length type command payload`,
|
|
16
|
+
* no checksum) on 233bf001 and indicates 10-byte weight records on 23434101.
|
|
17
|
+
*/
|
|
18
|
+
const sig16 = assigned => `0000${assigned}-0000-1000-8000-00805f9b34fb`;
|
|
19
|
+
export const AND_MEDICAL = {
|
|
20
|
+
bloodPressureService: sig16("1810"),
|
|
21
|
+
bloodPressureMeasurement: sig16("2a35"),
|
|
22
|
+
dateTime: sig16("2a08"),
|
|
23
|
+
currentTimeService: sig16("1805"),
|
|
24
|
+
currentTime: sig16("2a2b"),
|
|
25
|
+
commandService: "233bf000-5a34-1b6d-975c-000d5690abe4",
|
|
26
|
+
command: "233bf001-5a34-1b6d-975c-000d5690abe4",
|
|
27
|
+
scaleService: "23434100-1fe4-1eff-80cb-00ff78297d8b",
|
|
28
|
+
scaleRecord: "23434101-1fe4-1eff-80cb-00ff78297d8b"
|
|
29
|
+
};
|
|
30
|
+
const POUND_IN_KG = 0.45359237;
|
|
31
|
+
const KPA_IN_MMHG = 7.500617;
|
|
32
|
+
const toHex = bytes => bytes.map(value => (value & 0xff).toString(16).padStart(2, "0"));
|
|
33
|
+
|
|
34
|
+
/** SIG Date Time, phone-local: year (u16 LE), month, day, hour, minute, second. */
|
|
35
|
+
export const dateTimeCommand = now => toHex([now.getFullYear() & 0xff, now.getFullYear() >> 8, now.getMonth() + 1, now.getDate(), now.getHours(), now.getMinutes(), now.getSeconds()]);
|
|
36
|
+
|
|
37
|
+
/** A&D set-time frame for the scale: `08 01 01 YY MM DD hh mm ss`, binary, phone-local. */
|
|
38
|
+
export const scaleSetTimeCommand = now => toHex([0x08, 0x01, 0x01, now.getFullYear() % 100, now.getMonth() + 1, now.getDate(), now.getHours(), now.getMinutes(), now.getSeconds()]);
|
|
39
|
+
const sfloat = (bytes, at) => at + 1 < bytes.length ? decodeMedicalFloat((bytes[at] ?? 0) | (bytes[at + 1] ?? 0) << 8, 4, 12) : undefined;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* SIG Blood Pressure Measurement 0x2A35. kPa is converted to mmHg; the device timestamp is kept
|
|
43
|
+
* when the clock is valid; the user id (0-based, 0xFF unknown) becomes a 1-based memory slot;
|
|
44
|
+
* status bit 2 is the irregular pulse. A record without both pressures is dropped.
|
|
45
|
+
*/
|
|
46
|
+
export const readBloodPressure = frame => {
|
|
47
|
+
const bytes = frame.map(byte => hexToByte(byte));
|
|
48
|
+
const flags = bytes[0] ?? 0;
|
|
49
|
+
const unit = (flags & 0x01) !== 0 ? KPA_IN_MMHG : 1;
|
|
50
|
+
const systolic = sfloat(bytes, 1);
|
|
51
|
+
const diastolic = sfloat(bytes, 3);
|
|
52
|
+
if (systolic === undefined || diastolic === undefined) {
|
|
53
|
+
return undefined;
|
|
54
|
+
}
|
|
55
|
+
const recordedAt = recordedAtFromBloodPressureFrame(frame);
|
|
56
|
+
let cursor = 7 + ((flags & 0x02) !== 0 ? 7 : 0);
|
|
57
|
+
const heartRate = (flags & 0x04) !== 0 ? sfloat(bytes, cursor) : undefined;
|
|
58
|
+
cursor += (flags & 0x04) !== 0 ? 2 : 0;
|
|
59
|
+
const user = (flags & 0x08) !== 0 ? bytes[cursor] : undefined;
|
|
60
|
+
const status = bloodPressureStatusFromFrame(frame);
|
|
61
|
+
return {
|
|
62
|
+
systolic: Math.round(systolic * unit),
|
|
63
|
+
diastolic: Math.round(diastolic * unit),
|
|
64
|
+
...(heartRate === undefined ? {} : {
|
|
65
|
+
heartRate
|
|
66
|
+
}),
|
|
67
|
+
...(status === undefined ? {} : {
|
|
68
|
+
irregularHeartbeat: (status & 0x04) !== 0
|
|
69
|
+
}),
|
|
70
|
+
...(recordedAt ? {
|
|
71
|
+
recordedAt
|
|
72
|
+
} : {}),
|
|
73
|
+
...(user === undefined || user === 0xff ? {} : {
|
|
74
|
+
memorySlot: user + 1
|
|
75
|
+
})
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
/** `yearLE16 month day hour minute second` at `at`, local; undefined when the clock is unset. */
|
|
80
|
+
const readDateTime = (bytes, at) => {
|
|
81
|
+
const [low = 0, high = 0, month = 0, day = 0, hour = 0, minute = 0, second = 0] = bytes.slice(at, at + 7);
|
|
82
|
+
const year = low | high << 8;
|
|
83
|
+
const date = new Date(year, month - 1, day, hour, minute, second);
|
|
84
|
+
return year >= 2000 && date.getMonth() === month - 1 && date.getDate() === day ? date : undefined;
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* UC-352 record: flags (bit 0 = pounds), weight u16 LE in tenths, then the device time. Pounds
|
|
89
|
+
* are converted to kilograms. A record too short to carry a time uses the phone's, as MedM does.
|
|
90
|
+
*/
|
|
91
|
+
export const readWeight = (frame, now) => {
|
|
92
|
+
const bytes = frame.map(byte => hexToByte(byte));
|
|
93
|
+
const raw = (bytes[1] ?? 0) | (bytes[2] ?? 0) << 8;
|
|
94
|
+
if (bytes.length < 3 || raw === 0 || raw === 0xffff) {
|
|
95
|
+
return undefined;
|
|
96
|
+
}
|
|
97
|
+
const value = ((bytes[0] ?? 0) & 0x01) !== 0 ? raw / 10 * POUND_IN_KG : raw / 10;
|
|
98
|
+
const recordedAt = bytes.length >= 10 ? readDateTime(bytes, 3) : now;
|
|
99
|
+
return {
|
|
100
|
+
bodyWeight: Math.round(value * 100) / 100,
|
|
101
|
+
...(recordedAt ? {
|
|
102
|
+
recordedAt
|
|
103
|
+
} : {})
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
//# sourceMappingURL=and-medical.protocol.js.map
|
package/lib/module/modules/bt-management/services/devices/and-medical/and-medical.protocol.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["decodeMedicalFloat","hexToByte","bloodPressureStatusFromFrame","recordedAtFromBloodPressureFrame","sig16","assigned","AND_MEDICAL","bloodPressureService","bloodPressureMeasurement","dateTime","currentTimeService","currentTime","commandService","command","scaleService","scaleRecord","POUND_IN_KG","KPA_IN_MMHG","toHex","bytes","map","value","toString","padStart","dateTimeCommand","now","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","scaleSetTimeCommand","sfloat","at","length","undefined","readBloodPressure","frame","byte","flags","unit","systolic","diastolic","recordedAt","cursor","heartRate","user","status","Math","round","irregularHeartbeat","memorySlot","readDateTime","low","high","month","day","hour","minute","second","slice","year","date","Date","readWeight","raw","bodyWeight"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/and-medical/and-medical.protocol.ts"],"mappings":";;AAAA;;AAEA,SAASA,kBAAkB,QAAQ,wCAAqC;AACxE,SAASC,SAAS,QAAQ,+BAA4B;AACtD,SACEC,4BAA4B,EAC5BC,gCAAgC,QAC3B,2CAAwC;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,KAAK,GAAIC,QAAgB,IAC7B,OAAOA,QAAQ,8BAA8B;AAE/C,OAAO,MAAMC,WAAW,GAAG;EACzBC,oBAAoB,EAAEH,KAAK,CAAC,MAAM,CAAC;EACnCI,wBAAwB,EAAEJ,KAAK,CAAC,MAAM,CAAC;EACvCK,QAAQ,EAAEL,KAAK,CAAC,MAAM,CAAC;EACvBM,kBAAkB,EAAEN,KAAK,CAAC,MAAM,CAAC;EACjCO,WAAW,EAAEP,KAAK,CAAC,MAAM,CAAC;EAC1BQ,cAAc,EAAE,sCAAsC;EACtDC,OAAO,EAAE,sCAAsC;EAC/CC,YAAY,EAAE,sCAAsC;EACpDC,WAAW,EAAE;AACf,CAAU;AAEV,MAAMC,WAAW,GAAG,UAAU;AAC9B,MAAMC,WAAW,GAAG,QAAQ;AAE5B,MAAMC,KAAK,GAAIC,KAAwB,IACrCA,KAAK,CAACC,G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AKtC,SAAS,CAACsC,IAAI,CAAC,CAAC;EAClD,MAAM2B,GAAG,GAAG,CAAC/C,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,IAAK,CAACA,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAE;EAEpD,IAAIA,KAAK,CAACgB,MAAM,GAAG,CAAC,IAAI+B,GAAG,KAAK,CAAC,IAAIA,GAAG,KAAK,MAAM,EAAE;IACnD,OAAO9B,SAAS;EAClB;EAEA,MAAMf,KAAK,GAAG,CAAC,CAACF,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,IAAI,MAAM,CAAC,GAAI+C,GAAG,GAAG,EAAE,GAAIlD,WAAW,GAAGkD,GAAG,GAAG,EAAE;EAClF,MAAMtB,UAAU,GAAGzB,KAAK,CAACgB,MAAM,IAAI,EAAE,GAAGkB,YAAY,CAAClC,KAAK,EAAE,CAAC,CAAC,GAAGM,GAAG;EAEpE,OAAO;IACL0C,UAAU,EAAElB,IAAI,CAACC,KAAK,CAAC7B,KAAK,GAAG,GAAG,CAAC,GAAG,GAAG;IACzC,IAAIuB,UAAU,GAAG;MAAEA;IAAW,CAAC,GAAG,CAAC,CAAC;EACtC,CAAC;AACH,CAAC","ignoreList":[]}
|
package/lib/module/modules/bt-management/services/devices/and-medical/and-medical.sequencer.js
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { MeasurementTypeKey } from "@ovok/core";
|
|
4
|
+
import { CaseType } from "../../../types/case-type.js";
|
|
5
|
+
import { AND_MEDICAL, dateTimeCommand, readBloodPressure, readWeight, scaleSetTimeCommand } from "./and-medical.protocol.js";
|
|
6
|
+
|
|
7
|
+
/** `bpm`: time to 0x1810/0x2A08; `bpmCts`: to 0x1805/0x2A2B (UA-1200BLE/UB-1100BLE); `scale`: UC-352. */
|
|
8
|
+
|
|
9
|
+
/** MedM waits this long after connecting before a monitor's clock write. */
|
|
10
|
+
const MONITOR_TIME_DELAY_MS = 1_000;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Sets the clock, then reports whatever the device indicates. A monitor resends stored readings,
|
|
14
|
+
* so an exact repeat (same time and values) within one connection is reported once.
|
|
15
|
+
*/
|
|
16
|
+
class AndMedicalSequencer {
|
|
17
|
+
recorded = false;
|
|
18
|
+
seen = new Set();
|
|
19
|
+
constructor(params) {
|
|
20
|
+
this.params = params;
|
|
21
|
+
}
|
|
22
|
+
initialCommands = () => {
|
|
23
|
+
const now = this.now();
|
|
24
|
+
if (this.params.kind === "scale") {
|
|
25
|
+
return [{
|
|
26
|
+
serviceUuid: AND_MEDICAL.commandService,
|
|
27
|
+
characteristicUuid: AND_MEDICAL.command,
|
|
28
|
+
frame: scaleSetTimeCommand(now)
|
|
29
|
+
}];
|
|
30
|
+
}
|
|
31
|
+
const cts = this.params.kind === "bpmCts";
|
|
32
|
+
return [{
|
|
33
|
+
serviceUuid: cts ? AND_MEDICAL.currentTimeService : AND_MEDICAL.bloodPressureService,
|
|
34
|
+
characteristicUuid: cts ? AND_MEDICAL.currentTime : AND_MEDICAL.dateTime,
|
|
35
|
+
frame: dateTimeCommand(now),
|
|
36
|
+
delayBeforeWriteMs: MONITOR_TIME_DELAY_MS
|
|
37
|
+
}];
|
|
38
|
+
};
|
|
39
|
+
isNormalDisconnect = () => this.recorded;
|
|
40
|
+
nextCommand = frame => {
|
|
41
|
+
if (this.params.kind === "scale") {
|
|
42
|
+
const weight = readWeight(frame, this.now());
|
|
43
|
+
if (weight) {
|
|
44
|
+
this.report({
|
|
45
|
+
measurementTypeKey: MeasurementTypeKey.bodyWeight,
|
|
46
|
+
...weight
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
return undefined;
|
|
50
|
+
}
|
|
51
|
+
const reading = readBloodPressure(frame);
|
|
52
|
+
const key = reading?.recordedAt instanceof Date ? JSON.stringify(reading) : undefined;
|
|
53
|
+
if (reading && !(key && this.seen.has(key))) {
|
|
54
|
+
if (key) {
|
|
55
|
+
this.seen.add(key);
|
|
56
|
+
}
|
|
57
|
+
this.report({
|
|
58
|
+
measurementTypeKey: MeasurementTypeKey.bloodPressure,
|
|
59
|
+
...reading
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
return undefined;
|
|
63
|
+
};
|
|
64
|
+
report = reading => {
|
|
65
|
+
this.recorded = true;
|
|
66
|
+
this.params.onResult({
|
|
67
|
+
caseType: CaseType.RESULT,
|
|
68
|
+
...reading
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
now = () => this.params.now?.() ?? new Date();
|
|
72
|
+
}
|
|
73
|
+
export { AndMedicalSequencer };
|
|
74
|
+
//# sourceMappingURL=and-medical.sequencer.js.map
|
package/lib/module/modules/bt-management/services/devices/and-medical/and-medical.sequencer.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["MeasurementTypeKey","CaseType","AND_MEDICAL","dateTimeCommand","readBloodPressure","readWeight","scaleSetTimeCommand","MONITOR_TIME_DELAY_MS","AndMedicalSequencer","recorded","seen","Set","constructor","params","initialCommands","now","kind","serviceUuid","commandService","characteristicUuid","command","frame","cts","currentTimeService","bloodPressureService","currentTime","dateTime","delayBeforeWriteMs","isNormalDisconnect","nextCommand","weight","report","measurementTypeKey","bodyWeight","undefined","reading","key","recordedAt","Date","JSON","stringify","has","add","bloodPressure","onResult","caseType","RESULT"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/and-medical/and-medical.sequencer.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,YAAY;AAE/C,SAASC,QAAQ,QAAQ,6BAA0B;AAInD,SACEC,WAAW,EACXC,eAAe,EACfC,iBAAiB,EACjBC,UAAU,EACVC,mBAAmB,QACd,2BAAwB;;AAE/B;;AAGA;AACA,MAAMC,qBAAqB,GAAG,KAAK;;AAEnC;AACA;AACA;AACA;AACA,MAAMC,mBAAmB,CAA6B;EAC5CC,QAAQ,GAAG,KAAK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iB,KAAK,CAAC;IAExC,MAAMe,GAAG,GAAGD,OAAO,EAAEE,UAAU,YAAYC,IAAI,GAAGC,IAAI,CAACC,SAAS,CAACL,OAAO,CAAC,GAAGD,SAAS;IAErF,IAAIC,OAAO,IAAI,EAAEC,GAAG,IAAI,IAAI,CAAC1B,IAAI,CAAC+B,GAAG,CAACL,GAAG,CAAC,CAAC,EAAE;MAC3C,IAAIA,GAAG,EAAE;QACP,IAAI,CAAC1B,IAAI,CAACgC,GAAG,CAACN,GAAG,CAAC;MACpB;MACA,IAAI,CAACL,MAAM,CAAC;QAAEC,kBAAkB,EAAEhC,kBAAkB,CAAC2C,aAAa;QAAE,GAAGR;MAAQ,CAAC,CAAC;IACnF;IAEA,OAAOD,SAAS;EAClB,CAAC;EAEOH,MAAM,GAAII,OAAgC,IAAW;IAC3D,IAAI,CAAC1B,QAAQ,GAAG,IAAI;IACpB,IAAI,CAACI,MAAM,CAAC+B,QAAQ,CAAC;MAAEC,QAAQ,EAAE5C,QAAQ,CAAC6C,MAAM;MAAE,GAAGX;IAAQ,CAAC,CAAC;EACjE,CAAC;EAEOpB,GAAG,GAAGA,CAAA,KAAY,IAAI,CAACF,MAAM,CAACE,GAAG,GAAG,CAAC,IAAI,IAAIuB,IAAI,CAAC,CAAC;AAC7D;AAEA,SAAS9B,mBAAmB","ignoreList":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { BTManagedDevice } from "../bt-managed-device.js";
|
|
4
|
-
import { AOJ_VALUES, LiveOximeterSequencer } from "../live-oximeter.sequencer.js";
|
|
4
|
+
import { AOJ_VALUES, LiveOximeterSequencer, readOximeterData } from "../live-oximeter.sequencer.js";
|
|
5
5
|
import { AOJ_BP } from "./aoj-bp.protocol.js";
|
|
6
6
|
const aoj70bMainServices = [{
|
|
7
7
|
uuid: AOJ_BP.service,
|
|
@@ -22,7 +22,7 @@ class Aoj70bDevice extends BTManagedDevice {
|
|
|
22
22
|
constructor(device, params) {
|
|
23
23
|
super(device, params);
|
|
24
24
|
this.createCommandSequencer = () => new LiveOximeterSequencer({
|
|
25
|
-
|
|
25
|
+
readValues: frame => readOximeterData(frame, AOJ_VALUES),
|
|
26
26
|
onResult: result => this.onResult?.(result)
|
|
27
27
|
});
|
|
28
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BTManagedDevice","AOJ_VALUES","LiveOximeterSequencer","AOJ_BP","aoj70bMainServices","uuid","service","monitorUuids","notify","parsingModel","caseValuePosition","cases","Aoj70bDevice","mainServices","stuckDataTimeout","onStreamStart","undefined","constructor","device","params","createCommandSequencer","
|
|
1
|
+
{"version":3,"names":["BTManagedDevice","AOJ_VALUES","LiveOximeterSequencer","readOximeterData","AOJ_BP","aoj70bMainServices","uuid","service","monitorUuids","notify","parsingModel","caseValuePosition","cases","Aoj70bDevice","mainServices","stuckDataTimeout","onStreamStart","undefined","constructor","device","params","createCommandSequencer","readValues","frame","onResult","result","validatePackage","handleSuccessResult"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/aoj/aoj-70b.device.ts"],"mappings":";;AAOA,SAASA,eAAe,QAAQ,yBAAsB;AACtD,SAASC,UAAU,EAAEC,qBAAqB,EAAEC,gBAAgB,QAAQ,+BAA4B;AAEhG,SAASC,MAAM,QAAQ,sBAAmB;AAE1C,MAAMC,kBAA8B,GAAG,CACrC;EACEC,IAAI,EAAEF,MAAM,CAACG,OAAO;EACpBC,YAAY,EAAE,CAAC;IAAEF,IAAI,EAAEF,MAAM,CAACK,MAAM;IAAEC,YAAY,EAAE;MAAEC,iBAAiB,EAAE,EAAE;MAAEC,KAAK,EAAE;IAAG;EAAE,CAAC;AAC5F,CAAC,CACF;;AAED;AACA,MAAMC,YAAY,SAASb,eAAe,CAA4B;EAC1Dc,YAAY,GAAGT,kBAAkB;EACjCU,gBAAgB,GAAG,OAAO;EAC1BC,aAAa,GAAGC,SAAS;EAE5BC,WAAWA,CAACC,MAAc,EAAEC,MAAqD,EAAE;IACxF,KAAK,CAACD,MAAM,EAAEC,MAAM,CAAC;IACrB,IAAI,CAACC,sBAAsB,GAAG,MAC5B,IAAInB,qBAAqB,CAAC;MACxBoB,UAAU,EAAGC,KAAK,IAAKpB,gBAAgB,CAACoB,KAAK,EAAEtB,UAAU,CAAC;MAC1DuB,QAAQ,EAAGC,MAAM,IACf,IAAI,CAACD,QAAQ,GACXC,MAGF;IACJ,CAAC,CAAC;EACN;;EAEA;EACUC,eAAe,GAAGA,CAAA,KAAe,IAAI;EAErCC,mBAAmBA,CAAA,EAAS;IACpC;EACF;AACF;AAEA,SAASd,YAAY","ignoreList":[]}
|
package/lib/module/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js
CHANGED
|
@@ -5,35 +5,17 @@ import { CaseType } from "../../../types/case-type.js";
|
|
|
5
5
|
import { IntegratedDevices } from "../../../types/integrated-devices.js";
|
|
6
6
|
import { hexToByte } from "../../../utils/hex-to-byte.js";
|
|
7
7
|
import { BTManagedDevice } from "../bt-managed-device.js";
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
import { TAIDOC, TAIDOC_CHARACTERISTIC, TAIDOC_SERVICE, taidocCommand } from "../taidoc/taidoc.protocol.js";
|
|
9
|
+
import { isPatientGlucoseRecord } from "../taidoc/taidoc.records.js";
|
|
10
10
|
const BGM_SERVICE = "0003cdd0-0000-1000-8000-00805f9b0131";
|
|
11
11
|
const BGM_CHARACTERISTIC = "0003cdd1-0000-1000-8000-00805f9b0131";
|
|
12
|
-
const GLUCOSE_REQUEST = "
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Frame byte 5 of the TaiDoc `0x26` stored-result reply (`51 26 d0 d1 d2 d3 a5 cs`) is d3:
|
|
16
|
-
* bits 6-7 the meal flag, where `11` marks a control-solution test, and on multi-parameter
|
|
17
|
-
* meters bits 2-5 the parameter - 0 glucose; 6 haematocrit, 7 ketone, 8 uric acid,
|
|
18
|
-
* 9 cholesterol, 11 haemoglobin, 12 lactate, 13 triglycerides. Single-parameter TaiDoc meters
|
|
19
|
-
* keep the strip code in bits 2-5 instead, so this check holds only for multi-parameter ones;
|
|
20
|
-
* the TD-4216 and GlucoCheck Gold behind these two parsers both are.
|
|
21
|
-
*/
|
|
22
|
-
const RECORD_FLAGS_BYTE = 5;
|
|
23
|
-
const CONTROL_SOLUTION_FLAG = 0b11;
|
|
24
|
-
const GLUCOSE_PARAMETER = 0;
|
|
25
|
-
|
|
26
|
-
/** A stored TaiDoc result is a patient glucose reading, not another analyte or a control test. */
|
|
27
|
-
const isPatientGlucoseRecord = frame => {
|
|
28
|
-
const flags = hexToByte(frame[RECORD_FLAGS_BYTE] ?? "00");
|
|
29
|
-
return flags >> 6 !== CONTROL_SOLUTION_FLAG && (flags >> 2 & 0x0f) === GLUCOSE_PARAMETER;
|
|
30
|
-
};
|
|
12
|
+
const GLUCOSE_REQUEST = taidocCommand(TAIDOC.readingResult).join("");
|
|
31
13
|
const servicesFor = device => {
|
|
32
14
|
const isBgm = device === IntegratedDevices.BGM;
|
|
33
15
|
return [{
|
|
34
|
-
uuid: isBgm ? BGM_SERVICE :
|
|
16
|
+
uuid: isBgm ? BGM_SERVICE : TAIDOC_SERVICE,
|
|
35
17
|
monitorUuids: [{
|
|
36
|
-
uuid: isBgm ? BGM_CHARACTERISTIC :
|
|
18
|
+
uuid: isBgm ? BGM_CHARACTERISTIC : TAIDOC_CHARACTERISTIC,
|
|
37
19
|
parsingModel: {
|
|
38
20
|
caseValuePosition: [isBgm ? 9 : 1],
|
|
39
21
|
cases: [...(isBgm ? ["00", "0b", "10", "11", "18", "22", "33", "55"] : ["46", ...(device === IntegratedDevices.GLUCOCHECK ? ["50"] : [])]).map(caseValue => ({
|
|
@@ -62,7 +44,7 @@ const servicesFor = device => {
|
|
|
62
44
|
}],
|
|
63
45
|
...(isBgm ? {} : {
|
|
64
46
|
writeUuid: {
|
|
65
|
-
uuid:
|
|
47
|
+
uuid: TAIDOC_CHARACTERISTIC,
|
|
66
48
|
mainCommandUuid: GLUCOSE_REQUEST
|
|
67
49
|
}
|
|
68
50
|
})
|
package/lib/module/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MeasurementTypeKey","CaseType","IntegratedDevices","hexToByte","BTManagedDevice","
|
|
1
|
+
{"version":3,"names":["MeasurementTypeKey","CaseType","IntegratedDevices","hexToByte","BTManagedDevice","TAIDOC","TAIDOC_CHARACTERISTIC","TAIDOC_SERVICE","taidocCommand","isPatientGlucoseRecord","BGM_SERVICE","BGM_CHARACTERISTIC","GLUCOSE_REQUEST","readingResult","join","servicesFor","device","isBgm","BGM","uuid","monitorUuids","parsingModel","caseValuePosition","cases","GLUCOCHECK","map","caseValue","caseType","OTHER","parseDefinitions","measurementTypeKey","bloodGlucose","RESULT","name","parseType","byteIndexes","parseReference","customParserDefinition","value","slice","raw","parseInt","TAIDOC_GLUCOSE","Number","toFixed","writeUuid","mainCommandUuid","BloodGlucoseDevice","stuckDataTimeout","constructor","params","mainServices","deviceName","validatePackage","pkg","length","deviceData","handleSuccessResult","result","frame","onResult"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/blood-glucose/blood-glucose.device.ts"],"mappings":";;AAAA,SAAkCA,kBAAkB,QAAQ,YAAY;AAGxE,SAASC,QAAQ,QAAQ,6BAA0B;AAGnD,SAASC,iBAAiB,QAAQ,sCAAmC;AAGrE,SAASC,SAAS,QAAQ,+BAA4B;AACtD,SAASC,eAAe,QAAQ,yBAAsB;AACtD,SACEC,MAAM,EACNC,qBAAqB,EACrBC,cAAc,EACdC,aAAa,QACR,8BAA2B;AAClC,SAASC,sBAAsB,QAAQ,6BAA0B;AAEjE,MAAMC,WAAW,GAAG,sCAAsC;AAC1D,MAAMC,kBAAkB,GAAG,sCAAsC;AACjE,MAAMC,eAAe,GAAGJ,aAAa,CAACH,MAAM,CAACQ,aAAa,CAAC,CAACC,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EAC9B;MACA;IACF;IAEA,IAAI,CAACC,QAAQ,GAAGF,MAA0D,CAAC;EAC7E;AACF","ignoreList":[]}
|
|
@@ -34,6 +34,7 @@ export class BTDataProcessor {
|
|
|
34
34
|
currentUuid = "";
|
|
35
35
|
destroy = () => {
|
|
36
36
|
this.buffers.clear();
|
|
37
|
+
this.frameReader?.reset?.();
|
|
37
38
|
this.currentUuid = "";
|
|
38
39
|
this.measurementState.reset();
|
|
39
40
|
clearTimeout(this.stuckDataTimeout);
|
|
@@ -73,7 +74,7 @@ export class BTDataProcessor {
|
|
|
73
74
|
*/
|
|
74
75
|
readFramesFromBuffer = (reader, uuid, buffer) => {
|
|
75
76
|
while (buffer.length > 0) {
|
|
76
|
-
const result = reader.readFrame(buffer);
|
|
77
|
+
const result = reader.readFrame(buffer, uuid);
|
|
77
78
|
const hasProgressed = result.consumedBytes > 0;
|
|
78
79
|
buffer.splice(0, result.consumedBytes);
|
|
79
80
|
if (result.status === FrameReadStatus.COMPLETE) {
|
|
@@ -84,7 +85,7 @@ export class BTDataProcessor {
|
|
|
84
85
|
if (result.status === FrameReadStatus.CORRUPT) {
|
|
85
86
|
this.reportCorruptFrame();
|
|
86
87
|
}
|
|
87
|
-
if (
|
|
88
|
+
if (!hasProgressed) {
|
|
88
89
|
break;
|
|
89
90
|
}
|
|
90
91
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["sentryLogger","CaseType","FrameReadStatus","FrameParser","MeasurementStateMachine","BTDataProcessor","buffers","Map","constructor","device","mainServices","stuckDataTimeoutDuration","callbacks","frameReader","frameParser","measurementState","onStatusChanged","onStreamStart","onMeasurementEnd","onResult","currentUuid","destroy","clear","reset","clearTimeout","stuckDataTimeout","undefined","commandTimeout","processData","uuid","hexValue","String","toLowerCase","buffer","get","push","set","startStuckTimeout","readFramesFromBuffer","readWholeBuffer","armStuckTimeout","armCommandTimeout","startCommandTimeout","reader","length","result","readFrame","hasProgressed","consumedBytes","splice","status","COMPLETE","handleFrame","frame","answerFrame","CORRUPT","reportCorruptFrame","
|
|
1
|
+
{"version":3,"names":["sentryLogger","CaseType","FrameReadStatus","FrameParser","MeasurementStateMachine","BTDataProcessor","buffers","Map","constructor","device","mainServices","stuckDataTimeoutDuration","callbacks","frameReader","frameParser","measurementState","onStatusChanged","onStreamStart","onMeasurementEnd","onResult","currentUuid","destroy","clear","reset","clearTimeout","stuckDataTimeout","undefined","commandTimeout","processData","uuid","hexValue","String","toLowerCase","buffer","get","push","set","startStuckTimeout","readFramesFromBuffer","readWholeBuffer","armStuckTimeout","armCommandTimeout","startCommandTimeout","reader","length","result","readFrame","hasProgressed","consumedBytes","splice","status","COMPLETE","handleFrame","frame","answerFrame","CORRUPT","reportCorruptFrame","validatePackage","progress","commandProgress","commands","nextCommand","sendCommands","data","parse","frameLength","dependentData","parsingCase","caseType","DEPENDENT","handleDependentResult","isMeasuring","measuring","advance","onError","Error","cause","message","setTimeout","cancelConnection","duration","commandTimeoutMs","onCommandTimeout","terminal"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/bt-data-processor.ts"],"mappings":";;AAAA;;AAIA,SAASA,YAAY,QAAQ,yCAAsC;AACnE,SAASC,QAAQ,QAAQ,0BAAuB;AAKhD,SAASC,eAAe,QAAQ,kCAA+B;AAK/D,SAASC,WAAW,QAAQ,mBAAgB;AAC5C,SAASC,uBAAuB,QAAQ,gCAA6B;AA0CrE,OAAO,MAAMC,eAAe,CAAwB;EAClD;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACUC,OAAO,GAAG,IAAIC,GAAG,CAAmB,CAAC;EAK7CC,WAAWA,CACQC,MAAc,EAC/BC,YAA2C,EAC1BC,wBAAgC,EAChCC,SAAoC,EACpCC,WAAyB,EAC1C;IAAA,KALiBJ,MAAc,GAAdA,MAAc;IAAA,KAEdE,wBAAgC,GAAhCA,wBAAgC;IAAA,KAChCC,SAAoC,GAApCA,SAAoC;IAAA,KACpCC,WAAyB,GAAzBA,WAAy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AAC;IACjC,IAAI,CAACA,cAAc,GAAGmD,UAAU,CAAC,MAAM;MACrC,IAAI,CAACnD,cAAc,GAAGD,SAAS;MAE/B,MAAMmB,MAAM,GAAG,IAAI,CAACjC,SAAS,CAACsE,gBAAgB,GAAG,CAAC;MAElD,IAAIrC,MAAM,EAAEe,QAAQ,IAAIf,MAAM,CAACe,QAAQ,CAAChB,MAAM,GAAG,CAAC,EAAE;QAClD,IAAI,CAAChC,SAAS,CAACkD,YAAY,GAAGjB,MAAM,CAACe,QAAQ,CAAC;QAC9C,IAAI,CAAClB,mBAAmB,CAAC,CAAC;QAE1B;MACF;MAEA,IAAIG,MAAM,EAAEsC,QAAQ,EAAE;QACpB,IAAI,CAACvE,SAAS,CAAC8D,OAAO,GACpB,IAAIC,KAAK,CAAC,+CAA+C,CAC3D,CAAC;QACD,KAAK,IAAI,CAAClE,MAAM,CAACsE,gBAAgB,GAAG,CAAC;MACvC;IACF,CAAC,EAAEC,QAAQ,CAAC;EACd,CAAC;AACH","ignoreList":[]}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { sentryLogger } from "../../../helpers/utils/sentry-logger.js";
|
|
6
6
|
import { addOvokSpanEvent, recordOvokMetric } from "../../../helpers/utils/telemetry.js";
|
|
7
|
+
import { BUILT_IN_MEASUREMENT_TYPES } from "../../constants/built-in-measurement-types.js";
|
|
7
8
|
import { findDeviceVariant } from "../../constants/device-variants.js";
|
|
8
9
|
import { toBluetoothError } from "../../types/bluetooth-error.js";
|
|
9
10
|
import { clockSyncCapabilityForDevice } from "../../types/clock-sync.js";
|
|
@@ -27,9 +28,13 @@ export class BTManagedDevice {
|
|
|
27
28
|
* The timeout in milliseconds for the stuck data.
|
|
28
29
|
*/
|
|
29
30
|
|
|
30
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* The frame cases' measurement types, or - for a sequencer-driven parser whose cases are
|
|
33
|
+
* empty - the parser's entry in `BUILT_IN_MEASUREMENT_TYPES`.
|
|
34
|
+
*/
|
|
31
35
|
getSupportedMeasurementTypeKeys() {
|
|
32
|
-
|
|
36
|
+
const declared = supportedMeasurementTypeKeys(this.mainServices);
|
|
37
|
+
return declared.length > 0 ? declared : [...(BUILT_IN_MEASUREMENT_TYPES[this.deviceData.name] ?? [])];
|
|
33
38
|
}
|
|
34
39
|
|
|
35
40
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["sentryLogger","addOvokSpanEvent","recordOvokMetric","findDeviceVariant","toBluetoothError","clockSyncCapabilityForDevice","DeviceStatus","createStableResultId","supportedMeasurementTypeKeys","BTConnectionHandler","BTDataProcessor","pollingSequencerFor","BTManagedDevice","connected","destroyed","resultReportedThisConnection","historyTransferActive","bondedEventReported","reportedMeasurementKinds","Set","reportedDailyTotals","historyResultCount","getSupportedMeasurementTypeKeys","mainServices","reportsBondedEvent","handleMeasurementEnd","constructor","device","deviceName","onError","onErrorCallback","onDeviceStatusChanged","onDeviceStatusChangedCallback","onResult","onResultCallback","onConnectionEvent","onConnectionEventCallback","onDeviceDisconnected","onDeviceDisconnectedCallback","oneReadingPerConnection","resultPolicy","deviceData","id","name","localName","manufacturerData","sn","measurementTypes","clockSync","variant","String","manufacturer","model","status","measurementTypeKey","error","normalized","errorCode","code","originalError","translationKey","Error","caseType","_","data","policy","byMeasurement","default","has","add","temporal","end","Date","undefined","now","getTime","day","start","recordedAt","key","toISOString","slice","kind","progress","current","result","Object","defineProperty","value","enumerable","writable","destroy","connectionHandler","dataProcessor","disconnect","cancelConnection","connectInternal","clear","sequencer","createCommandSequencer","isHistoryTransfer","onStatusChanged","CONNECTED","bind","DISCONNECTED","event","onDataReceived","uuid","hexValue","processData","onDeviceInfo","info","manufacturerName","serialNumber","onServicesDiscovered","uuids","initialCommands","onCommandSent","armStuckTimeout","armCommandTimeout","isNormalDisconnect","preferredMtu","stuckDataTimeout","onStreamStart","onMeasurementEnd","validatePackage","parsedData","collectedValues","handleSuccessResult","nextCommand","frame","sendCommands","commands","commandTimeoutMs","onCommandTimeout","commandProgress","handleDependentResult","frameReader","connect","Promise","reject","connectionPromise","resolve","finally"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/bt-managed-device.ts"],"mappings":";;AAAA;;AAKA,SAASA,YAAY,QAAQ,yCAAsC;AACnE,SAASC,gBAAgB,EAAEC,gBAAgB,QAAQ,qCAAkC;AACrF,SAASC,iBAAiB,QAAQ,oCAAiC;AACnE,SAASC,gBAAgB,QAAQ,gCAA6B;AAC9D,SAASC,4BAA4B,QAAQ,2BAAwB;AAQrE,SAASC,YAAY,QAAQ,8BAA2B;AAQxD,SAASC,oBAAoB,QAAQ,gCAA6B;AAClE,SAASC,4BAA4B,QAAQ,gDAA6C;AAE1F,SAASC,mBAAmB,QAAQ,4BAAyB;AAC7D,SAASC,eAAe,QAAQ,wBAAqB;AACrD,SAASC,mBAAmB,QAAQ,gCAA6B;AAEjE,OAAO,MAAeC,eAAe,CAErC;EAKUC,SAAS,GAAG,KAAK;EACjBC,SAAS,GAAG,KAAK;EAMjBC,4BAA4B,GAAG,KAAK;EACpCC,qBAAqB,GAAG,KAAK;EAC7BC,mBAAmB,GAAG,KAAK;EAC3BC,wBAAwB,GAAG,IAAIC,GAAG,CAAqB,CAAC;EACxDC,mBAAmB,GAAG,IAAID,GAAG,CAAS,CAAC;EACvCE,kBAAkB,GAAG,CAAC;;EAG9B;AACF;AACA;;EAGE;EACUC,+BAA+BA,CAAA,EAAyB;IAChE,OAAOd,4BAA4B,CAAC,IAAI,CAACe,YAAY,CAAC;EACxD;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;;EAOE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;EAGE;AACF;AACA;AACA;AACA;AACA;AACA;;EAGE;AACF;AACA;AACA;AACA;AACA;;EAGE;EACUC,kBAAkB,GAAG,KAAK;;EAEpC;AACF;AACA;AACA;AACA;AACA;;EAQE;EACUC,oBAAoBA,CAAA,EAAS,CAAC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,CAAC,CAAC;IAEF,OAAO,IAAI,CAACoE,iBAAiB;EAC/B,CAAC;AACH","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["sentryLogger","addOvokSpanEvent","recordOvokMetric","BUILT_IN_MEASUREMENT_TYPES","findDeviceVariant","toBluetoothError","clockSyncCapabilityForDevice","DeviceStatus","createStableResultId","supportedMeasurementTypeKeys","BTConnectionHandler","BTDataProcessor","pollingSequencerFor","BTManagedDevice","connected","destroyed","resultReportedThisConnection","historyTransferActive","bondedEventReported","reportedMeasurementKinds","Set","reportedDailyTotals","historyResultCount","getSupportedMeasurementTypeKeys","declared","mainServices","length","deviceData","name","reportsBondedEvent","handleMeasurementEnd","constructor","device","deviceName","onError","onErrorCallback","onDeviceStatusChanged","onDeviceStatusChangedCallback","onResult","onResultCallback","onConnectionEvent","onConnectionEventCallback","onDeviceDisconnected","onDeviceDisconnectedCallback","oneReadingPerConnection","resultPolicy","id","localName","manufacturerData","sn","measurementTypes","clockSync","variant","String","manufacturer","model","status","measurementTypeKey","error","normalized","errorCode","code","originalError","translationKey","Error","caseType","_","data","policy","byMeasurement","default","has","add","temporal","end","Date","undefined","now","getTime","day","start","recordedAt","key","toISOString","slice","kind","progress","current","result","Object","defineProperty","value","enumerable","writable","destroy","connectionHandler","dataProcessor","disconnect","cancelConnection","connectInternal","clear","sequencer","createCommandSequencer","isHistoryTransfer","onStatusChanged","CONNECTED","bind","DISCONNECTED","event","onDataReceived","uuid","hexValue","processData","onDeviceInfo","info","manufacturerName","serialNumber","onServicesDiscovered","uuids","initialCommands","onCommandSent","armStuckTimeout","armCommandTimeout","isNormalDisconnect","preferredMtu","stuckDataTimeout","onStreamStart","onMeasurementEnd","validatePackage","parsedData","collectedValues","handleSuccessResult","nextCommand","frame","sendCommands","commands","commandTimeoutMs","onCommandTimeout","commandProgress","handleDependentResult","frameReader","connect","Promise","reject","connectionPromise","resolve","finally"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/bt-managed-device.ts"],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AAI,CAAC7C,eAAe,CAAC,CAAC,CAAC+C,OAAO,CAAC,MAAM;MAC5D,IAAI,CAACF,iBAAiB,GAAGpE,SAAS;IACpC,CAAC,CAAC;IAEF,OAAO,IAAI,CAACoE,iBAAiB;EAC/B,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { MeasurementTypeKey } from "@ovok/core";
|
|
4
|
+
import { CaseType } from "../../../types/case-type.js";
|
|
5
|
+
import { BP_ACK, bpSetTime, COFOE_GATT, historySetTime, unframe } from "./cofoe.protocol.js";
|
|
6
|
+
import { readBpRecord, readBpResult } from "./cofoe.records.js";
|
|
7
|
+
const BP = {
|
|
8
|
+
result: 0x03,
|
|
9
|
+
timeRequest: 0x06,
|
|
10
|
+
records: [0x02, 0x03]
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Cofoe `FF FF` blood-pressure monitors. Both generations get the clock on connect and have
|
|
15
|
+
* every reading acknowledged; the device ends the session.
|
|
16
|
+
*
|
|
17
|
+
* - `history: false` (`Cofoe_BPM`): a live `03` result, timed by the phone.
|
|
18
|
+
* - `history: true` (`Cofoe_KF66EP`): `02`/`03` records stamped with the device's own (BCD)
|
|
19
|
+
* clock, which is set again whenever the device asks (`06`).
|
|
20
|
+
*/
|
|
21
|
+
class CofoeBpSequencer {
|
|
22
|
+
recorded = false;
|
|
23
|
+
gatt = COFOE_GATT.bloodPressure;
|
|
24
|
+
constructor(params) {
|
|
25
|
+
this.params = params;
|
|
26
|
+
if (params.history) {
|
|
27
|
+
this.gatt = COFOE_GATT.history;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/** The records generation may expose its GATT under either UUID layout; write to the one found. */
|
|
32
|
+
onServicesDiscovered = serviceUuids => {
|
|
33
|
+
if (this.params.history && serviceUuids.includes(COFOE_GATT.historyReversed.service)) {
|
|
34
|
+
this.gatt = COFOE_GATT.historyReversed;
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
initialCommands = () => [this.command(this.setTime())];
|
|
38
|
+
isNormalDisconnect = () => this.recorded;
|
|
39
|
+
isHistoryTransfer = () => this.params.history;
|
|
40
|
+
nextCommand = frame => {
|
|
41
|
+
const {
|
|
42
|
+
command,
|
|
43
|
+
body
|
|
44
|
+
} = unframe("bloodPressure", frame);
|
|
45
|
+
if (this.params.history && command === BP.timeRequest) {
|
|
46
|
+
return [this.command(this.setTime())];
|
|
47
|
+
}
|
|
48
|
+
const isRecord = this.params.history ? BP.records.includes(command) : command === BP.result;
|
|
49
|
+
if (!isRecord) {
|
|
50
|
+
return undefined;
|
|
51
|
+
}
|
|
52
|
+
const reading = this.read(body);
|
|
53
|
+
if (reading) {
|
|
54
|
+
this.recorded = true;
|
|
55
|
+
this.params.onResult({
|
|
56
|
+
caseType: CaseType.RESULT,
|
|
57
|
+
measurementTypeKey: MeasurementTypeKey.bloodPressure,
|
|
58
|
+
...reading
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
return [this.command(BP_ACK)];
|
|
62
|
+
};
|
|
63
|
+
read = body => {
|
|
64
|
+
if (this.params.history) {
|
|
65
|
+
return readBpRecord(body);
|
|
66
|
+
}
|
|
67
|
+
const result = readBpResult(body);
|
|
68
|
+
return result && {
|
|
69
|
+
...result,
|
|
70
|
+
recordedAt: this.now()
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
setTime = () => this.params.history ? historySetTime(this.now()) : bpSetTime(this.now());
|
|
74
|
+
now = () => this.params.now?.() ?? new Date();
|
|
75
|
+
command = frame => ({
|
|
76
|
+
serviceUuid: this.gatt.service,
|
|
77
|
+
characteristicUuid: this.gatt.write,
|
|
78
|
+
frame
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
export { CofoeBpSequencer };
|
|
82
|
+
//# sourceMappingURL=cofoe-bp.sequencer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["MeasurementTypeKey","CaseType","BP_ACK","bpSetTime","COFOE_GATT","historySetTime","unframe","readBpRecord","readBpResult","BP","result","timeRequest","records","CofoeBpSequencer","recorded","gatt","bloodPressure","constructor","params","history","onServicesDiscovered","serviceUuids","includes","historyReversed","service","initialCommands","command","setTime","isNormalDisconnect","isHistoryTransfer","nextCommand","frame","body","isRecord","undefined","reading","read","onResult","caseType","RESULT","measurementTypeKey","recordedAt","now","Date","serviceUuid","characteristicUuid","write"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/cofoe/cofoe-bp.sequencer.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,YAAY;AAE/C,SAASC,QAAQ,QAAQ,6BAA0B;AAInD,SACEC,MAAM,EACNC,SAAS,EACTC,UAAU,EACVC,cAAc,EACdC,OAAO,QACF,qBAAkB;AACzB,SAASC,YAAY,EAAEC,YAAY,QAAQ,oBAAiB;AAE5D,MAAMC,EAAE,GAAG;EAAEC,MAAM,EAAE,IAAI;EAAEC,WAAW,EAAE,IAAI;EAAEC,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI;AAAE,CAAU;;AAE9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,gBAAgB,CAA6B;EACzCC,QAAQ,GAAG,KAAK;EAChBC,IAAI,GAAuCX,UAAU,CAACY,aAAa;EAEpEC,WAAWA,CACCC,MAIhB,EACD;IAAA,KALiBA,MAIhB,GAJgBA,MAIhB;IAED,IAAIA,MAAM,CAACC,OAAO,EAAE;MAClB,IAAI,CAACJ,IAAI,GAAGX,UAAU,CAACe,OAAO;IAChC;EACF;;EAEA;EACOC,oBAAoB,GAAIC,YAA+B,IAAW;IACvE,IAAI,IAAI,CAACH,MAAM,CAACC,OAAO,IAAIE,YAAY,CAACC,QAAQ,CAAClB,UAAU,CAACmB,eAAe,CAACC,OAAO,CAAC,EAAE;MACpF,IAAI,CAACT,IAAI,GAAGX,UAAU,CAACmB,eAAe;IAC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