mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-01-17 13:01:12 +01:00
Merge branch 'master' of gitorious.psi.ch:sls_det_software/sls_detector_software
This commit is contained in:
@@ -884,6 +884,10 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) {
|
||||
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdReceiver;
|
||||
i++;
|
||||
|
||||
descrToFuncMap[i].m_pFuncName="resetframescaught";
|
||||
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdReceiver;
|
||||
i++;
|
||||
|
||||
descrToFuncMap[i].m_pFuncName="frameindex";
|
||||
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdReceiver;
|
||||
i++;
|
||||
@@ -4058,8 +4062,9 @@ string slsDetectorCommand::helpSpeed(int narg, char *args[], int action) {
|
||||
|
||||
string slsDetectorCommand::cmdAdvanced(int narg, char *args[], int action) {
|
||||
|
||||
int retval;
|
||||
char answer[1000]="";
|
||||
|
||||
|
||||
if (action==HELP_ACTION)
|
||||
return helpAdvanced(narg, args, action);
|
||||
|
||||
@@ -4090,25 +4095,28 @@ string slsDetectorCommand::cmdAdvanced(int narg, char *args[], int action) {
|
||||
|
||||
myDet->setOnline(ONLINE_FLAG);
|
||||
|
||||
switch (myDet->setReadOutFlags(flag)) {
|
||||
case NORMAL_READOUT:
|
||||
return string("none");
|
||||
case STORE_IN_RAM:
|
||||
return string("storeinram");
|
||||
case TOT_MODE:
|
||||
return string("tot");
|
||||
case CONTINOUS_RO:
|
||||
return string("continous");
|
||||
case PARALLEL:
|
||||
return string("parallel");
|
||||
case NONPARALLEL:
|
||||
return string("nonparallel");
|
||||
case SAFE:
|
||||
return string("safe");
|
||||
default:
|
||||
return string("unknown");
|
||||
}
|
||||
|
||||
retval = myDet->setReadOutFlags(flag);
|
||||
|
||||
if(retval == NORMAL_READOUT)
|
||||
return string("none");
|
||||
|
||||
if(retval & STORE_IN_RAM)
|
||||
strcat(answer,"storeinram ");
|
||||
if(retval & TOT_MODE)
|
||||
strcat(answer,"tot ");
|
||||
if(retval & CONTINOUS_RO)
|
||||
strcat(answer,"continous ");
|
||||
if(retval & PARALLEL)
|
||||
strcat(answer,"parallel ");
|
||||
if(retval & NONPARALLEL)
|
||||
strcat(answer,"nonparallel ");
|
||||
if(retval & SAFE)
|
||||
strcat(answer,"safe ");
|
||||
if(strlen(answer))
|
||||
return string(answer);
|
||||
|
||||
return string("unknown");
|
||||
|
||||
} else if (cmd=="extsig") {
|
||||
externalSignalFlag flag=GET_EXTERNAL_SIGNAL_FLAG;
|
||||
int is=-1;
|
||||
@@ -4282,6 +4290,18 @@ string slsDetectorCommand::cmdReceiver(int narg, char *args[], int action) {
|
||||
}
|
||||
}
|
||||
|
||||
else if(cmd=="resetframescaught"){
|
||||
if (action==GET_ACTION)
|
||||
return string("cannot get");
|
||||
else{
|
||||
if(myDet->resetFramesCaught() == FAIL)
|
||||
strcpy(answer,"failed");
|
||||
else
|
||||
strcpy(answer,"successful");
|
||||
return string(answer);
|
||||
}
|
||||
}
|
||||
|
||||
else if(cmd=="frameindex"){
|
||||
if (action==PUT_ACTION)
|
||||
return string("cannot put");
|
||||
@@ -4336,6 +4356,7 @@ string slsDetectorCommand::helpReceiver(int narg, char *args[], int action) {
|
||||
ostringstream os;
|
||||
if (action==PUT_ACTION || action==HELP_ACTION) {
|
||||
os << "receiver [status] \t starts/stops the receiver to listen to detector packets. - can be start or stop" << std::endl;
|
||||
os << "resetframescaught [any value] \t resets frames caught by receiver" << std::endl;
|
||||
os << "r_readfreq \t sets the gui read frequency of the receiver, 0 if gui requests frame, >0 if receiver sends every nth frame to gui" << std::endl;
|
||||
os << "tengiga \t sets system to be configure for 10Gbe if set to 1, else 1Gbe if set to 0" << std::endl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user