mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-01-31 21:04:56 +01:00
made sure that server knows whether to stop sending to receiver even if receiver is down, made sure error in configuremac is shown when doing start receiver
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@292 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
@@ -3595,39 +3595,48 @@ string slsDetectorCommand::cmdReceiver(int narg, char *args[], int action) {
|
||||
if (action==HELP_ACTION)
|
||||
return helpReceiver(narg, args, action);
|
||||
|
||||
if(myDet->setReceiverOnline(ONLINE_FLAG)!=ONLINE_FLAG)
|
||||
return string("receiver not online");
|
||||
|
||||
myDet->setOnline(ONLINE_FLAG);
|
||||
myDet->setReceiverOnline(ONLINE_FLAG);
|
||||
|
||||
|
||||
if(cmd=="receiver"){
|
||||
if (action==PUT_ACTION) {
|
||||
if(!strcasecmp(args[1],"start")){
|
||||
|
||||
if(myDet->setReceiverOnline()!=ONLINE_FLAG)
|
||||
return string("cannot connect to receiver");
|
||||
|
||||
if(myDet->getReceiverStatus()==IDLE){
|
||||
//update receiver index
|
||||
if(myDet->setReceiverFileIndex(myDet->getFileIndex())==-1)
|
||||
return string("could not set receiver file index");
|
||||
|
||||
//to configure the server
|
||||
myDet->setOnline(ONLINE_FLAG);
|
||||
myDet->startReceiver();
|
||||
}
|
||||
}
|
||||
|
||||
else if(!strcasecmp(args[1],"stop")){
|
||||
if(myDet->getReceiverStatus()==RUNNING){
|
||||
myDet->setOnline(ONLINE_FLAG);
|
||||
if(myDet->stopReceiver()!=FAIL){
|
||||
//update index
|
||||
int index = myDet->setReceiverFileIndex();
|
||||
if(index==-1)
|
||||
return string("could not get receiver file index");
|
||||
myDet->setFileIndex(index);
|
||||
}
|
||||
|
||||
if(myDet->stopReceiver()!=FAIL){
|
||||
//update index
|
||||
int index = myDet->setReceiverFileIndex();
|
||||
if(index==-1)
|
||||
return string("could not get receiver file index");
|
||||
myDet->setFileIndex(index);
|
||||
}
|
||||
}else
|
||||
else if(myDet->setReceiverOnline()!=ONLINE_FLAG)
|
||||
return string("cannot connect to receiver");
|
||||
}
|
||||
|
||||
else
|
||||
return helpReceiver(narg, args, action);
|
||||
}
|
||||
return myDet->runStatusType(myDet->getReceiverStatus());
|
||||
}
|
||||
|
||||
|
||||
else if(cmd=="framescaught"){
|
||||
if (action==PUT_ACTION)
|
||||
return string("cannot put");
|
||||
|
||||
Reference in New Issue
Block a user