moench: removed api that goes only to processor (future: one has to use rX_jsonaddheader or rx_jsonpara to set key and values)

This commit is contained in:
2020-09-08 12:34:56 +02:00
parent aecde086a0
commit 8e49a114db
8 changed files with 1 additions and 247 deletions

View File

@ -2389,52 +2389,6 @@ std::string CmdProxy::JsonParameter(int action) {
return os.str();
}
std::string CmdProxy::MinMaxEnergyThreshold(int action) {
std::ostringstream os;
os << cmd << ' ';
if (action == defs::HELP_ACTION) {
if (cmd == "emin") {
os << "[n_value]\n\t[Moench] Minimum energy threshold (soft "
"setting) for processor."
<< '\n';
} else if (cmd == "emax") {
os << "[n_value]\n\t[Moench] Maximum energy threshold (soft "
"setting) for processor."
<< '\n';
} else {
throw sls::RuntimeError(
"Unknown command, use list to list all commands");
}
} else {
bool emax = false;
if (cmd == "emin") {
emax = false;
} else if (cmd == "emax") {
emax = true;
} else {
throw sls::RuntimeError(
"Unknown command, use list to list all commands");
}
if (action == defs::GET_ACTION) {
if (!args.empty()) {
WrongNumberOfParameters(0);
}
auto t = det->getDetectorMinMaxEnergyThreshold(emax, {det_id});
os << OutString(t) << '\n';
} else if (action == defs::PUT_ACTION) {
if (args.size() != 1) {
WrongNumberOfParameters(1);
}
det->setDetectorMinMaxEnergyThreshold(emax, StringTo<int>(args[0]),
{det_id});
os << args.front() << '\n';
} else {
throw sls::RuntimeError("Unknown action");
}
}
return os.str();
}
/* Advanced */
std::string CmdProxy::ProgramFpga(int action) {