receiver bug fix: with refactor, the callbacks were getting reset upon initialization. fixed

This commit is contained in:
2019-03-08 09:14:29 +01:00
parent 658438df3b
commit 0553755439
4 changed files with 52 additions and 25 deletions

View File

@ -38,17 +38,11 @@ class DataProcessor : private virtual slsDetectorDefs, public ThreadObject {
* @param act pointer to activated
* @param depaden pointer to deactivated padding enable
* @param sm pointer to silent mode
* @param dataReadycb pointer to data ready call back function
* @param dataModifyReadycb pointer to data ready call back function with modified
* @param pDataReadycb pointer to arguments of data ready call back function. To write/stream a smaller size of processed data, change this value (only smaller value is allowed).
*/
DataProcessor(int ind, detectorType dtype, Fifo* f, fileFormat* ftype,
bool fwenable, bool* dsEnable, bool* gpEnable, uint32_t* dr,
uint32_t* freq, uint32_t* timer,
bool* fp, bool* act, bool* depaden, bool* sm,
void (*dataReadycb)(char*, char*, uint32_t, void*),
void (*dataModifyReadycb)(char*, char*, uint32_t &, void*),
void *pDataReadycb);
bool* fp, bool* act, bool* depaden, bool* sm);
/**
* Destructor
@ -203,6 +197,27 @@ class DataProcessor : private virtual slsDetectorDefs, public ThreadObject {
*/
void SetPixelDimension();
/**
* Call back for raw data
* args to raw data ready callback are
* sls_receiver_header frame metadata
* dataPointer is the pointer to the data
* dataSize in bytes is the size of the data in bytes.
*/
void registerCallBackRawDataReady(void (*func)(char* ,
char*, uint32_t, void*),void *arg);
/**
* Call back for raw data (modified)
* args to raw data ready callback are
* sls_receiver_header frame metadata
* dataPointer is the pointer to the data
* revDatasize is the reference of data size in bytes.
* Can be modified to the new size to be written/streamed. (only smaller value).
*/
void registerCallBackRawDataModifyReady(void (*func)(char* ,
char*, uint32_t &,void*),void *arg);