mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-26 08:10:02 +02:00
check online is ok
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@244 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
parent
ef8455ced6
commit
2cfdc2b108
@ -13,8 +13,7 @@ INSTMODE= 0777
|
||||
SRCS= server.c server_funcs.c communication_funcs.c firmware_funcs.c mcb_funcs.c trimming_funcs.c sharedmemory.c
|
||||
OBJS= $(SRCS:%.c=%.o)
|
||||
|
||||
CFLAGS+= -Wall -DC_ONLY -DMCB_FUNCS -DVERBOSE
|
||||
#-DDACS_INT
|
||||
CFLAGS+= -Wall -DC_ONLY -DMCB_FUNCS -DVERBOSE -DDACS_INT
|
||||
#-DVERYVERBOSE
|
||||
#-Werror
|
||||
|
||||
|
@ -1062,32 +1062,13 @@ int slsDetector::setTCPSocket(string const name, int const control_port, int con
|
||||
#endif
|
||||
}
|
||||
if (retval!=FAIL) {
|
||||
if (controlSocket->Connect()<0) {
|
||||
controlSocket->SetTimeOut(5);
|
||||
thisDetector->onlineFlag=OFFLINE_FLAG;
|
||||
delete controlSocket;
|
||||
controlSocket=NULL;
|
||||
retval=FAIL;
|
||||
#ifdef VERBOSE
|
||||
std::cout<< "offline!" << std::endl;
|
||||
#endif
|
||||
} else {
|
||||
thisDetector->onlineFlag=ONLINE_FLAG;
|
||||
controlSocket->SetTimeOut(100);
|
||||
controlSocket->Disconnect();
|
||||
#ifdef VERBOSE
|
||||
std::cout<< "online!" << std::endl;
|
||||
#endif
|
||||
}
|
||||
checkOnline();
|
||||
} else {
|
||||
thisDetector->onlineFlag=OFFLINE_FLAG;
|
||||
#ifdef VERBOSE
|
||||
std::cout<< "offline!" << std::endl;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
return retval;
|
||||
};
|
||||
|
||||
|
@ -551,6 +551,10 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) {
|
||||
i++;
|
||||
|
||||
|
||||
descrToFuncMap[i].m_pFuncName="measurments"; //
|
||||
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimer;
|
||||
i++;
|
||||
|
||||
/* read only timers */
|
||||
|
||||
descrToFuncMap[i].m_pFuncName="exptimel"; //
|
||||
@ -2935,6 +2939,8 @@ string slsDetectorCommand::cmdTimer(int narg, char *args[], int action) {
|
||||
index=CYCLES_NUMBER;
|
||||
else if (cmd=="probes")
|
||||
index=PROBES_NUMBER;
|
||||
else if (cmd=="measurments")
|
||||
index=MEASUREMENTS_NUMBER;
|
||||
else
|
||||
return string("could not decode timer ")+cmd;
|
||||
|
||||
|
@ -26,11 +26,11 @@ slsDetectorUtils::slsDetectorUtils() {
|
||||
registerGoToPositionNoWaitCallback(&defaultGoToPositionNoWait,NULL);
|
||||
registerGetI0Callback(&defaultGetI0,NULL);
|
||||
#ifdef VERBOSE
|
||||
|
||||
registerAcquisitionFinishedCallback(&dummyAcquisitionFinished,this);
|
||||
cout << "done " << endl;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -560,7 +560,7 @@ class slsDetectorUtils : public slsDetectorActions, public postProcessing {
|
||||
*/
|
||||
int retrieveDetectorSetup(string const fname, int level=0);
|
||||
|
||||
|
||||
static int dummyAcquisitionFinished(double prog,int status,void* p){cout <<"Acquisition finished callback! " << prog << " " << status << endl; return 0;}
|
||||
|
||||
protected:
|
||||
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user