@ovok/native 1.10.12 → 1.10.14
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/components/btdevice-instruction.js +1 -1
- package/lib/commonjs/modules/bt-device/components/btdevice-instruction.js.map +1 -1
- package/lib/commonjs/modules/bt-device/constants/device-instruction-pdfs.js +4 -78
- package/lib/commonjs/modules/bt-device/constants/device-instruction-pdfs.js.map +1 -1
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-transtek-a6-bp-variants.js +577 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-transtek-a6-bp-variants.js.map +1 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-variants.js +2 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-variants.js.map +1 -1
- package/lib/commonjs/modules/bt-management/constants/built-in-measurement-types.js +1 -0
- package/lib/commonjs/modules/bt-management/constants/built-in-measurement-types.js.map +1 -1
- package/lib/commonjs/modules/bt-management/constants/device-variants.js +2 -1
- package/lib/commonjs/modules/bt-management/constants/device-variants.js.map +1 -1
- package/lib/commonjs/modules/bt-management/constants/no-parsing-cases.js +12 -0
- package/lib/commonjs/modules/bt-management/constants/no-parsing-cases.js.map +1 -0
- package/lib/commonjs/modules/bt-management/constants/transtek-a6-bp-device-variants.js +478 -0
- package/lib/commonjs/modules/bt-management/constants/transtek-a6-bp-device-variants.js.map +1 -0
- package/lib/commonjs/modules/bt-management/core/resolve-device-key.js +8 -1
- package/lib/commonjs/modules/bt-management/core/resolve-device-key.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/device-classes.js +3 -2
- package/lib/commonjs/modules/bt-management/services/device-classes.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/a606/a606.device.js +0 -4
- package/lib/commonjs/modules/bt-management/services/devices/a606/a606.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/and-medical/and-medical.device.js +3 -10
- package/lib/commonjs/modules/bt-management/services/devices/and-medical/and-medical.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/and-medical/and-medical.protocol.js +12 -12
- package/lib/commonjs/modules/bt-management/services/devices/and-medical/and-medical.protocol.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj-70b.device.js +2 -8
- package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj-70b.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj-bp.device.js +2 -9
- package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj-bp.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj-bp.protocol.js +12 -11
- package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj-bp.protocol.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj.device.js +0 -1
- package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01.device.js +1 -3
- package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01.device.js.map +1 -1
- 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/bpw1/bpw1.device.js +0 -4
- package/lib/commonjs/modules/bt-management/services/devices/bpw1/bpw1.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js +5 -0
- package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/checkme/checkme-ecg.device.js +2 -13
- package/lib/commonjs/modules/bt-management/services/devices/checkme/checkme-ecg.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/checkme/checkme-pod.device.js +0 -4
- package/lib/commonjs/modules/bt-management/services/devices/checkme/checkme-pod.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/checkme/checkme.device.js +0 -4
- package/lib/commonjs/modules/bt-management/services/devices/checkme/checkme.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe.device.js +2 -9
- package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe.protocol.js +14 -17
- package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe.protocol.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe.records.js +2 -2
- package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe.records.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/f4/f4.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/f5/f5-scale.device.js +2 -9
- package/lib/commonjs/modules/bt-management/services/devices/f5/f5-scale.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/famidoc/famidoc.device.js +3 -9
- package/lib/commonjs/modules/bt-management/services/devices/famidoc/famidoc.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/famidoc/famidoc.protocol.js +10 -9
- package/lib/commonjs/modules/bt-management/services/devices/famidoc/famidoc.protocol.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/genial-t31/genial-t31.device.js +0 -1
- package/lib/commonjs/modules/bt-management/services/devices/genial-t31/genial-t31.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/joytech/joytech.device.js +2 -8
- package/lib/commonjs/modules/bt-management/services/devices/joytech/joytech.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/joytech/joytech.protocol.js +10 -9
- package/lib/commonjs/modules/bt-management/services/devices/joytech/joytech.protocol.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/jumper/jumper.device.js +2 -9
- package/lib/commonjs/modules/bt-management/services/devices/jumper/jumper.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/jumper/jumper.protocol.js +10 -12
- package/lib/commonjs/modules/bt-management/services/devices/jumper/jumper.protocol.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.js +5 -4
- package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js +4 -6
- package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/taidoc/taidoc.device.js +3 -9
- package/lib/commonjs/modules/bt-management/services/devices/taidoc/taidoc.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/taidoc/taidoc.protocol.js +4 -3
- package/lib/commonjs/modules/bt-management/services/devices/taidoc/taidoc.protocol.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/transtek/a6-blood-pressure.measurements.js +103 -0
- package/lib/commonjs/modules/bt-management/services/devices/transtek/a6-blood-pressure.measurements.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/transtek/a6-blood-pressure.sequencer.js +97 -0
- package/lib/commonjs/modules/bt-management/services/devices/transtek/a6-blood-pressure.sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/transtek/a6-scale.protocol.js +7 -1
- package/lib/commonjs/modules/bt-management/services/devices/transtek/a6-scale.protocol.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/transtek/a6-scale.sequencer.js +5 -53
- package/lib/commonjs/modules/bt-management/services/devices/transtek/a6-scale.sequencer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/transtek/a6.device.js +53 -0
- package/lib/commonjs/modules/bt-management/services/devices/transtek/a6.device.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/transtek/a6.sequencer.js +70 -0
- package/lib/commonjs/modules/bt-management/services/devices/transtek/a6.sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/transtek/mambo-a5.device.js +3 -10
- package/lib/commonjs/modules/bt-management/services/devices/transtek/mambo-a5.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.device.js +4 -10
- package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.protocol.js +21 -21
- package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.protocol.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/trasense/s9.device.js +0 -4
- package/lib/commonjs/modules/bt-management/services/devices/trasense/s9.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.activity-device.js +0 -4
- package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.activity-device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.duo-control-sequencer.js +2 -1
- package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.duo-control-sequencer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.ecg-device.js +0 -6
- package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.ecg-device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/ap20.device.js +2 -9
- package/lib/commonjs/modules/bt-management/services/devices/viatom/ap20.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/baby-sleep-clip.device.js +2 -9
- package/lib/commonjs/modules/bt-management/services/devices/viatom/baby-sleep-clip.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/bioland.bgm.device.js +2 -9
- package/lib/commonjs/modules/bt-management/services/devices/viatom/bioland.bgm.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/oxy-s3.device.js +3 -10
- package/lib/commonjs/modules/bt-management/services/devices/viatom/oxy-s3.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/pc68b.device.js +2 -9
- package/lib/commonjs/modules/bt-management/services/devices/viatom/pc68b.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/pc80b.device.js +2 -9
- package/lib/commonjs/modules/bt-management/services/devices/viatom/pc80b.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/pf10aw1.device.js +2 -9
- package/lib/commonjs/modules/bt-management/services/devices/viatom/pf10aw1.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/poctor.m3102.device.js +2 -9
- package/lib/commonjs/modules/bt-management/services/devices/viatom/poctor.m3102.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/sp20.device.js +2 -9
- package/lib/commonjs/modules/bt-management/services/devices/viatom/sp20.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom-r20.device.js +2 -9
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom-r20.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bpm188.device.js +2 -9
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bpm188.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc100.device.js +2 -9
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc100.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc300.device.js +2 -9
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc300.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pm10.device.js +3 -10
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pm10.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.wbp02.device.js +3 -10
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.wbp02.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/yonker/yonker.device.js +2 -9
- package/lib/commonjs/modules/bt-management/services/devices/yonker/yonker.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/yonker/yonker.protocol.js +16 -16
- package/lib/commonjs/modules/bt-management/services/devices/yonker/yonker.protocol.js.map +1 -1
- package/lib/commonjs/modules/bt-management/types/clock-sync.js +1 -0
- package/lib/commonjs/modules/bt-management/types/clock-sync.js.map +1 -1
- package/lib/commonjs/modules/bt-management/types/integrated-devices.js +1 -0
- package/lib/commonjs/modules/bt-management/types/integrated-devices.js.map +1 -1
- package/lib/commonjs/modules/bt-management/utils/bytes-to-hex.js +10 -0
- package/lib/commonjs/modules/bt-management/utils/bytes-to-hex.js.map +1 -0
- package/lib/commonjs/modules/bt-management/utils/frame-bytes.js +11 -0
- package/lib/commonjs/modules/bt-management/utils/frame-bytes.js.map +1 -0
- package/lib/commonjs/modules/bt-management/utils/sig-uuid.js +10 -0
- package/lib/commonjs/modules/bt-management/utils/sig-uuid.js.map +1 -0
- package/lib/module/modules/bt-device/components/btdevice-instruction.js +1 -1
- package/lib/module/modules/bt-device/components/btdevice-instruction.js.map +1 -1
- package/lib/module/modules/bt-device/constants/device-instruction-pdfs.js +4 -78
- package/lib/module/modules/bt-device/constants/device-instruction-pdfs.js.map +1 -1
- package/lib/module/modules/bt-device/constants/supported-device-catalog-transtek-a6-bp-variants.js +575 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-transtek-a6-bp-variants.js.map +1 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-variants.js +2 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-variants.js.map +1 -1
- package/lib/module/modules/bt-management/constants/built-in-measurement-types.js +1 -0
- package/lib/module/modules/bt-management/constants/built-in-measurement-types.js.map +1 -1
- package/lib/module/modules/bt-management/constants/device-variants.js +2 -1
- package/lib/module/modules/bt-management/constants/device-variants.js.map +1 -1
- package/lib/module/modules/bt-management/constants/no-parsing-cases.js +8 -0
- package/lib/module/modules/bt-management/constants/no-parsing-cases.js.map +1 -0
- package/lib/module/modules/bt-management/constants/transtek-a6-bp-device-variants.js +476 -0
- package/lib/module/modules/bt-management/constants/transtek-a6-bp-device-variants.js.map +1 -0
- package/lib/module/modules/bt-management/core/resolve-device-key.js +7 -1
- package/lib/module/modules/bt-management/core/resolve-device-key.js.map +1 -1
- package/lib/module/modules/bt-management/services/device-classes.js +3 -2
- package/lib/module/modules/bt-management/services/device-classes.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/a606/a606.device.js +0 -4
- package/lib/module/modules/bt-management/services/devices/a606/a606.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/and-medical/and-medical.device.js +3 -10
- package/lib/module/modules/bt-management/services/devices/and-medical/and-medical.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/and-medical/and-medical.protocol.js +12 -12
- package/lib/module/modules/bt-management/services/devices/and-medical/and-medical.protocol.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/aoj/aoj-70b.device.js +2 -8
- package/lib/module/modules/bt-management/services/devices/aoj/aoj-70b.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/aoj/aoj-bp.device.js +2 -9
- package/lib/module/modules/bt-management/services/devices/aoj/aoj-bp.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/aoj/aoj-bp.protocol.js +12 -11
- package/lib/module/modules/bt-management/services/devices/aoj/aoj-bp.protocol.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/aoj/aoj.device.js +0 -1
- package/lib/module/modules/bt-management/services/devices/aoj/aoj.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bc01/bc01.device.js +1 -3
- package/lib/module/modules/bt-management/services/devices/bc01/bc01.device.js.map +1 -1
- 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/bpw1/bpw1.device.js +0 -4
- package/lib/module/modules/bt-management/services/devices/bpw1/bpw1.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-managed-device.js +5 -0
- package/lib/module/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/checkme/checkme-ecg.device.js +2 -13
- package/lib/module/modules/bt-management/services/devices/checkme/checkme-ecg.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/checkme/checkme-pod.device.js +0 -4
- package/lib/module/modules/bt-management/services/devices/checkme/checkme-pod.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/checkme/checkme.device.js +0 -4
- package/lib/module/modules/bt-management/services/devices/checkme/checkme.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/cofoe/cofoe.device.js +2 -9
- package/lib/module/modules/bt-management/services/devices/cofoe/cofoe.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/cofoe/cofoe.protocol.js +13 -15
- package/lib/module/modules/bt-management/services/devices/cofoe/cofoe.protocol.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/cofoe/cofoe.records.js +2 -2
- package/lib/module/modules/bt-management/services/devices/cofoe/cofoe.records.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/f4/f4.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/f5/f5-scale.device.js +2 -9
- package/lib/module/modules/bt-management/services/devices/f5/f5-scale.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/famidoc/famidoc.device.js +3 -9
- package/lib/module/modules/bt-management/services/devices/famidoc/famidoc.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/famidoc/famidoc.protocol.js +10 -9
- package/lib/module/modules/bt-management/services/devices/famidoc/famidoc.protocol.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/genial-t31/genial-t31.device.js +0 -1
- package/lib/module/modules/bt-management/services/devices/genial-t31/genial-t31.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/joytech/joytech.device.js +2 -8
- package/lib/module/modules/bt-management/services/devices/joytech/joytech.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/joytech/joytech.protocol.js +10 -9
- package/lib/module/modules/bt-management/services/devices/joytech/joytech.protocol.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/jumper/jumper.device.js +2 -9
- package/lib/module/modules/bt-management/services/devices/jumper/jumper.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/jumper/jumper.protocol.js +10 -12
- package/lib/module/modules/bt-management/services/devices/jumper/jumper.protocol.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.js +2 -1
- package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js +2 -3
- package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/taidoc/taidoc.device.js +3 -9
- package/lib/module/modules/bt-management/services/devices/taidoc/taidoc.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/taidoc/taidoc.protocol.js +4 -3
- package/lib/module/modules/bt-management/services/devices/taidoc/taidoc.protocol.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/transtek/a6-blood-pressure.measurements.js +98 -0
- package/lib/module/modules/bt-management/services/devices/transtek/a6-blood-pressure.measurements.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/transtek/a6-blood-pressure.sequencer.js +92 -0
- package/lib/module/modules/bt-management/services/devices/transtek/a6-blood-pressure.sequencer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/transtek/a6-scale.protocol.js +6 -0
- package/lib/module/modules/bt-management/services/devices/transtek/a6-scale.protocol.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/transtek/a6-scale.sequencer.js +6 -54
- package/lib/module/modules/bt-management/services/devices/transtek/a6-scale.sequencer.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/transtek/a6.device.js +48 -0
- package/lib/module/modules/bt-management/services/devices/transtek/a6.device.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/transtek/a6.sequencer.js +66 -0
- package/lib/module/modules/bt-management/services/devices/transtek/a6.sequencer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/transtek/mambo-a5.device.js +3 -10
- package/lib/module/modules/bt-management/services/devices/transtek/mambo-a5.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/transtek/transtek-command.device.js +4 -10
- package/lib/module/modules/bt-management/services/devices/transtek/transtek-command.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/transtek/transtek-command.protocol.js +21 -21
- package/lib/module/modules/bt-management/services/devices/transtek/transtek-command.protocol.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/trasense/s9.device.js +0 -4
- package/lib/module/modules/bt-management/services/devices/trasense/s9.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/veroval/veroval.activity-device.js +0 -4
- package/lib/module/modules/bt-management/services/devices/veroval/veroval.activity-device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/veroval/veroval.duo-control-sequencer.js +2 -1
- package/lib/module/modules/bt-management/services/devices/veroval/veroval.duo-control-sequencer.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/veroval/veroval.ecg-device.js +0 -6
- package/lib/module/modules/bt-management/services/devices/veroval/veroval.ecg-device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/ap20.device.js +2 -9
- package/lib/module/modules/bt-management/services/devices/viatom/ap20.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/baby-sleep-clip.device.js +2 -9
- package/lib/module/modules/bt-management/services/devices/viatom/baby-sleep-clip.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/bioland.bgm.device.js +2 -9
- package/lib/module/modules/bt-management/services/devices/viatom/bioland.bgm.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/oxy-s3.device.js +3 -10
- package/lib/module/modules/bt-management/services/devices/viatom/oxy-s3.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/pc68b.device.js +2 -9
- package/lib/module/modules/bt-management/services/devices/viatom/pc68b.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/pc80b.device.js +2 -9
- package/lib/module/modules/bt-management/services/devices/viatom/pc80b.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/pf10aw1.device.js +2 -9
- package/lib/module/modules/bt-management/services/devices/viatom/pf10aw1.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/poctor.m3102.device.js +2 -9
- package/lib/module/modules/bt-management/services/devices/viatom/poctor.m3102.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/sp20.device.js +2 -9
- package/lib/module/modules/bt-management/services/devices/viatom/sp20.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom-r20.device.js +2 -9
- package/lib/module/modules/bt-management/services/devices/viatom/viatom-r20.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.bpm188.device.js +2 -9
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.bpm188.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.pc100.device.js +2 -9
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.pc100.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.pc300.device.js +2 -9
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.pc300.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.pm10.device.js +3 -10
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.pm10.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.wbp02.device.js +3 -10
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.wbp02.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/yonker/yonker.device.js +2 -9
- package/lib/module/modules/bt-management/services/devices/yonker/yonker.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/yonker/yonker.protocol.js +16 -16
- package/lib/module/modules/bt-management/services/devices/yonker/yonker.protocol.js.map +1 -1
- package/lib/module/modules/bt-management/types/clock-sync.js +1 -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 +1 -0
- package/lib/module/modules/bt-management/types/integrated-devices.js.map +1 -1
- package/lib/module/modules/bt-management/utils/bytes-to-hex.js +5 -0
- package/lib/module/modules/bt-management/utils/bytes-to-hex.js.map +1 -0
- package/lib/module/modules/bt-management/utils/frame-bytes.js +7 -0
- package/lib/module/modules/bt-management/utils/frame-bytes.js.map +1 -0
- package/lib/module/modules/bt-management/utils/sig-uuid.js +5 -0
- package/lib/module/modules/bt-management/utils/sig-uuid.js.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/device-instruction-pdfs.d.ts +2 -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-transtek-a6-bp-variants.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-transtek-a6-bp-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-management/constants/built-in-measurement-types.d.ts.map +1 -1
- 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/no-parsing-cases.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/bt-management/constants/no-parsing-cases.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/constants/transtek-a6-bp-device-variants.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/bt-management/constants/transtek-a6-bp-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/device-classes.d.ts +3 -2
- 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/a606/a606.device.d.ts +0 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/a606/a606.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/and-medical/and-medical.device.d.ts +0 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/and-medical/and-medical.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/and-medical/and-medical.protocol.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/and-medical/and-medical.protocol.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj-70b.device.d.ts +0 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj-70b.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj-bp.device.d.ts +0 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj-bp.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj-bp.protocol.d.ts +7 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj-bp.protocol.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj.device.d.ts +0 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01.device.d.ts +0 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts +0 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bpw1/bpw1.device.d.ts +0 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bpw1/bpw1.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts +3 -2
- 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/checkme/checkme-ecg.device.d.ts +0 -4
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/checkme/checkme-ecg.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/checkme/checkme-pod.device.d.ts +0 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/checkme/checkme-pod.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/checkme/checkme.device.d.ts +0 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/checkme/checkme.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/cofoe/cofoe.device.d.ts +0 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/cofoe/cofoe.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/cofoe/cofoe.protocol.d.ts +0 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/cofoe/cofoe.protocol.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts +0 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/f4/f4.device.d.ts +0 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/f4/f4.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/f5/f5-scale.device.d.ts +0 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/f5/f5-scale.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/famidoc/famidoc.device.d.ts +0 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/famidoc/famidoc.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/famidoc/famidoc.protocol.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/famidoc/famidoc.protocol.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/genial-t31/genial-t31.device.d.ts +0 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/genial-t31/genial-t31.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/joytech/joytech.device.d.ts +0 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/joytech/joytech.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/joytech/joytech.protocol.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/joytech/joytech.protocol.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/jumper/jumper.device.d.ts +0 -2
- 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/jumper/jumper.protocol.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/jumper/jumper.protocol.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts +1 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/taidoc/taidoc.device.d.ts +0 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/taidoc/taidoc.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/taidoc/taidoc.protocol.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/a6-blood-pressure.measurements.d.ts +19 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/a6-blood-pressure.measurements.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/a6-blood-pressure.sequencer.d.ts +27 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/a6-blood-pressure.sequencer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/a6-scale.protocol.d.ts +6 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/a6-scale.protocol.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/a6-scale.sequencer.d.ts +3 -9
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/a6-scale.sequencer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/a6.device.d.ts +14 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/a6.device.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/a6.sequencer.d.ts +23 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/a6.sequencer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/mambo-a5.device.d.ts +0 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/mambo-a5.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/transtek-command.device.d.ts +0 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/transtek-command.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/transtek-command.protocol.d.ts +10 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/transtek-command.protocol.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/trasense/s9.device.d.ts +0 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/trasense/s9.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.activity-device.d.ts +0 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.activity-device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.duo-control-sequencer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.ecg-device.d.ts +0 -3
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.ecg-device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/ap20.device.d.ts +0 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/ap20.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/baby-sleep-clip.device.d.ts +0 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/baby-sleep-clip.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/bioland.bgm.device.d.ts +0 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/bioland.bgm.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/oxy-s3.device.d.ts +0 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/oxy-s3.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/pc68b.device.d.ts +0 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/pc68b.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/pc80b.device.d.ts +0 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/pc80b.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/pf10aw1.device.d.ts +0 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/pf10aw1.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/poctor.m3102.device.d.ts +0 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/poctor.m3102.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/sp20.device.d.ts +0 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/sp20.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom-r20.device.d.ts +0 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom-r20.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bpm188.device.d.ts +0 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bpm188.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pc100.device.d.ts +0 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pc100.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pc300.device.d.ts +0 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pc300.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pm10.device.d.ts +0 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pm10.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.wbp02.device.d.ts +0 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.wbp02.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/yonker/yonker.device.d.ts +0 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/yonker/yonker.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/yonker/yonker.protocol.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/yonker/yonker.protocol.d.ts.map +1 -1
- 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-measurement-map.d.ts +1 -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 +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/integrated-devices.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/utils/bytes-to-hex.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/bytes-to-hex.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/frame-bytes.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/frame-bytes.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/sig-uuid.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/sig-uuid.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-device/constants/device-instruction-pdfs.d.ts +2 -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-transtek-a6-bp-variants.d.ts +5 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-transtek-a6-bp-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-management/constants/built-in-measurement-types.d.ts.map +1 -1
- 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/no-parsing-cases.d.ts +4 -0
- package/lib/typescript/module/src/modules/bt-management/constants/no-parsing-cases.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/constants/transtek-a6-bp-device-variants.d.ts +5 -0
- package/lib/typescript/module/src/modules/bt-management/constants/transtek-a6-bp-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/device-classes.d.ts +3 -2
- 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/a606/a606.device.d.ts +0 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/a606/a606.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/and-medical/and-medical.device.d.ts +0 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/and-medical/and-medical.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/and-medical/and-medical.protocol.d.ts +9 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/and-medical/and-medical.protocol.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj-70b.device.d.ts +0 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj-70b.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj-bp.device.d.ts +0 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj-bp.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj-bp.protocol.d.ts +7 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj-bp.protocol.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj.device.d.ts +0 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01.device.d.ts +0 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts +0 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bpw1/bpw1.device.d.ts +0 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/bpw1/bpw1.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts +3 -2
- 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/checkme/checkme-ecg.device.d.ts +0 -4
- package/lib/typescript/module/src/modules/bt-management/services/devices/checkme/checkme-ecg.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/checkme/checkme-pod.device.d.ts +0 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/checkme/checkme-pod.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/checkme/checkme.device.d.ts +0 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/checkme/checkme.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/cofoe/cofoe.device.d.ts +0 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/cofoe/cofoe.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/cofoe/cofoe.protocol.d.ts +0 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/cofoe/cofoe.protocol.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts +0 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/f4/f4.device.d.ts +0 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/f4/f4.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/f5/f5-scale.device.d.ts +0 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/f5/f5-scale.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/famidoc/famidoc.device.d.ts +0 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/famidoc/famidoc.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/famidoc/famidoc.protocol.d.ts +8 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/famidoc/famidoc.protocol.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/genial-t31/genial-t31.device.d.ts +0 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/genial-t31/genial-t31.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/joytech/joytech.device.d.ts +0 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/joytech/joytech.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/joytech/joytech.protocol.d.ts +8 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/joytech/joytech.protocol.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/jumper/jumper.device.d.ts +0 -2
- 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/jumper/jumper.protocol.d.ts +4 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/jumper/jumper.protocol.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts +1 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/taidoc/taidoc.device.d.ts +0 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/taidoc/taidoc.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/taidoc/taidoc.protocol.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/a6-blood-pressure.measurements.d.ts +19 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/a6-blood-pressure.measurements.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/a6-blood-pressure.sequencer.d.ts +27 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/a6-blood-pressure.sequencer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/a6-scale.protocol.d.ts +6 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/a6-scale.protocol.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/a6-scale.sequencer.d.ts +3 -9
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/a6-scale.sequencer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/a6.device.d.ts +14 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/a6.device.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/a6.sequencer.d.ts +23 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/a6.sequencer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/mambo-a5.device.d.ts +0 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/mambo-a5.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/transtek-command.device.d.ts +0 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/transtek-command.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/transtek-command.protocol.d.ts +10 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/transtek-command.protocol.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/trasense/s9.device.d.ts +0 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/trasense/s9.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.activity-device.d.ts +0 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.activity-device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.duo-control-sequencer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.ecg-device.d.ts +0 -3
- package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.ecg-device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/ap20.device.d.ts +0 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/ap20.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/baby-sleep-clip.device.d.ts +0 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/baby-sleep-clip.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/bioland.bgm.device.d.ts +0 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/bioland.bgm.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/oxy-s3.device.d.ts +0 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/oxy-s3.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/pc68b.device.d.ts +0 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/pc68b.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/pc80b.device.d.ts +0 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/pc80b.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/pf10aw1.device.d.ts +0 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/pf10aw1.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/poctor.m3102.device.d.ts +0 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/poctor.m3102.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/sp20.device.d.ts +0 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/sp20.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom-r20.device.d.ts +0 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom-r20.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bpm188.device.d.ts +0 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bpm188.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pc100.device.d.ts +0 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pc100.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pc300.device.d.ts +0 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pc300.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pm10.device.d.ts +0 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pm10.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.wbp02.device.d.ts +0 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.wbp02.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/yonker/yonker.device.d.ts +0 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/yonker/yonker.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/yonker/yonker.protocol.d.ts +8 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/yonker/yonker.protocol.d.ts.map +1 -1
- 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-measurement-map.d.ts +1 -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 +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/integrated-devices.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/utils/bytes-to-hex.d.ts +3 -0
- package/lib/typescript/module/src/modules/bt-management/utils/bytes-to-hex.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/utils/frame-bytes.d.ts +3 -0
- package/lib/typescript/module/src/modules/bt-management/utils/frame-bytes.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/utils/sig-uuid.d.ts +3 -0
- package/lib/typescript/module/src/modules/bt-management/utils/sig-uuid.d.ts.map +1 -0
- package/package.json +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/transtek/a6-scale.device.js +0 -50
- package/lib/commonjs/modules/bt-management/services/devices/transtek/a6-scale.device.js.map +0 -1
- package/lib/module/modules/bt-management/services/devices/transtek/a6-scale.device.js +0 -45
- package/lib/module/modules/bt-management/services/devices/transtek/a6-scale.device.js.map +0 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/a6-scale.device.d.ts +0 -16
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/a6-scale.device.d.ts.map +0 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/a6-scale.device.d.ts +0 -16
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/a6-scale.device.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["IntegratedDevices","BTManagedDevice","TAIDOC_CHARACTERISTIC","TAIDOC_SERVICE","TaidocFrameReader","TaidocSequencer","KIND","TAIDOC_MULTI","TAIDOC_BPM","TAIDOC_THERMOMETER","TAIDOC_OXIMETER","TAIDOC_SCALE","
|
|
1
|
+
{"version":3,"names":["NO_PARSING_CASES","IntegratedDevices","BTManagedDevice","TAIDOC_CHARACTERISTIC","TAIDOC_SERVICE","TaidocFrameReader","TaidocSequencer","KIND","TAIDOC_MULTI","TAIDOC_BPM","TAIDOC_THERMOMETER","TAIDOC_OXIMETER","TAIDOC_SCALE","taidocMainServices","uuid","monitorUuids","parsingModel","TaidocDeviceClass","mainServices","stuckDataTimeout","constructor","device","params","frameReader","createCommandSequencer","kind","deviceName","onResult","result","TaidocDevice"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/taidoc/taidoc.device.ts"],"mappings":";;AAEA,SAASA,gBAAgB,QAAQ,wCAAqC;AAGtE,SAASC,iBAAiB,QAAQ,sCAAmC;AAGrE,SAASC,eAAe,QAAQ,yBAAsB;AAEtD,SAASC,qBAAqB,EAAEC,cAAc,EAAEC,iBAAiB,QAAQ,sBAAmB;AAE5F,SAASC,eAAe,QAAQ,uBAAoB;AASpD,MAAMC,IAAsC,GAAG;EAC7C,CAACN,iBAAiB,CAACO,YAAY,GAAG,OAAO;EACzC,CAACP,iBAAiB,CAACQ,UAAU,GAAG,KAAK;EACrC,CAACR,iBAAiB,CAACS,kBAAkB,GAAG,aAAa;EACrD,CAACT,iBAAiB,CAACU,eAAe,GAAG,UAAU;EAC/C,CAACV,iBAAiB,CAACW,YAAY,GAAG;AACpC,CAAC;;AAED;;AAEA,MAAMC,kBAA8B,GAAG,CACrC;EACEC,IAAI,EAAEV,cAAc;EACpBW,YAAY,EAAE,CAAC;IAAED,IAAI,EAAEX,qBAAqB;IAAEa,YAAY,EAAEhB;EAAiB,CAAC;AAChF,CAAC,CACF;;AAED;AACA,MAAMiB,iBAAiB,SAASf,eAAe,CAAe;EAClDgB,YAAY,GAAGL,kBAAkB;EACjCM,gBAAgB,GAAG,MAAM;EAE5BC,WAAWA,CAACC,MAAc,EAAEC,MAAwC,EAAE;IAC3E,KAAK,CAACD,MAAM,EAAEC,MAAM,CAAC;IACrB,IAAI,CAACC,WAAW,GAAG,IAAIlB,iBAAiB,CAAC,CAAC;IAC1C,IAAI,CAACmB,sBAAsB,GAAG,MAC5B,IAAIlB,eAAe,CAAC;MAClBmB,IAAI,EAAElB,IAAI,CAACe,MAAM,CAACI,UAAU,CAAC;MAC7BC,QAAQ,EAAGC,MAAM,IACf,IAAI,CAACD,QAAQ,GACXC,MAGF;IACJ,CAAC,CAAC;EACN;AAEF;AAEA,SAASX,iBAAiB,IAAIY,YAAY","ignoreList":[]}
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
/* eslint-disable import/group-exports */
|
|
4
4
|
|
|
5
5
|
import { FrameReadStatus } from "../../../types/frame-read-status.js";
|
|
6
|
+
import { bytesToHex } from "../../../utils/bytes-to-hex.js";
|
|
7
|
+
import { frameBytes } from "../../../utils/frame-bytes.js";
|
|
6
8
|
import { hexToByte } from "../../../utils/hex-to-byte.js";
|
|
7
9
|
|
|
8
10
|
/**
|
|
@@ -39,10 +41,9 @@ const HOST_END = 0xa3;
|
|
|
39
41
|
const DEVICE_END = 0xa5;
|
|
40
42
|
const FIXED_FRAME_BYTES = 8;
|
|
41
43
|
const VARIABLE_COMMANDS = [TAIDOC.weightRecord, TAIDOC.setUser];
|
|
42
|
-
const toHex = bytes => bytes.map(value => (value & 0xff).toString(16).padStart(2, "0"));
|
|
43
44
|
const byteAt = (frame, index) => hexToByte(frame[index] ?? "00");
|
|
44
45
|
const sum = bytes => bytes.reduce((total, value) => total + value, 0) & 0xff;
|
|
45
|
-
const withChecksum = bytes =>
|
|
46
|
+
const withChecksum = bytes => bytesToHex([...bytes, sum(bytes)]);
|
|
46
47
|
export const commandOf = frame => byteAt(frame, 1);
|
|
47
48
|
|
|
48
49
|
/** `51 cmd a b c d A3 cs`. */
|
|
@@ -86,7 +87,7 @@ export class TaidocFrameReader {
|
|
|
86
87
|
};
|
|
87
88
|
}
|
|
88
89
|
const received = buffer.slice(start, start + length);
|
|
89
|
-
const bytes = received
|
|
90
|
+
const bytes = frameBytes(received);
|
|
90
91
|
const end = bytes[length - 2];
|
|
91
92
|
if (end !== HOST_END && end !== DEVICE_END || sum(bytes.slice(0, -1)) !== bytes[length - 1]) {
|
|
92
93
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["FrameReadStatus","hexToByte","TAIDOC_SERVICE","TAIDOC_CHARACTERISTIC","TAIDOC","wakeUp","deviceTime","model","readingTime","readingResult","serial1","serial2","oximeterAfterTime","readingCount","setTime","shutdown","wakeNotice","weightRecord","setUser","busy","START","HOST_END","DEVICE_END","FIXED_FRAME_BYTES","VARIABLE_COMMANDS","
|
|
1
|
+
{"version":3,"names":["FrameReadStatus","bytesToHex","frameBytes","hexToByte","TAIDOC_SERVICE","TAIDOC_CHARACTERISTIC","TAIDOC","wakeUp","deviceTime","model","readingTime","readingResult","serial1","serial2","oximeterAfterTime","readingCount","setTime","shutdown","wakeNotice","weightRecord","setUser","busy","START","HOST_END","DEVICE_END","FIXED_FRAME_BYTES","VARIABLE_COMMANDS","byteAt","frame","index","sum","bytes","reduce","total","value","withChecksum","commandOf","taidocCommand","command","a","b","c","d","readingCountCommand","user","readingCommand","setTimeCommand","now","date","getFullYear","getMonth","getDate","getMinutes","getHours","weightRecordCommand","isHostFrame","length","TaidocFrameReader","readFrame","buffer","start","findIndex","byte","status","INCOMPLETE","consumedBytes","includes","received","slice","end","CORRUPT","COMPLETE","MULTI_USER_CODES","Set","usersFor","has","readCount"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/taidoc/taidoc.protocol.ts"],"mappings":";;AAAA;;AAGA,SAASA,eAAe,QAAQ,qCAAkC;AAElE,SAASC,UAA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AAM,GAAG,CAAC,CAAC;IAE7B,IAAKa,GAAG,KAAK9C,QAAQ,IAAI8C,GAAG,KAAK7C,UAAU,IAAKM,GAAG,CAACC,KAAK,CAACqC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAKrC,KAAK,CAACyB,MAAM,GAAG,CAAC,CAAC,EAAE;MAC7F,OAAO;QAAEO,MAAM,EAAE/D,eAAe,CAACsE,OAAO;QAAEL,aAAa,EAAEL,KAAK,GAAG;MAAE,CAAC;IACtE;IAEA,OAAO;MAAEG,MAAM,EAAE/D,eAAe,CAACuE,QAAQ;MAAEN,aAAa,EAAEL,KAAK,GAAGJ,MAAM;MAAE5B,KAAK,EAAEuC;IAAS,CAAC;EAC7F;AACF;;AAEA;AACA;AACA;AACA;AACA,MAAMK,gBAAqC,GAAG,IAAIC,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAEvF,OAAO,MAAMC,QAAQ,GAAIjE,KAAwB,IAC/C+D,gBAAgB,CAACG,GAAG,CAAChD,MAAM,CAAClB,KAAK,EAAE,CAAC,CAAC,GAAIkB,MAAM,CAAClB,KAAK,EAAE,CAAC,CAAC,IAAI,CAAE,CAAC,GAAG,CAAC,GAAG,CAAC;;AAE1E;AACA,OAAO,MAAMmE,SAAS,GAAIhD,KAAwB,IAChDD,MAAM,CAACC,KAAK,EAAE,CAAC,CAAC,GAAID,MAAM,CAACC,KAAK,EAAE,CAAC,CAAC,IAAI,CAAE","ignoreList":[]}
|
package/lib/module/modules/bt-management/services/devices/transtek/a6-blood-pressure.measurements.js
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { readA6Uint } from "./a6-scale.protocol.js";
|
|
4
|
+
const A6_BPM_EPOCH_MS = Date.UTC(2009, 11, 31, 16, 0, 0);
|
|
5
|
+
const KPA_TO_MMHG = 7.500617;
|
|
6
|
+
const RECORD_FLAGS = 0x0000030f;
|
|
7
|
+
const readA6Int16 = (bytes, offset) => {
|
|
8
|
+
const value = readA6Uint(bytes, offset, 2);
|
|
9
|
+
return value > 0x7fff ? value - 0x10000 : value;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Reads the A6 BPM MeasureDataBpm body from Transtek Health 2.0.5's
|
|
14
|
+
* LSBloodPressure(byte[]) parser.
|
|
15
|
+
* Fixed prefix: remaining count, flags, systolic, diastolic, mean pressure, status. Optional
|
|
16
|
+
* fields follow in pulse, user, vendor UTC, timezone, local-time order. The APK ignores the
|
|
17
|
+
* timezone and seven local-time bytes; only the vendor UTC value is exposed as a timestamp.
|
|
18
|
+
*/
|
|
19
|
+
export const parseA6BloodPressure = body => {
|
|
20
|
+
if (body.length < 14) {
|
|
21
|
+
return undefined;
|
|
22
|
+
}
|
|
23
|
+
const bytes = body.map(value => (value & 0xff).toString(16).padStart(2, "0"));
|
|
24
|
+
const flags = readA6Uint(bytes, 2, 4);
|
|
25
|
+
if ((flags & ~RECORD_FLAGS) !== 0) {
|
|
26
|
+
return undefined;
|
|
27
|
+
}
|
|
28
|
+
const rawSystolic = readA6Int16(bytes, 6);
|
|
29
|
+
const rawDiastolic = readA6Int16(bytes, 8);
|
|
30
|
+
const rawMeanPressure = readA6Int16(bytes, 10);
|
|
31
|
+
const status = readA6Uint(bytes, 12, 2);
|
|
32
|
+
const multiplier = (flags & 0x01) !== 0 ? KPA_TO_MMHG : 1;
|
|
33
|
+
const systolic = Math.round(rawSystolic * multiplier);
|
|
34
|
+
const diastolic = Math.round(rawDiastolic * multiplier);
|
|
35
|
+
const meanArterialPressure = rawMeanPressure > 0 ? Math.round(rawMeanPressure * multiplier) : undefined;
|
|
36
|
+
if (systolic <= 0 || diastolic <= 0) {
|
|
37
|
+
return undefined;
|
|
38
|
+
}
|
|
39
|
+
let offset = 14;
|
|
40
|
+
let heartRate;
|
|
41
|
+
let memorySlot;
|
|
42
|
+
let recordedAt;
|
|
43
|
+
if ((flags & 0x02) !== 0) {
|
|
44
|
+
if (body.length < offset + 2) {
|
|
45
|
+
return undefined;
|
|
46
|
+
}
|
|
47
|
+
heartRate = readA6Int16(bytes, offset);
|
|
48
|
+
offset += 2;
|
|
49
|
+
}
|
|
50
|
+
if ((flags & 0x04) !== 0) {
|
|
51
|
+
if (body.length < offset + 1) {
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
memorySlot = body[offset] ?? 0;
|
|
55
|
+
offset += 1;
|
|
56
|
+
}
|
|
57
|
+
if ((flags & 0x08) !== 0) {
|
|
58
|
+
if (body.length < offset + 4) {
|
|
59
|
+
return undefined;
|
|
60
|
+
}
|
|
61
|
+
const vendorSeconds = readA6Uint(bytes, offset, 4);
|
|
62
|
+
recordedAt = new Date(A6_BPM_EPOCH_MS + vendorSeconds * 1000);
|
|
63
|
+
offset += 4;
|
|
64
|
+
}
|
|
65
|
+
if ((flags & 0x100) !== 0) {
|
|
66
|
+
if (body.length < offset + 1) {
|
|
67
|
+
return undefined;
|
|
68
|
+
}
|
|
69
|
+
offset += 1;
|
|
70
|
+
}
|
|
71
|
+
if ((flags & 0x200) !== 0) {
|
|
72
|
+
if (body.length < offset + 7) {
|
|
73
|
+
return undefined;
|
|
74
|
+
}
|
|
75
|
+
offset += 7;
|
|
76
|
+
}
|
|
77
|
+
if (body.length < offset) {
|
|
78
|
+
return undefined;
|
|
79
|
+
}
|
|
80
|
+
return {
|
|
81
|
+
systolic,
|
|
82
|
+
diastolic,
|
|
83
|
+
...(meanArterialPressure !== undefined ? {
|
|
84
|
+
meanArterialPressure
|
|
85
|
+
} : {}),
|
|
86
|
+
...(heartRate !== undefined && heartRate > 0 ? {
|
|
87
|
+
heartRate
|
|
88
|
+
} : {}),
|
|
89
|
+
...(memorySlot !== undefined ? {
|
|
90
|
+
memorySlot
|
|
91
|
+
} : {}),
|
|
92
|
+
irregularHeartbeat: (status & 0x04) !== 0,
|
|
93
|
+
...(recordedAt ? {
|
|
94
|
+
recordedAt
|
|
95
|
+
} : {})
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
//# sourceMappingURL=a6-blood-pressure.measurements.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["readA6Uint","A6_BPM_EPOCH_MS","Date","UTC","KPA_TO_MMHG","RECORD_FLAGS","readA6Int16","bytes","offset","value","parseA6BloodPressure","body","length","undefined","map","toString","padStart","flags","rawSystolic","rawDiastolic","rawMeanPressure","status","multiplier","systolic","Math","round","diastolic","meanArterialPressure","heartRate","memorySlot","recordedAt","vendorSeconds","irregularHeartbeat"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/transtek/a6-blood-pressure.measurements.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,wBAAqB;AAEhD,MAAMC,eAAe,GAAGC,IAAI,CAACC,GAAG,CAAC,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC;AACxD,MAAMC,WAAW,GAAG,QAAQ;AAC5B,MAAMC,YAAY,GAAG,UAAU;AAY/B,MAAMC,WAAW,GAAGA,CAACC,KAAwB,EAAEC,MAAc,KAAa;EACxE,MAAMC,KAAK,GAAGT,UAAU,CAACO,KAAK,EAAEC,MAAM,EAAE,CAAC,CAAC;EAE1C,OAAOC,KAAK,GAAG,MAAM,GAAGA,KAAK,GAAG,OAAO,GAAGA,KAAK;AACjD,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,oBAAoB,GAC/BC,IAAuB,IACoB;EAC3C,IAAIA,IAAI,CAACC,MAAM,GAAG,EAAE,EAAE;IACpB,OAAOC,SAAS;EAClB;EAEA,MAAMN,KAAK,GAAGI,IAAI,CAACG,GAAG,CAAEL,KAAK,IAC3B,CAACA,KAAK,GAAG,IAAI,EAAEM,QAAQ,CAAC,EAAE,CAAC,CAACC,QAAQ,CAAC,CAAC,EAAE,GAAG,CA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AS,GAAG;MAAEgB;IAAW,CAAC,GAAG,CAAC,CAAC,CAAC;IACnDG,kBAAkB,EAAE,CAACX,MAAM,GAAG,IAAI,MAAM,CAAC;IACzC,IAAIS,UAAU,GAAG;MAAEA;IAAW,CAAC,GAAG,CAAC,CAAC;EACtC,CAAC;AACH,CAAC","ignoreList":[]}
|
package/lib/module/modules/bt-management/services/devices/transtek/a6-blood-pressure.sequencer.js
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { MeasurementTypeKey } from "@ovok/core";
|
|
4
|
+
import { CaseType } from "../../../types/case-type.js";
|
|
5
|
+
import { getClockParts, isClockSyncEnabled } from "../../../types/clock-sync.js";
|
|
6
|
+
import { parseA6BloodPressure } from "./a6-blood-pressure.measurements.js";
|
|
7
|
+
import { A6_BPM_MEASUREMENT, A6_BPM_SERVICE, A6_BPM_SETTING_RESPONSE, A6_BPM_START_MEASURING_RESPONSE, A6_BPM_SYNC, A6_BPM_TIME, A6_SCALE_WRITE, decodeA6Command, encodeA6Command, readA6Uint } from "./a6-scale.protocol.js";
|
|
8
|
+
import { A6Sequencer } from "./a6.sequencer.js";
|
|
9
|
+
const vendorEpochSeconds = Date.UTC(2010, 0, 1) / 1000;
|
|
10
|
+
const byte = value => (value & 0xff).toString(16).padStart(2, "0");
|
|
11
|
+
|
|
12
|
+
/** Vendor BP time is wall-clock seconds from 2010-01-01, encoded big-endian. */
|
|
13
|
+
const buildA6BloodPressureTimeBody = (now, timezone = "local") => {
|
|
14
|
+
const parts = getClockParts(now, timezone);
|
|
15
|
+
const seconds = Date.UTC(parts.year, parts.month - 1, parts.day, parts.hours, parts.minutes, parts.seconds) / 1000 - vendorEpochSeconds;
|
|
16
|
+
const encoded = Math.floor(seconds) >>> 0;
|
|
17
|
+
return [0x01, encoded >>> 24 & 0xff, encoded >>> 16 & 0xff, encoded >>> 8 & 0xff, encoded & 0xff];
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** Answers A6 BP login/settings requests, then fetches the cuff's BP history. */
|
|
21
|
+
class A6BloodPressureSequencer extends A6Sequencer {
|
|
22
|
+
userNumber = 0;
|
|
23
|
+
waitingForClockSettingResponse = false;
|
|
24
|
+
historySyncSent = false;
|
|
25
|
+
constructor(options) {
|
|
26
|
+
super(A6_BPM_SERVICE, options);
|
|
27
|
+
this.options = options;
|
|
28
|
+
}
|
|
29
|
+
processMessage = content => {
|
|
30
|
+
const message = decodeA6Command(content, this.key);
|
|
31
|
+
if (!message) {
|
|
32
|
+
return [];
|
|
33
|
+
}
|
|
34
|
+
if (message.command === 0x0007) {
|
|
35
|
+
if (message.body.length < 8) {
|
|
36
|
+
return [];
|
|
37
|
+
}
|
|
38
|
+
this.userNumber = message.body[6] ?? 0;
|
|
39
|
+
const response = encodeA6Command(0x0008, [0x01, ...message.body.slice(0, 6), 0x00, 0x02], this.key);
|
|
40
|
+
if (!response) {
|
|
41
|
+
return [];
|
|
42
|
+
}
|
|
43
|
+
const replies = [this.command(A6_SCALE_WRITE, response)];
|
|
44
|
+
if (isClockSyncEnabled(this.options.clockSync)) {
|
|
45
|
+
const now = this.options.clockSync?.now?.() ?? new Date();
|
|
46
|
+
const time = encodeA6Command(A6_BPM_TIME, buildA6BloodPressureTimeBody(now, this.options.clockSync?.timezone), this.key);
|
|
47
|
+
if (time) {
|
|
48
|
+
this.waitingForClockSettingResponse = true;
|
|
49
|
+
replies.push(this.command(A6_SCALE_WRITE, time, 500));
|
|
50
|
+
}
|
|
51
|
+
} else {
|
|
52
|
+
replies.push(...this.startHistorySync(500));
|
|
53
|
+
}
|
|
54
|
+
return replies;
|
|
55
|
+
}
|
|
56
|
+
if (message.command === A6_BPM_SETTING_RESPONSE) {
|
|
57
|
+
if (!this.waitingForClockSettingResponse) {
|
|
58
|
+
return [];
|
|
59
|
+
}
|
|
60
|
+
this.waitingForClockSettingResponse = false;
|
|
61
|
+
return this.startHistorySync(500);
|
|
62
|
+
}
|
|
63
|
+
if (message.command === A6_BPM_MEASUREMENT || message.command === A6_BPM_START_MEASURING_RESPONSE) {
|
|
64
|
+
if (message.command === A6_BPM_START_MEASURING_RESPONSE && readA6Uint(message.body.map(byte), 0, 2) === 1) {
|
|
65
|
+
return [];
|
|
66
|
+
}
|
|
67
|
+
const reading = parseA6BloodPressure(message.body);
|
|
68
|
+
if (reading) {
|
|
69
|
+
this.options.onResult({
|
|
70
|
+
caseType: CaseType.RESULT,
|
|
71
|
+
measurementTypeKey: MeasurementTypeKey.bloodPressure,
|
|
72
|
+
...reading,
|
|
73
|
+
memorySlot: reading.memorySlot ?? this.userNumber
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return [];
|
|
78
|
+
};
|
|
79
|
+
startHistorySync = delayBeforeWriteMs => {
|
|
80
|
+
if (this.historySyncSent) {
|
|
81
|
+
return [];
|
|
82
|
+
}
|
|
83
|
+
const sync = encodeA6Command(A6_BPM_SYNC, [this.userNumber, 0x01], this.key);
|
|
84
|
+
if (!sync) {
|
|
85
|
+
return [];
|
|
86
|
+
}
|
|
87
|
+
this.historySyncSent = true;
|
|
88
|
+
return [this.command(A6_SCALE_WRITE, sync, delayBeforeWriteMs)];
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
export { A6BloodPressureSequencer, buildA6BloodPressureTimeBody };
|
|
92
|
+
//# sourceMappingURL=a6-blood-pressure.sequencer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["MeasurementTypeKey","CaseType","getClockParts","isClockSyncEnabled","parseA6BloodPressure","A6_BPM_MEASUREMENT","A6_BPM_SERVICE","A6_BPM_SETTING_RESPONSE","A6_BPM_START_MEASURING_RESPONSE","A6_BPM_SYNC","A6_BPM_TIME","A6_SCALE_WRITE","decodeA6Command","encodeA6Command","readA6Uint","A6Sequencer","vendorEpochSeconds","Date","UTC","byte","value","toString","padStart","buildA6BloodPressureTimeBody","now","timezone","parts","seconds","year","month","day","hours","minutes","encoded","Math","floor","A6BloodPressureSequencer","userNumber","waitingForClockSettingResponse","historySyncSent","constructor","options","processMessage","content","message","key","command","body","length","response","slice","replies","clockSync","time","push","startHistorySync","map","reading","onResult","caseType","RESULT","measurementTypeKey","bloodPressure","memorySlot","delayBeforeWriteMs","sync"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/transtek/a6-blood-pressure.sequencer.ts"],"mappings":";;AAEA,SAASA,kBAAkB,QAAQ,YAAY;AAE/C,SAASC,QAAQ,QAAQ,6BAA0B;AACnD,SAEEC,aAAa,EACbC,kBAAkB,QACb,8BAA2B;AAMlC,SAASC,oBAAoB,QAAQ,qCAAkC;AACvE,SACEC,kBAAkB,EAClBC,cAAc,EACdC,uBAAuB,EACvBC,+BAA+B,EAC/BC,WAAW,EACXC,WAAW,EACXC,cAAc,EACdC,eAAe,EACfC,eAAe,EACfC,UAAU,QACL,wBAAqB;AAC5B,SAASC,WAAW,QAAQ,mBAAgB;AAa5C,MAAMC,kBAAkB,GAAGC,IAAI,CAACC,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI;AAEtD,MAAMC,IAAI,GAAIC,KAAa,IACzB,CAACA,KAAK,GAAG,IAAI,EAAEC,QAAQ,CAAC,EAAE,CAAC,CAACC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC;;AAG9C;AACA,MAAMC,4BAA4B,GAAGA,CACnCC,GAAS,EACTC,QAAsC,GAAG,OAAO,KACnC;EACb,MAAMC,KAAK,GAAGxB,aAAa,CAACsB,GAAG,EAAEC,QAAQ,CAAC;EAE1C,MAAME,OAAO,GACXV,IAAI,CAACC,GAAG,CACNQ,KAAK,CAACE,IAAI,EACVF,KAAK,CAACG,KAAK,GAAG,CAAC,EACfH,KAAK,CAACI,GAAG,EACTJ,KAAK,CAACK,KAAK,EACXL,KAAK,CAACM,OAAO,EACbN,KAAK,CAACC,OACR,CAAC,GACC,IAAI,GACNX,kBAAkB;EAEpB,M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AAO,EAAE;QACX,IAAI,CAAChB,OAAO,CAACiB,QAAQ,CAAC;UACpBC,QAAQ,EAAE1D,QAAQ,CAAC2D,MAAM;UACzBC,kBAAkB,EAAE7D,kBAAkB,CAAC8D,aAAa;UACpD,GAAGL,OAAO;UACVM,UAAU,EAAEN,OAAO,CAACM,UAAU,IAAI,IAAI,CAAC1B;QACzC,CAA0B,CAAC;MAC7B;IACF;IAEA,OAAO,EAAE;EACX,CAAC;EAEOkB,gBAAgB,GAAIS,kBAA0B,IAAsB;IAC1E,IAAI,IAAI,CAACzB,eAAe,EAAE;MACxB,OAAO,EAAE;IACX;IAEA,MAAM0B,IAAI,GAAGpD,eAAe,CAC1BJ,WAAW,EACX,CAAC,IAAI,CAAC4B,UAAU,EAAE,IAAI,CAAC,EACvB,IAAI,CAACQ,GACP,CAAC;IAED,IAAI,CAACoB,IAAI,EAAE;MACT,OAAO,EAAE;IACX;IAEA,IAAI,CAAC1B,eAAe,GAAG,IAAI;IAE3B,OAAO,CAAC,IAAI,CAACO,OAAO,CAACnC,cAAc,EAAEsD,IAAI,EAAED,kBAAkB,CAAC,CAAC;EACjE,CAAC;AACH;AAEA,SAAS5B,wBAAwB,EAAEb,4BAA4B","ignoreList":[]}
|
|
@@ -6,10 +6,16 @@ import CryptoJS from "crypto-js";
|
|
|
6
6
|
import { FrameReadStatus } from "../../../types/frame-read-status.js";
|
|
7
7
|
import { base64ToHex } from "../../../utils/base-64-to-hex.js";
|
|
8
8
|
export const A6_SCALE_SERVICE = "0000a602-0000-1000-8000-00805f9b34fb";
|
|
9
|
+
export const A6_BPM_SERVICE = "0000a610-0000-1000-8000-00805f9b34fb";
|
|
9
10
|
export const A6_SCALE_NOTIFY = "0000a621-0000-1000-8000-00805f9b34fb";
|
|
10
11
|
export const A6_SCALE_WRITE = "0000a624-0000-1000-8000-00805f9b34fb";
|
|
11
12
|
export const A6_SCALE_ACK = "0000a622-0000-1000-8000-00805f9b34fb";
|
|
12
13
|
export const A6_SCALE_WEIGHT = 0x4802;
|
|
14
|
+
export const A6_BPM_SYNC = 0x4901;
|
|
15
|
+
export const A6_BPM_MEASUREMENT = 0x4902;
|
|
16
|
+
export const A6_BPM_START_MEASURING_RESPONSE = 0x4906;
|
|
17
|
+
export const A6_BPM_TIME = 0x1102;
|
|
18
|
+
export const A6_BPM_SETTING_RESPONSE = 0x1100;
|
|
13
19
|
const byte = value => Number.parseInt(value ?? "00", 16) || 0;
|
|
14
20
|
export const readA6Uint = (bytes, offset, length) => bytes.slice(offset, offset + length).reduce((value, current) => value * 256 + byte(current), 0);
|
|
15
21
|
const bytesToHex = bytes => bytes.map(value => (value & 0xff).toString(16).padStart(2, "0")).join("");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CryptoJS","FrameReadStatus","base64ToHex","A6_SCALE_SERVICE","A6_SCALE_NOTIFY","A6_SCALE_WRITE","A6_SCALE_ACK","A6_SCALE_WEIGHT","byte","value","Number","parseInt","readA6Uint","bytes","offset","length","slice","reduce","current","bytesToHex","map","toString","padStart","join","hexToBytes","hex","match","a6EncryptionKey","deviceId","manufacturerData","mac","replace","toLowerCase","manufacturer","test","startsWith","undefined","prefix","Array","from","character","charCodeAt","encryptA6Body","body","key","padded","fill","encrypted","AES","encrypt","enc","Hex","parse","mode","ECB","padding","pad","NoPadding","stringify","ciphertext","decryptA6Body","lib","CipherParams","create","decrypted","decrypt","encodeA6Command","command","encodedBody","content","A6ScaleFrameReader","readFrame","buffer","status","INCOMPLETE","consumedBytes","control","frameCount","frameIndex","contentLength","CORRUPT","COMPLETE","frame","decodeA6Command","a6CommandBody"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/transtek/a6-scale.protocol.ts"],"mappings":";;AAAA;;AAEA,OAAOA,QAAQ,MAAM,WAAW;AAGhC,SAASC,eAAe,QAAQ,qCAAkC;AAElE,SAASC,WAAW,QAAQ,kCAA+B;AAE3D,OAAO,MAAMC,gBAAgB,GAAG,sCAAsC;AACtE,OAAO,MAAMC,eAAe,GAAG,sCAAsC;AACrE,OAAO,MAAMC,cAAc,GAAG,sCAAsC;AACpE,OAAO,MAAMC,YAAY,GAAG,sCAAsC;AAClE,OAAO,MAAMC,eAAe,GAAG,MAAM;
|
|
1
|
+
{"version":3,"names":["CryptoJS","FrameReadStatus","base64ToHex","A6_SCALE_SERVICE","A6_BPM_SERVICE","A6_SCALE_NOTIFY","A6_SCALE_WRITE","A6_SCALE_ACK","A6_SCALE_WEIGHT","A6_BPM_SYNC","A6_BPM_MEASUREMENT","A6_BPM_START_MEASURING_RESPONSE","A6_BPM_TIME","A6_BPM_SETTING_RESPONSE","byte","value","Number","parseInt","readA6Uint","bytes","offset","length","slice","reduce","current","bytesToHex","map","toString","padStart","join","hexToBytes","hex","match","a6EncryptionKey","deviceId","manufacturerData","mac","replace","toLowerCase","manufacturer","test","startsWith","undefined","prefix","Array","from","character","charCodeAt","encryptA6Body","body","key","padded","fill","encrypted","AES","encrypt","enc","Hex","parse","mode","ECB","padding","pad","NoPadding","stringify","ciphertext","decryptA6Body","lib","CipherParams","create","decrypted","decrypt","encodeA6Command","command","encodedBody","content","A6ScaleFrameReader","readFrame","buffer","status","INCOMPLETE","consumedBytes","control","frameCount","frameIndex","contentLength","CORRUPT","COMPLETE","frame","decodeA6Command","a6CommandBody"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/transtek/a6-scale.protocol.ts"],"mappings":";;AAAA;;AAEA,OAAOA,QAAQ,MAAM,WAAW;AAGhC,SAASC,eAAe,QAAQ,qCAAkC;AAElE,SAASC,WAAW,QAAQ,kCAA+B;AAE3D,OAAO,MAAMC,gBAAgB,GAAG,sCAAsC;AACtE,OAAO,MAAMC,cAAc,GAAG,sCAAsC;AACpE,OAAO,MAAMC,eAAe,GAAG,sCAAsC;AACrE,OAAO,MAAMC,cAAc,GAAG,sCAAsC;AACpE,OAAO,MAAMC,YAAY,GAAG,sCAAsC;AAClE,OAAO,MAAMC,eAAe,GAAG,MAAM;AACr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a,GAAG,EAAE,CAAE,EAC1E;MACA,OAAO;QAAEN,MAAM,EAAE9E,eAAe,CAACqF,OAAO;QAAEL,aAAa,EAAE;MAAE,CAAC;IAC9D;IACA,IAAIH,MAAM,CAACzD,MAAM,GAAGgE,aAAa,GAAG,CAAC,EAAE;MACrC,OAAO;QAAEN,MAAM,EAAE9E,eAAe,CAAC+E,UAAU;QAAEC,aAAa,EAAE;MAAE,CAAC;IACjE;IAEA,OAAO;MACLF,MAAM,EAAE9E,eAAe,CAACsF,QAAQ;MAChCN,aAAa,EAAEI,aAAa,GAAG,CAAC;MAChCG,KAAK,EAAEV,MAAM,CAACxD,KAAK,CAAC,CAAC,EAAE+D,aAAa,GAAG,CAAC;IAC1C,CAAC;EACH;AACF;AAEA,OAAO,MAAMI,eAAe,GAAGA,CAC7Bd,OAA0B,EAC1BzB,GAAY,KACwC;EACpD,IAAIyB,OAAO,CAACtD,MAAM,GAAG,CAAC,EAAE;IACtB,OAAOqB,SAAS;EAClB;EAEA,MAAM+B,OAAO,GAAGvD,UAAU,CAACyD,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;EACzC,MAAM1B,IAAI,GAAGiB,aAAa,CAACS,OAAO,CAACrD,KAAK,CAAC,CAAC,CAAC,EAAE4B,GAAG,CAAC;EAEjD,OAAOD,IAAI,GAAG;IAAEwB,OAAO;IAAExB;EAAK,CAAC,GAAGP,SAAS;AAC7C,CAAC;AAED,OAAO,MAAMgD,aAAa,GAAIF,KAAwB,IAAe;EACnE,MAAMH,aAAa,GAAGvE,IAAI,CAAC0E,KAAK,CAAC,CAAC,CAAC,CAAC;EAEpC,OAAOA,KAAK,CAAClE,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG+D,aAAa,CAAC;AAC1C,CAAC","ignoreList":[]}
|
|
@@ -3,63 +3,15 @@
|
|
|
3
3
|
import { MeasurementTypeKey } from "@ovok/core";
|
|
4
4
|
import { CaseType } from "../../../types/case-type.js";
|
|
5
5
|
import { parseA6Weight } from "./a6-scale.measurements.js";
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
serviceUuid: A6_SCALE_SERVICE,
|
|
9
|
-
characteristicUuid,
|
|
10
|
-
frame,
|
|
11
|
-
...(delayBeforeWriteMs ? {
|
|
12
|
-
delayBeforeWriteMs
|
|
13
|
-
} : {})
|
|
14
|
-
});
|
|
15
|
-
|
|
6
|
+
import { A6_SCALE_SERVICE, A6_SCALE_WEIGHT, A6_SCALE_WRITE, decodeA6Command, encodeA6Command } from "./a6-scale.protocol.js";
|
|
7
|
+
import { A6Sequencer } from "./a6.sequencer.js";
|
|
16
8
|
/** Answers A6 authentication/init requests and decodes the scale's weight records. */
|
|
17
|
-
export class A6ScaleSequencer {
|
|
18
|
-
expectedFragmentCount = 0;
|
|
9
|
+
export class A6ScaleSequencer extends A6Sequencer {
|
|
19
10
|
userNumber = 0;
|
|
20
11
|
constructor(options) {
|
|
12
|
+
super(A6_SCALE_SERVICE, options);
|
|
21
13
|
this.options = options;
|
|
22
|
-
this.key = a6EncryptionKey(options.deviceId, options.manufacturerData);
|
|
23
14
|
}
|
|
24
|
-
initialCommands = () => [];
|
|
25
|
-
isHistoryTransfer = () => true;
|
|
26
|
-
nextCommand = frame => {
|
|
27
|
-
const content = a6CommandBody(frame);
|
|
28
|
-
const control = Number.parseInt(frame[0] ?? "00", 16) || 0;
|
|
29
|
-
const count = control >> 4;
|
|
30
|
-
const index = control & 0x0f;
|
|
31
|
-
const replies = [];
|
|
32
|
-
if (count === 0) {
|
|
33
|
-
return replies;
|
|
34
|
-
}
|
|
35
|
-
if (!(count === 1 && content.length === 1 && content[0] === "01")) {
|
|
36
|
-
replies.push(command(A6_SCALE_ACK, ["00", "01", "01"]));
|
|
37
|
-
}
|
|
38
|
-
if (count === 1) {
|
|
39
|
-
replies.push(...this.processMessage(content));
|
|
40
|
-
return replies;
|
|
41
|
-
}
|
|
42
|
-
if (index === 0) {
|
|
43
|
-
this.fragments = Array.from({
|
|
44
|
-
length: count
|
|
45
|
-
}, () => []);
|
|
46
|
-
this.expectedFragmentCount = count;
|
|
47
|
-
}
|
|
48
|
-
if (!this.fragments || this.expectedFragmentCount !== count) {
|
|
49
|
-
this.fragments = undefined;
|
|
50
|
-
this.expectedFragmentCount = 0;
|
|
51
|
-
return replies;
|
|
52
|
-
}
|
|
53
|
-
this.fragments[index] = content;
|
|
54
|
-
if (this.fragments.some(part => part.length === 0)) {
|
|
55
|
-
return replies;
|
|
56
|
-
}
|
|
57
|
-
const assembled = this.fragments.flat();
|
|
58
|
-
this.fragments = undefined;
|
|
59
|
-
this.expectedFragmentCount = 0;
|
|
60
|
-
replies.push(...this.processMessage(assembled));
|
|
61
|
-
return replies;
|
|
62
|
-
};
|
|
63
15
|
processMessage = content => {
|
|
64
16
|
const message = decodeA6Command(content, this.key);
|
|
65
17
|
if (!message) {
|
|
@@ -71,7 +23,7 @@ export class A6ScaleSequencer {
|
|
|
71
23
|
}
|
|
72
24
|
this.userNumber = message.body[6] ?? 0;
|
|
73
25
|
const response = encodeA6Command(0x0008, [0x01, ...message.body.slice(0, 6), 0x00, 0x02], this.key);
|
|
74
|
-
return response ? [command(A6_SCALE_WRITE, response)] : [];
|
|
26
|
+
return response ? [this.command(A6_SCALE_WRITE, response)] : [];
|
|
75
27
|
}
|
|
76
28
|
if (message.command === 0x0009) {
|
|
77
29
|
const now = this.options.clockSync?.now?.() ?? new Date();
|
|
@@ -79,7 +31,7 @@ export class A6ScaleSequencer {
|
|
|
79
31
|
const timezone = this.options.clockSync?.timezone === "utc" ? 48 : 48 - Math.round(now.getTimezoneOffset() / 15);
|
|
80
32
|
const response = encodeA6Command(0x000a, [0x18, seconds >>> 24 & 0xff, seconds >>> 16 & 0xff, seconds >>> 8 & 0xff, seconds & 0xff, timezone], this.key);
|
|
81
33
|
const sync = encodeA6Command(0x4801, [this.userNumber, 1], this.key);
|
|
82
|
-
return [...(response ? [command(A6_SCALE_WRITE, response)] : []), ...(sync ? [command(A6_SCALE_WRITE, sync, 500)] : [])];
|
|
34
|
+
return [...(response ? [this.command(A6_SCALE_WRITE, response)] : []), ...(sync ? [this.command(A6_SCALE_WRITE, sync, 500)] : [])];
|
|
83
35
|
}
|
|
84
36
|
if (message.command === A6_SCALE_WEIGHT) {
|
|
85
37
|
const weight = parseA6Weight(message.body);
|
package/lib/module/modules/bt-management/services/devices/transtek/a6-scale.sequencer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MeasurementTypeKey","CaseType","parseA6Weight","
|
|
1
|
+
{"version":3,"names":["MeasurementTypeKey","CaseType","parseA6Weight","A6_SCALE_SERVICE","A6_SCALE_WEIGHT","A6_SCALE_WRITE","decodeA6Command","encodeA6Command","A6Sequencer","A6ScaleSequencer","userNumber","constructor","options","processMessage","content","message","key","command","body","length","response","slice","now","clockSync","Date","seconds","Math","floor","getTime","timezone","round","getTimezoneOffset","sync","weight","onResult","caseType","RESULT","measurementTypeKey","bodyWeight"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/transtek/a6-scale.sequencer.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,YAAY;AAE/C,SAASC,QAAQ,QAAQ,6BAA0B;AAOnD,SAASC,aAAa,QAAQ,4BAAyB;AACvD,SACEC,gBAAgB,EAChBC,eAAe,EACfC,cAAc,EACdC,eAAe,EACfC,eAAe,QACV,wBAAqB;AAC5B,SAASC,WAAW,QAAQ,mBAAgB;AAc5C;AACA,OAAO,MAAMC,gBAAgB,SAASD,WAAW,CAAC;EACxCE,UAAU,GAAG,CAAC;EAEfC,WAAWA,CAAkBC,OAAgC,EAAE;IACpE,KAAK,CAACT,gBAAgB,EAAES,OAAO,CAAC;IAAC,KADCA,OAAgC,GAAhCA,OAAgC;EAEpE;EAEUC,cAAc,GAAIC,OAA0B,IAAsB;IAC1E,MAAMC,OAAO,GAAGT,eAAe,CAACQ,OAAO,EAAE,IAAI,CAACE,GAAG,CAAC;IAElD,IAAI,CAACD,OAAO,EAAE;MAC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AAC;MAED,MAAMgB,IAAI,GAAGzB,eAAe,CAAC,MAAM,EAAE,CAAC,IAAI,CAACG,UAAU,EAAE,CAAC,CAAC,EAAE,IAAI,CAACM,GAAG,CAAC;MAEpE,OAAO,CACL,IAAII,QAAQ,GAAG,CAAC,IAAI,CAACH,OAAO,CAACZ,cAAc,EAAEe,QAAQ,CAAC,CAAC,GAAG,EAAE,CAAC,EAC7D,IAAIY,IAAI,GAAG,CAAC,IAAI,CAACf,OAAO,CAACZ,cAAc,EAAE2B,IAAI,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,CAC3D;IACH;IAEA,IAAIjB,OAAO,CAACE,OAAO,KAAKb,eAAe,EAAE;MACvC,MAAM6B,MAAM,GAAG/B,aAAa,CAACa,OAAO,CAACG,IAAI,CAAC;MAE1C,IAAIe,MAAM,EAAE;QACV,IAAI,CAACrB,OAAO,CAACsB,QAAQ,CAAC;UACpBC,QAAQ,EAAElC,QAAQ,CAACmC,MAAM;UACzBC,kBAAkB,EAAErC,kBAAkB,CAACsC,UAAU;UACjD,GAAGL;QACL,CAAa,CAAC;MAChB;IACF;IAEA,OAAO,EAAE;EACX,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { NO_PARSING_CASES } from "../../../constants/no-parsing-cases.js";
|
|
4
|
+
import { IntegratedDevices } from "../../../types/integrated-devices.js";
|
|
5
|
+
import { BTManagedDevice } from "../bt-managed-device.js";
|
|
6
|
+
import { A6BloodPressureSequencer } from "./a6-blood-pressure.sequencer.js";
|
|
7
|
+
import { A6_BPM_SERVICE, A6_SCALE_NOTIFY, A6_SCALE_SERVICE, A6_SCALE_WRITE, A6ScaleFrameReader } from "./a6-scale.protocol.js";
|
|
8
|
+
import { A6ScaleSequencer } from "./a6-scale.sequencer.js";
|
|
9
|
+
/** What differs between the A6 scale (A602) and the A6 blood-pressure monitor (A610). */
|
|
10
|
+
const A6_DEVICES = {
|
|
11
|
+
[IntegratedDevices.RPM_SCALE]: {
|
|
12
|
+
service: A6_SCALE_SERVICE,
|
|
13
|
+
sequencer: options => new A6ScaleSequencer(options)
|
|
14
|
+
},
|
|
15
|
+
[IntegratedDevices.TRANSTEK_A6_BPM]: {
|
|
16
|
+
service: A6_BPM_SERVICE,
|
|
17
|
+
sequencer: options => new A6BloodPressureSequencer(options)
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
const servicesFor = service => [{
|
|
21
|
+
uuid: service,
|
|
22
|
+
monitorUuids: [{
|
|
23
|
+
uuid: A6_SCALE_NOTIFY,
|
|
24
|
+
parsingModel: NO_PARSING_CASES
|
|
25
|
+
}],
|
|
26
|
+
writeUuid: {
|
|
27
|
+
uuid: A6_SCALE_WRITE,
|
|
28
|
+
mainCommandUuid: "0007"
|
|
29
|
+
}
|
|
30
|
+
}];
|
|
31
|
+
|
|
32
|
+
/** Transtek A6-generation devices: the GBS-2012-B scale family and the A6 blood-pressure monitors. */
|
|
33
|
+
export class TranstekA6Device extends BTManagedDevice {
|
|
34
|
+
stuckDataTimeout = 60_000;
|
|
35
|
+
constructor(device, params) {
|
|
36
|
+
super(device, params);
|
|
37
|
+
const a6 = A6_DEVICES[params.deviceName];
|
|
38
|
+
this.mainServices = servicesFor(a6.service);
|
|
39
|
+
this.frameReader = new A6ScaleFrameReader();
|
|
40
|
+
this.createCommandSequencer = () => a6.sequencer({
|
|
41
|
+
deviceId: device.id,
|
|
42
|
+
manufacturerData: device.manufacturerData,
|
|
43
|
+
clockSync: params.clockSync,
|
|
44
|
+
onResult: result => this.onResult?.(result)
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=a6.device.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["NO_PARSING_CASES","IntegratedDevices","BTManagedDevice","A6BloodPressureSequencer","A6_BPM_SERVICE","A6_SCALE_NOTIFY","A6_SCALE_SERVICE","A6_SCALE_WRITE","A6ScaleFrameReader","A6ScaleSequencer","A6_DEVICES","RPM_SCALE","service","sequencer","options","TRANSTEK_A6_BPM","servicesFor","uuid","monitorUuids","parsingModel","writeUuid","mainCommandUuid","TranstekA6Device","stuckDataTimeout","constructor","device","params","a6","deviceName","mainServices","frameReader","createCommandSequencer","deviceId","id","manufacturerData","clockSync","onResult","result"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/transtek/a6.device.ts"],"mappings":";;AAEA,SAASA,gBAAgB,QAAQ,wCAAqC;AAKtE,SAASC,iBAAiB,QAAQ,sCAAmC;AAGrE,SAASC,eAAe,QAAQ,yBAAsB;AAEtD,SAASC,wBAAwB,QAAQ,kCAA+B;AACxE,SACEC,cAAc,EACdC,eAAe,EACfC,gBAAgB,EAChBC,cAAc,EACdC,kBAAkB,QACb,wBAAqB;AAC5B,SAASC,gBAAgB,QAAQ,yBAAsB;AAWvD;AACA,MAAMC,UAAkH,GAAG;EACzH,CAACT,iBAAiB,CAACU,SAAS,GAAG;IAC7BC,OAAO,EAAEN,gBAAgB;IACzBO,SAAS,EAAGC,OAAO,IAAK,IAAIL,gBAAgB,CAACK,OAAO;EACtD,CAAC;EACD,CAACb,iBAAiB,CAACc,eAAe,GAAG;IACnCH,OAAO,EAAER,cAAc;IACvBS,SAAS,EAAGC,OAAO,IAAK,IAAIX,wBAAwB,CAACW,OAAO;EAC9D;AACF,CAAC;AAED,MAAME,WAAW,GAAIJ,OAAe,IAAiB,CACnD;EACEK,IAAI,EAAEL,OAAO;EACbM,YAAY,EAAE,CAAC;IAAED,IAAI,EAAEZ,eAAe;IAAEc,YAAY,EAAEnB;EAAiB,CAAC,CAAC;EACzEoB,SAAS,EAAE;IAAEH,IAAI,EAAEV,cAAc;IAAEc,eAAe,EAAE;EAAO;AAC7D,CAAC,CACF;;AAED;AACA,OAAO,MAAMC,gBAAgB,SAASpB,eAAe,CAAgB;EAEzDqB,gBAAgB,GAAG,MAAM;EAE5BC,WAAWA,CAACC,MAAc,EAAEC,MAAyC,EAAE;IAC5E,KAAK,CAACD,MAAM,EAAEC,MAAM,CAAC;IAErB,MAAMC,EAAE,GAAGjB,UAAU,CAACgB,MAAM,CAACE,UAAU,CAAC;IAExC,IAAI,CAACC,YAAY,GAAGb,WAAW,CAACW,EAAE,CAACf,OAAO,CAAC;IAC3C,IAAI,CAACkB,WAAW,GAAG,IAAItB,kBAAkB,CAAC,CAAC;IAC3C,IAAI,CAACuB,sBAAsB,GAAG,MAC5BJ,EAAE,CAACd,SAAS,CAAC;MACXmB,QAAQ,EAAEP,MAAM,CAACQ,EAAE;MACnBC,gBAAgB,EAAET,MAAM,CAACS,gBAAgB;MACzCC,SAAS,EAAET,MAAM,CAACS,SAAS;MAC3BC,QAAQ,EAAGC,MAAM,IAAK,IAAI,CAACD,QAAQ,GAAGC,MAAM;IAC9C,CAAC,CAAC;EACN;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { A6_SCALE_ACK, a6CommandBody, a6EncryptionKey } from "./a6-scale.protocol.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The A6 session both Transtek A6 devices share: control-byte framing, fragment reassembly, the
|
|
7
|
+
* acknowledgement of each frame, and the device's encryption key. Subclasses handle only the
|
|
8
|
+
* decoded messages of their own service.
|
|
9
|
+
*/
|
|
10
|
+
export class A6Sequencer {
|
|
11
|
+
expectedFragmentCount = 0;
|
|
12
|
+
constructor(serviceUuid, device) {
|
|
13
|
+
this.serviceUuid = serviceUuid;
|
|
14
|
+
this.key = a6EncryptionKey(device.deviceId, device.manufacturerData);
|
|
15
|
+
}
|
|
16
|
+
initialCommands = () => [];
|
|
17
|
+
isHistoryTransfer = () => true;
|
|
18
|
+
nextCommand = frame => {
|
|
19
|
+
const content = a6CommandBody(frame);
|
|
20
|
+
const control = Number.parseInt(frame[0] ?? "00", 16) || 0;
|
|
21
|
+
const count = control >> 4;
|
|
22
|
+
const index = control & 0x0f;
|
|
23
|
+
const replies = [];
|
|
24
|
+
if (count === 0) {
|
|
25
|
+
return replies;
|
|
26
|
+
}
|
|
27
|
+
if (!(count === 1 && content.length === 1 && content[0] === "01")) {
|
|
28
|
+
replies.push(this.command(A6_SCALE_ACK, ["00", "01", "01"]));
|
|
29
|
+
}
|
|
30
|
+
if (count === 1) {
|
|
31
|
+
replies.push(...this.processMessage(content));
|
|
32
|
+
return replies;
|
|
33
|
+
}
|
|
34
|
+
if (index === 0) {
|
|
35
|
+
this.fragments = Array.from({
|
|
36
|
+
length: count
|
|
37
|
+
}, () => []);
|
|
38
|
+
this.expectedFragmentCount = count;
|
|
39
|
+
}
|
|
40
|
+
if (!this.fragments || this.expectedFragmentCount !== count) {
|
|
41
|
+
this.fragments = undefined;
|
|
42
|
+
this.expectedFragmentCount = 0;
|
|
43
|
+
return replies;
|
|
44
|
+
}
|
|
45
|
+
this.fragments[index] = content;
|
|
46
|
+
if (this.fragments.some(part => part.length === 0)) {
|
|
47
|
+
return replies;
|
|
48
|
+
}
|
|
49
|
+
const assembled = this.fragments.flat();
|
|
50
|
+
this.fragments = undefined;
|
|
51
|
+
this.expectedFragmentCount = 0;
|
|
52
|
+
replies.push(...this.processMessage(assembled));
|
|
53
|
+
return replies;
|
|
54
|
+
};
|
|
55
|
+
command(characteristicUuid, frame, delayBeforeWriteMs) {
|
|
56
|
+
return {
|
|
57
|
+
serviceUuid: this.serviceUuid,
|
|
58
|
+
characteristicUuid,
|
|
59
|
+
frame,
|
|
60
|
+
...(delayBeforeWriteMs ? {
|
|
61
|
+
delayBeforeWriteMs
|
|
62
|
+
} : {})
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=a6.sequencer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["A6_SCALE_ACK","a6CommandBody","a6EncryptionKey","A6Sequencer","expectedFragmentCount","constructor","serviceUuid","device","key","deviceId","manufacturerData","initialCommands","isHistoryTransfer","nextCommand","frame","content","control","Number","parseInt","count","index","replies","length","push","command","processMessage","fragments","Array","from","undefined","some","part","assembled","flat","characteristicUuid","delayBeforeWriteMs"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/transtek/a6.sequencer.ts"],"mappings":";;AAGA,SAASA,YAAY,EAAEC,aAAa,EAAEC,eAAe,QAAQ,wBAAqB;;AAElF;AACA;AACA;AACA;AACA;AACA,OAAO,MAAeC,WAAW,CAA6B;EAEpDC,qBAAqB,GAAG,CAAC;EAGvBC,WAAWA,CACFC,WAAmB,EACpCC,MAA8D,EAC9D;IAAA,KAFiBD,WAAmB,GAAnBA,WAAmB;IAGpC,IAAI,CAACE,GAAG,GAAGN,eAAe,CAACK,MAAM,CAACE,QAAQ,EAAEF,MAAM,CAACG,gBAAgB,CAAC;EACtE;EAEOC,eAAe,GAAGA,CAAA,KAAgC,EAAE;EAEpDC,iBAAiB,GAAGA,CAAA,KAAe,IAAI;EAEvCC,WAAW,GAAIC,KAAwB,IAA+B;IAC3E,MAAMC,OAAO,GAAGd,aAAa,CAACa,KAAK,CAAC;IACpC,MAAME,OAAO,GAAGC,MAAM,CAACC,QAAQ,CAACJ,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC;IAC1D,MAAMK,KAAK,GAAGH,OAAO,IAAI,CAAC;IAC1B,MAAMI,KAAK,GAAGJ,OAAO,GAAG,IAAI;IAC5B,MAAMK,OAAwB,GAAG,EAAE;IAEnC,IAAIF,KAAK,KAAK,CAAC,EAAE;MACf,OAAOE,OAAO;IAChB;IAEA,IAAI,EAAEF,KAAK,KAAK,CAAC,IAAIJ,OAAO,CAACO,MAAM,KAAK,CAAC,IAAIP,OAAO,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,EAAE;MACjEM,OAAO,CAACE,IAAI,CAAC,IAAI,CAACC,OAAO,CAACxB,YAAY,EAAE,CAAC,IA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CAAC;IACtD,CAAC;EACH;AACF","ignoreList":[]}
|
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { MeasurementTypeKey } from "@ovok/core";
|
|
4
|
+
import { NO_PARSING_CASES } from "../../../constants/no-parsing-cases.js";
|
|
4
5
|
import { BTManagedDevice } from "../bt-managed-device.js";
|
|
5
6
|
import { MAMBO_A5_LOGIN, MAMBO_A5_NOTIFY, MAMBO_A5_SERVICE, MAMBO_A5_WRITE, MamboA5FrameReader } from "./mambo-a5.protocol.js";
|
|
6
7
|
import { MamboA5Sequencer } from "./mambo-a5.sequencer.js";
|
|
7
|
-
const acceptNothing = {
|
|
8
|
-
caseValuePosition: [],
|
|
9
|
-
cases: []
|
|
10
|
-
};
|
|
11
8
|
const mainServices = [{
|
|
12
9
|
uuid: MAMBO_A5_SERVICE,
|
|
13
10
|
monitorUuids: [{
|
|
14
11
|
uuid: MAMBO_A5_LOGIN,
|
|
15
|
-
parsingModel:
|
|
12
|
+
parsingModel: NO_PARSING_CASES
|
|
16
13
|
}, {
|
|
17
14
|
uuid: MAMBO_A5_NOTIFY,
|
|
18
|
-
parsingModel:
|
|
15
|
+
parsingModel: NO_PARSING_CASES
|
|
19
16
|
}],
|
|
20
17
|
writeUuid: {
|
|
21
18
|
uuid: MAMBO_A5_WRITE,
|
|
@@ -27,7 +24,6 @@ const mainServices = [{
|
|
|
27
24
|
export class MamboA5Device extends BTManagedDevice {
|
|
28
25
|
mainServices = mainServices;
|
|
29
26
|
stuckDataTimeout = 60_000;
|
|
30
|
-
onStreamStart = undefined;
|
|
31
27
|
getSupportedMeasurementTypeKeys() {
|
|
32
28
|
return [MeasurementTypeKey.bloodOxygenPulseRate];
|
|
33
29
|
}
|
|
@@ -39,8 +35,5 @@ export class MamboA5Device extends BTManagedDevice {
|
|
|
39
35
|
onResult: result => this.onResult?.(result)
|
|
40
36
|
});
|
|
41
37
|
}
|
|
42
|
-
handleSuccessResult() {
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
38
|
}
|
|
46
39
|
//# sourceMappingURL=mambo-a5.device.js.map
|