This commit is contained in:
2020-05-19 18:24:32 +02:00
parent 4570ffc8ad
commit cd90f09a30
15 changed files with 966 additions and 92 deletions

View File

@@ -241,6 +241,7 @@ typedef struct {
TRIGGER_EXPOSURE, /**< trigger mode i.e. exposure is triggered */
GATED, /**< gated */
BURST_TRIGGER, /**< trigger a burst of frames */
TRIGGER_GATED, /**< trigger and gating */
NUM_TIMING_MODES
};
@@ -483,9 +484,9 @@ typedef struct {
protected:
#endif
// #ifndef MYROOT
// #include "sls_detector_funcs.h"
// #endif
// #ifndef MYROOT
// #include "sls_detector_funcs.h"
// #endif
#ifdef __cplusplus
};

View File

@@ -198,6 +198,12 @@ enum detFuncs {
F_UPDATE_RATE_CORRECTION,
F_GET_RECEIVER_PARAMETERS,
F_START_PATTERN,
F_SET_NUM_GATES,
F_GET_NUM_GATES,
F_SET_GATE_DELAY,
F_GET_GATE_DELAY,
F_GET_EXPTIME_ALL_GATES,
F_GET_GATE_DELAY_ALL_GATES,
NUM_DET_FUNCTIONS,
RECEIVER_ENUM_START = 256, /**< detector function should not exceed this
@@ -492,6 +498,13 @@ const char* getFunctionNameFromEnum(enum detFuncs func) {
case F_UPDATE_RATE_CORRECTION: return "F_UPDATE_RATE_CORRECTION";
case F_GET_RECEIVER_PARAMETERS: return "F_GET_RECEIVER_PARAMETERS";
case F_START_PATTERN: return "F_START_PATTERN";
case F_SET_NUM_GATES: return "F_SET_NUM_GATES";
case F_GET_NUM_GATES: return "F_GET_NUM_GATES";
case F_SET_GATE_DELAY: return "F_SET_GATE_DELAY";
case F_GET_GATE_DELAY: return "F_GET_GATE_DELAY";
case F_GET_EXPTIME_ALL_GATES: return "F_GET_EXPTIME_ALL_GATES";
case F_GET_GATE_DELAY_ALL_GATES: return "F_GET_GATE_DELAY_ALL_GATES";
case NUM_DET_FUNCTIONS: return "NUM_DET_FUNCTIONS";
case RECEIVER_ENUM_START: return "RECEIVER_ENUM_START";

View File

@@ -128,6 +128,8 @@ std::string ToString(const defs::timingMode s) {
return std::string("gating");
case defs::BURST_TRIGGER:
return std::string("burst_trigger");
case defs::TRIGGER_GATED:
return std::string("trigger_gating");
default:
return std::string("Unknown");
}
@@ -318,6 +320,8 @@ template <> defs::timingMode StringTo(const std::string &s) {
return defs::GATED;
if (s == "burst_trigger")
return defs::BURST_TRIGGER;
if (s == "trigger_gating")
return defs::TRIGGER_GATED;
throw sls::RuntimeError("Unknown timing mode " + s);
}