timing functions changed

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@133 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
bergamaschi
2012-02-27 16:29:40 +00:00
parent 1064bd21ff
commit b755c533f0
13 changed files with 733 additions and 245 deletions

View File

@ -475,6 +475,10 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorBase *det) {
/* r/w timers */
descrToFuncMap[i].m_pFuncName="timing"; //
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTiming;
i++;
descrToFuncMap[i].m_pFuncName="exptime"; //
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimer;
i++;
@ -2644,6 +2648,32 @@ string slsDetectorCommand::helpADC(int narg, char *args[], int action) {
return os.str();
}
string slsDetectorCommand::cmdTiming(int narg, char *args[], int action){
#ifdef VERBOSE
cout << string("Executing command ")+string(args[0])+string(" ( ")+cmd+string(" )\n");
#endif
if (action==HELP_ACTION) {
return helpTiming(narg,args,HELP_ACTION);
}
myDet->setOnline(ONLINE_FLAG);
if (action==PUT_ACTION) {
if (myDet->externalCommunicationType(string(args[1]))== GET_EXTERNAL_COMMUNICATION_MODE) return helpTiming(narg,args, action);
myDet->setExternalCommunicationMode(myDet->externalCommunicationType(string(args[1])));
}
return myDet->externalCommunicationType(myDet->setExternalCommunicationMode());
}
string slsDetectorCommand::helpTiming(int narg, char *args[], int action){
ostringstream os;
if (action==GET_ACTION || action==HELP_ACTION)
os << string("sync \t gets the synchronization mode of the structure\n");
if (action==PUT_ACTION || action==HELP_ACTION)
os << string("sync mode \t sets synchronization mode of the structure. Cane be none, gating, trigger, complementary \n");
return os.str();
}
string slsDetectorCommand::cmdTimer(int narg, char *args[], int action) {