somewhere in separating zmq rxr and client

This commit is contained in:
Dhanya Maliakal
2017-11-14 16:26:17 +01:00
parent 6693d08331
commit dda86cfe9b
5 changed files with 61 additions and 13 deletions

View File

@ -1894,12 +1894,19 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) {
++i;
/*! \page network
- <b>zmqport [port]</b> sets/gets the 0MQ (TCP) port of the receiver from where data is streamed to the client. Use single-detector command to set individually or multi-detector command to calculate based on \c port for the rest. \c Returns \c (int)
- <b>zmqport [port]</b> sets/gets the 0MQ (TCP) port of the client to where final data is streamed to (eg. for GUI). Use single-detector command to set individually or multi-detector command to calculate based on \c port for the rest. \c Returns \c (int)
*/
descrToFuncMap[i].m_pFuncName="zmqport"; //
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdNetworkParameter;
++i;
/*! \page network
- <b>rx_zmqport [port]</b> sets/gets the 0MQ (TCP) port of the receiver from where data is streamed from (eg. to GUI or another process for further processing). Use single-detector command to set individually or multi-detector command to calculate based on \c port for the rest. \c Returns \c (int)
*/
descrToFuncMap[i].m_pFuncName="rx_zmqport"; //
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdNetworkParameter;
++i;
/*! \page network
- <b>configuremac [i]</b> configures the MAC of the detector with these parameters: detectorip, detectormac, rx_udpip, rx_udpmac, rx_udpport, rx_udpport2 (if applicable). This command is already included in \c rx_hsotname. Only put!. \c Returns \c (int)
*/
@ -3946,6 +3953,12 @@ string slsDetectorCommand::cmdNetworkParameter(int narg, char *args[], int actio
return ("cannot parse argument") + string(args[1]);
}
}else if (cmd=="zmqport") {
t=CLIENT_STREAMING_PORT;
if (action==PUT_ACTION){
if (!(sscanf(args[1],"%d",&i)))
return ("cannot parse argument") + string(args[1]);
}
}else if (cmd=="rx_zmqport") {
t=RECEIVER_STREAMING_PORT;
if (action==PUT_ACTION){
if (!(sscanf(args[1],"%d",&i)))
@ -3976,7 +3989,8 @@ string slsDetectorCommand::helpNetworkParameter(int narg, char *args[], int acti
os << "txndelay_right port \n sets detector transmission delay of the right port"<< std::endl;
os << "txndelay_frame port \n sets detector transmission delay of the entire frame"<< std::endl;
os << "flowcontrol_10g port \n sets flow control for 10g for eiger"<< std::endl;
os << "zmqport port \n sets zmq port (data from receiver to client); setting via multidetector command calculates port for individual detectors"<< std::endl;
os << "zmqport port \n sets zmq port (data to client from receiver/different process); setting via multidetector command calculates port for individual detectors"<< std::endl;
os << "rx_zmqport port \n sets zmq port (data from receiver to client/different process); setting via multidetector command calculates port for individual detectors"<< std::endl;
}
if (action==GET_ACTION || action==HELP_ACTION) {
os << "detectormac \n gets detector mac "<< std::endl;
@ -3989,7 +4003,8 @@ string slsDetectorCommand::helpNetworkParameter(int narg, char *args[], int acti
os << "txndelay_right \n gets detector transmission delay of the right port"<< std::endl;
os << "txndelay_frame \n gets detector transmission delay of the entire frame"<< std::endl;
os << "flowcontrol_10g \n gets flow control for 10g for eiger"<< std::endl;
os << "zmqport \n gets zmq port (data from receiver to client)"<< std::endl;
os << "zmqport \n gets zmq port (data to client from receiver/different process)"<< std::endl;
os << "rx_zmqport \n gets zmq port (data from receiver to client/different process)"<< std::endl;
}
return os.str();