mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-23 06:50:02 +02:00
get detector and receiver status bug fixed
This commit is contained in:
parent
36d6538104
commit
aeffb4b93f
@ -1523,8 +1523,7 @@ int multiSlsDetector::startAndReadAllNoWait(){
|
|||||||
*/
|
*/
|
||||||
slsDetectorDefs::runStatus multiSlsDetector::getRunStatus() {
|
slsDetectorDefs::runStatus multiSlsDetector::getRunStatus() {
|
||||||
|
|
||||||
runStatus s,s1;
|
runStatus s = IDLE,s1 = IDLE;
|
||||||
|
|
||||||
if (thisMultiDetector->masterPosition>=0)
|
if (thisMultiDetector->masterPosition>=0)
|
||||||
if (detectors[thisMultiDetector->masterPosition]){
|
if (detectors[thisMultiDetector->masterPosition]){
|
||||||
s = detectors[thisMultiDetector->masterPosition]->getRunStatus();
|
s = detectors[thisMultiDetector->masterPosition]->getRunStatus();
|
||||||
@ -4420,7 +4419,7 @@ int multiSlsDetector::stopReceiver(){
|
|||||||
|
|
||||||
slsDetectorDefs::runStatus multiSlsDetector::startReceiverReadout(){
|
slsDetectorDefs::runStatus multiSlsDetector::startReceiverReadout(){
|
||||||
int i=0;
|
int i=0;
|
||||||
runStatus s,s1;
|
runStatus s = IDLE,s1 = IDLE;
|
||||||
i=thisMultiDetector->masterPosition;
|
i=thisMultiDetector->masterPosition;
|
||||||
if (thisMultiDetector->masterPosition>=0) {
|
if (thisMultiDetector->masterPosition>=0) {
|
||||||
if (detectors[i]) {
|
if (detectors[i]) {
|
||||||
@ -4437,18 +4436,20 @@ slsDetectorDefs::runStatus multiSlsDetector::startReceiverReadout(){
|
|||||||
setErrorMask(getErrorMask()|(1<<i));
|
setErrorMask(getErrorMask()|(1<<i));
|
||||||
if(s == ERROR)
|
if(s == ERROR)
|
||||||
s1 = ERROR;
|
s1 = ERROR;
|
||||||
if(s1 != s)
|
/*if(s1 != s)
|
||||||
s1 = ERROR;
|
s1 = ERROR;*/
|
||||||
|
if(s != IDLE)
|
||||||
|
s1 = s;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**stoppedFlag=1;*/
|
/**stoppedFlag=1;*/
|
||||||
return s;
|
return s1;
|
||||||
}
|
}
|
||||||
|
|
||||||
slsDetectorDefs::runStatus multiSlsDetector::getReceiverStatus(){
|
slsDetectorDefs::runStatus multiSlsDetector::getReceiverStatus(){
|
||||||
|
|
||||||
runStatus s,s1;
|
runStatus s = IDLE,s1 = IDLE;
|
||||||
|
|
||||||
if (thisMultiDetector->masterPosition>=0)
|
if (thisMultiDetector->masterPosition>=0)
|
||||||
if (detectors[thisMultiDetector->masterPosition]){
|
if (detectors[thisMultiDetector->masterPosition]){
|
||||||
|
@ -3278,14 +3278,14 @@ slsDetectorDefs::runStatus slsDetector::getRunStatus(){
|
|||||||
stopSocket->SendDataOnly(&fnum,sizeof(fnum));
|
stopSocket->SendDataOnly(&fnum,sizeof(fnum));
|
||||||
stopSocket->ReceiveDataOnly(&ret,sizeof(ret));
|
stopSocket->ReceiveDataOnly(&ret,sizeof(ret));
|
||||||
|
|
||||||
// cout << "________:::____________" << ret << endl;
|
//cout << "________:::____________" << ret << endl;
|
||||||
|
|
||||||
if (ret==FAIL) {
|
if (ret==FAIL) {
|
||||||
stopSocket->ReceiveDataOnly(mess,sizeof(mess));
|
stopSocket->ReceiveDataOnly(mess,sizeof(mess));
|
||||||
std::cout<< "Detector returned error: " << mess << std::endl;
|
std::cout<< "Detector returned error: " << mess << std::endl;
|
||||||
} else {
|
} else {
|
||||||
stopSocket->ReceiveDataOnly(&retval,sizeof(retval));
|
stopSocket->ReceiveDataOnly(&retval,sizeof(retval));
|
||||||
// cout << "____________________" << retval << endl;
|
//cout << "____________________" << retval << endl;
|
||||||
}
|
}
|
||||||
stopSocket->Disconnect();
|
stopSocket->Disconnect();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user