diff --git a/RELEASE.txt b/RELEASE.txt index 84b3f2e9e..f7da1da3a 100755 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -40,6 +40,7 @@ This document describes the differences between v7.0.0 and v6.x.x - when in discard partial frames or empty mode, the frame number doesnt increase by 1, it increases to that number (so its faster) - file write disabled by default - start non blocking acquisition at modular level +- missingpackets signed (negative => extra packets) 2. Resolved Issues diff --git a/python/slsdet/detector.py b/python/slsdet/detector.py index c4618760a..1d2ec6218 100755 --- a/python/slsdet/detector.py +++ b/python/slsdet/detector.py @@ -1911,7 +1911,7 @@ class Detector(CppDetectorApi): @property @element def rx_missingpackets(self): - """Gets the number of missing packets for each port in receiver.""" + """Gets the number of missing packets for each port in receiver. Negative number denotes extra packets. """ return self.getNumMissingPackets() """ diff --git a/python/src/detector.cpp b/python/src/detector.cpp index f7a48f9fd..f796c3cbe 100644 --- a/python/src/detector.cpp +++ b/python/src/detector.cpp @@ -490,11 +490,10 @@ void init_det(py::module &m) { (Result(Detector::*)(sls::Positions) const) & Detector::getFramesCaught, py::arg() = Positions{}) - .def( - "getNumMissingPackets", - (Result>(Detector::*)(sls::Positions) const) & - Detector::getNumMissingPackets, - py::arg() = Positions{}) + .def("getNumMissingPackets", + (Result>(Detector::*)(sls::Positions) const) & + Detector::getNumMissingPackets, + py::arg() = Positions{}) .def("getNextFrameNumber", (Result(Detector::*)(sls::Positions) const) & Detector::getNextFrameNumber, diff --git a/slsDetectorSoftware/include/sls/Detector.h b/slsDetectorSoftware/include/sls/Detector.h index 4123d0284..ba10ac797 100644 --- a/slsDetectorSoftware/include/sls/Detector.h +++ b/slsDetectorSoftware/include/sls/Detector.h @@ -588,11 +588,9 @@ class Detector { Result getFramesCaught(Positions pos = {}) const; - /** Gets the number of missing packets for each port in receiver. - * Troubleshoot: If they are large numbers, convert it to signed to get - * number of access packets received */ - Result> - getNumMissingPackets(Positions pos = {}) const; + /** Gets the number of missing packets for each port in receiver. Negative + * number denotes extra packets. */ + Result> getNumMissingPackets(Positions pos = {}) const; /** [Eiger][Jungfrau][Moench][CTB] */ Result getNextFrameNumber(Positions pos = {}) const; diff --git a/slsDetectorSoftware/src/CmdProxy.h b/slsDetectorSoftware/src/CmdProxy.h index b9c813f47..b0c8ee303 100644 --- a/slsDetectorSoftware/src/CmdProxy.h +++ b/slsDetectorSoftware/src/CmdProxy.h @@ -1536,7 +1536,8 @@ class CmdProxy { "\n\tNumber of frames caught by receiver."); 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. " + "Negative number denotes extra packets."); INTEGER_COMMAND_VEC_ID( nextframenumber, getNextFrameNumber, setNextFrameNumber, diff --git a/slsDetectorSoftware/src/Detector.cpp b/slsDetectorSoftware/src/Detector.cpp index f31349ad4..e8680ef2f 100644 --- a/slsDetectorSoftware/src/Detector.cpp +++ b/slsDetectorSoftware/src/Detector.cpp @@ -797,7 +797,7 @@ Result Detector::getFramesCaught(Positions pos) const { return pimpl->Parallel(&Module::getFramesCaughtByReceiver, pos); } -Result> +Result> Detector::getNumMissingPackets(Positions pos) const { return pimpl->Parallel(&Module::getNumMissingPackets, pos); } diff --git a/slsDetectorSoftware/src/Module.cpp b/slsDetectorSoftware/src/Module.cpp index e36f69c1c..599a754b8 100644 --- a/slsDetectorSoftware/src/Module.cpp +++ b/slsDetectorSoftware/src/Module.cpp @@ -870,7 +870,7 @@ int64_t Module::getFramesCaughtByReceiver() const { return sendToReceiver(F_GET_RECEIVER_FRAMES_CAUGHT); } -std::vector Module::getNumMissingPackets() const { +std::vector Module::getNumMissingPackets() const { // TODO!(Erik) Refactor LOG(logDEBUG1) << "Getting num missing packets"; if (shm()->useReceiverFlag) { @@ -882,7 +882,7 @@ std::vector Module::getNumMissingPackets() const { " returned error: " + client.readErrorMessage()); } else { auto nports = client.Receive(); - std::vector retval(nports); + std::vector retval(nports); client.Receive(retval); LOG(logDEBUG1) << "Missing packets of Receiver" << moduleIndex << ": " << sls::ToString(retval); diff --git a/slsDetectorSoftware/src/Module.h b/slsDetectorSoftware/src/Module.h index 22ea7b030..217b35075 100644 --- a/slsDetectorSoftware/src/Module.h +++ b/slsDetectorSoftware/src/Module.h @@ -200,7 +200,7 @@ class Module : public virtual slsDetectorDefs { runStatus getReceiverStatus() const; double getReceiverProgress() const; int64_t getFramesCaughtByReceiver() const; - std::vector getNumMissingPackets() const; + std::vector getNumMissingPackets() const; uint64_t getNextFrameNumber() const; void setNextFrameNumber(uint64_t value); void sendSoftwareTrigger(const bool block);