From 4fce0dcd9cc3ac6df00f26606b724c168729df02 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Wed, 5 Jan 2022 14:23:53 +0100 Subject: [PATCH] temp workaround, but must fix in cmdproxy the possibility of getting extra packets in rx_missingpackets --- slsDetectorSoftware/src/CmdProxy.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/slsDetectorSoftware/src/CmdProxy.cpp b/slsDetectorSoftware/src/CmdProxy.cpp index 3181e08be..c320f1435 100644 --- a/slsDetectorSoftware/src/CmdProxy.cpp +++ b/slsDetectorSoftware/src/CmdProxy.cpp @@ -1285,20 +1285,20 @@ std::string CmdProxy::RxMissingPackets(int action) { if (!args.empty()) { WrongNumberOfParameters(0); } + auto mp = det->getNumMissingPackets(std::vector{det_id}); + /* auto tmp = det->getNumMissingPackets(std::vector{det_id}); // convert to signed missing packets (to get excess) - /* Result> mp(tmp.size()); for (unsigned int i = 0; i < mp.size(); ++i) { mp[i] = static_cast(tmp[i]); } - */ - - Result> mp; + OR + Result> tmp; for (auto val : tmp) { mp.push_back(static_cast(val)); } - + */ os << OutString(mp) << '\n'; } else if (action == defs::PUT_ACTION) { throw sls::RuntimeError("Cannot put");