From f4a5ddb6cca06464c91f52c3548919c390db23fd Mon Sep 17 00:00:00 2001 From: Lars Kool Date: Mon, 24 Jun 2024 10:21:24 +0200 Subject: [PATCH] Added Pressure and Volumetric pump base templates --- MMDevice/DeviceBase.h | 89 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) diff --git a/MMDevice/DeviceBase.h b/MMDevice/DeviceBase.h index 883b7e34b..aff685a80 100644 --- a/MMDevice/DeviceBase.h +++ b/MMDevice/DeviceBase.h @@ -2480,6 +2480,95 @@ class CStateDeviceBase : public CDeviceBase std::map labels_; }; +/** +* Base class for creating pump device adapters. +*/ +template +class CVolumetricPumpBase : public CDeviceBase +{ + int Home() + { + return DEVICE_UNSUPPORTED_COMMAND; + } + + int InvertDirection(bool /*state*/) + { + return DEVICE_UNSUPPORTED_COMMAND; + } + + int IsDirectionInverted(bool& /*state*/) + { + return DEVICE_UNSUPPORTED_COMMAND; + } + + int SetVolumeUl(double /*volume*/) + { + return DEVICE_UNSUPPORTED_COMMAND; + } + + int GetVolumeUl(double& /*volume*/) + { + return DEVICE_UNSUPPORTED_COMMAND; + } + + int SetMaxVolumeUl(double /*volume*/) + { + return DEVICE_UNSUPPORTED_COMMAND; + } + + int GetMaxVolumeUl(double& /*volume*/) + { + return DEVICE_UNSUPPORTED_COMMAND; + } + + int SetFlowrateUlPerSecond(double /*flowrate*/) + { + return DEVICE_UNSUPPORTED_COMMAND; + } + + int GetFlowrateUlPerSecond(double& /*flowrate*/) + { + return DEVICE_UNSUPPORTED_COMMAND; + } + + int Start() + { + return DEVICE_UNSUPPORTED_COMMAND; + } + + int DispenseDuration(double /*durSec*/) + { + return DEVICE_UNSUPPORTED_COMMAND; + } + + int DispenseVolume(double /*volUl*/) + { + return DEVICE_UNSUPPORTED_COMMAND; + } +}; + +/** +* Base class for creating pump device adapters. +*/ +template +class CPressurePumpBase : public CDeviceBase +{ + int Calibrate() + { + return DEVICE_UNSUPPORTED_COMMAND; + } + + int SetPressure(double /*pressure*/) + { + return DEVICE_UNSUPPORTED_COMMAND; + } + + int GetPressure(double& /*pressure*/) + { + return DEVICE_UNSUPPORTED_COMMAND; + } +}; + // _t, a macro for timing single lines. // This macros logs the text of the line, x, measures