included progresscallback to use in the gui to get the progress for receivers

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@336 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
l_maliakal_d 2012-11-08 08:28:51 +00:00
parent 33fa69d546
commit 6ee21ba810
2 changed files with 9 additions and 1 deletions

View File

@ -21,6 +21,9 @@ postProcessing::postProcessing(): expTime(NULL), ang(NULL), val(NULL), err(NULL)
//cout << "done "<< endl; //cout << "done "<< endl;
rawDataReady = 0; rawDataReady = 0;
pRawDataArg = 0; pRawDataArg = 0;
progress_call=0;
pProgressCallArg=0;
#ifdef VERBOSE #ifdef VERBOSE
registerDataCallback(&defaultDataReadyFunc, NULL); registerDataCallback(&defaultDataReadyFunc, NULL);
#endif #endif
@ -378,6 +381,8 @@ void* postProcessing::processData(int delflag) {
incrementProgress(caught-prevCaught); incrementProgress(caught-prevCaught);
prevCaught=caught; prevCaught=caught;
usleep(1000000); usleep(1000000);
if(progress_call)
progress_call(getCurrentProgress(),pProgressCallArg);
} }
/* /*
if (dataReady) { if (dataReady) {

View File

@ -240,7 +240,7 @@ s
void registerRawDataCallback(int( *userCallback)(double*, int, void*), void *pArg) {rawDataReady = userCallback; pRawDataArg = pArg;}; void registerRawDataCallback(int( *userCallback)(double*, int, void*), void *pArg) {rawDataReady = userCallback; pRawDataArg = pArg;};
void registerProgressCallback(int( *func)(double,void*), void *pArg){progress_call=func; pProgressCallArg=pArg;};
virtual double getRateCorrectionTau()=0; virtual double getRateCorrectionTau()=0;
@ -333,6 +333,9 @@ s
int (*rawDataReady)(double*,int,void*); int (*rawDataReady)(double*,int,void*);
void *pRawDataArg; void *pRawDataArg;
int (*progress_call)(double,void*);
void *pProgressCallArg;
postProcessingFuncs *ppFun; postProcessingFuncs *ppFun;
detectorData *thisData; detectorData *thisData;