mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-12 21:07:13 +02:00
ensuring acquire, p receiver start and the gui enables and disables data streaming accordingly. those with api will have to know what they want before acquiring
This commit is contained in:
@ -1319,7 +1319,15 @@ string slsDetectorCommand::cmdAcquire(int narg, char *args[], int action) {
|
||||
|
||||
|
||||
myDet->setOnline(ONLINE_FLAG);
|
||||
myDet->setReceiverOnline(ONLINE_FLAG);
|
||||
if (myDet->setReceiverOnline(ONLINE_FLAG) == ONLINE_FLAG) {
|
||||
//if it was not off
|
||||
if (myDet->enableDataStreamingFromReceiver(-1) != 0){
|
||||
//switch it off, if error
|
||||
if (myDet->enableDataStreamingFromReceiver(0) != 0) {
|
||||
return string("could not disable data streaming in receiver\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(myDet->acquire() == FAIL)
|
||||
return string("acquire unsuccessful");
|
||||
@ -4830,12 +4838,23 @@ string slsDetectorCommand::cmdReceiver(int narg, char *args[], int action) {
|
||||
|
||||
|
||||
myDet->setOnline(ONLINE_FLAG);
|
||||
myDet->setReceiverOnline(ONLINE_FLAG);
|
||||
int receivers = myDet->setReceiverOnline(ONLINE_FLAG);
|
||||
|
||||
if(cmd=="receiver"){
|
||||
if (action==PUT_ACTION) {
|
||||
if(!strcasecmp(args[1],"start"))
|
||||
if(!strcasecmp(args[1],"start")) {
|
||||
//to ensure data streaming enable is the same across client and receiver
|
||||
if (receivers == ONLINE_FLAG) {
|
||||
//if it was not off
|
||||
if (myDet->enableDataStreamingFromReceiver(-1) != 0){
|
||||
//switch it off, if error
|
||||
if (myDet->enableDataStreamingFromReceiver(0) != 0) {
|
||||
return string("could not disable data streaming in receiver\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
myDet->startReceiver();
|
||||
}
|
||||
else if(!strcasecmp(args[1],"stop")){
|
||||
//myDet->stopReceiver();
|
||||
// myDet->startReceiverReadout();
|
||||
|
Reference in New Issue
Block a user