mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-24 02:27:59 +02:00
including subframe index from receiver to client and also sending this to gui
This commit is contained in:
@ -138,7 +138,7 @@ void postProcessing::processFrame(int *myData, int delflag, int jctb) {
|
||||
// cout << "callback arg "<< getCurrentProgress()<< " " << (fname+string(".raw")).c_str() << " " << getTotalNumberOfChannels() << endl;
|
||||
// cout << "DATAREADY 1" <<endl;
|
||||
thisData=new detectorData(fdata,NULL,NULL,getCurrentProgress(),(fname+string(".raw")).c_str(),getTotalNumberOfChannels());
|
||||
dataReady(thisData, currentFrameIndex, pCallbackArg);
|
||||
dataReady(thisData, currentFrameIndex, -1, pCallbackArg);
|
||||
delete thisData;
|
||||
fdata=NULL;
|
||||
}
|
||||
@ -281,7 +281,7 @@ data queue size unlock
|
||||
// cout << "callback arg "<< getCurrentProgress()<< " " << (fname+ext).c_str() << " " << np << endl;
|
||||
//cout << "ADATREADY 2 " << endl;
|
||||
thisData=new detectorData(val,err,ang,getCurrentProgress(),(fname+ext).c_str(),np);
|
||||
dataReady(thisData, currentFrameIndex, pCallbackArg);
|
||||
dataReady(thisData, currentFrameIndex, -1, pCallbackArg);
|
||||
delete thisData;
|
||||
ang=NULL;
|
||||
val=NULL;
|
||||
@ -500,6 +500,7 @@ void* postProcessing::processData(int delflag) {
|
||||
int caught = -1;
|
||||
int currentAcquisitionIndex = -1;
|
||||
int currentFrameIndex = -1;
|
||||
int currentSubFrameIndex = -1;
|
||||
bool newData = false;
|
||||
int nthframe = setReadReceiverFrequency(0);
|
||||
|
||||
@ -633,7 +634,7 @@ void* postProcessing::processData(int delflag) {
|
||||
strcpy(currentfName,"");
|
||||
pthread_mutex_lock(&mg);
|
||||
//int* receiverData = new int [getTotalNumberOfChannels()];
|
||||
int* receiverData = readFrameFromReceiver(currentfName,currentAcquisitionIndex,currentFrameIndex);
|
||||
int* receiverData = readFrameFromReceiver(currentfName,currentAcquisitionIndex,currentFrameIndex,currentSubFrameIndex);
|
||||
pthread_mutex_unlock(&mg);
|
||||
|
||||
//if detector returned null
|
||||
@ -664,7 +665,7 @@ void* postProcessing::processData(int delflag) {
|
||||
if ((fdata) && (dataReady)){
|
||||
// cout << "DATAREADY 3" << endl;
|
||||
thisData = new detectorData(fdata,NULL,NULL,getCurrentProgress(),currentfName,getTotalNumberOfChannels());
|
||||
dataReady(thisData, currentFrameIndex, pCallbackArg);
|
||||
dataReady(thisData, currentFrameIndex, currentSubFrameIndex, pCallbackArg);
|
||||
delete thisData;
|
||||
fdata = NULL;
|
||||
progress = caught;
|
||||
|
@ -238,7 +238,7 @@ s
|
||||
void ResetPositionIndex(){pthread_mutex_lock(&mp); resetPositionIndex(); pthread_mutex_unlock(&mp);};
|
||||
|
||||
|
||||
void registerDataCallback(int( *userCallback)(detectorData*, int, void*), void *pArg) {dataReady = userCallback; pCallbackArg = pArg;};
|
||||
void registerDataCallback(int( *userCallback)(detectorData*, int, int, void*), void *pArg) {dataReady = userCallback; pCallbackArg = pArg;};
|
||||
|
||||
|
||||
void registerRawDataCallback(int( *userCallback)(double*, int, void*), void *pArg) {rawDataReady = userCallback; pRawDataArg = pArg;};
|
||||
@ -335,7 +335,7 @@ s
|
||||
private:
|
||||
double *fdata;
|
||||
|
||||
int (*dataReady)(detectorData*,int, void*);
|
||||
int (*dataReady)(detectorData*,int, int,void*);
|
||||
void *pCallbackArg;
|
||||
|
||||
int (*rawDataReady)(double*,int,void*);
|
||||
|
Reference in New Issue
Block a user