mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-23 15:00:02 +02:00
reverting to normal command parsing for missing packets
This commit is contained in:
parent
a1ee681135
commit
b9016fad12
@ -1274,27 +1274,6 @@ std::string CmdProxy::DetectorStatus(int action) {
|
||||
return os.str();
|
||||
}
|
||||
|
||||
std::string CmdProxy::RxMissingPackets(int action) {
|
||||
std::ostringstream os;
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "Number of missing packets for each port in receiver. If "
|
||||
"negative, they are packets in excess. "
|
||||
<< '\n';
|
||||
} else if (action == defs::GET_ACTION) {
|
||||
if (!args.empty()) {
|
||||
WrongNumberOfParameters(0);
|
||||
}
|
||||
auto mp = det->getNumMissingPackets(std::vector<int>{det_id});
|
||||
os << OutString(mp) << '\n';
|
||||
} else if (action == defs::PUT_ACTION) {
|
||||
throw sls::RuntimeError("Cannot put");
|
||||
} else {
|
||||
throw sls::RuntimeError("Unknown action");
|
||||
}
|
||||
return os.str();
|
||||
}
|
||||
|
||||
std::string CmdProxy::Scan(int action) {
|
||||
std::ostringstream os;
|
||||
os << cmd << ' ';
|
||||
|
@ -859,7 +859,7 @@ class CmdProxy {
|
||||
{"rx_status", &CmdProxy::ReceiverStatus},
|
||||
{"status", &CmdProxy::DetectorStatus},
|
||||
{"rx_framescaught", &CmdProxy::rx_framescaught},
|
||||
{"rx_missingpackets", &CmdProxy::RxMissingPackets},
|
||||
{"rx_missingpackets", &CmdProxy::rx_missingpackets},
|
||||
{"rx_frameindex", &CmdProxy::rx_frameindex},
|
||||
{"nextframenumber", &CmdProxy::nextframenumber},
|
||||
{"trigger", &CmdProxy::Trigger},
|
||||
@ -1535,6 +1535,10 @@ class CmdProxy {
|
||||
GET_COMMAND(rx_framescaught, getFramesCaught,
|
||||
"\n\tNumber of frames caught by each port in receiver.");
|
||||
|
||||
GET_COMMAND(rx_missingpackets, getNumMissingPackets,
|
||||
"\n\tNumber of missing packets for each port in receiver. If "
|
||||
"negative, they are packets in excess. ");
|
||||
|
||||
GET_COMMAND(
|
||||
rx_frameindex, getRxCurrentFrameIndex,
|
||||
"\n\tCurrent frame index received in receiver during acquisition.");
|
||||
|
Loading…
x
Reference in New Issue
Block a user