mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-02 16:10:41 +02:00
zmq separated for client and rx, ports and ip included in expert advanced mode
This commit is contained in:
parent
28e2ebf75a
commit
70e4c6e2a2
@ -958,7 +958,7 @@ An extension given by the modules serial number will be attached.
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>420</x>
|
<x>420</x>
|
||||||
<y>143</y>
|
<y>140</y>
|
||||||
<width>291</width>
|
<width>291</width>
|
||||||
<height>25</height>
|
<height>25</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -1264,7 +1264,7 @@ An extension given by the modules serial number will be attached.
|
|||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>ZMQ Port TX:</string>
|
<string>ZMQ Port:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -1312,6 +1312,42 @@ An extension given by the modules serial number will be attached.
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="3" column="3">
|
||||||
|
<widget class="QLabel" name="label_16">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>ZMQ IP:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="4">
|
||||||
|
<widget class="QLineEdit" name="dispZMQIP2">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>180</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Sets the Receiver UDP IP
|
||||||
|
#rx_udpip#</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
@ -1625,7 +1661,7 @@ An extension given by the modules serial number will be attached.
|
|||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>ZMQ Port RX:</string>
|
<string>Client ZMQ Port:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -1673,6 +1709,42 @@ An extension given by the modules serial number will be attached.
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="3" column="3">
|
||||||
|
<widget class="QLabel" name="lblIP_2">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Client ZMQ IP:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="4">
|
||||||
|
<widget class="QLineEdit" name="dispZMQIP">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>180</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Sets the detector IP to send packets to receiver
|
||||||
|
#detectorip#</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
|
@ -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;};
|
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 */
|
/** 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 */
|
/** 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 */
|
/** 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 */
|
/** 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:
|
public slots:
|
||||||
/** To select 1D or 2D plot
|
/** To select 1D or 2D plot
|
||||||
|
@ -158,6 +158,14 @@ private slots:
|
|||||||
*/
|
*/
|
||||||
void SetNetworkParameters();
|
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
|
/** Sets the receiver. which also sets the receiver parameters
|
||||||
*/
|
*/
|
||||||
void SetReceiver();
|
void SetReceiver();
|
||||||
|
@ -79,6 +79,8 @@ void qTabAdvanced::SetupWidgetWindow(){
|
|||||||
isAngular = true;
|
isAngular = true;
|
||||||
spinZmqPort->setEnabled(false);
|
spinZmqPort->setEnabled(false);
|
||||||
spinZmqPort2->setEnabled(false);
|
spinZmqPort2->setEnabled(false);
|
||||||
|
dispZMQIP->setEnabled(false);
|
||||||
|
dispZMQIP2->setEnabled(false);
|
||||||
break;
|
break;
|
||||||
case slsDetectorDefs::EIGER:
|
case slsDetectorDefs::EIGER:
|
||||||
isEnergy = true;
|
isEnergy = true;
|
||||||
@ -165,7 +167,8 @@ void qTabAdvanced::SetupWidgetWindow(){
|
|||||||
dispRxrHostname->setText(det->getReceiver().c_str());
|
dispRxrHostname->setText(det->getReceiver().c_str());
|
||||||
dispUDPIP->setText(det->getReceiverUDPIP().c_str());
|
dispUDPIP->setText(det->getReceiverUDPIP().c_str());
|
||||||
dispUDPMAC->setText(det->getReceiverUDPMAC().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
|
//check if its online and set it to red if offline
|
||||||
#ifdef VERYVERBOSE
|
#ifdef VERYVERBOSE
|
||||||
@ -261,11 +264,7 @@ void qTabAdvanced::Initialization(){
|
|||||||
connect(spinStopPort, SIGNAL(valueChanged(int)), this, SLOT(SetStopPort(int)));
|
connect(spinStopPort, SIGNAL(valueChanged(int)), this, SLOT(SetStopPort(int)));
|
||||||
connect(comboOnline, SIGNAL(currentIndexChanged(int)), this, SLOT(SetOnline(int)));
|
connect(comboOnline, SIGNAL(currentIndexChanged(int)), this, SLOT(SetOnline(int)));
|
||||||
|
|
||||||
if((detType==slsDetectorDefs::GOTTHARD) ||
|
if(detType!=slsDetectorDefs::MYTHEN){
|
||||||
(detType==slsDetectorDefs::MOENCH) ||
|
|
||||||
(detType==slsDetectorDefs::PROPIX) ||
|
|
||||||
(detType==slsDetectorDefs::JUNGFRAU) ||
|
|
||||||
(detType==slsDetectorDefs::EIGER)){
|
|
||||||
|
|
||||||
//network
|
//network
|
||||||
connect(spinTCPPort, SIGNAL(valueChanged(int)), this, SLOT(SetRxrTCPPort(int)));
|
connect(spinTCPPort, SIGNAL(valueChanged(int)), this, SLOT(SetRxrTCPPort(int)));
|
||||||
@ -279,6 +278,9 @@ void qTabAdvanced::Initialization(){
|
|||||||
connect(dispUDPIP, SIGNAL(editingFinished()), this, SLOT(SetNetworkParameters()));
|
connect(dispUDPIP, SIGNAL(editingFinished()), this, SLOT(SetNetworkParameters()));
|
||||||
connect(dispUDPMAC, 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()));
|
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(){
|
void qTabAdvanced::SetReceiver(){
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
cout << "Setting Receiver" << endl;
|
cout << "Setting Receiver" << endl;
|
||||||
@ -1107,6 +1141,8 @@ void qTabAdvanced::SetDetector(int index){
|
|||||||
dispRxrHostname->setText(det->getReceiver().c_str());
|
dispRxrHostname->setText(det->getReceiver().c_str());
|
||||||
dispUDPIP->setText(det->getReceiverUDPIP().c_str());
|
dispUDPIP->setText(det->getReceiverUDPIP().c_str());
|
||||||
dispUDPMAC->setText(det->getReceiverUDPMAC().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
|
//check if its online and set it to red if offline
|
||||||
@ -1280,11 +1316,7 @@ void qTabAdvanced::Refresh(){
|
|||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
cout << "Getting Receiver Network Information" << endl;
|
cout << "Getting Receiver Network Information" << endl;
|
||||||
#endif
|
#endif
|
||||||
if ((detType==slsDetectorDefs::GOTTHARD) ||
|
if (detType!=slsDetectorDefs::MYTHEN){
|
||||||
(detType==slsDetectorDefs::MOENCH)||
|
|
||||||
(detType==slsDetectorDefs::PROPIX)||
|
|
||||||
(detType==slsDetectorDefs::JUNGFRAU)||
|
|
||||||
(detType==slsDetectorDefs::EIGER)){
|
|
||||||
//disconnect
|
//disconnect
|
||||||
disconnect(spinTCPPort, SIGNAL(valueChanged(int)), this, SLOT(SetRxrTCPPort(int)));
|
disconnect(spinTCPPort, SIGNAL(valueChanged(int)), this, SLOT(SetRxrTCPPort(int)));
|
||||||
disconnect(spinUDPPort, SIGNAL(valueChanged(int)), this, SLOT(SetRxrUDPPort(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(dispUDPMAC, SIGNAL(editingFinished()), this, SLOT(SetNetworkParameters()));
|
||||||
connect(btnRxr, SIGNAL(clicked()), this, SLOT(SetReceiver()));
|
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
|
//highlight in red if detector or receiver is offline
|
||||||
|
Loading…
x
Reference in New Issue
Block a user