ctb callback used

This commit is contained in:
2019-05-01 12:10:15 +02:00
parent 2f3b0e0b06
commit fc7d3bcaea
11 changed files with 204 additions and 12 deletions

View File

@ -39,11 +39,15 @@ 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 ct pointer to ctb type
* @param cdo pointer to ctb digital offset
* @param cad pointer to ctb analog databytes
*/
DataProcessor(int ind, detectorType dtype, Fifo* f, fileFormat* ftype,
bool fwenable, bool* mfwenable, bool* dsEnable, bool* gpEnable, uint32_t* dr,
uint32_t* freq, uint32_t* timer,
bool* fp, bool* act, bool* depaden, bool* sm);
bool* fp, bool* act, bool* depaden, bool* sm,
int* ct, int* cdo, int* cad);
/**
* Destructor
@ -217,8 +221,21 @@ class DataProcessor : private virtual slsDetectorDefs, public ThreadObject {
* 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);
char*, uint32_t &, void*),void *arg);
/**
* Call back for raw CTB data that will be modified
* args to raw data call back are
* 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).
* type CTB chip type
* digitalOffset digital offset
* analogdataBytes analog databytes
*/
void registerCallBackCTBReceiverReady(void (*func)(char*,
char*, uint32_t &, int, int, int, void*),void *arg);
@ -387,6 +404,16 @@ class DataProcessor : private virtual slsDetectorDefs, public ThreadObject {
/** Frame Number of latest processed frame number of an entire Acquisition (including all scans) */
uint64_t currentFrameIndex;
// for ctb call back
/** ctb type*/
int* ctbType;
/** ctb digital offset */
int* ctbDigitalOffset;
/** ctb analog databytes */
int* ctbAnalogDataBytes;
//call back
/**
@ -409,6 +436,20 @@ class DataProcessor : private virtual slsDetectorDefs, public ThreadObject {
void (*rawDataModifyReadyCallBack)(char*,
char*, uint32_t &, void*);
/**
* Call back for raw CTB data that will be modified
* args to raw data call back are
* 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).
* type CTB chip type
* digitalOffset digital offset
* analogdataBytes analog databytes
*/
void (*ctbRawDataReadyCallBack)(char*,
char*, uint32_t &, int, int, int, void*);
void *pRawDataReady;

View File

@ -95,6 +95,20 @@ class slsReceiver : private virtual slsDetectorDefs {
void registerCallBackRawDataModifyReady(void (*func)(char* ,
char*, uint32_t &,void*),void *arg);
/**
* Call back for raw CTB data that will be modified
* args to raw data call back are
* 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).
* type CTB chip type
* digitalOffset digital offset
* analogdataBytes analog databytes
*/
void registerCallBackCTBReceiverReady(void (*func)(char*,
char*, uint32_t &, int, int, int, void*),void *arg);
private:

View File

@ -751,6 +751,20 @@ class slsReceiverImplementation: private virtual slsDetectorDefs {
void registerCallBackRawDataModifyReady(void (*func)(char* ,
char*, uint32_t &,void*),void *arg);
/**
* Call back for raw CTB data that will be modified
* args to raw data call back are
* 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).
* type CTB chip type
* digitalOffset digital offset
* analogdataBytes analog databytes
*/
void registerCallBackCTBReceiverReady(void (*func)(char*,
char*, uint32_t &, int, int, int, void*),void *arg);
private:
/**
@ -924,6 +938,13 @@ private:
/** Fifo Structure to store addresses of memory writes */
std::vector<std::unique_ptr<Fifo>> fifo;
/** ctb type for callback*/
int ctbType;
/* ctb digital offset for callback */
int ctbDigitalOffset;
/* analog data bytes */
int ctbAnalogDataBytes;
//***callback parameters***
/**
* Call back for start acquisition
@ -964,6 +985,21 @@ private:
*/
void (*rawDataModifyReadyCallBack)(char* ,
char*, uint32_t &, void*);
/**
* Call back for raw CTB data that will be modified
* args to raw data call back are
* 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).
* type CTB chip type
* digitalOffset digital offset
* analogdataBytes analog databytes
*/
void (*ctbRawDataReadyCallBack)(char*,
char*, uint32_t &, int, int, int, void*);
void *pRawDataReady;

View File

@ -92,6 +92,21 @@ class slsReceiverTCPIPInterface : private virtual slsDetectorDefs {
void registerCallBackRawDataModifyReady(void (*func)(char* ,
char*, uint32_t &,void*),void *arg);
/**
* Call back for raw CTB data that will be modified
* args to raw data call back are
* 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).
* type CTB chip type
* digitalOffset digital offset
* analogdataBytes analog databytes
*/
void registerCallBackCTBReceiverReady(void (*func)(char*,
char*, uint32_t &, int, int, int, void*),void *arg);
private:
/**
@ -367,6 +382,21 @@ class slsReceiverTCPIPInterface : private virtual slsDetectorDefs {
void (*rawDataModifyReadyCallBack)(char* ,
char*, uint32_t &, void*);
/**
* Call back for raw CTB data that will be modified
* args to raw data call back are
* 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).
* type CTB chip type
* digitalOffset digital offset
* analogdataBytes analog databytes
*/
void (*ctbRawDataReadyCallBack)(char*,
char*, uint32_t &, int, int, int, void*);
void *pRawDataReady;

View File

@ -87,6 +87,16 @@ public:
void registerCallBackRawDataModifyReady(void (*func)(char* header,
char* datapointer, uint32_t &revDatasize, void*),void *arg);
/**
@short register callback to be called when CTB data are available in receiver (to process and/or save the data).
\param func raw data ready callback. arguments are sls_receiver_header, dataPointer, revDatasize is the reference of data size in bytes, chip type, digital offset, analog databytes. revDatasize be modified to the new size to be written/streamed. (only smaller value).
\param arg argument
\returns nothing
*/
void registerCallBackCTBReceiverReady(void (*func)(char* header,
char* datapointer, uint32_t &revDatasize, int type, int digitalOffset, int analogDataBytes, void*),void *arg);
//receiver object
std::unique_ptr<slsReceiver> receiver;
};