This commit is contained in:
Erik Frojdh 2020-09-17 12:18:34 +02:00
parent 5d648443fa
commit 2d2e80469c
2 changed files with 235 additions and 176 deletions

View File

@ -603,14 +603,16 @@ std::string CmdProxy::Adcphase(int action) {
} }
} else if (action == defs::PUT_ACTION) { } else if (action == defs::PUT_ACTION) {
if (args.size() == 1) { if (args.size() == 1) {
det->setADCPhase(StringTo<int>(args[0]), std::vector<int>{det_id}); det->setADCPhase(StringTo<int>(args[0]),
std::vector<int>{det_id});
os << args.front() << '\n'; os << args.front() << '\n';
} else if (args.size() == 2) { } else if (args.size() == 2) {
if (args[1] != "deg") { if (args[1] != "deg") {
throw sls::RuntimeError("Unknown adcphase 2nd argument " + throw sls::RuntimeError("Unknown adcphase 2nd argument " +
args[1] + ". Did you mean deg?"); args[1] + ". Did you mean deg?");
} }
det->setADCPhaseInDegrees(StringTo<int>(args[0]), std::vector<int>{det_id}); det->setADCPhaseInDegrees(StringTo<int>(args[0]),
std::vector<int>{det_id});
os << args[0] << " " << args[1] << '\n'; os << args[0] << " " << args[1] << '\n';
} else { } else {
WrongNumberOfParameters(1); WrongNumberOfParameters(1);
@ -655,14 +657,16 @@ std::string CmdProxy::Dbitphase(int action) {
} }
} else if (action == defs::PUT_ACTION) { } else if (action == defs::PUT_ACTION) {
if (args.size() == 1) { if (args.size() == 1) {
det->setDBITPhase(StringTo<int>(args[0]), std::vector<int>{det_id}); det->setDBITPhase(StringTo<int>(args[0]),
std::vector<int>{det_id});
os << args.front() << '\n'; os << args.front() << '\n';
} else if (args.size() == 2) { } else if (args.size() == 2) {
if (args[1] != "deg") { if (args[1] != "deg") {
throw sls::RuntimeError("Unknown dbitphase 2nd argument " + throw sls::RuntimeError("Unknown dbitphase 2nd argument " +
args[1] + ". Did you mean deg? "); args[1] + ". Did you mean deg? ");
} }
det->setDBITPhaseInDegrees(StringTo<int>(args[0]), std::vector<int>{det_id}); det->setDBITPhaseInDegrees(StringTo<int>(args[0]),
std::vector<int>{det_id});
os << args[0] << " " << args[1] << '\n'; os << args[0] << " " << args[1] << '\n';
} else { } else {
WrongNumberOfParameters(1); WrongNumberOfParameters(1);
@ -691,14 +695,16 @@ std::string CmdProxy::ClockFrequency(int action) {
if (args.size() != 1) { if (args.size() != 1) {
WrongNumberOfParameters(1); WrongNumberOfParameters(1);
} }
auto t = det->getClockFrequency(StringTo<int>(args[0]), std::vector<int>{det_id}); auto t = det->getClockFrequency(StringTo<int>(args[0]),
std::vector<int>{det_id});
os << OutString(t) << '\n'; os << OutString(t) << '\n';
} else if (action == defs::PUT_ACTION) { } else if (action == defs::PUT_ACTION) {
if (args.size() != 2) { if (args.size() != 2) {
WrongNumberOfParameters(2); WrongNumberOfParameters(2);
} }
det->setClockFrequency(StringTo<int>(args[0]), det->setClockFrequency(StringTo<int>(args[0]),
StringTo<int>(args[1]), std::vector<int>{det_id}); StringTo<int>(args[1]),
std::vector<int>{det_id});
os << StringTo<int>(args[1]) << '\n'; os << StringTo<int>(args[1]) << '\n';
} else { } else {
throw sls::RuntimeError("Unknown action"); throw sls::RuntimeError("Unknown action");
@ -724,7 +730,8 @@ std::string CmdProxy::ClockPhase(int action) {
} }
if (action == defs::GET_ACTION) { if (action == defs::GET_ACTION) {
if (args.size() == 1) { if (args.size() == 1) {
auto t = det->getClockPhase(StringTo<int>(args[0]), std::vector<int>{det_id}); auto t = det->getClockPhase(StringTo<int>(args[0]),
std::vector<int>{det_id});
os << OutString(t) << '\n'; os << OutString(t) << '\n';
} else if (args.size() == 2) { } else if (args.size() == 2) {
if (args[1] != "deg") { if (args[1] != "deg") {
@ -740,7 +747,8 @@ std::string CmdProxy::ClockPhase(int action) {
} else if (action == defs::PUT_ACTION) { } else if (action == defs::PUT_ACTION) {
if (args.size() == 2) { if (args.size() == 2) {
det->setClockPhase(StringTo<int>(args[0]), det->setClockPhase(StringTo<int>(args[0]),
StringTo<int>(args[1]), std::vector<int>{det_id}); StringTo<int>(args[1]),
std::vector<int>{det_id});
os << args[1] << '\n'; os << args[1] << '\n';
} else if (args.size() == 3) { } else if (args.size() == 3) {
if (args[2] != "deg") { if (args[2] != "deg") {
@ -748,7 +756,8 @@ std::string CmdProxy::ClockPhase(int action) {
". Did you mean deg?"); ". Did you mean deg?");
} }
det->setClockPhaseinDegrees(StringTo<int>(args[0]), det->setClockPhaseinDegrees(StringTo<int>(args[0]),
StringTo<int>(args[1]), std::vector<int>{det_id}); StringTo<int>(args[1]),
std::vector<int>{det_id});
os << args[1] << " " << args[2] << '\n'; os << args[1] << " " << args[2] << '\n';
} else { } else {
WrongNumberOfParameters(1); WrongNumberOfParameters(1);
@ -777,8 +786,8 @@ std::string CmdProxy::MaxClockPhaseShift(int action) {
if (args.size() != 1) { if (args.size() != 1) {
WrongNumberOfParameters(1); WrongNumberOfParameters(1);
} }
auto t = auto t = det->getMaxClockPhaseShift(StringTo<int>(args[0]),
det->getMaxClockPhaseShift(StringTo<int>(args[0]), std::vector<int>{det_id}); std::vector<int>{det_id});
os << OutString(t) << '\n'; os << OutString(t) << '\n';
} else if (action == defs::PUT_ACTION) { } else if (action == defs::PUT_ACTION) {
throw sls::RuntimeError("Cannot put"); throw sls::RuntimeError("Cannot put");
@ -806,7 +815,8 @@ std::string CmdProxy::ClockDivider(int action) {
if (args.size() != 1) { if (args.size() != 1) {
WrongNumberOfParameters(1); WrongNumberOfParameters(1);
} }
auto t = det->getClockDivider(StringTo<int>(args[0]), std::vector<int>{det_id}); auto t = det->getClockDivider(StringTo<int>(args[0]),
std::vector<int>{det_id});
os << OutString(t) << '\n'; os << OutString(t) << '\n';
} else if (action == defs::PUT_ACTION) { } else if (action == defs::PUT_ACTION) {
if (args.size() != 2) { if (args.size() != 2) {
@ -840,7 +850,8 @@ std::string CmdProxy::ExternalSignal(int action) {
if (args.size() != 1) { if (args.size() != 1) {
WrongNumberOfParameters(1); WrongNumberOfParameters(1);
} }
auto t = det->getExternalSignalFlags(StringTo<int>(args[0]), std::vector<int>{det_id}); auto t = det->getExternalSignalFlags(StringTo<int>(args[0]),
std::vector<int>{det_id});
os << args[0] << " " << OutString(t) << '\n'; os << args[0] << " " << OutString(t) << '\n';
} else if (action == defs::PUT_ACTION) { } else if (action == defs::PUT_ACTION) {
if (args.size() != 2) { if (args.size() != 2) {
@ -848,7 +859,8 @@ std::string CmdProxy::ExternalSignal(int action) {
} }
det->setExternalSignalFlags( det->setExternalSignalFlags(
StringTo<int>(args[0]), StringTo<int>(args[0]),
StringTo<slsDetectorDefs::externalSignalFlag>(args[1]), std::vector<int>{det_id}); StringTo<slsDetectorDefs::externalSignalFlag>(args[1]),
std::vector<int>{det_id});
os << args[0] << " " << args[1] << '\n'; os << args[0] << " " << args[1] << '\n';
} else { } else {
throw sls::RuntimeError("Unknown action"); throw sls::RuntimeError("Unknown action");
@ -872,10 +884,14 @@ std::string CmdProxy::TemperatureValues(int action) {
if (t.size() > 0) { if (t.size() > 0) {
auto it = t.cbegin(); auto it = t.cbegin();
os << ToString(*it) << ' '; os << ToString(*it) << ' ';
os << OutString(det->getTemperature(*it++, std::vector<int>{det_id})) << " °C"; os << OutString(
det->getTemperature(*it++, std::vector<int>{det_id}))
<< " °C";
while (it != t.cend()) { while (it != t.cend()) {
os << ", " << ToString(*it) << ' '; os << ", " << ToString(*it) << ' ';
os << OutString(det->getTemperature(*it++, std::vector<int>{det_id})) << " °C"; os << OutString(
det->getTemperature(*it++, std::vector<int>{det_id}))
<< " °C";
} }
} }
os << "]\n"; os << "]\n";
@ -911,8 +927,9 @@ std::string CmdProxy::Dac(int action) {
} else if (args.size() > 2) { } else if (args.size() > 2) {
WrongNumberOfParameters(1); WrongNumberOfParameters(1);
} }
auto t = det->getDAC( auto t =
static_cast<defs::dacIndex>(StringTo<int>(args[0])), mv, std::vector<int>{det_id}); det->getDAC(static_cast<defs::dacIndex>(StringTo<int>(args[0])), mv,
std::vector<int>{det_id});
os << args[0] << ' ' << OutString(t) os << args[0] << ' ' << OutString(t)
<< (args.size() > 1 ? " mV\n" : "\n"); << (args.size() > 1 ? " mV\n" : "\n");
} else if (action == defs::PUT_ACTION) { } else if (action == defs::PUT_ACTION) {
@ -1241,9 +1258,10 @@ std::string CmdProxy::Threshold(int action) {
os << OutString(t) << '\n'; os << OutString(t) << '\n';
} else if (action == defs::PUT_ACTION) { } else if (action == defs::PUT_ACTION) {
if (args.size() == 1) { if (args.size() == 1) {
auto t = det->getSettings(std::vector<int>{det_id}).tsquash( auto t = det->getSettings(std::vector<int>{det_id})
"Inconsistent settings between detectors"); .tsquash("Inconsistent settings between detectors");
det->setThresholdEnergy(StringTo<int>(args[0]), t, true, std::vector<int>{det_id}); det->setThresholdEnergy(StringTo<int>(args[0]), t, true,
std::vector<int>{det_id});
} else if (args.size() == 2) { } else if (args.size() == 2) {
det->setThresholdEnergy( det->setThresholdEnergy(
StringTo<int>(args[0]), StringTo<int>(args[0]),
@ -1271,9 +1289,10 @@ std::string CmdProxy::ThresholdNoTb(int action) {
throw sls::RuntimeError("cannot get"); throw sls::RuntimeError("cannot get");
} else if (action == defs::PUT_ACTION) { } else if (action == defs::PUT_ACTION) {
if (args.size() == 1) { if (args.size() == 1) {
auto t = det->getSettings(std::vector<int>{det_id}).tsquash( auto t = det->getSettings(std::vector<int>{det_id})
"Inconsistent settings between detectors"); .tsquash("Inconsistent settings between detectors");
det->setThresholdEnergy(StringTo<int>(args[0]), t, false, std::vector<int>{det_id}); det->setThresholdEnergy(StringTo<int>(args[0]), t, false,
std::vector<int>{det_id});
} else if (args.size() == 2) { } else if (args.size() == 2) {
det->setThresholdEnergy( det->setThresholdEnergy(
StringTo<int>(args[0]), StringTo<int>(args[0]),
@ -1632,14 +1651,16 @@ std::string CmdProxy::VetoPhoton(int action) {
if (args.size() != 2) { if (args.size() != 2) {
WrongNumberOfParameters(2); WrongNumberOfParameters(2);
} }
det->getVetoPhoton(StringTo<int>(args[0]), args[1], std::vector<int>{det_id}); det->getVetoPhoton(StringTo<int>(args[0]), args[1],
std::vector<int>{det_id});
os << "saved to file " << args[1] << '\n'; os << "saved to file " << args[1] << '\n';
} else if (action == defs::PUT_ACTION) { } else if (action == defs::PUT_ACTION) {
if (args.size() != 4) { if (args.size() != 4) {
WrongNumberOfParameters(4); WrongNumberOfParameters(4);
} }
det->setVetoPhoton(StringTo<int>(args[0]), StringTo<int>(args[1]), det->setVetoPhoton(StringTo<int>(args[0]), StringTo<int>(args[1]),
StringTo<int>(args[2]), args[3], std::vector<int>{det_id}); StringTo<int>(args[2]), args[3],
std::vector<int>{det_id});
os << sls::ToString(args) << '\n'; os << sls::ToString(args) << '\n';
} else { } else {
throw sls::RuntimeError("Unknown action"); throw sls::RuntimeError("Unknown action");
@ -1684,7 +1705,8 @@ std::string CmdProxy::VetoFile(int action) {
if (args.size() != 2) { if (args.size() != 2) {
WrongNumberOfParameters(2); WrongNumberOfParameters(2);
} }
det->setVetoFile(StringTo<int>(args[0]), args[1], std::vector<int>{det_id}); det->setVetoFile(StringTo<int>(args[0]), args[1],
std::vector<int>{det_id});
os << sls::ToString(args) << '\n'; os << sls::ToString(args) << '\n';
} else { } else {
throw sls::RuntimeError("Unknown action"); throw sls::RuntimeError("Unknown action");
@ -1755,7 +1777,8 @@ std::string CmdProxy::ConfigureADC(int action) {
WrongNumberOfParameters(2); WrongNumberOfParameters(2);
} }
auto t = det->getADCConfiguration(StringTo<int>(args[0]), auto t = det->getADCConfiguration(StringTo<int>(args[0]),
StringTo<int>(args[1]), std::vector<int>{det_id}); StringTo<int>(args[1]),
std::vector<int>{det_id});
os << OutStringHex(t) << '\n'; os << OutStringHex(t) << '\n';
} else if (action == defs::PUT_ACTION) { } else if (action == defs::PUT_ACTION) {
if (args.size() != 3) { if (args.size() != 3) {
@ -1948,10 +1971,12 @@ std::string CmdProxy::Samples(int action) {
if (args.size() != 1) { if (args.size() != 1) {
WrongNumberOfParameters(1); WrongNumberOfParameters(1);
} }
det->setNumberOfAnalogSamples(StringTo<int>(args[0]), std::vector<int>{det_id}); det->setNumberOfAnalogSamples(StringTo<int>(args[0]),
std::vector<int>{det_id});
// set also digital samples for ctb // set also digital samples for ctb
if (det->getDetectorType().squash() == defs::CHIPTESTBOARD) { if (det->getDetectorType().squash() == defs::CHIPTESTBOARD) {
det->setNumberOfDigitalSamples(StringTo<int>(args[0]), std::vector<int>{det_id}); det->setNumberOfDigitalSamples(StringTo<int>(args[0]),
std::vector<int>{det_id});
} }
os << args.front() << '\n'; os << args.front() << '\n';
} else { } else {
@ -1978,7 +2003,8 @@ std::string CmdProxy::SlowAdc(int action) {
throw sls::RuntimeError("Unknown adc argument " + args[0]); throw sls::RuntimeError("Unknown adc argument " + args[0]);
} }
auto t = det->getSlowADC( auto t = det->getSlowADC(
static_cast<defs::dacIndex>(nchan + defs::SLOW_ADC0), std::vector<int>{det_id}); static_cast<defs::dacIndex>(nchan + defs::SLOW_ADC0),
std::vector<int>{det_id});
Result<double> result(t.size()); Result<double> result(t.size());
for (unsigned int i = 0; i < t.size(); ++i) { for (unsigned int i = 0; i < t.size(); ++i) {
result[i] = t[i] / 1000.00; result[i] = t[i] / 1000.00;
@ -2048,7 +2074,8 @@ std::string CmdProxy::DigitalIODelay(int action) {
WrongNumberOfParameters(2); WrongNumberOfParameters(2);
} }
det->setDigitalIODelay(StringTo<uint64_t>(args[0]), det->setDigitalIODelay(StringTo<uint64_t>(args[0]),
StringTo<int>(args[1]), std::vector<int>{det_id}); StringTo<int>(args[1]),
std::vector<int>{det_id});
os << sls::ToString(args) << '\n'; os << sls::ToString(args) << '\n';
} else { } else {
throw sls::RuntimeError("Unknown action"); throw sls::RuntimeError("Unknown action");
@ -2152,7 +2179,8 @@ std::string CmdProxy::PatternLoopAddresses(int action) {
if (!args.empty()) { if (!args.empty()) {
WrongNumberOfParameters(0); WrongNumberOfParameters(0);
} }
auto t = det->getPatternLoopAddresses(level, std::vector<int>{det_id}); auto t =
det->getPatternLoopAddresses(level, std::vector<int>{det_id});
os << OutStringHex(t, 4) << '\n'; os << OutStringHex(t, 4) << '\n';
} else if (action == defs::PUT_ACTION) { } else if (action == defs::PUT_ACTION) {
if (args.size() != 2) { if (args.size() != 2) {
@ -2160,7 +2188,8 @@ std::string CmdProxy::PatternLoopAddresses(int action) {
} }
int start = StringTo<int>(args[0]); int start = StringTo<int>(args[0]);
int stop = StringTo<int>(args[1]); int stop = StringTo<int>(args[1]);
det->setPatternLoopAddresses(level, start, stop, std::vector<int>{det_id}); det->setPatternLoopAddresses(level, start, stop,
std::vector<int>{det_id});
os << '[' << ToStringHex(start, 4) << ", " << ToStringHex(stop, 4) os << '[' << ToStringHex(start, 4) << ", " << ToStringHex(stop, 4)
<< "]\n"; << "]\n";
} else { } else {
@ -2212,7 +2241,8 @@ std::string CmdProxy::PatternLoopCycles(int action) {
if (args.size() != 1) { if (args.size() != 1) {
WrongNumberOfParameters(1); WrongNumberOfParameters(1);
} }
det->setPatternLoopCycles(level, StringTo<int>(args[0]), std::vector<int>{det_id}); det->setPatternLoopCycles(level, StringTo<int>(args[0]),
std::vector<int>{det_id});
os << args.front() << '\n'; os << args.front() << '\n';
} else { } else {
throw sls::RuntimeError("Unknown action"); throw sls::RuntimeError("Unknown action");
@ -2370,15 +2400,18 @@ std::string CmdProxy::JsonParameter(int action) {
if (args.size() != 1) { if (args.size() != 1) {
WrongNumberOfParameters(1); WrongNumberOfParameters(1);
} }
auto t = det->getAdditionalJsonParameter(args[0], std::vector<int>{det_id}); auto t =
det->getAdditionalJsonParameter(args[0], std::vector<int>{det_id});
os << OutString(t) << '\n'; os << OutString(t) << '\n';
} else if (action == defs::PUT_ACTION) { } else if (action == defs::PUT_ACTION) {
switch (args.size()) { switch (args.size()) {
case 1: case 1:
det->setAdditionalJsonParameter(args[0], "", std::vector<int>{det_id}); det->setAdditionalJsonParameter(args[0], "",
std::vector<int>{det_id});
break; break;
case 2: case 2:
det->setAdditionalJsonParameter(args[0], args[1], std::vector<int>{det_id}); det->setAdditionalJsonParameter(args[0], args[1],
std::vector<int>{det_id});
break; break;
default: default:
WrongNumberOfParameters(1); WrongNumberOfParameters(1);
@ -2460,7 +2493,8 @@ std::string CmdProxy::UpdateFirmwareAndDetectorServer(int action) {
if (args[2].find(".pof") == std::string::npos) { if (args[2].find(".pof") == std::string::npos) {
throw sls::RuntimeError("Programming file must be a pof file."); throw sls::RuntimeError("Programming file must be a pof file.");
} }
det->updateFirmwareAndServer(args[0], args[1], args[2], std::vector<int>{det_id}); det->updateFirmwareAndServer(args[0], args[1], args[2],
std::vector<int>{det_id});
os << "successful\n"; os << "successful\n";
} else { } else {
throw sls::RuntimeError("Unknown action"); throw sls::RuntimeError("Unknown action");
@ -2480,14 +2514,16 @@ std::string CmdProxy::Register(int action) {
if (args.size() != 1) { if (args.size() != 1) {
WrongNumberOfParameters(1); WrongNumberOfParameters(1);
} }
auto t = det->readRegister(StringTo<uint32_t>(args[0]), std::vector<int>{det_id}); auto t = det->readRegister(StringTo<uint32_t>(args[0]),
std::vector<int>{det_id});
os << OutStringHex(t) << '\n'; os << OutStringHex(t) << '\n';
} else if (action == defs::PUT_ACTION) { } else if (action == defs::PUT_ACTION) {
if (args.size() != 2) { if (args.size() != 2) {
WrongNumberOfParameters(2); WrongNumberOfParameters(2);
} }
det->writeRegister(StringTo<uint32_t>(args[0]), det->writeRegister(StringTo<uint32_t>(args[0]),
StringTo<uint32_t>(args[1]), std::vector<int>{det_id}); StringTo<uint32_t>(args[1]),
std::vector<int>{det_id});
os << sls::ToString(args) << '\n'; os << sls::ToString(args) << '\n';
} else { } else {
throw sls::RuntimeError("Unknown action"); throw sls::RuntimeError("Unknown action");
@ -2510,7 +2546,8 @@ std::string CmdProxy::AdcRegister(int action) {
WrongNumberOfParameters(2); WrongNumberOfParameters(2);
} }
det->writeAdcRegister(StringTo<uint32_t>(args[0]), det->writeAdcRegister(StringTo<uint32_t>(args[0]),
StringTo<uint32_t>(args[1]), std::vector<int>{det_id}); StringTo<uint32_t>(args[1]),
std::vector<int>{det_id});
os << sls::ToString(args) << '\n'; os << sls::ToString(args) << '\n';
} else { } else {
throw sls::RuntimeError("Unknown action"); throw sls::RuntimeError("Unknown action");

View File

@ -183,7 +183,6 @@
return os.str(); \ return os.str(); \
} }
/** int or enum */ /** int or enum */
#define INTEGER_COMMAND_VEC_ID_GET(CMDNAME, GETFCN, SETFCN, CONV, HLPSTR) \ #define INTEGER_COMMAND_VEC_ID_GET(CMDNAME, GETFCN, SETFCN, CONV, HLPSTR) \
std::string CMDNAME(const int action) { \ std::string CMDNAME(const int action) { \
@ -303,7 +302,7 @@
WrongNumberOfParameters(1); \ WrongNumberOfParameters(1); \
} \ } \
auto t = det->GETFCN(INDEX, StringTo<int>(args[0]), \ auto t = det->GETFCN(INDEX, StringTo<int>(args[0]), \
std::vector<int>{det_id}); \ std::vector<int>{det_id}); \
os << args[0] << ' ' << OutStringHex(t) << '\n'; \ os << args[0] << ' ' << OutStringHex(t) << '\n'; \
} else if (action == slsDetectorDefs::PUT_ACTION) { \ } else if (action == slsDetectorDefs::PUT_ACTION) { \
if (args.size() != 2) { \ if (args.size() != 2) { \
@ -1189,32 +1188,34 @@ class CmdProxy {
GET_COMMAND_NOID(settingslist, getSettingsList, GET_COMMAND_NOID(settingslist, getSettingsList,
"\n\tList of settings implemented for this detector."); "\n\tList of settings implemented for this detector.");
INTEGER_COMMAND_VEC_ID(settings, getSettings, setSettings, INTEGER_COMMAND_VEC_ID(
sls::StringTo<slsDetectorDefs::detectorSettings>, settings, getSettings, setSettings,
"[standard, fast, highgain, dynamicgain, lowgain, " sls::StringTo<slsDetectorDefs::detectorSettings>,
"mediumgain, veryhighgain, dynamichg0, " "[standard, fast, highgain, dynamicgain, lowgain, "
"fixgain1, fixgain2, forceswitchg1, forceswitchg2, " "mediumgain, veryhighgain, dynamichg0, "
"verylowgain, g1_hg, g1_lg, g2_hc_hg, g2_hc_lg, " "fixgain1, fixgain2, forceswitchg1, forceswitchg2, "
"g2_lc_hg, g2_lc_lg, g4_hg, g4_lg]" "verylowgain, g1_hg, g1_lg, g2_hc_hg, g2_hc_lg, "
"\n\t Detector Settings" "g2_lc_hg, g2_lc_lg, g4_hg, g4_lg]"
"\n\t[Jungfrau] - [dynamicgain | dynamichg0 | fixgain1 | " "\n\t Detector Settings"
"fixgain2 | forceswitchg1 | forceswitchg2]" "\n\t[Jungfrau] - [dynamicgain | dynamichg0 | fixgain1 | "
"\n\t[Gotthard] - [dynamicgain | highgain | lowgain | " "fixgain2 | forceswitchg1 | forceswitchg2]"
"mediumgain | veryhighgain]" "\n\t[Gotthard] - [dynamicgain | highgain | lowgain | "
"\n\t[Gotthard2] - [dynamicgain | fixgain1 | fixgain2]" "mediumgain | veryhighgain]"
"\n\t[Moench] - [g1_hg | g1_lg | g2_hc_hg | g2_hc_lg | " "\n\t[Gotthard2] - [dynamicgain | fixgain1 | fixgain2]"
"g2_lc_hg | g2_lc_lg | g4_hg | g4_lg]" "\n\t[Moench] - [g1_hg | g1_lg | g2_hc_hg | g2_hc_lg | "
"\n\t[Eiger] Use threshold or thresholdnotb. \n\t[Eiger] " "g2_lc_hg | g2_lc_lg | g4_hg | g4_lg]"
"settings loaded from file found in settingspath."); "\n\t[Eiger] Use threshold or thresholdnotb. \n\t[Eiger] "
"settings loaded from file found in settingspath.");
EXECUTE_SET_COMMAND_1ARG( EXECUTE_SET_COMMAND_1ARG(
trimbits, loadTrimbits, trimbits, loadTrimbits,
"[fname]\n\t[Eiger][Mythen3] Loads the trimbit file to detector. If no " "[fname]\n\t[Eiger][Mythen3] Loads the trimbit file to detector. If no "
"extension specified, serial number of each module is attached."); "extension specified, serial number of each module is attached.");
INTEGER_COMMAND_VEC_ID(trimval, getAllTrimbits, setAllTrimbits, StringTo<int>, INTEGER_COMMAND_VEC_ID(
"[n_trimval]\n\t[Eiger][Mythen3] All trimbits set to this " trimval, getAllTrimbits, setAllTrimbits, StringTo<int>,
"value. Returns -1 if all trimbits are different values."); "[n_trimval]\n\t[Eiger][Mythen3] All trimbits set to this "
"value. Returns -1 if all trimbits are different values.");
/* acquisition parameters */ /* acquisition parameters */
@ -1262,13 +1263,14 @@ class CmdProxy {
GET_COMMAND_NOID(drlist, getDynamicRangeList, GET_COMMAND_NOID(drlist, getDynamicRangeList,
"\n\tGets the list of dynamic ranges for this detector."); "\n\tGets the list of dynamic ranges for this detector.");
INTEGER_COMMAND_VEC_ID(timing, getTimingMode, setTimingMode, INTEGER_COMMAND_VEC_ID(
sls::StringTo<slsDetectorDefs::timingMode>, timing, getTimingMode, setTimingMode,
"[auto|trigger|gating|burst_trigger]\n\tTiming Mode of " sls::StringTo<slsDetectorDefs::timingMode>,
"detector.\n\t[Jungfrau][Gotthard][Ctb][Moench][Gotthard2] " "[auto|trigger|gating|burst_trigger]\n\tTiming Mode of "
"[auto|trigger]\n\t[Mythen3] " "detector.\n\t[Jungfrau][Gotthard][Ctb][Moench][Gotthard2] "
"[auto|trigger|gating|trigger_gating]\n\t[Eiger] " "[auto|trigger]\n\t[Mythen3] "
"[auto|trigger|gating|burst_trigger]"); "[auto|trigger|gating|trigger_gating]\n\t[Eiger] "
"[auto|trigger|gating|burst_trigger]");
GET_COMMAND_NOID(timinglist, getTimingModeList, GET_COMMAND_NOID(timinglist, getTimingModeList,
"\n\tGets the list of timing modes for this detector."); "\n\tGets the list of timing modes for this detector.");
@ -1281,22 +1283,24 @@ class CmdProxy {
"\n\t[CTB][Jungfrau] Absolute maximum Phase shift of of the " "\n\t[CTB][Jungfrau] Absolute maximum Phase shift of of the "
"clock to latch digital bits."); "clock to latch digital bits.");
INTEGER_COMMAND_VEC_ID(highvoltage, getHighVoltage, setHighVoltage, StringTo<int>, INTEGER_COMMAND_VEC_ID(highvoltage, getHighVoltage, setHighVoltage,
"[n_value]\n\tHigh voltage to the sensor in Voltage." StringTo<int>,
"\n\t[Gotthard] [0|90|110|120|150|180|200]" "[n_value]\n\tHigh voltage to the sensor in Voltage."
"\n\t[Eiger][Mythen3][Gotthard2] 0-200" "\n\t[Gotthard] [0|90|110|120|150|180|200]"
"\n\t[Jungfrau][Ctb][Moench] [0|60-200]"); "\n\t[Eiger][Mythen3][Gotthard2] 0-200"
"\n\t[Jungfrau][Ctb][Moench] [0|60-200]");
INTEGER_COMMAND_VEC_ID(powerchip, getPowerChip, setPowerChip, StringTo<int>, INTEGER_COMMAND_VEC_ID(
"[0, 1]\n\t[Jungfrau][Mythen3][Gotthard2][Moench] Power " powerchip, getPowerChip, setPowerChip, StringTo<int>,
"the chip. Default 0." "[0, 1]\n\t[Jungfrau][Mythen3][Gotthard2][Moench] Power "
"\n\t[Jungfrau] Get will return power status." "the chip. Default 0."
"Can be off if temperature event occured (temperature over " "\n\t[Jungfrau] Get will return power status."
"temp_threshold with temp_control enabled." "Can be off if temperature event occured (temperature over "
"\n\t[Mythen3] If module not connected or wrong module, 1 " "temp_threshold with temp_control enabled."
"will fail. By default, not powered on" "\n\t[Mythen3] If module not connected or wrong module, 1 "
"\n\t[Gotthard2] If module not connected or wrong module, " "will fail. By default, not powered on"
"1 will fail. By default, powered on at server start up."); "\n\t[Gotthard2] If module not connected or wrong module, "
"1 will fail. By default, powered on at server start up.");
INTEGER_COMMAND_VEC_ID( INTEGER_COMMAND_VEC_ID(
imagetest, getImageTestMode, setImageTestMode, StringTo<int>, imagetest, getImageTestMode, setImageTestMode, StringTo<int>,
@ -1305,11 +1309,12 @@ class CmdProxy {
"\n\t[Eiger][Jungfrau] Only for Virtual servers. If 0, each pixel " "\n\t[Eiger][Jungfrau] Only for Virtual servers. If 0, each pixel "
"intensity incremented by 1. If 1, all pixels almost saturated."); "intensity incremented by 1. If 1, all pixels almost saturated.");
INTEGER_COMMAND_VEC_ID(parallel, getParallelMode, setParallelMode, StringTo<int>, INTEGER_COMMAND_VEC_ID(
"[0, 1]\n\t[Eiger][Mythen3] Enable or disable parallel " parallel, getParallelMode, setParallelMode, StringTo<int>,
"mode.\n\t[Mythen3] If exptime is too short, the " "[0, 1]\n\t[Eiger][Mythen3] Enable or disable parallel "
"acquisition will return ERROR status and take fewer " "mode.\n\t[Mythen3] If exptime is too short, the "
"frames than expected."); "acquisition will return ERROR status and take fewer "
"frames than expected.");
/** temperature */ /** temperature */
GET_COMMAND_NOID( GET_COMMAND_NOID(
@ -1693,11 +1698,12 @@ class CmdProxy {
GET_COMMAND(rx_missingpackets, getNumMissingPackets, GET_COMMAND(rx_missingpackets, getNumMissingPackets,
"\n\tNumber of missing packets for each port in receiver."); "\n\tNumber of missing packets for each port in receiver.");
INTEGER_COMMAND_VEC_ID(startingfnum, getStartingFrameNumber, INTEGER_COMMAND_VEC_ID(
setStartingFrameNumber, StringTo<uint64_t>, startingfnum, getStartingFrameNumber, setStartingFrameNumber,
"[n_value]\n\t[Eiger][Jungfrau] Starting frame number for " StringTo<uint64_t>,
"next acquisition. Stopping acquiistion might result in " "[n_value]\n\t[Eiger][Jungfrau] Starting frame number for "
"different frame numbers for different modules."); "next acquisition. Stopping acquiistion might result in "
"different frame numbers for different modules.");
EXECUTE_SET_COMMAND( EXECUTE_SET_COMMAND(
trigger, sendSoftwareTrigger, trigger, sendSoftwareTrigger,
@ -1726,11 +1732,12 @@ class CmdProxy {
"[0, 1]\n\t[Jungfrau] The udp interface to stream data from detector. " "[0, 1]\n\t[Jungfrau] The udp interface to stream data from detector. "
"Effective only when number of interfaces is 1. Default: 0 (outer)"); "Effective only when number of interfaces is 1. Default: 0 (outer)");
INTEGER_COMMAND_VEC_ID(udp_srcip, getSourceUDPIP, setSourceUDPIP, IpAddr, INTEGER_COMMAND_VEC_ID(
"[x.x.x.x]\n\tIp address of the detector (source) udp " udp_srcip, getSourceUDPIP, setSourceUDPIP, IpAddr,
"interface. Must be same subnet as destination udp " "[x.x.x.x]\n\tIp address of the detector (source) udp "
"ip.\n\t[Eiger] Set only for 10G. For 1G, detector will " "interface. Must be same subnet as destination udp "
"replace with its own DHCP IP address."); "ip.\n\t[Eiger] Set only for 10G. For 1G, detector will "
"replace with its own DHCP IP address.");
INTEGER_COMMAND_VEC_ID( INTEGER_COMMAND_VEC_ID(
udp_srcip2, getSourceUDPIP2, setSourceUDPIP2, IpAddr, udp_srcip2, getSourceUDPIP2, setSourceUDPIP2, IpAddr,
@ -1744,9 +1751,10 @@ class CmdProxy {
"interface. \n\t[Eiger] Do not set as detector will replace with its " "interface. \n\t[Eiger] Do not set as detector will replace with its "
"own DHCP Mac (1G) or DHCP Mac + 1 (10G)."); "own DHCP Mac (1G) or DHCP Mac + 1 (10G).");
INTEGER_COMMAND_VEC_ID(udp_srcmac2, getSourceUDPMAC2, setSourceUDPMAC2, MacAddr, INTEGER_COMMAND_VEC_ID(
"[x:x:x:x:x:x]\n\t[Jungfrau] Mac address of the bottom " udp_srcmac2, getSourceUDPMAC2, setSourceUDPMAC2, MacAddr,
"half of detector (source) udp interface. "); "[x:x:x:x:x:x]\n\t[Jungfrau] Mac address of the bottom "
"half of detector (source) udp interface. ");
INTEGER_COMMAND_VEC_ID( INTEGER_COMMAND_VEC_ID(
udp_dstmac, getDestinationUDPMAC, setDestinationUDPMAC, MacAddr, udp_dstmac, getDestinationUDPMAC, setDestinationUDPMAC, MacAddr,
@ -1770,13 +1778,14 @@ class CmdProxy {
"interface. Default is 50001. \n\tIf multi command, ports for each " "interface. Default is 50001. \n\tIf multi command, ports for each "
"module is calculated (incremented by 1 if no 2nd interface)"); "module is calculated (incremented by 1 if no 2nd interface)");
INTEGER_COMMAND_VEC_ID_GET(udp_dstport2, getDestinationUDPPort2, INTEGER_COMMAND_VEC_ID_GET(
setDestinationUDPPort2, StringTo<int>, udp_dstport2, getDestinationUDPPort2, setDestinationUDPPort2,
"[n]\n\t[Jungfrau][Eiger][Gotthard2] Port number of the " StringTo<int>,
"receiver (destination) udp interface 2. Default is 50002. " "[n]\n\t[Jungfrau][Eiger][Gotthard2] Port number of the "
"\n\tIf multi command, ports for each module is calculated " "receiver (destination) udp interface 2. Default is 50002. "
"(incremented by 2) \n\t[Jungfrau] bottom half \n\t[Eiger] " "\n\tIf multi command, ports for each module is calculated "
"right half \n\t[Gotthard2] veto debugging"); "(incremented by 2) \n\t[Jungfrau] bottom half \n\t[Eiger] "
"right half \n\t[Gotthard2] veto debugging");
EXECUTE_SET_COMMAND( EXECUTE_SET_COMMAND(
udp_reconfigure, reconfigureUDPDestination, udp_reconfigure, reconfigureUDPDestination,
@ -1793,12 +1802,13 @@ class CmdProxy {
GET_COMMAND(rx_printconfig, printRxConfiguration, GET_COMMAND(rx_printconfig, printRxConfiguration,
"\n\tPrints the receiver configuration."); "\n\tPrints the receiver configuration.");
INTEGER_COMMAND_VEC_ID(tengiga, getTenGiga, setTenGiga, StringTo<int>, INTEGER_COMMAND_VEC_ID(
"[0, 1]\n\t[Eiger][Ctb][Moench][Mythen3] 10GbE Enable."); tengiga, getTenGiga, setTenGiga, StringTo<int>,
"[0, 1]\n\t[Eiger][Ctb][Moench][Mythen3] 10GbE Enable.");
INTEGER_COMMAND_VEC_ID(flowcontrol10g, getTenGigaFlowControl, INTEGER_COMMAND_VEC_ID(flowcontrol10g, getTenGigaFlowControl,
setTenGigaFlowControl, StringTo<int>, setTenGigaFlowControl, StringTo<int>,
"[0, 1]\n\t[Eiger][Jungfrau] 10GbE Flow Control."); "[0, 1]\n\t[Eiger][Jungfrau] 10GbE Flow Control.");
INTEGER_COMMAND_VEC_ID( INTEGER_COMMAND_VEC_ID(
txndelay_frame, getTransmissionDelayFrame, setTransmissionDelayFrame, txndelay_frame, getTransmissionDelayFrame, setTransmissionDelayFrame,
@ -1834,9 +1844,10 @@ class CmdProxy {
"first command to set a receiver parameter. Multi command will " "first command to set a receiver parameter. Multi command will "
"automatically increment for individual modules."); "automatically increment for individual modules.");
INTEGER_COMMAND_VEC_ID(rx_fifodepth, getRxFifoDepth, setRxFifoDepth, StringTo<int>, INTEGER_COMMAND_VEC_ID(
"[n_frames]\n\tSet the number of frames in the receiver " rx_fifodepth, getRxFifoDepth, setRxFifoDepth, StringTo<int>,
"fifo depth (buffer between listener and writer threads)."); "[n_frames]\n\tSet the number of frames in the receiver "
"fifo depth (buffer between listener and writer threads).");
INTEGER_COMMAND_VEC_ID( INTEGER_COMMAND_VEC_ID(
rx_silent, getRxSilentMode, setRxSilentMode, StringTo<int>, rx_silent, getRxSilentMode, setRxSilentMode, StringTo<int>,
@ -1851,9 +1862,9 @@ class CmdProxy {
"frames."); "frames.");
INTEGER_COMMAND_VEC_ID(rx_padding, getPartialFramesPadding, INTEGER_COMMAND_VEC_ID(rx_padding, getPartialFramesPadding,
setPartialFramesPadding, StringTo<int>, setPartialFramesPadding, StringTo<int>,
"[0, 1]\n\tPartial frames padding enable in the " "[0, 1]\n\tPartial frames padding enable in the "
"receiver. Default: enabled. Disabling is fastest."); "receiver. Default: enabled. Disabling is fastest.");
INTEGER_COMMAND_VEC_ID( INTEGER_COMMAND_VEC_ID(
rx_udpsocksize, getRxUDPSocketBufferSize, setRxUDPSocketBufferSize, rx_udpsocksize, getRxUDPSocketBufferSize, setRxUDPSocketBufferSize,
@ -1865,9 +1876,10 @@ class CmdProxy {
"\n\tActual udp socket buffer size. Double the size of " "\n\tActual udp socket buffer size. Double the size of "
"rx_udpsocksize due to kernel bookkeeping."); "rx_udpsocksize due to kernel bookkeeping.");
INTEGER_COMMAND_VEC_ID(rx_lock, getRxLock, setRxLock, StringTo<int>, INTEGER_COMMAND_VEC_ID(
"[0, 1]\n\tLock receiver to one client IP, 1 locks, 0 " rx_lock, getRxLock, setRxLock, StringTo<int>,
"unlocks. Default is unlocked. 1: locks"); "[0, 1]\n\tLock receiver to one client IP, 1 locks, 0 "
"unlocks. Default is unlocked. 1: locks");
GET_COMMAND( GET_COMMAND(
rx_lastclient, getRxLastClientIP, rx_lastclient, getRxLastClientIP,
@ -1900,8 +1912,8 @@ class CmdProxy {
"index]_f[sub file index]_[acquisition/file index].raw."); "index]_f[sub file index]_[acquisition/file index].raw.");
INTEGER_COMMAND_VEC_ID(findex, getAcquisitionIndex, setAcquisitionIndex, INTEGER_COMMAND_VEC_ID(findex, getAcquisitionIndex, setAcquisitionIndex,
StringTo<int64_t>, StringTo<int64_t>,
"[n_value]\n\tFile or Acquisition index."); "[n_value]\n\tFile or Acquisition index.");
INTEGER_COMMAND_VEC_ID( INTEGER_COMMAND_VEC_ID(
fwrite, getFileWrite, setFileWrite, StringTo<int>, fwrite, getFileWrite, setFileWrite, StringTo<int>,
@ -1915,10 +1927,10 @@ class CmdProxy {
foverwrite, getFileOverWrite, setFileOverWrite, StringTo<int>, foverwrite, getFileOverWrite, setFileOverWrite, StringTo<int>,
"[0, 1]\n\tEnable or disable file overwriting. Default is 1."); "[0, 1]\n\tEnable or disable file overwriting. Default is 1.");
INTEGER_COMMAND_VEC_ID(rx_framesperfile, getFramesPerFile, setFramesPerFile, INTEGER_COMMAND_VEC_ID(
StringTo<int>, rx_framesperfile, getFramesPerFile, setFramesPerFile, StringTo<int>,
"[n_frames]\n\tNumber of frames per file in receiver. 0 is " "[n_frames]\n\tNumber of frames per file in receiver. 0 is "
"infinite or all frames in single file."); "infinite or all frames in single file.");
/* ZMQ Streaming Parameters (Receiver<->Client) */ /* ZMQ Streaming Parameters (Receiver<->Client) */
@ -1939,11 +1951,12 @@ class CmdProxy {
"timeout, after which current frame is sent out. (default timeout is " "timeout, after which current frame is sent out. (default timeout is "
"200 ms). Usually used for gui purposes."); "200 ms). Usually used for gui purposes.");
INTEGER_COMMAND_VEC_ID(rx_zmqstartfnum, getRxZmqStartingFrame, INTEGER_COMMAND_VEC_ID(
setRxZmqStartingFrame, StringTo<int>, rx_zmqstartfnum, getRxZmqStartingFrame, setRxZmqStartingFrame,
"[fnum]\n\tThe starting frame index to stream out. 0 by " StringTo<int>,
"default, which streams the first frame in an acquisition, " "[fnum]\n\tThe starting frame index to stream out. 0 by "
"and then depending on the rx zmq frequency/ timer"); "default, which streams the first frame in an acquisition, "
"and then depending on the rx zmq frequency/ timer");
INTEGER_COMMAND_VEC_ID_GET( INTEGER_COMMAND_VEC_ID_GET(
rx_zmqport, getRxZmqPort, setRxZmqPort, StringTo<int>, rx_zmqport, getRxZmqPort, setRxZmqPort, StringTo<int>,
@ -1993,9 +2006,10 @@ class CmdProxy {
settingspath, getSettingsPath, setSettingsPath, settingspath, getSettingsPath, setSettingsPath,
"[path]\n\t[Eiger] Directory where settings files are loaded from/to."); "[path]\n\t[Eiger] Directory where settings files are loaded from/to.");
INTEGER_COMMAND_VEC_ID(overflow, getOverFlowMode, setOverFlowMode, StringTo<int>, INTEGER_COMMAND_VEC_ID(
"[0, 1]\n\t[Eiger] Enable or disable show overflow flag in " overflow, getOverFlowMode, setOverFlowMode, StringTo<int>,
"32 bit mode. Default is disabled."); "[0, 1]\n\t[Eiger] Enable or disable show overflow flag in "
"32 bit mode. Default is disabled.");
INTEGER_COMMAND_VEC_ID( INTEGER_COMMAND_VEC_ID(
flippeddatax, getBottom, setBottom, StringTo<int>, flippeddatax, getBottom, setBottom, StringTo<int>,
@ -2009,11 +2023,12 @@ class CmdProxy {
"starting from the centre. 256 is default. The permissible values " "starting from the centre. 256 is default. The permissible values "
"depend on dynamic range and 10Gbe enabled."); "depend on dynamic range and 10Gbe enabled.");
INTEGER_COMMAND_VEC_ID(interruptsubframe, getInterruptSubframe, INTEGER_COMMAND_VEC_ID(
setInterruptSubframe, StringTo<int>, interruptsubframe, getInterruptSubframe, setInterruptSubframe,
"[0, 1]\n\t[Eiger] 1 interrupts last subframe at required " StringTo<int>,
"exposure time. 0 will wait for last sub frame to finish " "[0, 1]\n\t[Eiger] 1 interrupts last subframe at required "
"exposing. 0 is default."); "exposure time. 0 will wait for last sub frame to finish "
"exposing. 0 is default.");
TIME_GET_COMMAND(measuredperiod, getMeasuredPeriod, TIME_GET_COMMAND(measuredperiod, getMeasuredPeriod,
"[(optional unit) ns|us|ms|s]\n\t[Eiger] Measured frame " "[(optional unit) ns|us|ms|s]\n\t[Eiger] Measured frame "
@ -2096,18 +2111,19 @@ class CmdProxy {
"[duration] [(optional unit) ns|us|ms|s]\n\t[Gotthard2] Burst " "[duration] [(optional unit) ns|us|ms|s]\n\t[Gotthard2] Burst "
"period. Only in burst mode and auto timing mode."); "period. Only in burst mode and auto timing mode.");
INTEGER_COMMAND_VEC_ID(cdsgain, getCDSGain, setCDSGain, StringTo<bool>, INTEGER_COMMAND_VEC_ID(
"[0, 1]\n\t[Gotthard2] Enable or disable CDS gain. Default " cdsgain, getCDSGain, setCDSGain, StringTo<bool>,
"is disabled."); "[0, 1]\n\t[Gotthard2] Enable or disable CDS gain. Default "
"is disabled.");
INTEGER_COMMAND_VEC_ID( INTEGER_COMMAND_VEC_ID(
filter, getFilter, setFilter, StringTo<int>, filter, getFilter, setFilter, StringTo<int>,
"[0|1|2|3]\n\t[Gotthard2] Set filter resistor. Default is 0."); "[0|1|2|3]\n\t[Gotthard2] Set filter resistor. Default is 0.");
INTEGER_COMMAND_VEC_ID(currentsource, getCurrentSource, setCurrentSource, INTEGER_COMMAND_VEC_ID(
StringTo<int>, currentsource, getCurrentSource, setCurrentSource, StringTo<int>,
"[0, 1]\n\t[Gotthard2] Enable or disable current source. " "[0, 1]\n\t[Gotthard2] Enable or disable current source. "
"Default is disabled."); "Default is disabled.");
INTEGER_COMMAND_VEC_ID( INTEGER_COMMAND_VEC_ID(
timingsource, getTimingSource, setTimingSource, timingsource, getTimingSource, setTimingSource,
@ -2116,14 +2132,15 @@ class CmdProxy {
"and external is system timing. Default is internal."); "and external is system timing. Default is internal.");
INTEGER_COMMAND_VEC_ID(veto, getVeto, setVeto, StringTo<int>, INTEGER_COMMAND_VEC_ID(veto, getVeto, setVeto, StringTo<int>,
"[0, 1]\n\t[Gotthard2] Enable or disable veto data " "[0, 1]\n\t[Gotthard2] Enable or disable veto data "
"streaming from detector. Default is 0."); "streaming from detector. Default is 0.");
/* Mythen3 Specific */ /* Mythen3 Specific */
INTEGER_COMMAND_VEC_ID(gates, getNumberOfGates, setNumberOfGates, StringTo<int>, INTEGER_COMMAND_VEC_ID(
"[n_gates]\n\t[Mythen3] Number of external gates in gating " gates, getNumberOfGates, setNumberOfGates, StringTo<int>,
"or trigger_gating mode (external gating)."); "[n_gates]\n\t[Mythen3] Number of external gates in gating "
"or trigger_gating mode (external gating).");
/* CTB/ Moench Specific */ /* CTB/ Moench Specific */
@ -2137,13 +2154,14 @@ class CmdProxy {
"[n_clk in MHz]\n\t[Ctb][Moench] ADC clock frequency in MHz."); "[n_clk in MHz]\n\t[Ctb][Moench] ADC clock frequency in MHz.");
INTEGER_COMMAND_VEC_ID(runclk, getRUNClock, setRUNClock, StringTo<int>, INTEGER_COMMAND_VEC_ID(runclk, getRUNClock, setRUNClock, StringTo<int>,
"[n_clk in MHz]\n\t[Ctb][Moench] Run clock in MHz."); "[n_clk in MHz]\n\t[Ctb][Moench] Run clock in MHz.");
GET_COMMAND(syncclk, getSYNCClock, GET_COMMAND(syncclk, getSYNCClock,
"[n_clk in MHz]\n\t[Ctb][Moench] Sync clock in MHz."); "[n_clk in MHz]\n\t[Ctb][Moench] Sync clock in MHz.");
INTEGER_COMMAND_VEC_ID(adcpipeline, getADCPipeline, setADCPipeline, StringTo<int>, INTEGER_COMMAND_VEC_ID(
"[n_value]\n\t[Ctb][Moench] Pipeline for ADC clock."); adcpipeline, getADCPipeline, setADCPipeline, StringTo<int>,
"[n_value]\n\t[Ctb][Moench] Pipeline for ADC clock.");
INTEGER_IND_COMMAND(v_limit, getVoltage, setVoltage, StringTo<int>, INTEGER_IND_COMMAND(v_limit, getVoltage, setVoltage, StringTo<int>,
defs::V_LIMIT, defs::V_LIMIT,
@ -2164,14 +2182,16 @@ class CmdProxy {
/* CTB Specific */ /* CTB Specific */
INTEGER_COMMAND_VEC_ID(dsamples, getNumberOfDigitalSamples, INTEGER_COMMAND_VEC_ID(
setNumberOfDigitalSamples, StringTo<int>, dsamples, getNumberOfDigitalSamples, setNumberOfDigitalSamples,
"[n_value]\n\t[CTB] Number of digital samples expected."); StringTo<int>,
"[n_value]\n\t[CTB] Number of digital samples expected.");
INTEGER_COMMAND_VEC_ID(romode, getReadoutMode, setReadoutMode, INTEGER_COMMAND_VEC_ID(
sls::StringTo<slsDetectorDefs::readoutMode>, romode, getReadoutMode, setReadoutMode,
"[analog|digital|analog_digital]\n\t[CTB] Readout mode. " sls::StringTo<slsDetectorDefs::readoutMode>,
"Default is analog."); "[analog|digital|analog_digital]\n\t[CTB] Readout mode. "
"Default is analog.");
INTEGER_COMMAND_VEC_ID( INTEGER_COMMAND_VEC_ID(
dbitclk, getDBITClock, setDBITClock, StringTo<int>, dbitclk, getDBITClock, setDBITClock, StringTo<int>,
@ -2243,18 +2263,19 @@ class CmdProxy {
"[0, 1]\n\t[Ctb] Enable for external sampling signal to extsamplingsrc " "[0, 1]\n\t[Ctb] Enable for external sampling signal to extsamplingsrc "
"signal for digital data. For advanced users only."); "signal for digital data. For advanced users only.");
INTEGER_COMMAND_VEC_ID(extsamplingsrc, getExternalSamplingSource, INTEGER_COMMAND_VEC_ID(
setExternalSamplingSource, StringTo<int>, extsamplingsrc, getExternalSamplingSource, setExternalSamplingSource,
"[0-63]\n\t[Ctb] Sampling source signal for digital data. " StringTo<int>,
"For advanced users only."); "[0-63]\n\t[Ctb] Sampling source signal for digital data. "
"For advanced users only.");
INTEGER_COMMAND_VEC_ID(rx_dbitoffset, getRxDbitOffset, setRxDbitOffset, INTEGER_COMMAND_VEC_ID(
StringTo<int>, rx_dbitoffset, getRxDbitOffset, setRxDbitOffset, StringTo<int>,
"[n_bytes]\n\t[Ctb] Offset in bytes in digital data to " "[n_bytes]\n\t[Ctb] Offset in bytes in digital data to "
"skip in receiver."); "skip in receiver.");
INTEGER_COMMAND_VEC_ID(led, getLEDEnable, setLEDEnable, StringTo<int>, INTEGER_COMMAND_VEC_ID(led, getLEDEnable, setLEDEnable, StringTo<int>,
"[0, 1]\n\t[Ctb] Switches on/off all LEDs."); "[0, 1]\n\t[Ctb] Switches on/off all LEDs.");
/* Pattern */ /* Pattern */
@ -2319,8 +2340,9 @@ class CmdProxy {
"[n]\n\tPort number of the stop server on detector for detector-client " "[n]\n\tPort number of the stop server on detector for detector-client "
"tcp interface. Default is 1953. Normally unchanged."); "tcp interface. Default is 1953. Normally unchanged.");
INTEGER_COMMAND_VEC_ID(lock, getDetectorLock, setDetectorLock, StringTo<int>, INTEGER_COMMAND_VEC_ID(lock, getDetectorLock, setDetectorLock,
"[0, 1]\n\tLock detector to one IP, 1: locks"); StringTo<int>,
"[0, 1]\n\tLock detector to one IP, 1: locks");
GET_COMMAND( GET_COMMAND(
lastclient, getLastClientIP, lastclient, getLastClientIP,