mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-13 13:27:14 +02:00
updated users class to reflect zmq changes (separation), fixed warnings
This commit is contained in:
@ -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
|
||||
|
@ -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(){
|
||||
|
@ -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
|
||||
|
@ -90,46 +90,29 @@ 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 setFilePath(string s){return fileIO::setFilePath(s);};
|
||||
|
Reference in New Issue
Block a user