mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-23 15:00:02 +02:00
removed merge conflicts from bug fix of zmq buffering while acquire from command line
This commit is contained in:
commit
9c55cb4974
@ -1350,6 +1350,26 @@ An extension given by the modules serial number will be attached.
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="btnRestartStreaming">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>23</x>
|
||||
<y>142</y>
|
||||
<width>291</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Switching off and on the receiver data streaming from command line requires client sockets to be restarted as well.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Restart Streaming (Receiver->GUI)</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../include/icons.qrc">
|
||||
<normaloff>:/icons/images/refresh.png</normaloff>:/icons/images/refresh.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QWidget" name="gridLayoutWidget_7">
|
||||
<property name="geometry">
|
||||
@ -1661,7 +1681,7 @@ An extension given by the modules serial number will be attached.
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Client ZMQ Port:</string>
|
||||
<string>ZMQ Port (GUI):</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -170,6 +170,10 @@ private slots:
|
||||
*/
|
||||
void SetReceiver();
|
||||
|
||||
/** Restart data streaming in receiver and gui
|
||||
*/
|
||||
void RestartStreaming();
|
||||
|
||||
/** Add ROI Input if the value changed in the last slot
|
||||
*/
|
||||
void AddROIInputSlot(){AddROIInput(1);};
|
||||
|
@ -778,11 +778,20 @@ void* qDrawPlot::DataStartAcquireThread(void *this_pointer){
|
||||
if(((qDrawPlot*)this_pointer)->myDet->setReceiverOnline() == slsDetectorDefs::ONLINE_FLAG) {
|
||||
|
||||
// if receiver data up streaming not on, switch it on
|
||||
if (((qDrawPlot*)this_pointer)->myDet->enableDataStreamingFromReceiver() != 1)
|
||||
if (((qDrawPlot*)this_pointer)->myDet->enableDataStreamingFromReceiver() != 1) {cprintf(GREEN,"receiver not on\n");
|
||||
// switch on receiver
|
||||
if (((qDrawPlot*)this_pointer)->myDet->enableDataStreamingFromReceiver(1) != 1) {
|
||||
qDefs::checkErrorMessage(((qDrawPlot*)this_pointer)->myDet,"qDrawPlot::DataStartAcquireThread");
|
||||
return this_pointer;
|
||||
}
|
||||
// switch off client
|
||||
((qDrawPlot*)this_pointer)->myDet->enableDataStreamingToClient(0);
|
||||
// switch on client
|
||||
if (((qDrawPlot*)this_pointer)->myDet->enableDataStreamingToClient(1) != 1) {
|
||||
qDefs::checkErrorMessage(((qDrawPlot*)this_pointer)->myDet,"qDrawPlot::DataStartAcquireThread");
|
||||
return this_pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
((qDrawPlot*)this_pointer)->myDet->acquire(1);
|
||||
|
@ -81,6 +81,7 @@ void qTabAdvanced::SetupWidgetWindow(){
|
||||
spinZmqPort2->setEnabled(false);
|
||||
dispZMQIP->setEnabled(false);
|
||||
dispZMQIP2->setEnabled(false);
|
||||
btnRestartStreaming->setEnabled(false);
|
||||
break;
|
||||
case slsDetectorDefs::EIGER:
|
||||
isEnergy = true;
|
||||
@ -282,6 +283,7 @@ void qTabAdvanced::Initialization(){
|
||||
connect(dispZMQIP2, SIGNAL(editingFinished()), this, SLOT(SetReceiverZMQIP()));
|
||||
|
||||
connect(btnRxr, SIGNAL(clicked()), this, SLOT(SetReceiver()));
|
||||
connect(btnRestartStreaming,SIGNAL(clicked()), this, SLOT(RestartStreaming()));
|
||||
|
||||
}
|
||||
|
||||
@ -731,12 +733,17 @@ void qTabAdvanced::SetRxrUDPPort(int port){
|
||||
|
||||
void qTabAdvanced::SetCltZmqPort(int port){
|
||||
#ifdef VERBOSE
|
||||
cout << "Setting Receiver UDP Port:" << port << endl;
|
||||
cout << "Setting Client UDP Port:" << port << endl;
|
||||
#endif
|
||||
ostringstream ss; ss << port; string sport = ss.str();
|
||||
|
||||
disconnect(spinZmqPort, SIGNAL(valueChanged(int)), this, SLOT(SetCltZmqPort(int)));
|
||||
spinZmqPort->setValue(atoi(det->setClientStreamingPort(sport).c_str()));
|
||||
myDet->enableDataStreamingFromReceiver(false);
|
||||
myDet->enableDataStreamingToClient(false);
|
||||
|
||||
myDet->enableDataStreamingFromReceiver(true);
|
||||
myDet->enableDataStreamingToClient(true);
|
||||
qDefs::checkErrorMessage(det,"qTabAdvanced::SetCltZmqPort");
|
||||
connect(spinZmqPort, SIGNAL(valueChanged(int)), this, SLOT(SetCltZmqPort(int)));
|
||||
}
|
||||
@ -753,6 +760,11 @@ void qTabAdvanced::SetRxrZmqPort(int port){
|
||||
|
||||
disconnect(spinZmqPort2, SIGNAL(valueChanged(int)), this, SLOT(SetRxrZmqPort(int)));
|
||||
spinZmqPort2->setValue(atoi(det->setReceiverStreamingPort(sport).c_str()));
|
||||
myDet->enableDataStreamingFromReceiver(false);
|
||||
myDet->enableDataStreamingToClient(false);
|
||||
|
||||
myDet->enableDataStreamingFromReceiver(true);
|
||||
myDet->enableDataStreamingToClient(true);
|
||||
qDefs::checkErrorMessage(det,"qTabAdvanced::SetRxrZmqPort");
|
||||
connect(spinZmqPort2, SIGNAL(valueChanged(int)), this, SLOT(SetRxrZmqPort(int)));
|
||||
}
|
||||
@ -849,6 +861,11 @@ void qTabAdvanced::SetClientZMQIP(){
|
||||
disconnect(dispZMQIP, SIGNAL(editingFinished()), this, SLOT(SetClientZMQIP()));
|
||||
|
||||
dispZMQIP->setText(QString(det->setClientStreamingIP(dispZMQIP->text().toAscii().constData()).c_str()));
|
||||
myDet->enableDataStreamingFromReceiver(false);
|
||||
myDet->enableDataStreamingToClient(false);
|
||||
|
||||
myDet->enableDataStreamingFromReceiver(true);
|
||||
myDet->enableDataStreamingToClient(true);
|
||||
qDefs::checkErrorMessage(det,"qTabAdvanced::SetClientZMQIP");
|
||||
|
||||
connect(dispZMQIP, SIGNAL(editingFinished()), this, SLOT(SetClientZMQIP()));
|
||||
@ -865,6 +882,11 @@ void qTabAdvanced::SetReceiverZMQIP(){
|
||||
disconnect(dispZMQIP2, SIGNAL(editingFinished()), this, SLOT(SetReceiverZMQIP()));
|
||||
|
||||
dispZMQIP2->setText(QString(det->setReceiverStreamingIP(dispZMQIP2->text().toAscii().constData()).c_str()));
|
||||
myDet->enableDataStreamingFromReceiver(false);
|
||||
myDet->enableDataStreamingToClient(false);
|
||||
|
||||
myDet->enableDataStreamingFromReceiver(true);
|
||||
myDet->enableDataStreamingToClient(true);
|
||||
qDefs::checkErrorMessage(det,"qTabAdvanced::SetReceiverZMQIP");
|
||||
|
||||
connect(dispZMQIP2, SIGNAL(editingFinished()), this, SLOT(SetReceiverZMQIP()));
|
||||
@ -888,6 +910,23 @@ void qTabAdvanced::SetReceiver(){
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
void qTabAdvanced::RestartStreaming(){
|
||||
#ifdef VERBOSE
|
||||
cout << "Restarting Data Streaming in Receiver and Gui" << endl;
|
||||
#endif
|
||||
disconnect(btnRestartStreaming,SIGNAL(clicked()), this, SLOT(RestartStreaming()));
|
||||
myDet->enableDataStreamingFromReceiver(false);
|
||||
myDet->enableDataStreamingToClient(false);
|
||||
|
||||
myDet->enableDataStreamingFromReceiver(true);
|
||||
myDet->enableDataStreamingToClient(true);
|
||||
connect(btnRestartStreaming,SIGNAL(clicked()), this, SLOT(RestartStreaming()));
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user