made advanced tab detector dependent. each set mac adress etc is done via slsdetector and not multi

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@147 af1100a4-978c-4157-bff7-07162d2ba061
This commit is contained in:
l_maliakal_d 2013-02-26 08:34:47 +00:00
parent 642d7d8c74
commit 0682d23abd
9 changed files with 589 additions and 540 deletions

File diff suppressed because it is too large Load Diff

View File

@ -510,7 +510,7 @@
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../include/icons.qrc"> <iconset resource="../include/icons.qrc">
<normaloff>:/icons/images/remove.png</normaloff>:/icons/images/remove.png</iconset> <normaloff>:/icons/images/erase.png</normaloff>:/icons/images/erase.png</iconset>
</property> </property>
<property name="iconSize"> <property name="iconSize">
<size> <size>
@ -585,7 +585,7 @@
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../include/icons.qrc"> <iconset resource="../include/icons.qrc">
<normaloff>:/icons/images/add.png</normaloff>:/icons/images/add.png</iconset> <normaloff>:/icons/images/calculate.png</normaloff>:/icons/images/calculate.png</iconset>
</property> </property>
<property name="iconSize"> <property name="iconSize">
<size> <size>
@ -780,7 +780,7 @@
<rect> <rect>
<x>10</x> <x>10</x>
<y>20</y> <y>20</y>
<width>348</width> <width>341</width>
<height>26</height> <height>26</height>
</rect> </rect>
</property> </property>

Binary file not shown.

After

Width:  |  Height:  |  Size: 833 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 605 B

View File

@ -16,5 +16,7 @@
<file>../images/leftArrow.png</file> <file>../images/leftArrow.png</file>
<file>../images/rightArrow.png</file> <file>../images/rightArrow.png</file>
<file>../images/upload.png</file> <file>../images/upload.png</file>
<file>../images/setup.png</file>
<file>../images/calculate.png</file>
</qresource> </qresource>
</RCC> </RCC>

View File

@ -213,6 +213,44 @@ static const int64_t GUI_VERSION=0x20121213;
}; };
//-------------------------------------------------------------------------------------------------------------------------------------------------
/**gets error mask and displays the message if it exists
* @param myDet is the slsdetector object
/returns error message else an empty string
* */
static string checkErrorMessage(slsDetector*& myDet){
int errorLevel= (int)WARNING;
string retval="";
size_t pos;
retval = myDet->getErrorMessage(errorLevel);
if(!retval.empty()){
//replace all \n with <br>
pos = 0;
while((pos = retval.find("\n", pos)) != string::npos){
retval.replace(pos, 1, "<br>");
pos += 1;
}
retval.insert(0,"<font color=\"darkBlue\">");
retval.append("</font></nobr>");
//display message
qDefs::Message((MessageIndex)errorLevel,retval,"Main");
}
myDet->clearErrorMask();
return retval;
};
//------------------------------------------------------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------------------------------------------------------
}; };

View File

@ -58,6 +58,7 @@ private:
*/ */
void AddROIInput(int num); void AddROIInput(int num);
private slots: private slots:
/** Enable/Disable Energy and Calibration Logs /** Enable/Disable Energy and Calibration Logs
@ -142,10 +143,6 @@ private slots:
*/ */
void SetReceiver(); void SetReceiver();
/** Configures mac
*/
void Configuremac();
/** Add ROI Input if the value changed in the last slot /** Add ROI Input if the value changed in the last slot
*/ */
void AddROIInputSlot(){AddROIInput(1);}; void AddROIInputSlot(){AddROIInput(1);};
@ -166,10 +163,17 @@ private slots:
*/ */
void clearROIinDetector(); void clearROIinDetector();
/** Clears ROI in detector
*/
void SetDetector(int index);
private: private:
/** The sls detector object */ /** The multi detector object */
multiSlsDetector *myDet; multiSlsDetector *myDet;
/** The sls detector object */
slsDetector *det;
/** detector type */ /** detector type */
slsDetectorDefs::detectorType detType; slsDetectorDefs::detectorType detType;
@ -192,10 +196,6 @@ private:
bool isEnergy; bool isEnergy;
bool isAngular; bool isAngular;
/**sls detector obejct*/
slsDetector *det;
/** ROI */ /** ROI */
vector <QLabel*> lblFromX; vector <QLabel*> lblFromX;
vector <QSpinBox*> spinFromX; vector <QSpinBox*> spinFromX;

View File

