Skip to content

Commit

Permalink
Added Pressure and Volumetric pump base templates
Browse files Browse the repository at this point in the history
  • Loading branch information
Lars-Kool committed Jun 24, 2024
1 parent 0d30f1f commit f4a5ddb
Showing 1 changed file with 89 additions and 0 deletions.
89 changes: 89 additions & 0 deletions MMDevice/DeviceBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -2480,6 +2480,95 @@ class CStateDeviceBase : public CDeviceBase<MM::State, U>
std::map<std::string, long> labels_;
};

/**
* Base class for creating pump device adapters.
*/
template <class U>
class CVolumetricPumpBase : public CDeviceBase<MM::VolumetricPump, U>
{
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 U>
class CPressurePumpBase : public CDeviceBase<MM::PressurePump, U>
{
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
Expand Down

0 comments on commit f4a5ddb

Please sign in to comment.