somewhere, but weird threads

This commit is contained in:
Dhanya Maliakal
2016-10-05 15:26:58 +02:00
parent 39baeade37
commit 6da59ca382
8 changed files with 145 additions and 220 deletions

View File

@@ -7720,7 +7720,7 @@ int slsDetector::enableDataStreamingFromReceiver(int enable){
if ((enable > 0) && (retval != enable)){
cout << "could not set data streaming in receiver to " << enable <<" Returned:" << retval << endl;
setErrorMask((getErrorMask())|(RECEIVER_READ_FREQUENCY));
setErrorMask((getErrorMask())|(DATA_STREAMING));
}
return retval;
}

View File

@@ -1580,11 +1580,6 @@ class slsDetector : public slsDetectorUtils, public energyConversion {
*/
int createReceivingDataThreads(bool destroy = false){};
/**
* Start Receiving Data Threads
* @return OK or FAIL
*/
int startReceivingData(){};
/** Reads frames from receiver through a constant socket
*/

View File

@@ -172,22 +172,18 @@ int slsDetectorUtils::acquire(int delflag){
}
if (*threadedProcessing) {
sem_init(&dataThreadStartedSemaphore,1,0);
if (*threadedProcessing)
startThread(delflag);
if(dataReady)
createReceivingDataThreads();
}
#ifdef VERBOSE
cout << " starting thread " << endl;
#endif
//resets frames caught in receiver
if(receiver){
resetFramesCaught();
resetFramesCaught();
}
for(int im=0;im<nm;im++) {
#ifdef VERBOSE
@@ -314,11 +310,6 @@ int slsDetectorUtils::acquire(int delflag){
break;
}
pthread_mutex_unlock(&mg);
//start the receiving sockets in their threads
if(*threadedProcessing && dataReady){
startReceivingData();
}
}
#ifdef VERBOSE
cout << "Acquiring " << endl;
@@ -488,19 +479,11 @@ int slsDetectorUtils::acquire(int delflag){
#ifdef VERBOSE
cout << "wait for data processing thread" << endl;
#endif
if(dataReady){
//if mask is not cleared, clear it
}
setJoinThread(1);
pthread_join(dataProcessingThread, &status);
#ifdef VERBOSE
cout << "data processing thread joined" << endl;
#endif
if(dataReady){
createReceivingDataThreads(true);
sem_destroy(&dataThreadStartedSemaphore);
}
}

View File

@@ -653,11 +653,6 @@ virtual int resetFramesCaught()=0;
*/
virtual int createReceivingDataThreads(bool destroy = false)=0;
/**
* Start Receiving Data Threads
* @return OK or FAIL
*/
virtual int startReceivingData()=0;
/** Reads frames from receiver through a constant socket
*/