@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,181 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.mamboA5Crc32 = exports.encodeMamboA5Packet = exports.MamboA5FrameReader = exports.MAMBO_A5_WRITE = exports.MAMBO_A5_VERSION = exports.MAMBO_A5_SERVICE = exports.MAMBO_A5_NOTIFY = exports.MAMBO_A5_LOGIN = void 0;
|
|
7
|
+
var _frameReadStatus = require("../../../types/frame-read-status.js");
|
|
8
|
+
/* eslint-disable import/group-exports */
|
|
9
|
+
|
|
10
|
+
const MAMBO_A5_SERVICE = exports.MAMBO_A5_SERVICE = "0000a500-0000-1000-8000-00805f9b34fb";
|
|
11
|
+
const MAMBO_A5_LOGIN = exports.MAMBO_A5_LOGIN = "0000a501-0000-1000-8000-00805f9b34fb";
|
|
12
|
+
const MAMBO_A5_WRITE = exports.MAMBO_A5_WRITE = "0000a502-0000-1000-8000-00805f9b34fb";
|
|
13
|
+
const MAMBO_A5_NOTIFY = exports.MAMBO_A5_NOTIFY = "0000a503-0000-1000-8000-00805f9b34fb";
|
|
14
|
+
const MAMBO_A5_VERSION = exports.MAMBO_A5_VERSION = [0xaa, 0x01];
|
|
15
|
+
const MAX_LOGICAL_LENGTH = 109;
|
|
16
|
+
const byte = value => Number.parseInt(value ?? "00", 16) || 0;
|
|
17
|
+
const hex = value => (value & 0xff).toString(16).padStart(2, "0");
|
|
18
|
+
const crcTable = Array.from({
|
|
19
|
+
length: 256
|
|
20
|
+
}, (_, index) => {
|
|
21
|
+
let value = index;
|
|
22
|
+
for (let bit = 0; bit < 8; bit += 1) {
|
|
23
|
+
value = (value & 1) !== 0 ? value >>> 1 ^ 0xedb88320 : value >>> 1;
|
|
24
|
+
}
|
|
25
|
+
return value >>> 0;
|
|
26
|
+
});
|
|
27
|
+
const mamboA5Crc32 = bytes => bytes.reduce((crc, value) => (crc >>> 8 ^ (crcTable[(crc ^ value) & 0xff] ?? 0)) >>> 0, 0);
|
|
28
|
+
exports.mamboA5Crc32 = mamboA5Crc32;
|
|
29
|
+
/** Reassembles A5's indexed BLE fragments and verifies the vendor CRC before decoding. */
|
|
30
|
+
class MamboA5FrameReader {
|
|
31
|
+
pending = new Map();
|
|
32
|
+
reset = () => {
|
|
33
|
+
this.pending.clear();
|
|
34
|
+
};
|
|
35
|
+
readFrame = (buffer, uuid = "") => {
|
|
36
|
+
const key = uuid.toLowerCase();
|
|
37
|
+
let pending = this.pending.get(key);
|
|
38
|
+
if (pending && this.isStart(buffer)) {
|
|
39
|
+
this.pending.delete(key);
|
|
40
|
+
pending = undefined;
|
|
41
|
+
}
|
|
42
|
+
if (pending) {
|
|
43
|
+
const chunkLength = Math.min(19, pending.remaining);
|
|
44
|
+
const frameLength = chunkLength + 1;
|
|
45
|
+
if (buffer.length < frameLength) {
|
|
46
|
+
return {
|
|
47
|
+
status: _frameReadStatus.FrameReadStatus.INCOMPLETE,
|
|
48
|
+
consumedBytes: 0
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
if (byte(buffer[0]) !== pending.nextIndex) {
|
|
52
|
+
this.pending.delete(key);
|
|
53
|
+
return {
|
|
54
|
+
status: _frameReadStatus.FrameReadStatus.CORRUPT,
|
|
55
|
+
consumedBytes: 1
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
const packet = [...pending.packet, ...buffer.slice(1, frameLength)];
|
|
59
|
+
const remaining = pending.remaining - chunkLength;
|
|
60
|
+
if (remaining > 0) {
|
|
61
|
+
this.pending.set(key, {
|
|
62
|
+
...pending,
|
|
63
|
+
remaining,
|
|
64
|
+
nextIndex: pending.nextIndex + 1,
|
|
65
|
+
packet
|
|
66
|
+
});
|
|
67
|
+
return {
|
|
68
|
+
status: _frameReadStatus.FrameReadStatus.INCOMPLETE,
|
|
69
|
+
consumedBytes: frameLength
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
this.pending.delete(key);
|
|
73
|
+
return this.complete(pending.serial, packet, frameLength);
|
|
74
|
+
}
|
|
75
|
+
const start = buffer.findIndex((value, index) => byte(value) === 0x80 && [0x00, 0x01].includes(byte(buffer[index + 1])));
|
|
76
|
+
if (start === -1) {
|
|
77
|
+
return {
|
|
78
|
+
status: _frameReadStatus.FrameReadStatus.INCOMPLETE,
|
|
79
|
+
consumedBytes: Math.max(0, buffer.length - 1)
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
if (buffer.length < start + 3) {
|
|
83
|
+
return {
|
|
84
|
+
status: _frameReadStatus.FrameReadStatus.INCOMPLETE,
|
|
85
|
+
consumedBytes: start
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
const totalLength = byte(buffer[start + 2]);
|
|
89
|
+
if (totalLength < 4 || totalLength > MAX_LOGICAL_LENGTH) {
|
|
90
|
+
return {
|
|
91
|
+
status: _frameReadStatus.FrameReadStatus.CORRUPT,
|
|
92
|
+
consumedBytes: start + 1
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
const serial = buffer.slice(start, start + 2);
|
|
96
|
+
if (totalLength <= 16) {
|
|
97
|
+
const frameLength = totalLength + 4;
|
|
98
|
+
if (buffer.length < start + frameLength) {
|
|
99
|
+
return {
|
|
100
|
+
status: _frameReadStatus.FrameReadStatus.INCOMPLETE,
|
|
101
|
+
consumedBytes: start
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
return this.complete(serial, buffer.slice(start + 4, start + frameLength), start + frameLength);
|
|
105
|
+
}
|
|
106
|
+
const firstLength = 20;
|
|
107
|
+
if (buffer.length < start + firstLength) {
|
|
108
|
+
return {
|
|
109
|
+
status: _frameReadStatus.FrameReadStatus.INCOMPLETE,
|
|
110
|
+
consumedBytes: start
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
if (byte(buffer[start + 3]) !== 1) {
|
|
114
|
+
return {
|
|
115
|
+
status: _frameReadStatus.FrameReadStatus.CORRUPT,
|
|
116
|
+
consumedBytes: start + 1
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
const packet = buffer.slice(start + 4, start + firstLength);
|
|
120
|
+
const remaining = totalLength - packet.length;
|
|
121
|
+
this.pending.set(key, {
|
|
122
|
+
serial,
|
|
123
|
+
remaining,
|
|
124
|
+
nextIndex: 2,
|
|
125
|
+
packet
|
|
126
|
+
});
|
|
127
|
+
return {
|
|
128
|
+
status: _frameReadStatus.FrameReadStatus.INCOMPLETE,
|
|
129
|
+
consumedBytes: start + firstLength
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
isStart = buffer => byte(buffer[0]) === 0x80 && [0x00, 0x01].includes(byte(buffer[1]));
|
|
133
|
+
complete = (serial, packetAndCrc, consumedBytes) => {
|
|
134
|
+
if (packetAndCrc.length < 4) {
|
|
135
|
+
return {
|
|
136
|
+
status: _frameReadStatus.FrameReadStatus.CORRUPT,
|
|
137
|
+
consumedBytes
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
const payload = packetAndCrc.slice(0, -4);
|
|
141
|
+
const expectedCrc = Number.parseInt(packetAndCrc.slice(-4).join(""), 16) >>> 0;
|
|
142
|
+
const actualCrc = mamboA5Crc32(payload.map(byte));
|
|
143
|
+
if (actualCrc !== expectedCrc) {
|
|
144
|
+
return {
|
|
145
|
+
status: _frameReadStatus.FrameReadStatus.CORRUPT,
|
|
146
|
+
consumedBytes
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
return {
|
|
150
|
+
status: _frameReadStatus.FrameReadStatus.COMPLETE,
|
|
151
|
+
consumedBytes,
|
|
152
|
+
frame: [...serial, ...payload]
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
exports.MamboA5FrameReader = MamboA5FrameReader;
|
|
157
|
+
const encodeMamboA5Packet = (serial, payload, versioned) => {
|
|
158
|
+
const logical = [...(versioned ? MAMBO_A5_VERSION : []), ...payload];
|
|
159
|
+
const packetLength = logical.length + 4;
|
|
160
|
+
if (serial.length !== 2 || packetLength > MAX_LOGICAL_LENGTH) {
|
|
161
|
+
return [];
|
|
162
|
+
}
|
|
163
|
+
const crc = mamboA5Crc32(logical);
|
|
164
|
+
const packet = [...logical, crc >>> 24 & 0xff, crc >>> 16 & 0xff, crc >>> 8 & 0xff, crc & 0xff];
|
|
165
|
+
if (packetLength <= 16) {
|
|
166
|
+
return [[...serial, hex(packetLength), "01", ...packet.map(hex)]];
|
|
167
|
+
}
|
|
168
|
+
const fragments = [];
|
|
169
|
+
let offset = 0;
|
|
170
|
+
let index = 1;
|
|
171
|
+
while (offset < packet.length) {
|
|
172
|
+
const capacity = index === 1 ? 16 : 19;
|
|
173
|
+
const chunk = packet.slice(offset, offset + capacity);
|
|
174
|
+
fragments.push(index === 1 ? [...serial, hex(packetLength), hex(index), ...chunk.map(hex)] : [hex(index), ...chunk.map(hex)]);
|
|
175
|
+
offset += chunk.length;
|
|
176
|
+
index += 1;
|
|
177
|
+
}
|
|
178
|
+
return fragments;
|
|
179
|
+
};
|
|
180
|
+
exports.encodeMamboA5Packet = encodeMamboA5Packet;
|
|
181
|
+
//# sourceMappingURL=mambo-a5.protocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_frameReadStatus","require","MAMBO_A5_SERVICE","exports","MAMBO_A5_LOGIN","MAMBO_A5_WRITE","MAMBO_A5_NOTIFY","MAMBO_A5_VERSION","MAX_LOGICAL_LENGTH","byte","value","Number","parseInt","hex","toString","padStart","crcTable","Array","from","length","_","index","bit","mamboA5Crc32","bytes","reduce","crc","MamboA5FrameReader","pending","Map","reset","clear","readFrame","buffer","uuid","key","toLowerCase","get","isStart","delete","undefined","chunkLength","Math","min","remaining","frameLength","status","FrameReadStatus","INCOMPLETE","consumedBytes","nextIndex","CORRUPT","packet","slice","set","complete","serial","start","findIndex","includes","max","totalLength","firstLength","packetAndCrc","payload","expectedCrc","join","actualCrc","map","COMPLETE","frame","encodeMamboA5Packet","versioned","logical","packetLength","fragments","offset","capacity","chunk","push"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/transtek/mambo-a5.protocol.ts"],"mappings":";;;;;;AAGA,IAAAA,gBAAA,GAAAC,OAAA;AAHA;;AAMO,MAAMC,gBAAgB,GAAAC,OAAA,CAAAD,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AAG,CAAC6D,YAAY,CAAC,EAAE7D,GAAG,CAACQ,KAAK,CAAC,EAAE,GAAGyD,KAAK,CAACV,GAAG,CAACvD,GAAG,CAAC,CAAC,GAC7D,CAACA,GAAG,CAACQ,KAAK,CAAC,EAAE,GAAGyD,KAAK,CAACV,GAAG,CAACvD,GAAG,CAAC,CACpC,CAAC;IACD+D,MAAM,IAAIE,KAAK,CAAC3D,MAAM;IACtBE,KAAK,IAAI,CAAC;EACZ;EAEA,OAAOsD,SAAS;AAClB,CAAC;AAACxE,OAAA,CAAAoE,mBAAA,GAAAA,mBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.MamboA5Sequencer = void 0;
|
|
7
|
+
var _core = require("@ovok/core");
|
|
8
|
+
var _caseType = require("../../../types/case-type.js");
|
|
9
|
+
var _mamboA5Measurements = require("./mambo-a5.measurements.js");
|
|
10
|
+
var _mamboA5Protocol = require("./mambo-a5.protocol.js");
|
|
11
|
+
const command = frame => ({
|
|
12
|
+
serviceUuid: _mamboA5Protocol.MAMBO_A5_SERVICE,
|
|
13
|
+
characteristicUuid: _mamboA5Protocol.MAMBO_A5_WRITE,
|
|
14
|
+
frame
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
/** Performs the safe login/time exchange and decodes A5 blood-oxygen history. */
|
|
18
|
+
class MamboA5Sequencer {
|
|
19
|
+
constructor(options) {
|
|
20
|
+
this.options = options;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// shortcut: 0x62 pairing needs mode and burn-code inputs; add them before unpaired tracking.
|
|
24
|
+
initialCommands = () => [];
|
|
25
|
+
isHistoryTransfer = () => true;
|
|
26
|
+
nextCommand = (frame, uuid) => {
|
|
27
|
+
if (frame.length < 3) {
|
|
28
|
+
return [];
|
|
29
|
+
}
|
|
30
|
+
const serial = frame.slice(0, 2);
|
|
31
|
+
const hasVersion = frame[2]?.toLowerCase() === "aa" && frame[3]?.toLowerCase() === "01";
|
|
32
|
+
const payload = frame.slice(hasVersion ? 4 : 2).map(value => Number.parseInt(value, 16));
|
|
33
|
+
const packetMarker = serial.join("").toLowerCase();
|
|
34
|
+
const isLogin = packetMarker === "8001" || /a501$/i.test(uuid ?? "");
|
|
35
|
+
if (isLogin) {
|
|
36
|
+
if (payload[0] === 0x62 || payload[0] === 0x63) {
|
|
37
|
+
return [];
|
|
38
|
+
}
|
|
39
|
+
const now = this.options.clockSync?.now?.() ?? new Date();
|
|
40
|
+
const seconds = Math.floor(now.getTime() / 1000);
|
|
41
|
+
const timezone = this.options.clockSync?.timezone === "utc" ? 48 : 48 - Math.round(now.getTimezoneOffset() / 15);
|
|
42
|
+
const loginResponse = [0x01, seconds >>> 24 & 0xff, seconds >>> 16 & 0xff, seconds >>> 8 & 0xff, seconds & 0xff, timezone, 0x02];
|
|
43
|
+
return (0, _mamboA5Protocol.encodeMamboA5Packet)(serial, loginResponse, hasVersion).map(command);
|
|
44
|
+
}
|
|
45
|
+
if (packetMarker !== "8000") {
|
|
46
|
+
return [];
|
|
47
|
+
}
|
|
48
|
+
if (payload.length === 0) {
|
|
49
|
+
return [];
|
|
50
|
+
}
|
|
51
|
+
const dataType = payload[0] ?? 0;
|
|
52
|
+
const oxygenRecords = (0, _mamboA5Measurements.parseMamboA5Oxygen)(payload);
|
|
53
|
+
oxygenRecords.forEach(record => {
|
|
54
|
+
this.options.onResult({
|
|
55
|
+
caseType: _caseType.CaseType.RESULT,
|
|
56
|
+
measurementTypeKey: _core.MeasurementTypeKey.bloodOxygenPulseRate,
|
|
57
|
+
...record
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
// Oxygen history uses the same command/device-type acknowledgement as the vendor sync worker.
|
|
62
|
+
if (dataType === 0x50) {
|
|
63
|
+
// shortcut: 0x50 needs user settings, add a profile input before answering it.
|
|
64
|
+
return [];
|
|
65
|
+
}
|
|
66
|
+
if (dataType !== 0x83 && dataType !== 0x8e) {
|
|
67
|
+
return [];
|
|
68
|
+
}
|
|
69
|
+
return (0, _mamboA5Protocol.encodeMamboA5Packet)(serial, [dataType, 0x01], hasVersion).flatMap(frameBytes => [command(frameBytes)]);
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
exports.MamboA5Sequencer = MamboA5Sequencer;
|
|
73
|
+
//# sourceMappingURL=mambo-a5.sequencer.js.map
|
package/lib/commonjs/modules/bt-management/services/devices/transtek/mambo-a5.sequencer.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_core","require","_caseType","_mamboA5Measurements","_mamboA5Protocol","command","frame","serviceUuid","MAMBO_A5_SERVICE","characteristicUuid","MAMBO_A5_WRITE","MamboA5Sequencer","constructor","options","initialCommands","isHistoryTransfer","nextCommand","uuid","length","serial","slice","hasVersion","toLowerCase","payload","map","value","Number","parseInt","packetMarker","join","isLogin","test","now","clockSync","Date","seconds","Math","floor","getTime","timezone","round","getTimezoneOffset","loginResponse","encodeMamboA5Packet","dataType","oxygenRecords","parseMamboA5Oxygen","forEach","record","onResult","caseType","CaseType","RESULT","measurementTypeKey","MeasurementTypeKey","bloodOxygenPulseRate","flatMap","frameBytes","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/transtek/mambo-a5.sequencer.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AAQA,IAAAE,oBAAA,GAAAF,OAAA;AACA,IAAAG,gBAAA,GAAAH,OAAA;AAeA,MAAMI,OAAO,GAAIC,KAAwB,KAAqB;EAC5DC,WAAW,EAAEC,iCAAgB;EAC7BC,kBAAkB,EAAEC,+BAAc;EAClCJ;AACF,CAAC,CAAC;;AAEF;AACO,MAAMK,gBAAgB,CAA6B;EACjDC,WAAWA,CAAkBC,OAAgC,EAAE;IAAA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,UAAU,CAAC,CAACmC,OAAO,CACrEC,UAAU,IAAK,CAACpD,OAAO,CAACoD,UAAU,CAAC,CACtC,CAAC;EACH,CAAC;AACH;AAACC,OAAA,CAAA/C,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.YonkerDevice = void 0;
|
|
7
|
+
var _integratedDevices = require("../../../types/integrated-devices.js");
|
|
8
|
+
var _btManagedDevice = require("../bt-managed-device.js");
|
|
9
|
+
var _liveOximeterSequencer = require("../live-oximeter.sequencer.js");
|
|
10
|
+
var _yonkerProtocol = require("./yonker.protocol.js");
|
|
11
|
+
var _yonkerSequencer = require("./yonker.sequencer.js");
|
|
12
|
+
const passThrough = {
|
|
13
|
+
caseValuePosition: [],
|
|
14
|
+
cases: []
|
|
15
|
+
};
|
|
16
|
+
const service = (uuid, notify, optional = false) => ({
|
|
17
|
+
uuid,
|
|
18
|
+
optional,
|
|
19
|
+
monitorUuids: notify.map(monitor => ({
|
|
20
|
+
uuid: monitor,
|
|
21
|
+
parsingModel: passThrough
|
|
22
|
+
}))
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
/** MedM subscribes to all three; the type byte, not the characteristic, says what a frame is. */
|
|
26
|
+
const YONKER_SERVICES = [service(_yonkerProtocol.YONKER_GATT.service, [_yonkerProtocol.YONKER_GATT.notify, _yonkerProtocol.YONKER_GATT.notifyAlternate], true), service(_yonkerProtocol.YONKER_GATT.uartService, [_yonkerProtocol.YONKER_GATT.uartNotify], true)];
|
|
27
|
+
const SERVICES = {
|
|
28
|
+
[_integratedDevices.IntegratedDevices.YONKER_OXIMETER]: YONKER_SERVICES,
|
|
29
|
+
[_integratedDevices.IntegratedDevices.YONKER_BPM]: YONKER_SERVICES,
|
|
30
|
+
[_integratedDevices.IntegratedDevices.YONKER_THERMOMETER]: YONKER_SERVICES,
|
|
31
|
+
[_integratedDevices.IntegratedDevices.YONKER_SCALE]: [service(_yonkerProtocol.AILINK_GATT.service, [_yonkerProtocol.AILINK_GATT.notify])],
|
|
32
|
+
[_integratedDevices.IntegratedDevices.YONKER_80B]: [service(_yonkerProtocol.AILINK_GATT.service, [_yonkerProtocol.AILINK_GATT.notify])]
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/** The YK-80B: MedM asks for the firmware version on connect, then reads the stream. */
|
|
36
|
+
class Yonker80bSequencer extends _liveOximeterSequencer.LiveOximeterSequencer {
|
|
37
|
+
initialCommands = () => [{
|
|
38
|
+
serviceUuid: _yonkerProtocol.AILINK_GATT.service,
|
|
39
|
+
characteristicUuid: _yonkerProtocol.AILINK_GATT.writeShort,
|
|
40
|
+
frame: _yonkerProtocol.FIRMWARE_REQUEST
|
|
41
|
+
}];
|
|
42
|
+
}
|
|
43
|
+
const SEQUENCERS = {
|
|
44
|
+
[_integratedDevices.IntegratedDevices.YONKER_OXIMETER]: onResult => new _liveOximeterSequencer.LiveOximeterSequencer({
|
|
45
|
+
readValues: frame => (0, _liveOximeterSequencer.readOximeterData)(frame, _liveOximeterSequencer.AOJ_VALUES, "spo2-pulse"),
|
|
46
|
+
onResult
|
|
47
|
+
}),
|
|
48
|
+
[_integratedDevices.IntegratedDevices.YONKER_BPM]: onResult => new _yonkerSequencer.YonkerSequencer({
|
|
49
|
+
kind: "blood-pressure",
|
|
50
|
+
onResult
|
|
51
|
+
}),
|
|
52
|
+
[_integratedDevices.IntegratedDevices.YONKER_THERMOMETER]: onResult => new _yonkerSequencer.YonkerSequencer({
|
|
53
|
+
kind: "thermometer",
|
|
54
|
+
onResult
|
|
55
|
+
}),
|
|
56
|
+
[_integratedDevices.IntegratedDevices.YONKER_SCALE]: onResult => new _yonkerSequencer.YonkerScaleSequencer({
|
|
57
|
+
onResult
|
|
58
|
+
}),
|
|
59
|
+
[_integratedDevices.IntegratedDevices.YONKER_80B]: onResult => new Yonker80bSequencer({
|
|
60
|
+
readValues: _yonkerProtocol.read80bMeasurement,
|
|
61
|
+
onResult
|
|
62
|
+
})
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Yonker YK-81C oximeters, YK-BPA blood-pressure monitors, YK-IRT4 thermometers, the AiLink
|
|
67
|
+
* weight scale and the YK-80B oximeter, with their rebrands.
|
|
68
|
+
*/
|
|
69
|
+
class YonkerDeviceClass extends _btManagedDevice.BTManagedDevice {
|
|
70
|
+
stuckDataTimeout = 120_000;
|
|
71
|
+
onStreamStart = undefined;
|
|
72
|
+
constructor(device, params) {
|
|
73
|
+
super(device, params);
|
|
74
|
+
this.mainServices = SERVICES[params.deviceName];
|
|
75
|
+
if (params.deviceName === _integratedDevices.IntegratedDevices.YONKER_SCALE) {
|
|
76
|
+
this.frameReader = new _yonkerProtocol.AilinkFrameReader([0xa7]);
|
|
77
|
+
} else if (params.deviceName === _integratedDevices.IntegratedDevices.YONKER_80B) {
|
|
78
|
+
this.frameReader = new _yonkerProtocol.AilinkFrameReader([0xa6, 0xa7]);
|
|
79
|
+
}
|
|
80
|
+
this.createCommandSequencer = () => SEQUENCERS[params.deviceName](result => this.onResult?.(result));
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/** The oximeter, monitor and thermometer send one frame per notification. */
|
|
84
|
+
validatePackage = () => true;
|
|
85
|
+
handleSuccessResult() {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
exports.YonkerDevice = YonkerDeviceClass;
|
|
90
|
+
//# sourceMappingURL=yonker.device.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_integratedDevices","require","_btManagedDevice","_liveOximeterSequencer","_yonkerProtocol","_yonkerSequencer","passThrough","caseValuePosition","cases","service","uuid","notify","optional","monitorUuids","map","monitor","parsingModel","YONKER_SERVICES","YONKER_GATT","notifyAlternate","uartService","uartNotify","SERVICES","IntegratedDevices","YONKER_OXIMETER","YONKER_BPM","YONKER_THERMOMETER","YONKER_SCALE","AILINK_GATT","YONKER_80B","Yonker80bSequencer","LiveOximeterSequencer","initialCommands","serviceUuid","characteristicUuid","writeShort","frame","FIRMWARE_REQUEST","SEQUENCERS","onResult","readValues","readOximeterData","AOJ_VALUES","YonkerSequencer","kind","YonkerScaleSequencer","read80bMeasurement","YonkerDeviceClass","BTManagedDevice","stuckDataTimeout","onStreamStart","undefined","constructor","device","params","mainServices","deviceName","frameReader","AilinkFrameReader","createCommandSequencer","result","validatePackage","handleSuccessResult","exports","YonkerDevice"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/yonker/yonker.device.ts"],"mappings":";;;;;;AAKA,IAAAA,kBAAA,GAAAC,OAAA;AAGA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAF,OAAA;AAEA,IAAAG,eAAA,GAAAH,OAAA;AAOA,IAAAI,gBAAA,GAAAJ,OAAA;AAWA,MAAMK,WAAW,GAAG;EAAEC,iBAAiB,EAAE,EAAE;EAAEC,KAAK,EAAE;AAAG,CAAC;AAExD,MAAMC,OAAO,GAAGA,CAACC,IAAY,EAAEC,MAAyB,EAAEC,QAAQ,GAAG,KAAK,MAAgB;EACxFF,IAAI;EACJE,QAAQ;EACRC,YAAY,EAAEF,MAAM,CAACG,GAAG,CAAEC,OAAO,KAAM;IAAEL,IAAI,EAAEK,OAAO;IAAEC,YAAY,EAAEV;EAAY,CAAC,CAAC;AACtF,CAAC,CAAC;;AAEF;AACA,MAAMW,eAA2B,GAAG,CAClCR,OAAO,CAACS,2BAAW,CAACT,OAAO,EAAE,CAACS,2BAAW,CAACP,MAAM,EAAEO,2BAAW,CAACC,eAAe,CAAC,EAAE,IAAI,CAAC,EACrFV,OAAO,CAACS,2BAAW,CAACE,WAAW,EAAE,CAACF,2BAAW,CAACG,UAAU,CAAC,EAAE,IAAI,CAAC,CACjE;AAED,MAAMC,QAA0C,GAAG;EAC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AAIU,QAAQ,IACvC,IAAIT,kBAAkB,CAAC;IAAEU,UAAU,EAAEM,kCAAkB;IAAEP;EAAS,CAAC;AACvE,CAAC;;AAED;AACA;AACA;AACA;AACA,MAAMQ,iBAAiB,SAASC,gCAAe,CAAe;EAElDC,gBAAgB,GAAG,OAAO;EAC1BC,aAAa,GAAGC,SAAS;EAE5BC,WAAWA,CAACC,MAAc,EAAEC,MAAwC,EAAE;IAC3E,KAAK,CAACD,MAAM,EAAEC,MAAM,CAAC;IACrB,IAAI,CAACC,YAAY,GAAGjC,QAAQ,CAACgC,MAAM,CAACE,UAAU,CAAC;IAE/C,IAAIF,MAAM,CAACE,UAAU,KAAKjC,oCAAiB,CAACI,YAAY,EAAE;MACxD,IAAI,CAAC8B,WAAW,GAAG,IAAIC,iCAAiB,CAAC,CAAC,IAAI,CAAC,CAAC;IAClD,CAAC,MAAM,IAAIJ,MAAM,CAACE,UAAU,KAAKjC,oCAAiB,CAACM,UAAU,EAAE;MAC7D,IAAI,CAAC4B,WAAW,GAAG,IAAIC,iCAAiB,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACxD;IAEA,IAAI,CAACC,sBAAsB,GAAG,MAC5BrB,UAAU,CAACgB,MAAM,CAACE,UAAU,CAAC,CAAEI,MAAM,IACnC,IAAI,CAACrB,QAAQ,GACXqB,MACF,CACF,CAAC;EACL;;EAEA;EACUC,eAAe,GAAGA,CAAA,KAAe,IAAI;EAErCC,mBAAmBA,CAAA,EAAS;IACpC;EACF;AACF;AAACC,OAAA,CAAAC,YAAA,GAAAjB,iBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.shortFrame = exports.scaleSetTimeCommand = exports.readYonkerTemperature = exports.readYonkerBloodPressure = exports.readScaleWeight = exports.read80bMeasurement = exports.longFrame = exports.idOf = exports.commandOf = exports.bpmSetTimeCommand = exports.bodyOf = exports.YONKER_GATT = exports.FIRMWARE_REQUEST = exports.AilinkFrameReader = exports.AILINK_GATT = void 0;
|
|
7
|
+
var _frameReadStatus = require("../../../types/frame-read-status.js");
|
|
8
|
+
var _hexToByte = require("../../../utils/hex-to-byte.js");
|
|
9
|
+
/* eslint-disable import/group-exports */
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Yonker devices and their rebrands, from MedM Health Diary 3.12.11's `CYonker_*` classes.
|
|
13
|
+
*
|
|
14
|
+
* The oximeter, blood-pressure monitor and thermometer share one GATT map and send one frame
|
|
15
|
+
* per notification: a type byte (`80` live, `81` result) and its values, no length, no
|
|
16
|
+
* checksum. The scale (an AiLink module, MedM's `CConmo_WeightScale`) and the YK-80B oximeter
|
|
17
|
+
* frame everything as `A6|A7 xx xx LL CMD body CS 7A`.
|
|
18
|
+
*/
|
|
19
|
+
const sig16 = assigned => `0000${assigned}-0000-1000-8000-00805f9b34fb`;
|
|
20
|
+
const YONKER_GATT = exports.YONKER_GATT = {
|
|
21
|
+
service: "cdeacd80-5235-4c07-8846-93a37ee6b86d",
|
|
22
|
+
notify: "cdeacd81-5235-4c07-8846-93a37ee6b86d",
|
|
23
|
+
notifyAlternate: "cdeacd82-5235-4c07-8846-93a37ee6b86d",
|
|
24
|
+
/** Nordic UART; MedM subscribes to its `…0002` characteristic. */
|
|
25
|
+
uartService: "6e400001-b5a3-f393-e0a9-e50e24dcca9e",
|
|
26
|
+
uartNotify: "6e400002-b5a3-f393-e0a9-e50e24dcca9e",
|
|
27
|
+
/** Where the blood-pressure monitor takes its clock. */
|
|
28
|
+
timeService: sig16("1804"),
|
|
29
|
+
timeWrite: sig16("2a07")
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/** The scale and the YK-80B: notify on `ffe2`, long frames to `ffe1`, short ones to `ffe3`. */
|
|
33
|
+
const AILINK_GATT = exports.AILINK_GATT = {
|
|
34
|
+
service: sig16("ffe0"),
|
|
35
|
+
writeLong: sig16("ffe1"),
|
|
36
|
+
notify: sig16("ffe2"),
|
|
37
|
+
writeShort: sig16("ffe3")
|
|
38
|
+
};
|
|
39
|
+
const bytes = frame => frame.map(byte => (0, _hexToByte.hexToByte)(byte));
|
|
40
|
+
const toHex = values => values.map(value => (value & 0xff).toString(16).padStart(2, "0"));
|
|
41
|
+
const sum = values => values.reduce((total, value) => total + value, 0) & 0xff;
|
|
42
|
+
|
|
43
|
+
/** `8F YY MM DD hh mm` and nine zero bytes, local time. */
|
|
44
|
+
const bpmSetTimeCommand = now => toHex([0x8f, now.getFullYear() - 2000, now.getMonth() + 1, now.getDate(), now.getHours(), now.getMinutes(), ...new Array(9).fill(0)]);
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* `81 SYS DIA PULSE USER RECORD YY MM DD hh mm`, mmHg, local time. A zero year means the clock
|
|
48
|
+
* was never set, and the phone's time is used, as MedM does.
|
|
49
|
+
*/
|
|
50
|
+
exports.bpmSetTimeCommand = bpmSetTimeCommand;
|
|
51
|
+
const readYonkerBloodPressure = (frame, now) => {
|
|
52
|
+
const b = bytes(frame);
|
|
53
|
+
if (b.length < 11 || b[0] !== 0x81 || !b[1] || !b[2]) {
|
|
54
|
+
return undefined;
|
|
55
|
+
}
|
|
56
|
+
const year = b[6] ?? 0;
|
|
57
|
+
const user = b[4] ?? 0;
|
|
58
|
+
return {
|
|
59
|
+
systolic: b[1],
|
|
60
|
+
diastolic: b[2],
|
|
61
|
+
...(b[3] ? {
|
|
62
|
+
heartRate: b[3]
|
|
63
|
+
} : {}),
|
|
64
|
+
recordedAt: year === 0 ? now : new Date(2000 + year, (b[7] ?? 1) - 1, b[8] ?? 1, b[9] ?? 0, b[10] ?? 0),
|
|
65
|
+
...(user > 0 ? {
|
|
66
|
+
memorySlot: user
|
|
67
|
+
} : {})
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* `80 hi lo FLAGS X`: hundredths of a degree; flags bit 1 marks Fahrenheit, which MedM ignores
|
|
73
|
+
* and the SDK converts.
|
|
74
|
+
*/
|
|
75
|
+
exports.readYonkerBloodPressure = readYonkerBloodPressure;
|
|
76
|
+
const readYonkerTemperature = frame => {
|
|
77
|
+
const b = bytes(frame);
|
|
78
|
+
if (b.length < 5 || b[0] !== 0x80) {
|
|
79
|
+
return undefined;
|
|
80
|
+
}
|
|
81
|
+
const value = ((b[1] ?? 0) << 8 | (b[2] ?? 0)) / 100;
|
|
82
|
+
if (value === 0) {
|
|
83
|
+
return undefined;
|
|
84
|
+
}
|
|
85
|
+
return ((b[3] ?? 0) & 0x02) !== 0 ? Math.round((value - 32) * 5 / 9 * 100) / 100 : value;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
/** `A7 ID ID (n+1) CMD payload CS 7A`, the checksum covering everything but the first byte. */
|
|
89
|
+
exports.readYonkerTemperature = readYonkerTemperature;
|
|
90
|
+
const longFrame = (id, command, payload = []) => {
|
|
91
|
+
const covered = [id >> 8, id & 0xff, payload.length + 1, command, ...payload];
|
|
92
|
+
return toHex([0xa7, ...covered, sum(covered), 0x7a]);
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
/** `A6 (n+1) CMD payload CS 6A`. */
|
|
96
|
+
exports.longFrame = longFrame;
|
|
97
|
+
const shortFrame = (command, payload = []) => {
|
|
98
|
+
const covered = [payload.length + 1, command, ...payload];
|
|
99
|
+
return toHex([0xa6, ...covered, sum(covered), 0x6a]);
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
/** Scale set time, command `37`: `YY MM DD hh mm ss weekday` (Sunday 1), local time. */
|
|
103
|
+
exports.shortFrame = shortFrame;
|
|
104
|
+
const scaleSetTimeCommand = now => shortFrame(0x37, [now.getFullYear() - 2000, now.getMonth() + 1, now.getDate(), now.getHours(), now.getMinutes(), now.getSeconds(), now.getDay() + 1]);
|
|
105
|
+
exports.scaleSetTimeCommand = scaleSetTimeCommand;
|
|
106
|
+
const idOf = frame => (0, _hexToByte.hexToByte)(frame[1] ?? "00") << 8 | (0, _hexToByte.hexToByte)(frame[2] ?? "00");
|
|
107
|
+
exports.idOf = idOf;
|
|
108
|
+
const commandOf = frame => (0, _hexToByte.hexToByte)(frame[4] ?? "00");
|
|
109
|
+
exports.commandOf = commandOf;
|
|
110
|
+
const bodyOf = frame => bytes(frame.slice(5, -2));
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Scale weight, command `02`: a u24 big-endian raw value, then precision (high nibble, decimal
|
|
114
|
+
* places) and unit (low nibble). Only kilograms (unit 0) are accepted - the SDK sets the scale to
|
|
115
|
+
* kilograms, and the other unit codes are not documented.
|
|
116
|
+
*/
|
|
117
|
+
exports.bodyOf = bodyOf;
|
|
118
|
+
const readScaleWeight = body => {
|
|
119
|
+
const raw = (body[0] ?? 0) << 16 | (body[1] ?? 0) << 8 | (body[2] ?? 0);
|
|
120
|
+
const format = body[3] ?? 0;
|
|
121
|
+
if (body.length < 4 || raw === 0 || (format & 0x0f) !== 0) {
|
|
122
|
+
return undefined;
|
|
123
|
+
}
|
|
124
|
+
return raw / 10 ** (format >> 4);
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* YK-80B measurement, command `03`: status, SpO2, pulse, PI×10, battery, RR×10, waveform, bar,
|
|
129
|
+
* worn. Dropped when the status or worn flag is zero or the SpO2 is `FF`, as MedM does.
|
|
130
|
+
*/
|
|
131
|
+
exports.readScaleWeight = readScaleWeight;
|
|
132
|
+
const read80bMeasurement = frame => {
|
|
133
|
+
const body = bodyOf(frame);
|
|
134
|
+
if (commandOf(frame) !== 0x03 || body.length < 9) {
|
|
135
|
+
return undefined;
|
|
136
|
+
}
|
|
137
|
+
const [status = 0, bloodOxygen = 0, pulseRate = 0, perfusionIndex = 0] = body;
|
|
138
|
+
if (status === 0 || body[8] === 0 || bloodOxygen === 0 || bloodOxygen > 100 || pulseRate === 0 || pulseRate === 0xff) {
|
|
139
|
+
return undefined;
|
|
140
|
+
}
|
|
141
|
+
return {
|
|
142
|
+
bloodOxygen,
|
|
143
|
+
pulseRate,
|
|
144
|
+
...(perfusionIndex > 0 && perfusionIndex !== 0xff ? {
|
|
145
|
+
perfusionIndex: perfusionIndex / 10
|
|
146
|
+
} : {})
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
/** YK-80B firmware request, the one command MedM writes to it. */
|
|
151
|
+
exports.read80bMeasurement = read80bMeasurement;
|
|
152
|
+
const FIRMWARE_REQUEST = exports.FIRMWARE_REQUEST = shortFrame(0x0e);
|
|
153
|
+
|
|
154
|
+
/** Isolates checked `A7 … 7A` frames (and `A6 … 7A` for the YK-80B) across notifications. */
|
|
155
|
+
class AilinkFrameReader {
|
|
156
|
+
constructor(starts) {
|
|
157
|
+
this.starts = starts;
|
|
158
|
+
}
|
|
159
|
+
readFrame(buffer) {
|
|
160
|
+
const values = bytes(buffer);
|
|
161
|
+
const start = values.findIndex(value => this.starts.includes(value));
|
|
162
|
+
if (start === -1) {
|
|
163
|
+
return {
|
|
164
|
+
status: _frameReadStatus.FrameReadStatus.INCOMPLETE,
|
|
165
|
+
consumedBytes: values.length
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
if (start + 4 > values.length) {
|
|
169
|
+
return {
|
|
170
|
+
status: _frameReadStatus.FrameReadStatus.INCOMPLETE,
|
|
171
|
+
consumedBytes: start
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
const length = (values[start + 3] ?? 0) + 6;
|
|
175
|
+
if (length < 7) {
|
|
176
|
+
return {
|
|
177
|
+
status: _frameReadStatus.FrameReadStatus.CORRUPT,
|
|
178
|
+
consumedBytes: start + 1
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
if (start + length > values.length) {
|
|
182
|
+
return {
|
|
183
|
+
status: _frameReadStatus.FrameReadStatus.INCOMPLETE,
|
|
184
|
+
consumedBytes: start
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
const received = values.slice(start, start + length);
|
|
188
|
+
if (received[length - 1] !== 0x7a || received[length - 2] !== sum(received.slice(1, -2))) {
|
|
189
|
+
return {
|
|
190
|
+
status: _frameReadStatus.FrameReadStatus.CORRUPT,
|
|
191
|
+
consumedBytes: start + 1
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
return {
|
|
195
|
+
status: _frameReadStatus.FrameReadStatus.COMPLETE,
|
|
196
|
+
consumedBytes: start + length,
|
|
197
|
+
frame: buffer.slice(start, start + length)
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
exports.AilinkFrameReader = AilinkFrameReader;
|
|
202
|
+
//# sourceMappingURL=yonker.protocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_frameReadStatus","require","_hexToByte","sig16","assigned","YONKER_GATT","exports","service","notify","notifyAlternate","uartService","uartNotify","timeService","timeWrite","AILINK_GATT","writeLong","writeShort","bytes","frame","map","byte","hexToByte","toHex","values","value","toString","padStart","sum","reduce","total","bpmSetTimeCommand","now","getFullYear","getMonth","getDate","getHours","getMinutes","Array","fill","readYonkerBloodPressure","b","length","undefined","year","user","systolic","diastolic","heartRate","recordedAt","Date","memorySlot","readYonkerTemperature","Math","round","longFrame","id","command","payload","covered","shortFrame","scaleSetTimeCommand","getSeconds","getDay","idOf","commandOf","bodyOf","slice","readScaleWeight","body","raw","format","read80bMeasurement","status","bloodOxygen","pulseRate","perfusionIndex","FIRMWARE_REQUEST","AilinkFrameReader","constructor","starts","readFrame","buffer","start","findIndex","includes","FrameReadStatus","INCOMPLETE","consumedBytes","CORRUPT","received","COMPLETE"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/yonker/yonker.protocol.ts"],"mappings":";;;;;;AAGA,IAAAA,gBAAA,GAAAC,OAAA;AAEA,IAAAC,UAAA,GAAAD,OAAA;AALA;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;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