diff --git a/slsDetectorSoftware/slsDetector/slsDetector.h b/slsDetectorSoftware/slsDetector/slsDetector.h index 06fb35123..3e058fad7 100644 --- a/slsDetectorSoftware/slsDetector/slsDetector.h +++ b/slsDetectorSoftware/slsDetector/slsDetector.h @@ -1643,7 +1643,7 @@ class slsDetector : public slsDetectorUtils, public energyConversion { /** gets the number of frames caught by any one receiver (to avoid using threadpool) \returns number of frames caught by any one receiver (master receiver if exists) */ - int getFramesCaughtByAnyReceiver() {getFramesCaughtByReceiver();}; + int getFramesCaughtByAnyReceiver() {return getFramesCaughtByReceiver();}; /** gets the current frame index of receiver \returns current frame index of receiver diff --git a/slsDetectorSoftware/slsDetector/slsDetectorUsers.cpp b/slsDetectorSoftware/slsDetector/slsDetectorUsers.cpp index 828c9f65b..c783d349f 100644 --- a/slsDetectorSoftware/slsDetector/slsDetectorUsers.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetectorUsers.cpp @@ -231,12 +231,12 @@ int slsDetectorUsers::enableDataStreamingToClient(int i){ return myDetector->enableDataStreamingToClient(i); } -int slsDetectorUsers::setReceiverDataStreamingOutPort(int i, int imod){ - return myDetector->setReceiverDataStreamingOutPort(i, imod); +int slsDetectorUsers::setReceiverDataStreamingOutPort(int i){ + return myDetector->setReceiverDataStreamingOutPort(i); } -int slsDetectorUsers::setClientDataStreamingInPort(int i, int imod){ - return myDetector->setClientDataStreamingInPort(i, imod); +int slsDetectorUsers::setClientDataStreamingInPort(int i){ + return myDetector->setClientDataStreamingInPort(i); } int64_t slsDetectorUsers::getModuleFirmwareVersion(){ diff --git a/slsDetectorSoftware/slsDetector/slsDetectorUsers.h b/slsDetectorSoftware/slsDetector/slsDetectorUsers.h index f0cee1730..dbaa75340 100644 --- a/slsDetectorSoftware/slsDetector/slsDetectorUsers.h +++ b/slsDetectorSoftware/slsDetector/slsDetectorUsers.h @@ -454,23 +454,19 @@ class slsDetectorUsers /** * Set/Get receiver streaming out ZMQ port - * If imod is -1, when setting it calculates and sets the port for all individual detectors - * and when getting it returns only the port of individual detector in first position + * For multi modules, it calculates (increments) and sets the ports * @param i sets, -1 gets - * @param imod module index, -1 for all * @returns receiver streaming out ZMQ port () */ - int setReceiverDataStreamingOutPort(int i, int imod=-1); + int setReceiverDataStreamingOutPort(int i=-1); /** * Set/Get client streaming in ZMQ port - * If imod is -1, when setting it calculates and sets the port for all individual detectors - * and when getting it returns only the port of individual detector in first position + * For multi modules, it calculates (increments) and sets the ports * @param i sets, -1 gets - * @param imod module index, -1 for all * @returns client streaming in ZMQ port */ - int setClientDataStreamingInPort(int i, int imod=-1); + int setClientDataStreamingInPort(int i=-1); /** get get Module Firmware Version diff --git a/slsDetectorSoftware/slsDetector/slsDetectorUtils.h b/slsDetectorSoftware/slsDetector/slsDetectorUtils.h index 0a6bdafc8..9f47b3080 100644 --- a/slsDetectorSoftware/slsDetector/slsDetectorUtils.h +++ b/slsDetectorSoftware/slsDetector/slsDetectorUtils.h @@ -90,48 +90,31 @@ class slsDetectorUtils : public slsDetectorActions, public postProcessing { int enablePixelMaskCorrection(int i=-1) {if (i>0) setBadChannelCorrection("default"); else if (i==0) setBadChannelCorrection(""); return getBadChannelCorrection();}; int enableCountRateCorrection(int i=-1) {if (i>0) setRateCorrection(i); else if (i==0) setRateCorrection(0); return getRateCorrection();}; + /** * Set/Get receiver streaming out ZMQ port + * For multi modules, it calculates (increments) and sets the ports * @param i sets, -1 gets - * @param imod module index, -1 for all * @returns receiver streaming out ZMQ port */ - int setReceiverDataStreamingOutPort(int i, int imod) { \ - // single module - if (imod < 0) { \ - if (i >= 0) { \ - ostringstream ss; ss << i; string s = ss.str(); \ - getSlsDetector(imod)->setReceiverStreamingPort(RECEIVER_STREAMING_PORT, s); \ - } \ - return atoi(getSlsDetector(imod)->getReceiverStreamingPort().c_str()); \ - } \ - // multimodule - if (i >= 0) \ - setNetworkParameter(RECEIVER_STREAMING_PORT, s); \ - return atoi(getSlsDetector(0)->getNetworkParameter(RECEIVER_STREAMING_PORT).c_str());}; \ + int setReceiverDataStreamingOutPort(int i) { \ + if (i >= 0) { ostringstream ss; ss << i; string s = ss.str(); \ + setNetworkParameter(RECEIVER_STREAMING_PORT, s);} \ + return atoi(getNetworkParameter(RECEIVER_STREAMING_PORT).c_str());}; \ /** * Set/Get client streaming in ZMQ port + * For multi modules, it calculates (increments) and sets the ports * @param i sets, -1 gets - * @param imod module index, -1 for all * @returns client streaming in ZMQ port */ - int setClientDataStreamingInPort(int i, int imod=-1){ \ - // single module - if (imod < 0) { \ - if (i >= 0) { \ - ostringstream ss; ss << i; string s = ss.str(); \ - getSlsDetector(imod)->setReceiverStreamingPort(CLIENT_STREAMING_PORT, s); \ - } \ - return atoi(getSlsDetector(imod)->getReceiverStreamingPort().c_str()); \ - } \ - // multimodule - if (i >= 0) \ - setNetworkParameter(CLIENT_STREAMING_PORT, s); \ - return atoi(getSlsDetector(0)->getNetworkParameter(CLIENT_STREAMING_PORT).c_str());}; \ - }; + int setClientDataStreamingInPort(int i){ \ + if (i >= 0) { ostringstream ss; ss << i; string s = ss.str(); \ + setNetworkParameter(CLIENT_STREAMING_PORT, s);} \ + return atoi(getNetworkParameter(CLIENT_STREAMING_PORT).c_str());}; \ - // string getFilePath(){return fileIO::getFilePath();};; + +// string getFilePath(){return fileIO::getFilePath();};; // string setFilePath(string s){return fileIO::setFilePath(s);}; // string getFileName(){return fileIO::getFileName();};