mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 18:17:59 +02:00
merge from developer
This commit is contained in:
@ -204,6 +204,17 @@ inline std::string ToString(const defs::detectorModeType s) {
|
||||
}
|
||||
}
|
||||
|
||||
inline std::string ToString(const defs::burstModeType s) {
|
||||
switch (s) {
|
||||
case defs::INTERNAL:
|
||||
return std::string("internal");
|
||||
case defs::EXTERNAL:
|
||||
return std::string("external");
|
||||
default:
|
||||
return std::string("Unknown");
|
||||
}
|
||||
}
|
||||
|
||||
// in case we already have a string
|
||||
// causes a copy but might be needed in generic code
|
||||
inline std::string ToString(const std::string& s) {
|
||||
@ -550,6 +561,16 @@ inline defs::dacIndex StringTo(const std::string& s) {
|
||||
throw sls::RuntimeError("Unknown dac Index " + s);
|
||||
}
|
||||
|
||||
template <>
|
||||
inline defs::burstModeType StringTo(const std::string& s) {
|
||||
if (s == "internal")
|
||||
return defs::INTERNAL;
|
||||
if (s == "external")
|
||||
return defs::EXTERNAL;
|
||||
throw sls::RuntimeError("Unknown burst mode type" + s);
|
||||
}
|
||||
|
||||
|
||||
/** For types with a .str() method use this for conversion */
|
||||
template <typename T>
|
||||
typename std::enable_if<has_str<T>::value, std::string>::type
|
||||
|
@ -438,6 +438,14 @@ class slsDetectorDefs {
|
||||
ANALOG /** < analog */
|
||||
};
|
||||
|
||||
/**
|
||||
* burst mode type for gotthard2
|
||||
*/
|
||||
enum burstModeType {
|
||||
INTERNAL,
|
||||
EXTERNAL,
|
||||
};
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
protected:
|
||||
|
@ -188,6 +188,8 @@ enum detFuncs{
|
||||
F_GET_ADC_ENABLE_MASK_10G,
|
||||
F_SET_COUNTER_MASK,
|
||||
F_GET_COUNTER_MASK,
|
||||
F_SET_BURST_TYPE,
|
||||
F_GET_BURST_TYPE,
|
||||
NUM_DET_FUNCTIONS,
|
||||
|
||||
RECEIVER_ENUM_START = 256, /**< detector function should not exceed this (detector server should not compile anyway) */
|
||||
@ -443,7 +445,8 @@ static const char* getFunctionNameFromEnum(enum detFuncs func) {
|
||||
case F_GET_ADC_ENABLE_MASK_10G: return "F_GET_ADC_ENABLE_MASK_10G";
|
||||
case F_SET_COUNTER_MASK: return "F_SET_COUNTER_MASK";
|
||||
case F_GET_COUNTER_MASK: return "F_GET_COUNTER_MASK";
|
||||
|
||||
case F_SET_BURST_TYPE: return "F_SET_BURST_TYPE";
|
||||
case F_GET_BURST_TYPE: return "F_GET_BURST_TYPE";
|
||||
|
||||
case NUM_DET_FUNCTIONS: return "NUM_DET_FUNCTIONS";
|
||||
case RECEIVER_ENUM_START: return "RECEIVER_ENUM_START";
|
||||
|
@ -4,9 +4,9 @@
|
||||
#define APIRECEIVER 0x190722
|
||||
#define APIGUI 0x190723
|
||||
#define APIMOENCH 0x190820
|
||||
#define APIGOTTHARD2 0x191127
|
||||
#define APIGOTTHARD 0x191127
|
||||
#define APIJUNGFRAU 0x191127
|
||||
#define APICTB 0x191210
|
||||
#define APIEIGER 0x200121
|
||||
#define APIMYTHEN3 0x200121
|
||||
#define APICTB 0x200122
|
||||
#define APIGOTTHARD 0x200122
|
||||
#define APIGOTTHARD2 0x200122
|
||||
#define APIJUNGFRAU 0x200122
|
||||
#define APIMYTHEN3 0x200122
|
||||
#define APIEIGER 0x200122
|
||||
|
Reference in New Issue
Block a user