@ovok/native 1.10.10 → 1.10.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/modules/bt-device/constants/device-instruction-pdfs.js +19 -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-variants.js +8 -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 +2 -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 +84 -0
- package/lib/commonjs/modules/bt-management/constants/built-in-measurement-types.js.map +1 -0
- package/lib/commonjs/modules/bt-management/constants/cofoe-device-variants.js +101 -0
- package/lib/commonjs/modules/bt-management/constants/cofoe-device-variants.js.map +1 -0
- package/lib/commonjs/modules/bt-management/constants/device-variants.js +5 -1
- package/lib/commonjs/modules/bt-management/constants/device-variants.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/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/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 +23 -1
- package/lib/commonjs/modules/bt-management/services/device-classes.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-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/yonker/yonker.device.js +90 -0
- package/lib/commonjs/modules/bt-management/services/devices/yonker/yonker.device.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/yonker/yonker.protocol.js +202 -0
- package/lib/commonjs/modules/bt-management/services/devices/yonker/yonker.protocol.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/yonker/yonker.sequencer.js +137 -0
- package/lib/commonjs/modules/bt-management/services/devices/yonker/yonker.sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/types/integrated-devices.js +18 -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 +19 -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-variants.js +8 -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 +2 -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 +82 -0
- package/lib/module/modules/bt-management/constants/built-in-measurement-types.js.map +1 -0
- package/lib/module/modules/bt-management/constants/cofoe-device-variants.js +99 -0
- package/lib/module/modules/bt-management/constants/cofoe-device-variants.js.map +1 -0
- package/lib/module/modules/bt-management/constants/device-variants.js +5 -1
- package/lib/module/modules/bt-management/constants/device-variants.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/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/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 +23 -1
- package/lib/module/modules/bt-management/services/device-classes.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-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/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/device-measurement-map.js.map +1 -1
- package/lib/module/modules/bt-management/types/integrated-devices.js +18 -0
- package/lib/module/modules/bt-management/types/integrated-devices.js.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-device/constants/device-instruction-pdfs.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-and-medical-variants.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-and-medical-variants.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-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-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/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/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/services/background-sync/background-service-uuids.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/device-classes.d.ts +22 -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/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-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/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/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 +18 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-measurement-map.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/integrated-devices.d.ts +19 -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/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-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/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/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/services/background-sync/background-service-uuids.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/device-classes.d.ts +22 -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/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-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/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/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 +18 -0
- package/lib/typescript/module/src/modules/bt-management/types/device-measurement-map.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/integrated-devices.d.ts +19 -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
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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B,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,I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AC9B;MACA;IACF;IAEA,IAAI,CAACC,QAAQ,GAAGF,MAA0D,CAAC;EAC7E;AACF","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,QA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AAE0E,IAAI,CAAC,IAAI,CAAC;MACjCiC,qBAAqB,EAAE,IAAI,CAACA,qBAAqB,EAAEjC,IAAI,CAAC,IAAI;IAC9D,CAAC,EACD,IAAI,CAACkC,WACP,CAAC;IAED,MAAM,IAAI,CAAC7C,iBAAiB,CAAC8C,OAAO,CAAC,CAAC;EACxC,CAAC;EAEMA,OAAO,GAAGA,CAAA,KAAqB;IACpC,IAAI,IAAI,CAAC5H,SAAS,EAAE;MAClB,OAAO6H,OAAO,CAACC,MAAM,CAAC,IAAI/E,KAAK,CAAC,6CAA6C,CAAC,CAAC;IACjF;IAEA,IAAI,IAAI,CAACgF,iBAAiB,EAAE;MAC1B,OAAO,IAAI,CAACA,iBAAiB;IAC/B;IAEA,IAAI,IAAI,CAAChI,SAAS,EAAE;MAClB,OAAO8H,OAAO,CAACG,OAAO,CAAC,CAAC;IAC1B;IAEA,IAAI,CAACD,iBAAiB,GAAG,IAAI,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":[]}
|
|
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"],"mappings":";;AAAA;;AAKA,SAASA,YAAY,QAAQ,yCAAsC;AACnE,SAASC,gBAAgB,EAAEC,gBAAgB,QAAQ,qCAAkC;AACrF,SAASC,0BAA0B,QAAQ,+CAA4C;AACvF,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;EAMj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KAAK,IACrBhC,SAAS,CAACqC,eAAe,GAAGL,KAAK,CAAC,IAAI,UAAU;MAClDnG,OAAO,EAAE,IAAI,CAACA,OAAO,EAAEwE,IAAI,CAAC,IAAI,CAAC;MACjCiC,qBAAqB,EAAE,IAAI,CAACA,qBAAqB,EAAEjC,IAAI,CAAC,IAAI;IAC9D,CAAC,EACD,IAAI,CAACkC,WACP,CAAC;IAED,MAAM,IAAI,CAAC7C,iBAAiB,CAAC8C,OAAO,CAAC,CAAC;EACxC,CAAC;EAEMA,OAAO,GAAGA,CAAA,KAAqB;IACpC,IAAI,IAAI,CAAC9H,SAAS,EAAE;MAClB,OAAO+H,OAAO,CAACC,MAAM,CAAC,IAAI/E,KAAK,CAAC,6CAA6C,CAAC,CAAC;IACjF;IAEA,IAAI,IAAI,CAACgF,iBAAiB,EAAE;MAC1B,OAAO,IAAI,CAACA,iBAAiB;IAC/B;IAEA,IAAI,IAAI,CAAClI,SAAS,EAAE;MAClB,OAAOgI,OAAO,CAACG,OAAO,CAAC,CAAC;IAC1B;IAEA,IAAI,CAACD,iBAAiB,GAAG,IAAI,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,YAA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AC7B,IAAI,CAACS,OAAO;IAC9BqB,kBAAkB,EAAE,IAAI,CAAC9B,IAAI,CAAC+B,KAAK;IACnCf;EACF,CAAC,CAAC;AACJ;AAEA,SAASlB,gBAAgB","ignoreList":[]}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/* eslint-disable import/group-exports */
|
|
4
|
+
import { MeasurementTypeKey } from "@ovok/core";
|
|
5
|
+
import { CaseType } from "../../../types/case-type.js";
|
|
6
|
+
import { cgh25Frame, cgh25SetTime, COFOE_GATT, kfb06Frame, kfb06SetTime, unframe } from "./cofoe.protocol.js";
|
|
7
|
+
import { readCgh25Glucose, readKfb06Glucose } from "./cofoe.records.js";
|
|
8
|
+
const command = frame => ({
|
|
9
|
+
serviceUuid: COFOE_GATT.glucometer.service,
|
|
10
|
+
characteristicUuid: COFOE_GATT.glucometer.write,
|
|
11
|
+
frame
|
|
12
|
+
});
|
|
13
|
+
const report = (params, reading) => params.onResult({
|
|
14
|
+
caseType: CaseType.RESULT,
|
|
15
|
+
measurementTypeKey: MeasurementTypeKey.bloodGlucose,
|
|
16
|
+
...reading
|
|
17
|
+
});
|
|
18
|
+
const KFB06 = {
|
|
19
|
+
handshake: 0x01,
|
|
20
|
+
getInfo: 0x03,
|
|
21
|
+
setTime: 0x10,
|
|
22
|
+
getData: 0x07,
|
|
23
|
+
ack: 0x40,
|
|
24
|
+
ok: 0x00,
|
|
25
|
+
info: 0x13,
|
|
26
|
+
header: 0x15,
|
|
27
|
+
record: 0x11
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** MedM re-sends get-data every second until the data header arrives. */
|
|
31
|
+
const GET_DATA_RETRY_MS = 1_000;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* KF-B06, CGH200 and Novocont Comfort: handshake, device info, set the clock, then get-data
|
|
35
|
+
* until the data header (`15`) arrives, and acknowledge each `11` record with the sequence
|
|
36
|
+
* byte it carried. There is no end-of-data command; the meter closes the link.
|
|
37
|
+
*/
|
|
38
|
+
export class CofoeKfb06Sequencer {
|
|
39
|
+
phase = "handshake";
|
|
40
|
+
sequence = 0;
|
|
41
|
+
constructor(params) {
|
|
42
|
+
this.params = params;
|
|
43
|
+
}
|
|
44
|
+
initialCommands = () => [this.send(KFB06.handshake)];
|
|
45
|
+
isHistoryTransfer = () => true;
|
|
46
|
+
isNormalDisconnect = () => this.phase === "records";
|
|
47
|
+
commandTimeoutMs = () => this.phase === "header" ? GET_DATA_RETRY_MS : undefined;
|
|
48
|
+
onCommandTimeout = () => this.phase === "header" ? {
|
|
49
|
+
commands: [this.send(KFB06.getData)]
|
|
50
|
+
} : {};
|
|
51
|
+
|
|
52
|
+
/** Keeps the get-data retry running across anything that is not the data header. */
|
|
53
|
+
commandProgress = frame => this.phase === "header" && unframe("kfb06", frame).command !== KFB06.header ? "partial" : "complete";
|
|
54
|
+
nextCommand = frame => {
|
|
55
|
+
const {
|
|
56
|
+
command: received,
|
|
57
|
+
sequence,
|
|
58
|
+
body
|
|
59
|
+
} = unframe("kfb06", frame);
|
|
60
|
+
if (this.phase === "handshake" && received === KFB06.ok) {
|
|
61
|
+
this.phase = "info";
|
|
62
|
+
return [this.send(KFB06.getInfo)];
|
|
63
|
+
}
|
|
64
|
+
if (this.phase === "info" && received === KFB06.info) {
|
|
65
|
+
this.phase = "time";
|
|
66
|
+
return [command(kfb06SetTime(this.sequence++, this.now()))];
|
|
67
|
+
}
|
|
68
|
+
if (this.phase === "time" && received === KFB06.ok) {
|
|
69
|
+
this.phase = "header";
|
|
70
|
+
return [this.send(KFB06.getData)];
|
|
71
|
+
}
|
|
72
|
+
if (this.phase === "header" && received === KFB06.header) {
|
|
73
|
+
this.phase = "records";
|
|
74
|
+
}
|
|
75
|
+
if ((this.phase === "header" || this.phase === "records") && received === KFB06.record) {
|
|
76
|
+
const reading = readKfb06Glucose(body);
|
|
77
|
+
if (reading) {
|
|
78
|
+
report(this.params, reading);
|
|
79
|
+
}
|
|
80
|
+
return [command(kfb06Frame(KFB06.ack, sequence))];
|
|
81
|
+
}
|
|
82
|
+
return undefined;
|
|
83
|
+
};
|
|
84
|
+
send = code => command(kfb06Frame(code, this.sequence++));
|
|
85
|
+
now = () => this.params.now?.() ?? new Date();
|
|
86
|
+
}
|
|
87
|
+
const CGH25 = {
|
|
88
|
+
live: 0x00,
|
|
89
|
+
timeRequest: 0x01,
|
|
90
|
+
record: 0x02,
|
|
91
|
+
count: 0x04,
|
|
92
|
+
ready: 0x06,
|
|
93
|
+
getRecord: 0x02,
|
|
94
|
+
getCount: 0x04
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* CGH25 and CGH30. The meter drives: it asks for the time (`01`), says it is ready (`06`), is
|
|
99
|
+
* asked for its record count, and the records are then pulled newest first, from index `count`
|
|
100
|
+
* down to 1. MedM can also wipe the meter's memory afterwards; that is never done here.
|
|
101
|
+
*/
|
|
102
|
+
export class CofoeCgh25Sequencer {
|
|
103
|
+
remaining = 0;
|
|
104
|
+
finished = false;
|
|
105
|
+
constructor(params) {
|
|
106
|
+
this.params = params;
|
|
107
|
+
}
|
|
108
|
+
initialCommands = () => [];
|
|
109
|
+
isHistoryTransfer = () => true;
|
|
110
|
+
isNormalDisconnect = () => this.finished;
|
|
111
|
+
nextCommand = frame => {
|
|
112
|
+
const {
|
|
113
|
+
command: received,
|
|
114
|
+
body
|
|
115
|
+
} = unframe("cgh25", frame);
|
|
116
|
+
switch (received) {
|
|
117
|
+
case CGH25.timeRequest:
|
|
118
|
+
return [command(cgh25SetTime(this.now()))];
|
|
119
|
+
case CGH25.ready:
|
|
120
|
+
return [command(cgh25Frame(CGH25.getCount))];
|
|
121
|
+
case CGH25.count:
|
|
122
|
+
this.remaining = (body[0] ?? 0) << 8 | (body[1] ?? 0);
|
|
123
|
+
return this.requestNext();
|
|
124
|
+
case CGH25.live:
|
|
125
|
+
case CGH25.record:
|
|
126
|
+
{
|
|
127
|
+
const reading = readCgh25Glucose(body);
|
|
128
|
+
if (reading) {
|
|
129
|
+
report(this.params, reading);
|
|
130
|
+
}
|
|
131
|
+
return received === CGH25.record ? this.requestNext() : undefined;
|
|
132
|
+
}
|
|
133
|
+
default:
|
|
134
|
+
return undefined;
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
requestNext = () => {
|
|
138
|
+
const index = this.remaining;
|
|
139
|
+
if (index < 1) {
|
|
140
|
+
this.finished = true;
|
|
141
|
+
return undefined;
|
|
142
|
+
}
|
|
143
|
+
this.remaining = index - 1;
|
|
144
|
+
return [command(cgh25Frame(CGH25.getRecord, [index >> 8, index & 0xff, 0, 0, 0, 0, 0, 0, 0]))];
|
|
145
|
+
};
|
|
146
|
+
now = () => this.params.now?.() ?? new Date();
|
|
147
|
+
}
|
|
148
|
+
//# sourceMappingURL=cofoe-glucose.sequencer.js.map
|
package/lib/module/modules/bt-management/services/devices/cofoe/cofoe-glucose.sequencer.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["MeasurementTypeKey","CaseType","cgh25Frame","cgh25SetTime","COFOE_GATT","kfb06Frame","kfb06SetTime","unframe","readCgh25Glucose","readKfb06Glucose","command","frame","serviceUuid","glucometer","service","characteristicUuid","write","report","params","reading","onResult","caseType","RESULT","measurementTypeKey","bloodGlucose","KFB06","handshake","getInfo","setTime","getData","ack","ok","info","header","record","GET_DATA_RETRY_MS","CofoeKfb06Sequencer","phase","sequence","constructor","initialCommands","send","isHistoryTransfer","isNormalDisconnect","commandTimeoutMs","undefined","onCommandTimeout","commands","commandProgress","nextCommand","received","body","now","code","Date","CGH25","live","timeRequest","count","ready","getRecord","getCount","CofoeCgh25Sequencer","remaining","finished","requestNext","index"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/cofoe/cofoe-glucose.sequencer.ts"],"mappings":";;AAAA;AACA,SAASA,kBAAkB,QAAQ,YAAY;AAE/C,SAASC,QAAQ,QAAQ,6BAA0B;AAInD,S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AEpB,OAAOnB,SAAS;IAClB;IAEA,IAAI,CAACkB,SAAS,GAAGG,KAAK,GAAG,CAAC;IAE1B,OAAO,CAACxD,OAAO,CAACR,UAAU,CAACqD,KAAK,CAACK,SAAS,EAAE,CAACM,KAAK,IAAI,CAAC,EAAEA,KAAK,GAAG,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;EAChG,CAAC;EAEOd,GAAG,GAAGA,CAAA,KAAY,IAAI,CAAClC,MAAM,CAACkC,GAAG,GAAG,CAAC,IAAI,IAAIE,IAAI,CAAC,CAAC;AAC7D","ignoreList":[]}
|
package/lib/module/modules/bt-management/services/devices/cofoe/cofoe-thermometer.sequencer.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { MeasurementTypeKey } from "@ovok/core";
|
|
4
|
+
import { CaseType } from "../../../types/case-type.js";
|
|
5
|
+
import { readThermometerText } from "./cofoe.records.js";
|
|
6
|
+
|
|
7
|
+
/** KF-HW-081A: one ASCII reading per notification, timed by the phone; the app never writes. */
|
|
8
|
+
class CofoeThermometerSequencer {
|
|
9
|
+
recorded = false;
|
|
10
|
+
constructor(params) {
|
|
11
|
+
this.params = params;
|
|
12
|
+
}
|
|
13
|
+
initialCommands = () => [];
|
|
14
|
+
isNormalDisconnect = () => this.recorded;
|
|
15
|
+
nextCommand = frame => {
|
|
16
|
+
const bodyTemp = readThermometerText(frame);
|
|
17
|
+
if (bodyTemp !== undefined) {
|
|
18
|
+
this.recorded = true;
|
|
19
|
+
this.params.onResult({
|
|
20
|
+
caseType: CaseType.RESULT,
|
|
21
|
+
measurementTypeKey: MeasurementTypeKey.temperature,
|
|
22
|
+
bodyTemp,
|
|
23
|
+
recordedAt: new Date()
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
return undefined;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
export { CofoeThermometerSequencer };
|
|
30
|
+
//# sourceMappingURL=cofoe-thermometer.sequencer.js.map
|
package/lib/module/modules/bt-management/services/devices/cofoe/cofoe-thermometer.sequencer.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["MeasurementTypeKey","CaseType","readThermometerText","CofoeThermometerSequencer","recorded","constructor","params","initialCommands","isNormalDisconnect","nextCommand","frame","bodyTemp","undefined","onResult","caseType","RESULT","measurementTypeKey","temperature","recordedAt","Date"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/cofoe/cofoe-thermometer.sequencer.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,YAAY;AAE/C,SAASC,QAAQ,QAAQ,6BAA0B;AAInD,SAASC,mBAAmB,QAAQ,oBAAiB;;AAErD;AACA,MAAMC,yBAAyB,CAA6B;EAClDC,QAAQ,GAAG,KAAK;EAEjBC,WAAWA,CAAkBC,MAA+D,EAAE;IAAA,KAAjEA,MAA+D,GAA/DA,MAA+D;EAAG;EAE/FC,eAAe,GAAGA,CAAA,KAAgC,EAAE;EAEpDC,kBAAkB,GAAGA,CAAA,KAAe,IAAI,CAACJ,QAAQ;EAEjDK,WAAW,GAAIC,KAAwB,IAAgB;IAC5D,MAAMC,QAAQ,GAAGT,mBAAmB,CAACQ,KAAK,CAAC;IAE3C,IAAIC,QAAQ,KAAKC,SAAS,EAAE;MAC1B,IAAI,CAACR,QAAQ,GAAG,IAAI;MACpB,IAAI,CAACE,MAAM,CAACO,QAAQ,CAAC;QACnBC,QAAQ,EAAEb,QAAQ,CAACc,MAAM;QACzBC,kBAAkB,EAAEhB,kBAAkB,CAACiB,WAAW;QAClDN,QAAQ;QACRO,UAAU,EAAE,IAAIC,IAAI,CAAC;MACvB,CAAC,CAAC;IACJ;IAEA,OAAOP,SAAS;EAClB,CAAC;AACH;AAEA,SAAST,yBAAyB","ignoreList":[]}
|