Commit 35fa251a authored by Emmanuel Papillon's avatar Emmanuel Papillon Committed by Generic Bliss account for Control Software

add high voltage state reading and reset command

parent a3ee43ad
Pipeline #34375 passed with stages
in 5 minutes and 33 seconds
......@@ -122,6 +122,8 @@ class LIBEIGER Camera : public HwMaxImageSizeCallbackGen, public EventCallbackGe
void getTemperature(double&);
void getHumidity(double&);
void getHighVoltageState(std::string&);
void resetHighVoltage();
void setCountrateCorrection(bool);
void getCountrateCorrection(bool&);
......
......@@ -137,9 +137,10 @@ namespace eigerapi
typedef std::shared_ptr<Transfer> TransferReq;
enum COMMAND_NAME {INITIALIZE,ARM, DISARM,TRIGGER,CANCEL,ABORT,
FILEWRITER_CLEAR};
FILEWRITER_CLEAR, HV_RESET};
enum PARAM_NAME {TEMP,
HUMIDITY,
HVSTATE,
DETECTOR_STATUS,
PIXELDEPTH,
X_PIXEL_SIZE,
......
......@@ -41,6 +41,7 @@ typedef Requests::CurlReq CurlReq;
static const char* CSTR_EIGERCONFIG = "config";
static const char* CSTR_EIGERSTATUS = "status";
static const char* CSTR_EIGERSTATUS_BOARD = "status/board_000";
static const char* CSTR_EIGERSTATUS_HV = "status/high_voltage";
static const char* CSTR_EIGERCOMMAND = "command";
static const char* CSTR_EIGERFILES = "files";
static const char* CSTR_SUBSYSTEMFILEWRITER = "filewriter";
......@@ -83,6 +84,7 @@ static CommandIndex CommandsDescription[] = {
{Requests::CANCEL, {"cancel",CSTR_SUBSYSTEMDETECTOR,CSTR_EIGERCOMMAND}},
{Requests::ABORT, {"abort",CSTR_SUBSYSTEMDETECTOR,CSTR_EIGERCOMMAND}},
{Requests::FILEWRITER_CLEAR, {"clear",CSTR_SUBSYSTEMFILEWRITER,CSTR_EIGERCOMMAND}},
{Requests::HV_RESET, {"hv_reset",CSTR_SUBSYSTEMDETECTOR,CSTR_EIGERCOMMAND}},
};
const char* get_cmd_name(Requests::COMMAND_NAME cmd_name)
......@@ -105,6 +107,7 @@ ParamIndex ParamDescription[] = {
// Detector Read only values
{Requests::TEMP, {"th0_temp",CSTR_SUBSYSTEMDETECTOR,CSTR_EIGERSTATUS_BOARD}},
{Requests::HUMIDITY, {"th0_humidity",CSTR_SUBSYSTEMDETECTOR,CSTR_EIGERSTATUS_BOARD}},
{Requests::HVSTATE, {"state",CSTR_SUBSYSTEMDETECTOR,CSTR_EIGERSTATUS_HV}},
{Requests::DETECTOR_STATUS, {"state",CSTR_SUBSYSTEMDETECTOR,CSTR_EIGERSTATUS}},
{Requests::PIXELDEPTH, {"bit_depth_readout"}},
{Requests::X_PIXEL_SIZE, {"x_pixel_size"}},
......
......@@ -81,6 +81,8 @@ namespace Eiger
void getTemperature(double& /Out/);
void getHumidity(double& /Out/);
void getHighVoltageState(std::string& /Out/);
void resetHighVoltage();
void setCountrateCorrection(const bool);
void getCountrateCorrection(bool& /Out/);
......
......@@ -848,6 +848,26 @@ void Camera::getHumidity(double &humidity)
}
//-----------------------------------------------------------------------------
/// Returns the high voltage state
/*!
@return state string
*/
//-----------------------------------------------------------------------------
void Camera::getHighVoltageState(std::string &hvstate)
{
DEB_MEMBER_FUNCT();
getParam(Requests::HVSTATE,hvstate);
}
void Camera::resetHighVoltage()
{
DEB_MEMBER_FUNCT();
sendCommand(Requests::HV_RESET);
DEB_TRACE() << "reset HighVoltage";
}
//-----------------------------------------------------------------------------
/// Count rate correction setter
//-----------------------------------------------------------------------------
......
......@@ -181,6 +181,13 @@ class Eiger(PyTango.Device_4Impl):
stream_stats.ave_time(),
stream_stats.ave_speed()]
#----------------------------------------------------------------------------
# reset high voltage
#----------------------------------------------------------------------------
@Core.DEB_MEMBER_FUNCT
def resetHighVoltage(self):
_EigerCamera.resetHighVoltage()
#==================================================================
#
# EigerClass class definition
......@@ -221,6 +228,9 @@ class EigerClass(PyTango.DeviceClass):
'latchStreamStatistics':
[[PyTango.DevBoolean, "Reset statistics"],
[PyTango.DevVarDoubleArray, "[<ave_size>, <ave_time>, <ave_speed>]"]],
'resetHighVoltage':
[[PyTango.DevVoid, ""],
[PyTango.DevVoid, ""]],
}
......@@ -238,6 +248,10 @@ class EigerClass(PyTango.DeviceClass):
[[PyTango.DevFloat,
PyTango.SCALAR,
PyTango.READ]],
'high_voltage_state':
[[PyTango.DevString,
PyTango.SCALAR,
PyTango.READ]],
'countrate_correction':
[[PyTango.DevString,
PyTango.SCALAR,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment