mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 18:17:59 +02:00
semaphores , no usleep in receiver
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@660 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
@ -4346,7 +4346,32 @@ int multiSlsDetector::stopReceiver(){
|
||||
}
|
||||
|
||||
|
||||
slsDetectorDefs::runStatus multiSlsDetector::startReceiverReadout(){
|
||||
|
||||
runStatus s,s1;
|
||||
|
||||
if (thisMultiDetector->masterPosition>=0)
|
||||
if (detectors[thisMultiDetector->masterPosition]){
|
||||
s = detectors[thisMultiDetector->masterPosition]->startReceiverReadout();
|
||||
if(detectors[thisMultiDetector->masterPosition]->getErrorMask())
|
||||
setErrorMask(getErrorMask()|(1<<thisMultiDetector->masterPosition));
|
||||
return s;
|
||||
}
|
||||
|
||||
if (detectors[0]) s=detectors[0]->startReceiverReadout();
|
||||
|
||||
for (int i=0; i<thisMultiDetector->numberOfDetectors; i++) {
|
||||
s1=detectors[i]->startReceiverReadout();
|
||||
if(detectors[i]->getErrorMask())
|
||||
setErrorMask(getErrorMask()|(1<<i));
|
||||
if (s1==ERROR)
|
||||
s=ERROR;
|
||||
if (s1==IDLE && s!=IDLE)
|
||||
s=ERROR;
|
||||
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
slsDetectorDefs::runStatus multiSlsDetector::getReceiverStatus(){
|
||||
|
||||
|
@ -1110,6 +1110,12 @@ class multiSlsDetector : public slsDetectorUtils {
|
||||
*/
|
||||
int stopReceiver();
|
||||
|
||||
/** Sets the receiver to start any readout remaining in the fifo and
|
||||
* change status to transmitting.
|
||||
* The status changes to run_finished when fifo is empty
|
||||
*/
|
||||
runStatus startReceiverReadout();
|
||||
|
||||
/** gets the status of the listening mode of receiver
|
||||
\returns status
|
||||
*/
|
||||
|
Reference in New Issue
Block a user