diff --git a/RELEASE.txt b/RELEASE.txt index 612a599b9..035deeca5 100755 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -41,6 +41,8 @@ This document describes the differences between v7.0.0 and v6.x.x - file write disabled by default - eiger 12 bit mode - start non blocking acquisition at modular level +- hostname cmd failed when connecting to servers in update mode (ctb, moench, jungfrau, eiger) +- missingpackets signed (negative => extra packets) 2. Resolved Issues diff --git a/python/slsdet/detector.py b/python/slsdet/detector.py index 3ba65126a..6c4b200db 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/slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServer_developer b/slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServer_developer index 917b3a0a6..73aca12be 100755 Binary files a/slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServer_developer and b/slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServer_developer differ diff --git a/slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServer_developer b/slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServer_developer index dc91a9b1e..4a342d105 100755 Binary files a/slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServer_developer and b/slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServer_developer differ diff --git a/slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer b/slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer index e9aca514c..b3ebdf0cc 100755 Binary files a/slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer and b/slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer differ diff --git a/slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServer_developer b/slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServer_developer index 84d9fc547..82202ac4b 100755 Binary files a/slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServer_developer and b/slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServer_developer differ diff --git a/slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServer_developer b/slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServer_developer index 6ddc84636..2ff62174f 100755 Binary files a/slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServer_developer and b/slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServer_developer differ diff --git a/slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServer_developer b/slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServer_developer index 186b3ca86..527d451e2 100755 Binary files a/slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServer_developer and b/slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServer_developer differ diff --git a/slsDetectorServers/moenchDetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/moenchDetectorServer/slsDetectorFunctionList.c index 684ba1152..1bf765a99 100644 --- a/slsDetectorServers/moenchDetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/moenchDetectorServer/slsDetectorFunctionList.c @@ -67,7 +67,13 @@ int defaultDacValues[NDAC] = DEFAULT_DAC_VALS; int vLimit = 0; enum detectorSettings thisSettings = UNINITIALIZED; int highvoltage = 0; + +// getNumberofchannels return 0 for y in --update mode (virtual servers) +#ifdef VIRTUAL +int nSamples = DEFAULT_NUM_SAMPLES; +#else int nSamples = 1; +#endif int detPos[2] = {0, 0}; int isInitCheckDone() { return initCheckDone; } diff --git a/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer b/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer index b3198a1f6..046003d62 100755 Binary files a/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer and b/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer differ diff --git a/slsDetectorServers/slsDetectorServer/src/slsDetectorServer_funcs.c b/slsDetectorServers/slsDetectorServer/src/slsDetectorServer_funcs.c index abd4f8f68..956591314 100644 --- a/slsDetectorServers/slsDetectorServer/src/slsDetectorServer_funcs.c +++ b/slsDetectorServers/slsDetectorServer/src/slsDetectorServer_funcs.c @@ -80,28 +80,32 @@ char scanErrMessage[MAX_STR_LENGTH] = ""; /* initialization functions */ int updateModeAllowedFunction(int file_des) { - unsigned int listsize = 19; - enum detFuncs list[] = {F_EXEC_COMMAND, - F_GET_DETECTOR_TYPE, - F_GET_FIRMWARE_VERSION, - F_GET_SERVER_VERSION, - F_GET_SERIAL_NUMBER, - F_WRITE_REGISTER, - F_READ_REGISTER, - F_LOCK_SERVER, - F_GET_LAST_CLIENT_IP, - F_PROGRAM_FPGA, - F_RESET_FPGA, - F_CHECK_VERSION, - F_COPY_DET_SERVER, - F_REBOOT_CONTROLLER, - F_GET_KERNEL_VERSION, - F_UPDATE_KERNEL, - F_UPDATE_DETECTOR_SERVER, - F_GET_UPDATE_MODE, - F_SET_UPDATE_MODE}; - for (unsigned int i = 0; i < listsize; ++i) { - if ((unsigned int)fnum == list[i]) { + enum detFuncs allowedFuncs[] = {F_EXEC_COMMAND, + F_GET_DETECTOR_TYPE, + F_GET_FIRMWARE_VERSION, + F_GET_SERVER_VERSION, + F_GET_SERIAL_NUMBER, + F_WRITE_REGISTER, + F_READ_REGISTER, + F_LOCK_SERVER, + F_GET_LAST_CLIENT_IP, + F_PROGRAM_FPGA, + F_RESET_FPGA, + F_CHECK_VERSION, + F_COPY_DET_SERVER, + F_REBOOT_CONTROLLER, + F_GET_KERNEL_VERSION, + F_UPDATE_KERNEL, + F_UPDATE_DETECTOR_SERVER, + F_GET_UPDATE_MODE, + F_SET_UPDATE_MODE, + F_GET_NUM_CHANNELS, + F_GET_NUM_INTERFACES, + F_ACTIVATE}; + size_t allowedFuncsSize = sizeof(allowedFuncs) / sizeof(enum detFuncs); + + for (unsigned int i = 0; i < allowedFuncsSize; ++i) { + if ((unsigned int)fnum == allowedFuncs[i]) { return OK; } } diff --git a/slsDetectorSoftware/include/sls/Detector.h b/slsDetectorSoftware/include/sls/Detector.h index a515205bc..c7e091dbc 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 14cbb870a..95155b1b2 100644 --- a/slsDetectorSoftware/src/CmdProxy.h +++ b/slsDetectorSoftware/src/CmdProxy.h @@ -1535,7 +1535,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 bde663187..54f9aff14 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); diff --git a/slsSupportLib/include/sls/versionAPI.h b/slsSupportLib/include/sls/versionAPI.h index 86b76114c..02cba7f71 100644 --- a/slsSupportLib/include/sls/versionAPI.h +++ b/slsSupportLib/include/sls/versionAPI.h @@ -6,10 +6,10 @@ #define APIRECEIVER 0x211124 #define APIGUI 0x211124 -#define APIEIGER 0x220218 -#define APICTB 0x220218 -#define APIGOTTHARD 0x220218 -#define APIGOTTHARD2 0x220218 -#define APIJUNGFRAU 0x220218 -#define APIMYTHEN3 0x220218 -#define APIMOENCH 0x220218 +#define APICTB 0x220223 +#define APIGOTTHARD 0x220223 +#define APIGOTTHARD2 0x220223 +#define APIJUNGFRAU 0x220223 +#define APIMYTHEN3 0x220223 +#define APIMOENCH 0x220223 +#define APIEIGER 0x220223