mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-01-16 20:09:22 +01:00
somewhere, but weird threads
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user