mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-26 16:20:03 +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
|
SRCS= server.c server_funcs.c communication_funcs.c firmware_funcs.c mcb_funcs.c trimming_funcs.c sharedmemory.c
|
||||||
OBJS= $(SRCS:%.c=%.o)
|
OBJS= $(SRCS:%.c=%.o)
|
||||||
|
|
||||||
CFLAGS+= -Wall -DC_ONLY -DMCB_FUNCS -DVERBOSE
|
CFLAGS+= -Wall -DC_ONLY -DMCB_FUNCS -DVERBOSE -DDACS_INT
|
||||||
#-DDACS_INT
|
|
||||||
#-DVERYVERBOSE
|
#-DVERYVERBOSE
|
||||||
#-Werror
|
#-Werror
|
||||||
|
|
||||||
|
@ -1062,32 +1062,13 @@ int slsDetector::setTCPSocket(string const name, int const control_port, int con
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if (retval!=FAIL) {
|
if (retval!=FAIL) {
|
||||||
if (controlSocket->Connect()<0) {
|
checkOnline();
|
||||||
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
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
thisDetector->onlineFlag=OFFLINE_FLAG;
|
thisDetector->onlineFlag=OFFLINE_FLAG;
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
std::cout<< "offline!" << std::endl;
|
std::cout<< "offline!" << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -551,6 +551,10 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) {
|
|||||||
i++;
|
i++;
|
||||||
|
|
||||||
|
|
||||||
|
descrToFuncMap[i].m_pFuncName="measurments"; //
|
||||||
|
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimer;
|
||||||
|
i++;
|
||||||
|
|
||||||
/* read only timers */
|
/* read only timers */
|
||||||
|
|
||||||
descrToFuncMap[i].m_pFuncName="exptimel"; //
|
descrToFuncMap[i].m_pFuncName="exptimel"; //
|
||||||
@ -2935,6 +2939,8 @@ string slsDetectorCommand::cmdTimer(int narg, char *args[], int action) {
|
|||||||
index=CYCLES_NUMBER;
|
index=CYCLES_NUMBER;
|
||||||
else if (cmd=="probes")
|
else if (cmd=="probes")
|
||||||
index=PROBES_NUMBER;
|
index=PROBES_NUMBER;
|
||||||
|
else if (cmd=="measurments")
|
||||||
|
index=MEASUREMENTS_NUMBER;
|
||||||
else
|
else
|
||||||
return string("could not decode timer ")+cmd;
|
return string("could not decode timer ")+cmd;
|
||||||
|
|
||||||
|
@ -26,11 +26,11 @@ slsDetectorUtils::slsDetectorUtils() {
|
|||||||
registerGoToPositionNoWaitCallback(&defaultGoToPositionNoWait,NULL);
|
registerGoToPositionNoWaitCallback(&defaultGoToPositionNoWait,NULL);
|
||||||
registerGetI0Callback(&defaultGetI0,NULL);
|
registerGetI0Callback(&defaultGetI0,NULL);
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
|
|
||||||
|
registerAcquisitionFinishedCallback(&dummyAcquisitionFinished,this);
|
||||||
cout << "done " << endl;
|
cout << "done " << endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -560,7 +560,7 @@ class slsDetectorUtils : public slsDetectorActions, public postProcessing {
|
|||||||
*/
|
*/
|
||||||
int retrieveDetectorSetup(string const fname, int level=0);
|
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:
|
protected:
|
||||||
|
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user