diff --git a/slsDetectorGui/forms/form_tab_advanced.ui b/slsDetectorGui/forms/form_tab_advanced.ui
index af6a7bc0a..e8fc4d59d 100644
--- a/slsDetectorGui/forms/form_tab_advanced.ui
+++ b/slsDetectorGui/forms/form_tab_advanced.ui
@@ -958,7 +958,7 @@ An extension given by the modules serial number will be attached.
420
- 143
+ 140
291
25
@@ -1264,7 +1264,7 @@ An extension given by the modules serial number will be attached.
- ZMQ Port TX:
+ ZMQ Port:
@@ -1312,6 +1312,42 @@ An extension given by the modules serial number will be attached.
+ -
+
+
+
+ 0
+ 0
+
+
+
+ ZMQ IP:
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 180
+ 0
+
+
+
+ Sets the Receiver UDP IP
+#rx_udpip#
+
+
+
+
+
+
@@ -1625,7 +1661,7 @@ An extension given by the modules serial number will be attached.
- ZMQ Port RX:
+ Client ZMQ Port:
@@ -1673,6 +1709,42 @@ An extension given by the modules serial number will be attached.
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Client ZMQ IP:
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 180
+ 0
+
+
+
+ Sets the detector IP to send packets to receiver
+#detectorip#
+
+
+
+
+
+
diff --git a/slsDetectorGui/include/qDrawPlot.h b/slsDetectorGui/include/qDrawPlot.h
index cd1aba4d4..a8071818b 100644
--- a/slsDetectorGui/include/qDrawPlot.h
+++ b/slsDetectorGui/include/qDrawPlot.h
@@ -146,13 +146,13 @@ public:
void SetHistogram(bool enable,int histArg, int min=0, int max=0, double size=0){histogram = enable;histogramArgument = histArg; histFrom=min;histTo=max;histSize=size;};
/** Get X Minimum value from plot */
- double GetXMinimum() { if(plot_in_scope==1) return plot1D->GetXMinimum(); else plot2D->GetPlot()->GetXMinimum();};
+ double GetXMinimum() { if(plot_in_scope==1) return plot1D->GetXMinimum(); else return plot2D->GetPlot()->GetXMinimum();};
/** Get X Maximum value from plot */
- double GetXMaximum() { if(plot_in_scope==1) return plot1D->GetXMaximum(); else plot2D->GetPlot()->GetXMaximum();};
+ double GetXMaximum() { if(plot_in_scope==1) return plot1D->GetXMaximum(); else return plot2D->GetPlot()->GetXMaximum();};
/** Get Y Minimum value from plot */
- double GetYMinimum() { if(plot_in_scope==1) return plot1D->GetYMinimum(); else plot2D->GetPlot()->GetYMinimum();};
+ double GetYMinimum() { if(plot_in_scope==1) return plot1D->GetYMinimum(); else return plot2D->GetPlot()->GetYMinimum();};
/** Get Y Maximum value from plot */
- double GetYMaximum() { if(plot_in_scope==1) return plot1D->GetYMaximum(); else plot2D->GetPlot()->GetYMaximum();};
+ double GetYMaximum() { if(plot_in_scope==1) return plot1D->GetYMaximum(); else return plot2D->GetPlot()->GetYMaximum();};
public slots:
/** To select 1D or 2D plot
diff --git a/slsDetectorGui/include/qTabAdvanced.h b/slsDetectorGui/include/qTabAdvanced.h
index 5071e8fd6..a871d5649 100644
--- a/slsDetectorGui/include/qTabAdvanced.h
+++ b/slsDetectorGui/include/qTabAdvanced.h
@@ -158,6 +158,14 @@ private slots:
*/
void SetNetworkParameters();
+ /** Sets client zmq ip to listen to
+ */
+ void SetClientZMQIP();
+
+ /** Sets receiver zmq ip to stream from
+ */
+ void SetReceiverZMQIP();
+
/** Sets the receiver. which also sets the receiver parameters
*/
void SetReceiver();
diff --git a/slsDetectorGui/src/qTabAdvanced.cpp b/slsDetectorGui/src/qTabAdvanced.cpp
index fe3aab038..dadec29d2 100644
--- a/slsDetectorGui/src/qTabAdvanced.cpp
+++ b/slsDetectorGui/src/qTabAdvanced.cpp
@@ -79,6 +79,8 @@ void qTabAdvanced::SetupWidgetWindow(){
isAngular = true;
spinZmqPort->setEnabled(false);
spinZmqPort2->setEnabled(false);
+ dispZMQIP->setEnabled(false);
+ dispZMQIP2->setEnabled(false);
break;
case slsDetectorDefs::EIGER:
isEnergy = true;
@@ -165,7 +167,8 @@ void qTabAdvanced::SetupWidgetWindow(){
dispRxrHostname->setText(det->getReceiver().c_str());
dispUDPIP->setText(det->getReceiverUDPIP().c_str());
dispUDPMAC->setText(det->getReceiverUDPMAC().c_str());
-
+ dispZMQIP->setText(det->getClientStreamingIP().c_str());
+ dispZMQIP2->setText(det->getReceiverStreamingIP().c_str());
//check if its online and set it to red if offline
#ifdef VERYVERBOSE
@@ -261,11 +264,7 @@ void qTabAdvanced::Initialization(){
connect(spinStopPort, SIGNAL(valueChanged(int)), this, SLOT(SetStopPort(int)));
connect(comboOnline, SIGNAL(currentIndexChanged(int)), this, SLOT(SetOnline(int)));
- if((detType==slsDetectorDefs::GOTTHARD) ||
- (detType==slsDetectorDefs::MOENCH) ||
- (detType==slsDetectorDefs::PROPIX) ||
- (detType==slsDetectorDefs::JUNGFRAU) ||
- (detType==slsDetectorDefs::EIGER)){
+ if(detType!=slsDetectorDefs::MYTHEN){
//network
connect(spinTCPPort, SIGNAL(valueChanged(int)), this, SLOT(SetRxrTCPPort(int)));
@@ -279,6 +278,9 @@ void qTabAdvanced::Initialization(){
connect(dispUDPIP, SIGNAL(editingFinished()), this, SLOT(SetNetworkParameters()));
connect(dispUDPMAC, SIGNAL(editingFinished()), this, SLOT(SetNetworkParameters()));
+ connect(dispZMQIP, SIGNAL(editingFinished()), this, SLOT(SetClientZMQIP()));
+ connect(dispZMQIP2, SIGNAL(editingFinished()), this, SLOT(SetReceiverZMQIP()));
+
connect(btnRxr, SIGNAL(clicked()), this, SLOT(SetReceiver()));
}
@@ -840,6 +842,38 @@ void qTabAdvanced::SetNetworkParameters(){
//-------------------------------------------------------------------------------------------------------------------------------------------------
+void qTabAdvanced::SetClientZMQIP(){
+#ifdef VERBOSE
+ cout << "Setting Client ZMQ IP" << endl;
+#endif
+ disconnect(dispZMQIP, SIGNAL(editingFinished()), this, SLOT(SetClientZMQIP()));
+
+ dispZMQIP->setText(QString(det->setClientStreamingIP(dispZMQIP->text().toAscii().constData()).c_str()));
+ qDefs::checkErrorMessage(det,"qTabAdvanced::SetClientZMQIP");
+
+ connect(dispZMQIP, SIGNAL(editingFinished()), this, SLOT(SetClientZMQIP()));
+}
+
+
+//-------------------------------------------------------------------------------------------------------------------------------------------------
+
+
+void qTabAdvanced::SetReceiverZMQIP(){
+#ifdef VERBOSE
+ cout << "Setting Receiver ZMQ IP" << endl;
+#endif
+ disconnect(dispZMQIP2, SIGNAL(editingFinished()), this, SLOT(SetReceiverZMQIP()));
+
+ dispZMQIP2->setText(QString(det->setReceiverStreamingIP(dispZMQIP2->text().toAscii().constData()).c_str()));
+ qDefs::checkErrorMessage(det,"qTabAdvanced::SetReceiverZMQIP");
+
+ connect(dispZMQIP2, SIGNAL(editingFinished()), this, SLOT(SetReceiverZMQIP()));
+}
+
+
+//-------------------------------------------------------------------------------------------------------------------------------------------------
+
+
void qTabAdvanced::SetReceiver(){
#ifdef VERBOSE
cout << "Setting Receiver" << endl;
@@ -1107,6 +1141,8 @@ void qTabAdvanced::SetDetector(int index){
dispRxrHostname->setText(det->getReceiver().c_str());
dispUDPIP->setText(det->getReceiverUDPIP().c_str());
dispUDPMAC->setText(det->getReceiverUDPMAC().c_str());
+ dispZMQIP->setText(det->getClientStreamingIP().c_str());
+ dispZMQIP2->setText(det->getReceiverStreamingIP().c_str());
//check if its online and set it to red if offline
@@ -1280,11 +1316,7 @@ void qTabAdvanced::Refresh(){
#ifdef VERBOSE
cout << "Getting Receiver Network Information" << endl;
#endif
- if ((detType==slsDetectorDefs::GOTTHARD) ||
- (detType==slsDetectorDefs::MOENCH)||
- (detType==slsDetectorDefs::PROPIX)||
- (detType==slsDetectorDefs::JUNGFRAU)||
- (detType==slsDetectorDefs::EIGER)){
+ if (detType!=slsDetectorDefs::MYTHEN){
//disconnect
disconnect(spinTCPPort, SIGNAL(valueChanged(int)), this, SLOT(SetRxrTCPPort(int)));
disconnect(spinUDPPort, SIGNAL(valueChanged(int)), this, SLOT(SetRxrUDPPort(int)));
@@ -1326,6 +1358,14 @@ void qTabAdvanced::Refresh(){
connect(dispUDPMAC, SIGNAL(editingFinished()), this, SLOT(SetNetworkParameters()));
connect(btnRxr, SIGNAL(clicked()), this, SLOT(SetReceiver()));
+ // zmq parameters
+ disconnect(dispZMQIP, SIGNAL(editingFinished()), this, SLOT(SetClientZMQIP()));
+ dispZMQIP->setText(det->getClientStreamingIP().c_str());
+ connect(dispZMQIP, SIGNAL(editingFinished()), this, SLOT(SetClientZMQIP()));
+
+ disconnect(dispZMQIP2, SIGNAL(editingFinished()), this, SLOT(SetReceiverZMQIP()));
+ dispZMQIP2->setText(det->getReceiverStreamingIP().c_str());
+ connect(dispZMQIP2, SIGNAL(editingFinished()), this, SLOT(SetReceiverZMQIP()));
}
//highlight in red if detector or receiver is offline