mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-22 01:27:59 +02:00
client stage2 ongoing, utils removed but not compile ready; left to do imod for every multi, connect client to multi
This commit is contained in:
@ -23,7 +23,7 @@ class ZmqSocket;
|
||||
#define SHORT_STRING_LENGTH 50
|
||||
#define DATE_LENGTH 30
|
||||
|
||||
class multiSlsDetector : public slsDetectorUtils {
|
||||
class multiSlsDetector : public postProcessing {
|
||||
|
||||
private:
|
||||
|
||||
@ -1408,6 +1408,56 @@ public:
|
||||
*/
|
||||
int setCTBPatWaitTime(int level, uint64_t t=-1);
|
||||
|
||||
/**
|
||||
* Loads the detector setup from file
|
||||
* @param fname file to read from
|
||||
* @param level if 2 reads also reads trimbits, angular conversion coefficients etc.
|
||||
* from files with default extensions as generated by dumpDetectorSetup
|
||||
* @returns OK or FAIL
|
||||
*/
|
||||
int retrieveDetectorSetup(std::string const fname, int level=0);
|
||||
|
||||
/**
|
||||
* Saves the detector setup to file
|
||||
* @param fname file to write to
|
||||
* @param level if 2 reads also trimbits, flat field, angular correction etc.
|
||||
* and writes them to files with automatically added extension
|
||||
* @returns OK or FAIL
|
||||
*/
|
||||
int dumpDetectorSetup(std::string const fname, int level=0);
|
||||
|
||||
/**
|
||||
* register callback for accessing acquisition final data
|
||||
* @param func function to be called at the end of the acquisition.
|
||||
* gets detector status and progress index as arguments
|
||||
* @param pArg argument
|
||||
*/
|
||||
void registerAcquisitionFinishedCallback(int( *func)(double,int, void*), void *pArg);
|
||||
|
||||
/**
|
||||
* register callback for accessing measurement final data
|
||||
* @param func function to be called at the end of the acquisition.
|
||||
* gets detector status and progress index as arguments
|
||||
* @param pArg argument
|
||||
*/
|
||||
void registerMeasurementFinishedCallback(int( *func)(int,int, void*), void *pArg);
|
||||
|
||||
/**
|
||||
* register callback for accessing detector progress
|
||||
* @param func function to be called at the end of the acquisition.
|
||||
* gets detector status and progress index as arguments
|
||||
* @param pArg argument
|
||||
*/
|
||||
void registerProgressCallback(int( *func)(double,void*), void *pArg);
|
||||
|
||||
/**
|
||||
* Performs a complete acquisition
|
||||
* resets frames caught in receiver, starts receiver, starts detector,
|
||||
* blocks till detector finished acquisition, stop receiver, increments file index,
|
||||
* loops for measurements, calls required call backs.
|
||||
* @returns OK or FAIL depending on if it already started
|
||||
*/
|
||||
int acquire();
|
||||
|
||||
private:
|
||||
/**
|
||||
@ -1455,6 +1505,30 @@ private:
|
||||
*/
|
||||
int processImageWithGapPixels(char* image, char*& gpImage);
|
||||
|
||||
/**
|
||||
* Set total progress (total number of frames/images in an acquisition)
|
||||
* @returns total progress
|
||||
*/
|
||||
int setTotalProgress();
|
||||
|
||||
/**
|
||||
* Get progress in current acquisition
|
||||
* @returns current progress
|
||||
*/
|
||||
double getCurrentProgress();
|
||||
|
||||
/**
|
||||
* Increment progress by one
|
||||
*/
|
||||
void incrementProgress();
|
||||
|
||||
/**
|
||||
* Set current progress to argument
|
||||
* @param i current progress
|
||||
*/
|
||||
void setCurrentProgress(int i=0);
|
||||
|
||||
|
||||
|
||||
/** Multi detector Id */
|
||||
int detId;
|
||||
@ -1476,6 +1550,22 @@ private:
|
||||
|
||||
/** Threadpool */
|
||||
ThreadPool* threadpool;
|
||||
|
||||
|
||||
int totalProgress;
|
||||
int progressIndex;
|
||||
|
||||
int (*acquisition_finished)(double,int,void*);
|
||||
int (*measurement_finished)(int,int,void*);
|
||||
void *acqFinished_p, *measFinished_p;
|
||||
int (*progress_call)(double,void*);
|
||||
void *pProgressCallArg;
|
||||
|
||||
/** semaphore to let postprocessing thread continue for next scan/measurement */
|
||||
sem_t sem_newRTAcquisition;
|
||||
|
||||
/** semaphore to let main thread know it got all the dummy packets (also from ext. process) */
|
||||
sem_t sem_endRTAcquisition;
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user