@ -2,10 +2,10 @@
#define SVNURL "file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui" #define SVNURL "file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui"
//#define SVNREPPATH "" //#define SVNREPPATH ""
#define SVNREPUUID "af1100a4-978c-4157-bff7-07162d2ba061" #define SVNREPUUID "af1100a4-978c-4157-bff7-07162d2ba061"
//#define SVNREV 0x137 //#define SVNREV 0x146
//#define SVNKIND "" //#define SVNKIND ""
//#define SVNSCHED "" //#define SVNSCHED ""
#define SVNAUTH "l_maliakal_d" #define SVNAUTH "l_maliakal_d"
#define SVNREV 0x137 #define SVNREV 0x146
#define SVNDATE 0x20130116 #define SVNDATE 0x20130222
// //

View File

@ -47,10 +47,7 @@ void qTabAdvanced::SetupWidgetWindow(){
lblMAC->setEnabled(false); lblMAC->setEnabled(false);
dispIP->setEnabled(false); dispIP->setEnabled(false);
dispMAC->setEnabled(false); dispMAC->setEnabled(false);
boxRxrPorts->setEnabled(false);
boxRxr->setEnabled(false); boxRxr->setEnabled(false);
btnRxr->setEnabled(false);
btnConfigure->setEnabled(false);
red = QPalette(); red = QPalette();
@ -76,10 +73,7 @@ void qTabAdvanced::SetupWidgetWindow(){
lblMAC->setEnabled(true); lblMAC->setEnabled(true);
dispIP->setEnabled(true); dispIP->setEnabled(true);
dispMAC->setEnabled(true); dispMAC->setEnabled(true);
boxRxrPorts->setEnabled(true);
boxRxr->setEnabled(true); boxRxr->setEnabled(true);
btnRxr->setEnabled(true);
btnConfigure->setEnabled(true);
break; break;
default: break; default: break;
} }
@ -105,24 +99,32 @@ void qTabAdvanced::SetupWidgetWindow(){
//network //network
spinControlPort->setValue(myDet->setPort(slsDetectorDefs::CONTROL_PORT,-1));
spinStopPort->setValue(myDet->setPort(slsDetectorDefs::STOP_PORT,-1));
spinTCPPort->setValue(myDet->setPort(slsDetectorDefs::DATA_PORT,-1));
spinUDPPort->setValue(atoi(myDet->getNetworkParameter(slsDetectorDefs::RECEIVER_UDP_PORT)));
dispHostname->setText(QString(myDet->getHostname().c_str())); //add detectors
dispIP->setText(QString(myDet->getNetworkParameter(slsDetectorDefs::DETECTOR_IP))); for(int i=0;i<myDet->getNumberOfDetectors();i++)
dispMAC->setText(QString(myDet->getNetworkParameter(slsDetectorDefs::DETECTOR_MAC))); comboDetector->addItem(QString(myDet->getHostname(i).c_str()));
dispRxrHostname->setText(QString(myDet->getNetworkParameter(slsDetectorDefs::RECEIVER_HOSTNAME)));
dispUDPIP->setText(QString(myDet->getNetworkParameter(slsDetectorDefs::RECEIVER_UDP_IP))); comboDetector->setCurrentIndex(0);
dispUDPMAC->setText(QString(myDet->getNetworkParameter(slsDetectorDefs::RECEIVER_UDP_MAC))); det = myDet->getSlsDetector(comboDetector->currentIndex());
spinControlPort->setValue(det->getControlPort());
spinStopPort->setValue(det->getStopPort());
spinTCPPort->setValue(det->getReceiverPort());
spinUDPPort->setValue(atoi(det->getReceiverUDPPort()));
dispIP->setText(det->getDetectorIP());
dispMAC->setText(det->getDetectorMAC());
dispRxrHostname->setText(det->getReceiver());
dispUDPIP->setText(det->getReceiverUDPIP());
dispUDPMAC->setText(det->getReceiverUDPMAC());
//check if its online and set it to red if offline //check if its online and set it to red if offline
myDet->checkOnline(); det->checkOnline();
myDet->checkReceiverOnline(); det->checkReceiverOnline();
comboOnline->setCurrentIndex(myDet->setOnline()); comboOnline->setCurrentIndex(det->setOnline());
comboRxrOnline->setCurrentIndex(myDet->setReceiverOnline()); comboRxrOnline->setCurrentIndex(det->setReceiverOnline());
if(!comboOnline->currentIndex()){ if(!comboOnline->currentIndex()){
comboOnline->setToolTip(detOnlineTip + errOnlineTip); comboOnline->setToolTip(detOnlineTip + errOnlineTip);
lblOnline->setToolTip(detOnlineTip + errOnlineTip); lblOnline->setToolTip(detOnlineTip + errOnlineTip);
@ -137,6 +139,7 @@ void qTabAdvanced::SetupWidgetWindow(){
} }
//updates roi //updates roi
updateROIList(); updateROIList();
@ -187,6 +190,7 @@ void qTabAdvanced::Initialization(){
} }
//network //network
connect(comboDetector, SIGNAL(currentIndexChanged(int)), this, SLOT(SetDetector(int)));
connect(spinControlPort, SIGNAL(valueChanged(int)), this, SLOT(SetControlPort(int))); connect(spinControlPort, SIGNAL(valueChanged(int)), this, SLOT(SetControlPort(int)));
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)));
@ -204,7 +208,6 @@ void qTabAdvanced::Initialization(){
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()));
connect(btnConfigure, SIGNAL(clicked()), this, SLOT(Configuremac()));
} }
@ -482,8 +485,8 @@ void qTabAdvanced::SetControlPort(int port){
cout << "Setting Control Port:" << port << endl; cout << "Setting Control Port:" << port << endl;
#endif #endif
disconnect(spinControlPort, SIGNAL(valueChanged(int)), this, SLOT(SetControlPort(int))); disconnect(spinControlPort, SIGNAL(valueChanged(int)), this, SLOT(SetControlPort(int)));
spinStopPort->setValue(myDet->setPort(slsDetectorDefs::CONTROL_PORT,port)); spinStopPort->setValue(det->setPort(slsDetectorDefs::CONTROL_PORT,port));
qDefs::checkErrorMessage(myDet); qDefs::checkErrorMessage(det);
connect(spinControlPort, SIGNAL(valueChanged(int)), this, SLOT(SetControlPort(int))); connect(spinControlPort, SIGNAL(valueChanged(int)), this, SLOT(SetControlPort(int)));
} }
@ -496,8 +499,8 @@ void qTabAdvanced::SetStopPort(int port){
cout << "Setting Stop Port:" << port << endl; cout << "Setting Stop Port:" << port << endl;
#endif #endif
disconnect(spinStopPort, SIGNAL(valueChanged(int)), this, SLOT(SetStopPort(int))); disconnect(spinStopPort, SIGNAL(valueChanged(int)), this, SLOT(SetStopPort(int)));
spinControlPort->setValue(myDet->setPort(slsDetectorDefs::STOP_PORT,port)); spinControlPort->setValue(det->setPort(slsDetectorDefs::STOP_PORT,port));
qDefs::checkErrorMessage(myDet); qDefs::checkErrorMessage(det);
connect(spinStopPort, SIGNAL(valueChanged(int)), this, SLOT(SetStopPort(int))); connect(spinStopPort, SIGNAL(valueChanged(int)), this, SLOT(SetStopPort(int)));
} }
@ -511,8 +514,8 @@ void qTabAdvanced::SetRxrTCPPort(int port){
cout << "Setting Receiver TCP Port:" << port << endl; cout << "Setting Receiver TCP Port:" << port << endl;
#endif #endif
disconnect(spinTCPPort, SIGNAL(valueChanged(int)), this, SLOT(SetRxrTCPPort(int))); disconnect(spinTCPPort, SIGNAL(valueChanged(int)), this, SLOT(SetRxrTCPPort(int)));
spinTCPPort->setValue(myDet->setPort(slsDetectorDefs::DATA_PORT,port)); spinTCPPort->setValue(det->setPort(slsDetectorDefs::DATA_PORT,port));
qDefs::checkErrorMessage(myDet); qDefs::checkErrorMessage(det);
connect(spinTCPPort, SIGNAL(valueChanged(int)), this, SLOT(SetRxrTCPPort(int))); connect(spinTCPPort, SIGNAL(valueChanged(int)), this, SLOT(SetRxrTCPPort(int)));
} }
@ -524,12 +527,10 @@ void qTabAdvanced::SetRxrUDPPort(int port){
#ifdef VERBOSE #ifdef VERBOSE
cout << "Setting Receiver UDP Port:" << port << endl; cout << "Setting Receiver UDP Port:" << port << endl;
#endif #endif
char sNumber[100];
sprintf(sNumber,"%d",port);
disconnect(spinUDPPort, SIGNAL(valueChanged(int)), this, SLOT(SetRxrUDPPort(int))); disconnect(spinUDPPort, SIGNAL(valueChanged(int)), this, SLOT(SetRxrUDPPort(int)));
spinUDPPort->setValue(atoi(myDet->setNetworkParameter(slsDetectorDefs::RECEIVER_UDP_PORT,sNumber))); spinUDPPort->setValue(det->setReceiverUDPPort(port));
qDefs::checkErrorMessage(myDet); qDefs::checkErrorMessage(det);
connect(spinUDPPort, SIGNAL(valueChanged(int)), this, SLOT(SetRxrUDPPort(int))); connect(spinUDPPort, SIGNAL(valueChanged(int)), this, SLOT(SetRxrUDPPort(int)));
} }
@ -542,8 +543,8 @@ void qTabAdvanced::SetReceiverOnline(int index){
cout << "Setting Reciever Online to :" << index << endl; cout << "Setting Reciever Online to :" << index << endl;
#endif #endif
disconnect(comboRxrOnline, SIGNAL(currentIndexChanged(int)), this, SLOT(SetReceiverOnline(int))); disconnect(comboRxrOnline, SIGNAL(currentIndexChanged(int)), this, SLOT(SetReceiverOnline(int)));
comboRxrOnline->setCurrentIndex(myDet->setReceiverOnline(index)); comboRxrOnline->setCurrentIndex(det->setReceiverOnline(index));
qDefs::checkErrorMessage(myDet); qDefs::checkErrorMessage(det);
connect(comboRxrOnline, SIGNAL(currentIndexChanged(int)), this, SLOT(SetReceiverOnline(int))); connect(comboRxrOnline, SIGNAL(currentIndexChanged(int)), this, SLOT(SetReceiverOnline(int)));
//highlight in red if offline //highlight in red if offline
if(!comboRxrOnline->currentIndex()){ if(!comboRxrOnline->currentIndex()){
@ -568,8 +569,8 @@ void qTabAdvanced::SetOnline(int index){
cout << "Setting Detector Online to " << index << endl; cout << "Setting Detector Online to " << index << endl;
#endif #endif
disconnect(comboOnline, SIGNAL(currentIndexChanged(int)), this, SLOT(SetOnline(int))); disconnect(comboOnline, SIGNAL(currentIndexChanged(int)), this, SLOT(SetOnline(int)));
comboOnline->setCurrentIndex(myDet->setOnline(index)); comboOnline->setCurrentIndex(det->setOnline(index));
qDefs::checkErrorMessage(myDet); qDefs::checkErrorMessage(det);
connect(comboOnline, SIGNAL(currentIndexChanged(int)), this, SLOT(SetOnline(int))); connect(comboOnline, SIGNAL(currentIndexChanged(int)), this, SLOT(SetOnline(int)));
//highlight in red if offline //highlight in red if offline
if(!comboOnline->currentIndex()){ if(!comboOnline->currentIndex()){
@ -599,11 +600,11 @@ void qTabAdvanced::SetNetworkParameters(){
disconnect(dispUDPIP, SIGNAL(editingFinished()), this, SLOT(SetNetworkParameters())); disconnect(dispUDPIP, SIGNAL(editingFinished()), this, SLOT(SetNetworkParameters()));
disconnect(dispUDPMAC, SIGNAL(editingFinished()), this, SLOT(SetNetworkParameters())); disconnect(dispUDPMAC, SIGNAL(editingFinished()), this, SLOT(SetNetworkParameters()));
dispIP->setText(QString(myDet->setNetworkParameter(slsDetectorDefs::DETECTOR_IP,dispIP->text().toAscii().constData()))); dispIP->setText(QString(det->setDetectorIP(dispIP->text().toAscii().constData())));
dispMAC->setText(QString(myDet->setNetworkParameter(slsDetectorDefs::DETECTOR_MAC,dispMAC->text().toAscii().constData()))); dispMAC->setText(QString(det->setDetectorMAC(dispMAC->text().toAscii().constData())));
dispUDPIP->setText(QString(myDet->setNetworkParameter(slsDetectorDefs::RECEIVER_UDP_IP,dispUDPIP->text().toAscii().constData()))); dispUDPIP->setText(QString(det->setReceiverUDPIP(dispUDPIP->text().toAscii().constData())));
dispUDPMAC->setText(QString(myDet->setNetworkParameter(slsDetectorDefs::RECEIVER_UDP_MAC,dispUDPMAC->text().toAscii().constData()))); dispUDPMAC->setText(QString(det->setReceiverUDPMAC(dispUDPMAC->text().toAscii().constData())));
qDefs::checkErrorMessage(myDet); qDefs::checkErrorMessage(det);
connect(dispIP, SIGNAL(editingFinished()), this, SLOT(SetNetworkParameters())); connect(dispIP, SIGNAL(editingFinished()), this, SLOT(SetNetworkParameters()));
connect(dispMAC, SIGNAL(editingFinished()), this, SLOT(SetNetworkParameters())); connect(dispMAC, SIGNAL(editingFinished()), this, SLOT(SetNetworkParameters()));
@ -619,23 +620,12 @@ void qTabAdvanced::SetReceiver(){
#ifdef VERBOSE #ifdef VERBOSE
cout << "Setting Receiver" << endl; cout << "Setting Receiver" << endl;
#endif #endif
dispRxrHostname->setText(QString(myDet->setNetworkParameter(slsDetectorDefs::RECEIVER_HOSTNAME,dispRxrHostname->text().toAscii().constData()))); dispRxrHostname->setText(QString(det->setReceiver(dispRxrHostname->text().toAscii().constData())));
qDefs::checkErrorMessage(myDet); qDefs::checkErrorMessage(det);
Refresh(); Refresh();
} }
//-------------------------------------------------------------------------------------------------------------------------------------------------
void qTabAdvanced::Configuremac(){
#ifdef VERBOSE
cout << "Configuring Mac:" << endl;
#endif
myDet->configureMAC();
qDefs::checkErrorMessage(myDet);
}
//------------------------------------------------------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------------------------------------------------------
@ -865,6 +855,61 @@ void qTabAdvanced::clearROIinDetector(){
//------------------------------------------------------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------------------------------------------------------
void qTabAdvanced::SetDetector(int index){
#ifdef VERYVERBOSE
cout<<"in SetDetector: " << index << endl;
#endif
det = myDet->getSlsDetector(comboDetector->currentIndex());
spinControlPort->setValue(det->getControlPort());
spinStopPort->setValue(det->getStopPort());
spinTCPPort->setValue(det->getReceiverPort());
spinUDPPort->setValue(atoi(det->getReceiverUDPPort()));
dispIP->setText(det->getDetectorIP());
dispMAC->setText(det->getDetectorMAC());
dispRxrHostname->setText(det->getReceiver());
dispUDPIP->setText(det->getReceiverUDPIP());
dispUDPMAC->setText(det->getReceiverUDPMAC());
//check if its online and set it to red if offline
det->checkOnline();
det->checkReceiverOnline();
comboOnline->setCurrentIndex(det->setOnline());
comboRxrOnline->setCurrentIndex(det->setReceiverOnline());
//highlight in red if detector or receiver is offline
if(!comboOnline->currentIndex()){
comboOnline->setToolTip(detOnlineTip + errOnlineTip);
lblOnline->setToolTip(detOnlineTip + errOnlineTip);
lblOnline->setPalette(red);
lblOnline->setText("Online:*");
}else{
comboOnline->setToolTip(detOnlineTip);
lblOnline->setToolTip(detOnlineTip);
lblOnline->setPalette(lblHostname->palette());
lblOnline->setText("Online:");
}
if(comboRxrOnline->isEnabled()){
if(!comboRxrOnline->currentIndex()){
comboRxrOnline->setToolTip(rxrOnlineTip + errOnlineTip);
lblRxrOnline->setToolTip(rxrOnlineTip + errOnlineTip);
lblRxrOnline->setPalette(red);
lblRxrOnline->setText("Online:*");
}else{
comboRxrOnline->setToolTip(rxrOnlineTip);
lblRxrOnline->setToolTip(rxrOnlineTip);
lblRxrOnline->setPalette(lblHostname->palette());
lblRxrOnline->setText("Online:");
}
}
}
//-------------------------------------------------------------------------------------------------------------------------------------------------
void qTabAdvanced::Refresh(){ void qTabAdvanced::Refresh(){
@ -935,17 +980,19 @@ void qTabAdvanced::Refresh(){
//network //network
//so that updated status det = myDet->getSlsDetector(comboDetector->currentIndex());
myDet->checkOnline();
dispHostname->setText(QString(myDet->getHostname().c_str()));
//disconnect //disconnect
disconnect(spinControlPort, SIGNAL(valueChanged(int)), this, SLOT(SetControlPort(int))); disconnect(spinControlPort, SIGNAL(valueChanged(int)), this, SLOT(SetControlPort(int)));
disconnect(spinStopPort, SIGNAL(valueChanged(int)), this, SLOT(SetStopPort(int))); disconnect(spinStopPort, SIGNAL(valueChanged(int)), this, SLOT(SetStopPort(int)));
disconnect(comboOnline, SIGNAL(currentIndexChanged(int)), this, SLOT(SetOnline(int))); disconnect(comboOnline, SIGNAL(currentIndexChanged(int)), this, SLOT(SetOnline(int)));
spinControlPort->setValue(myDet->setPort(slsDetectorDefs::CONTROL_PORT,-1)); //so that updated status
spinStopPort->setValue(myDet->setPort(slsDetectorDefs::STOP_PORT,-1)); det->checkOnline();
comboOnline->setCurrentIndex(myDet->setOnline()); comboOnline->setCurrentIndex(det->setOnline());
spinControlPort->setValue(det->getControlPort());
spinStopPort->setValue(det->getStopPort());
//connect //connect
connect(spinControlPort, SIGNAL(valueChanged(int)), this, SLOT(SetControlPort(int))); connect(spinControlPort, SIGNAL(valueChanged(int)), this, SLOT(SetControlPort(int)));
connect(spinStopPort, SIGNAL(valueChanged(int)), this, SLOT(SetStopPort(int))); connect(spinStopPort, SIGNAL(valueChanged(int)), this, SLOT(SetStopPort(int)));
@ -963,21 +1010,20 @@ void qTabAdvanced::Refresh(){
disconnect(dispUDPIP, SIGNAL(editingFinished()), this, SLOT(SetNetworkParameters())); disconnect(dispUDPIP, SIGNAL(editingFinished()), this, SLOT(SetNetworkParameters()));
disconnect(dispUDPMAC, SIGNAL(editingFinished()), this, SLOT(SetNetworkParameters())); disconnect(dispUDPMAC, SIGNAL(editingFinished()), this, SLOT(SetNetworkParameters()));
disconnect(btnRxr, SIGNAL(clicked()), this, SLOT(SetReceiver())); disconnect(btnRxr, SIGNAL(clicked()), this, SLOT(SetReceiver()));
disconnect(btnConfigure, SIGNAL(clicked()), this, SLOT(Configuremac()));
dispIP->setText(det->getDetectorIP());
dispMAC->setText(det->getDetectorMAC());
//so that updated status //so that updated status
myDet->checkReceiverOnline(); det->checkReceiverOnline();
dispRxrHostname->setText(QString(myDet->getNetworkParameter(slsDetectorDefs::RECEIVER_HOSTNAME))); comboRxrOnline->setCurrentIndex(det->setReceiverOnline());
spinTCPPort->setValue(myDet->setPort(slsDetectorDefs::DATA_PORT,-1)); dispRxrHostname->setText(det->getReceiver());
spinUDPPort->setValue(atoi(myDet->getNetworkParameter(slsDetectorDefs::RECEIVER_UDP_PORT))); spinTCPPort->setValue(det->getReceiverPort());
spinUDPPort->setValue(atoi(det->getReceiverUDPPort()));
dispIP->setText(QString(myDet->getNetworkParameter(slsDetectorDefs::DETECTOR_IP))); dispUDPIP->setText(det->getReceiverUDPIP());
dispMAC->setText(QString(myDet->getNetworkParameter(slsDetectorDefs::DETECTOR_MAC))); dispUDPMAC->setText(det->getReceiverUDPMAC());
comboRxrOnline->setCurrentIndex(myDet->setReceiverOnline());
dispUDPIP->setText(QString(myDet->getNetworkParameter(slsDetectorDefs::RECEIVER_UDP_IP)));
dispUDPMAC->setText(QString(myDet->getNetworkParameter(slsDetectorDefs::RECEIVER_UDP_MAC)));
//connect //connect
connect(spinTCPPort, SIGNAL(valueChanged(int)), this, SLOT(SetRxrTCPPort(int))); connect(spinTCPPort, SIGNAL(valueChanged(int)), this, SLOT(SetRxrTCPPort(int)));
@ -988,7 +1034,6 @@ void qTabAdvanced::Refresh(){
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(btnRxr, SIGNAL(clicked()), this, SLOT(SetReceiver())); connect(btnRxr, SIGNAL(clicked()), this, SLOT(SetReceiver()));
connect(btnConfigure, SIGNAL(clicked()), this, SLOT(Configuremac()));
} }