mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-17 15:27:13 +02:00
reverting to normal command parsing for missing packets
This commit is contained in:
@ -1274,27 +1274,6 @@ std::string CmdProxy::DetectorStatus(int action) {
|
|||||||
return os.str();
|
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::string CmdProxy::Scan(int action) {
|
||||||
std::ostringstream os;
|
std::ostringstream os;
|
||||||
os << cmd << ' ';
|
os << cmd << ' ';
|
||||||
|
@ -859,7 +859,7 @@ class CmdProxy {
|
|||||||
{"rx_status", &CmdProxy::ReceiverStatus},
|
{"rx_status", &CmdProxy::ReceiverStatus},
|
||||||
{"status", &CmdProxy::DetectorStatus},
|
{"status", &CmdProxy::DetectorStatus},
|
||||||
{"rx_framescaught", &CmdProxy::rx_framescaught},
|
{"rx_framescaught", &CmdProxy::rx_framescaught},
|
||||||
{"rx_missingpackets", &CmdProxy::RxMissingPackets},
|
{"rx_missingpackets", &CmdProxy::rx_missingpackets},
|
||||||
{"rx_frameindex", &CmdProxy::rx_frameindex},
|
{"rx_frameindex", &CmdProxy::rx_frameindex},
|
||||||
{"nextframenumber", &CmdProxy::nextframenumber},
|
{"nextframenumber", &CmdProxy::nextframenumber},
|
||||||
{"trigger", &CmdProxy::Trigger},
|
{"trigger", &CmdProxy::Trigger},
|
||||||
@ -1535,6 +1535,10 @@ class CmdProxy {
|
|||||||
GET_COMMAND(rx_framescaught, getFramesCaught,
|
GET_COMMAND(rx_framescaught, getFramesCaught,
|
||||||
"\n\tNumber of frames caught by each port in receiver.");
|
"\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(
|
GET_COMMAND(
|
||||||
rx_frameindex, getRxCurrentFrameIndex,
|
rx_frameindex, getRxCurrentFrameIndex,
|
||||||
"\n\tCurrent frame index received in receiver during acquisition.");
|
"\n\tCurrent frame index received in receiver during acquisition.");
|
||||||
|
Reference in New Issue
Block a user