mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-13 05:17:13 +02:00
check for giving an error in gui if cannot connect to hostname
This commit is contained in:
@ -514,20 +514,6 @@ string multiSlsDetector::setHostname(const char* name, int pos){
|
|||||||
cout << "-----------------------------set online!" << endl;
|
cout << "-----------------------------set online!" << endl;
|
||||||
#endif
|
#endif
|
||||||
setOnline(ONLINE_FLAG);
|
setOnline(ONLINE_FLAG);
|
||||||
if(pos>=0){
|
|
||||||
if(detectors[pos]->getErrorMask())
|
|
||||||
setErrorMask(getErrorMask()|(1<<pos));
|
|
||||||
}else{
|
|
||||||
cprintf(BLUE,"Checking all the detectors %d\n",thisMultiDetector->numberOfDetectors);
|
|
||||||
for (int ip=0; ip<thisMultiDetector->numberOfDetectors; ip++) {
|
|
||||||
if (detectors[ip]) {
|
|
||||||
if(detectors[ip]->getErrorMask()){
|
|
||||||
setErrorMask(getErrorMask()|(1<<ip));
|
|
||||||
cprintf(BG_RED,"Setting error mask for %d\n",ip);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return getHostname(pos);
|
return getHostname(pos);
|
||||||
}
|
}
|
||||||
|
@ -1246,6 +1246,7 @@ string slsDetector::checkOnline() {
|
|||||||
delete controlSocket;
|
delete controlSocket;
|
||||||
controlSocket=NULL;
|
controlSocket=NULL;
|
||||||
retval = string(thisDetector->hostname);
|
retval = string(thisDetector->hostname);
|
||||||
|
thisDetector->onlineFlag=OFFLINE_FLAG;
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
std::cout<< "offline!" << std::endl;
|
std::cout<< "offline!" << std::endl;
|
||||||
#endif
|
#endif
|
||||||
@ -1253,6 +1254,7 @@ string slsDetector::checkOnline() {
|
|||||||
thisDetector->onlineFlag=ONLINE_FLAG;
|
thisDetector->onlineFlag=ONLINE_FLAG;
|
||||||
controlSocket->SetTimeOut(100);
|
controlSocket->SetTimeOut(100);
|
||||||
disconnectControl();
|
disconnectControl();
|
||||||
|
thisDetector->onlineFlag=ONLINE_FLAG;
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
std::cout<< "online!" << std::endl;
|
std::cout<< "online!" << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user