mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-12 12:57:13 +02:00
adding a receiver callback to be able to give modified size from the callback
This commit is contained in:
@ -40,7 +40,11 @@ class DataProcessor : private virtual slsReceiverDefs, public ThreadObject {
|
||||
void (*dataReadycb)(uint64_t, uint32_t, uint32_t, uint64_t,
|
||||
uint64_t, uint16_t, uint16_t, uint16_t, uint16_t,
|
||||
uint32_t, uint16_t, uint8_t, uint8_t,
|
||||
char*, uint32_t*, void*),
|
||||
char*, uint32_t, void*),
|
||||
void (*dataModifyReadycb)(uint64_t, uint32_t, uint32_t, uint64_t,
|
||||
uint64_t, uint16_t, uint16_t, uint16_t, uint16_t,
|
||||
uint32_t, uint16_t, uint8_t, uint8_t,
|
||||
char*, uint32_t &, void*),
|
||||
void *pDataReadycb);
|
||||
|
||||
/**
|
||||
@ -378,28 +382,55 @@ class DataProcessor : private virtual slsReceiverDefs, public ThreadObject {
|
||||
|
||||
|
||||
//call back
|
||||
/**
|
||||
* Call back for raw data
|
||||
* args to raw data ready callback are
|
||||
* frameNumber is the frame number
|
||||
* expLength is the subframe number (32 bit eiger) or real time exposure time in 100ns (others)
|
||||
* packetNumber is the packet number
|
||||
* bunchId is the bunch id from beamline
|
||||
* timestamp is the time stamp with 10 MHz clock
|
||||
* modId is the unique module id (unique even for left, right, top, bottom)
|
||||
* xCoord is the x coordinate in the complete detector system
|
||||
* yCoord is the y coordinate in the complete detector system
|
||||
* zCoord is the z coordinate in the complete detector system
|
||||
* debug is for debugging purposes
|
||||
* roundRNumber is the round robin set number
|
||||
* detType is the detector type see :: detectorType
|
||||
* version is the version number of this structure format
|
||||
* dataPointer is the pointer to the data
|
||||
* dataSize in bytes is the size of the data in bytes. To write/stream a smaller size of processed data, change this value (only smaller value is allowed).
|
||||
*/
|
||||
void (*rawDataReadyCallBack)(uint64_t, uint32_t, uint32_t, uint64_t, uint64_t,
|
||||
uint16_t, uint16_t, uint16_t, uint16_t, uint32_t, uint16_t, uint8_t, uint8_t,
|
||||
char*, uint32_t*, void*);
|
||||
/**
|
||||
* Call back for raw data
|
||||
* args to raw data ready callback are
|
||||
* frameNumber is the frame number
|
||||
* expLength is the subframe number (32 bit eiger) or real time exposure time in 100ns (others)
|
||||
* packetNumber is the packet number
|
||||
* bunchId is the bunch id from beamline
|
||||
* timestamp is the time stamp with 10 MHz clock
|
||||
* modId is the unique module id (unique even for left, right, top, bottom)
|
||||
* xCoord is the x coordinate in the complete detector system
|
||||
* yCoord is the y coordinate in the complete detector system
|
||||
* zCoord is the z coordinate in the complete detector system
|
||||
* debug is for debugging purposes
|
||||
* roundRNumber is the round robin set number
|
||||
* detType is the detector type see :: detectorType
|
||||
* version is the version number of this structure format
|
||||
* dataPointer is the pointer to the data
|
||||
* dataSize in bytes is the size of the data in bytes.
|
||||
*/
|
||||
void (*rawDataReadyCallBack)(uint64_t, uint32_t,
|
||||
uint32_t, uint64_t, uint64_t, uint16_t, uint16_t, uint16_t,
|
||||
uint16_t, uint32_t, uint16_t, uint8_t, uint8_t,
|
||||
char*, uint32_t, void*);
|
||||
|
||||
|
||||
/**
|
||||
* Call back for raw data (modified)
|
||||
* args to raw data ready callback are
|
||||
* frameNumber is the frame number
|
||||
* expLength is the subframe number (32 bit eiger) or real time exposure time in 100ns (others)
|
||||
* packetNumber is the packet number
|
||||
* bunchId is the bunch id from beamline
|
||||
* timestamp is the time stamp with 10 MHz clock
|
||||
* modId is the unique module id (unique even for left, right, top, bottom)
|
||||
* xCoord is the x coordinate in the complete detector system
|
||||
* yCoord is the y coordinate in the complete detector system
|
||||
* zCoord is the z coordinate in the complete detector system
|
||||
* debug is for debugging purposes
|
||||
* roundRNumber is the round robin set number
|
||||
* detType is the detector type see :: detectorType
|
||||
* version is the version number of this structure format
|
||||
* 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 (*rawDataModifyReadyCallBack)(uint64_t, uint32_t,
|
||||
uint32_t, uint64_t, uint64_t, uint16_t, uint16_t, uint16_t,
|
||||
uint16_t, uint32_t, uint16_t, uint8_t, uint8_t,
|
||||
char*, uint32_t &, void*);
|
||||
|
||||
void *pRawDataReady;
|
||||
|
||||
|
||||
|
@ -583,31 +583,53 @@ class UDPBaseImplementation : protected virtual slsReceiverDefs, public UDPInter
|
||||
*/
|
||||
void registerCallBackAcquisitionFinished(void (*func)(uint64_t, void*),void *arg);
|
||||
|
||||
/**
|
||||
* Call back for raw data
|
||||
* args to raw data ready callback are
|
||||
* frameNumber is the frame number
|
||||
* expLength is the subframe number (32 bit eiger) or real time exposure time in 100ns (others)
|
||||
* packetNumber is the packet number
|
||||
* bunchId is the bunch id from beamline
|
||||
* timestamp is the time stamp with 10 MHz clock
|
||||
* modId is the unique module id (unique even for left, right, top, bottom)
|
||||
* xCoord is the x coordinate in the complete detector system
|
||||
* yCoord is the y coordinate in the complete detector system
|
||||
* zCoord is the z coordinate in the complete detector system
|
||||
* debug is for debugging purposes
|
||||
* roundRNumber is the round robin set number
|
||||
* detType is the detector type see :: detectorType
|
||||
* version is the version number of this structure format
|
||||
* dataPointer is the pointer to the data
|
||||
* dataSize in bytes is the size of the data in bytes. To write/stream a smaller size of processed data, change this value (only smaller value is allowed).
|
||||
*/
|
||||
void registerCallBackRawDataReady(void (*func)(uint64_t, uint32_t, uint32_t,
|
||||
uint64_t, uint64_t, uint16_t, uint16_t, uint16_t, uint16_t, uint32_t,
|
||||
uint16_t, uint8_t, uint8_t,
|
||||
char*, uint32_t*, void*),void *arg);
|
||||
|
||||
/**
|
||||
* Call back for raw data
|
||||
* args to raw data ready callback are
|
||||
* frameNumber is the frame number
|
||||
* expLength is the subframe number (32 bit eiger) or real time exposure time in 100ns (others)
|
||||
* packetNumber is the packet number
|
||||
* bunchId is the bunch id from beamline
|
||||
* timestamp is the time stamp with 10 MHz clock
|
||||
* modId is the unique module id (unique even for left, right, top, bottom)
|
||||
* xCoord is the x coordinate in the complete detector system
|
||||
* yCoord is the y coordinate in the complete detector system
|
||||
* zCoord is the z coordinate in the complete detector system
|
||||
* debug is for debugging purposes
|
||||
* roundRNumber is the round robin set number
|
||||
* detType is the detector type see :: detectorType
|
||||
* version is the version number of this structure format
|
||||
* dataPointer is the pointer to the data
|
||||
* dataSize in bytes is the size of the data in bytes.
|
||||
*/
|
||||
void registerCallBackRawDataReady(void (*func)(uint64_t, uint32_t,
|
||||
uint32_t, uint64_t, uint64_t, uint16_t, uint16_t, uint16_t,
|
||||
uint16_t, uint32_t, uint16_t, uint8_t, uint8_t,
|
||||
char*, uint32_t, void*),void *arg);
|
||||
|
||||
/**
|
||||
* Call back for raw data (modified)
|
||||
* args to raw data ready callback are
|
||||
* frameNumber is the frame number
|
||||
* expLength is the subframe number (32 bit eiger) or real time exposure time in 100ns (others)
|
||||
* packetNumber is the packet number
|
||||
* bunchId is the bunch id from beamline
|
||||
* timestamp is the time stamp with 10 MHz clock
|
||||
* modId is the unique module id (unique even for left, right, top, bottom)
|
||||
* xCoord is the x coordinate in the complete detector system
|
||||
* yCoord is the y coordinate in the complete detector system
|
||||
* zCoord is the z coordinate in the complete detector system
|
||||
* debug is for debugging purposes
|
||||
* roundRNumber is the round robin set number
|
||||
* detType is the detector type see :: detectorType
|
||||
* version is the version number of this structure format
|
||||
* 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)(uint64_t, uint32_t,
|
||||
uint32_t, uint64_t, uint64_t, uint16_t, uint16_t, uint16_t,
|
||||
uint16_t, uint32_t, uint16_t, uint8_t, uint8_t,
|
||||
char*, uint32_t &,void*),void *arg);
|
||||
|
||||
|
||||
protected:
|
||||
@ -721,28 +743,55 @@ class UDPBaseImplementation : protected virtual slsReceiverDefs, public UDPInter
|
||||
void *pAcquisitionFinished;
|
||||
|
||||
|
||||
/**
|
||||
* Call back for raw data
|
||||
* args to raw data ready callback are
|
||||
* frameNumber is the frame number
|
||||
* expLength is the subframe number (32 bit eiger) or real time exposure time in 100ns (others)
|
||||
* packetNumber is the packet number
|
||||
* bunchId is the bunch id from beamline
|
||||
* timestamp is the time stamp with 10 MHz clock
|
||||
* modId is the unique module id (unique even for left, right, top, bottom)
|
||||
* xCoord is the x coordinate in the complete detector system
|
||||
* yCoord is the y coordinate in the complete detector system
|
||||
* zCoord is the z coordinate in the complete detector system
|
||||
* debug is for debugging purposes
|
||||
* roundRNumber is the round robin set number
|
||||
* detType is the detector type see :: detectorType
|
||||
* version is the version number of this structure format
|
||||
* dataPointer is the pointer to the data
|
||||
* dataSize in bytes is the size of the data in bytes. To write/stream a smaller size of processed data, change this value (only smaller value is allowed).
|
||||
*/
|
||||
void (*rawDataReadyCallBack)(uint64_t, uint32_t, uint32_t, uint64_t, uint64_t,
|
||||
uint16_t, uint16_t, uint16_t, uint16_t, uint32_t, uint16_t, uint8_t, uint8_t,
|
||||
char*, uint32_t*, void*);
|
||||
/**
|
||||
* Call back for raw data
|
||||
* args to raw data ready callback are
|
||||
* frameNumber is the frame number
|
||||
* expLength is the subframe number (32 bit eiger) or real time exposure time in 100ns (others)
|
||||
* packetNumber is the packet number
|
||||
* bunchId is the bunch id from beamline
|
||||
* timestamp is the time stamp with 10 MHz clock
|
||||
* modId is the unique module id (unique even for left, right, top, bottom)
|
||||
* xCoord is the x coordinate in the complete detector system
|
||||
* yCoord is the y coordinate in the complete detector system
|
||||
* zCoord is the z coordinate in the complete detector system
|
||||
* debug is for debugging purposes
|
||||
* roundRNumber is the round robin set number
|
||||
* detType is the detector type see :: detectorType
|
||||
* version is the version number of this structure format
|
||||
* dataPointer is the pointer to the data
|
||||
* dataSize in bytes is the size of the data in bytes.
|
||||
*/
|
||||
void (*rawDataReadyCallBack)(uint64_t, uint32_t,
|
||||
uint32_t, uint64_t, uint64_t, uint16_t, uint16_t, uint16_t,
|
||||
uint16_t, uint32_t, uint16_t, uint8_t, uint8_t,
|
||||
char*, uint32_t, void*);
|
||||
|
||||
|
||||
/**
|
||||
* Call back for raw data (modified)
|
||||
* args to raw data ready callback are
|
||||
* frameNumber is the frame number
|
||||
* expLength is the subframe number (32 bit eiger) or real time exposure time in 100ns (others)
|
||||
* packetNumber is the packet number
|
||||
* bunchId is the bunch id from beamline
|
||||
* timestamp is the time stamp with 10 MHz clock
|
||||
* modId is the unique module id (unique even for left, right, top, bottom)
|
||||
* xCoord is the x coordinate in the complete detector system
|
||||
* yCoord is the y coordinate in the complete detector system
|
||||
* zCoord is the z coordinate in the complete detector system
|
||||
* debug is for debugging purposes
|
||||
* roundRNumber is the round robin set number
|
||||
* detType is the detector type see :: detectorType
|
||||
* version is the version number of this structure format
|
||||
* 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 (*rawDataModifyReadyCallBack)(uint64_t, uint32_t,
|
||||
uint32_t, uint64_t, uint64_t, uint16_t, uint16_t, uint16_t,
|
||||
uint16_t, uint32_t, uint16_t, uint8_t, uint8_t,
|
||||
char*, uint32_t &, void*);
|
||||
|
||||
void *pRawDataReady;
|
||||
|
||||
|
||||
|
@ -689,10 +689,36 @@ class UDPInterface {
|
||||
* detType is the detector type see :: detectorType
|
||||
* version is the version number of this structure format
|
||||
* dataPointer is the pointer to the data
|
||||
* dataSize in bytes is the size of the data in bytes. To write/stream a smaller size of processed data, change this value (only smaller value is allowed).
|
||||
* dataSize in bytes is the size of the data in bytes.
|
||||
*/
|
||||
virtual void registerCallBackRawDataReady(void (*func)(uint64_t, uint32_t, uint32_t, uint64_t, uint64_t, uint16_t, uint16_t, uint16_t, uint16_t, uint32_t, uint16_t, uint8_t, uint8_t,
|
||||
char*, uint32_t*, void*),void *arg) = 0;
|
||||
virtual void registerCallBackRawDataReady(void (*func)(uint64_t, uint32_t,
|
||||
uint32_t, uint64_t, uint64_t, uint16_t, uint16_t, uint16_t,
|
||||
uint16_t, uint32_t, uint16_t, uint8_t, uint8_t,
|
||||
char*, uint32_t, void*),void *arg) = 0;
|
||||
|
||||
/**
|
||||
* Call back for raw data (modified)
|
||||
* args to raw data ready callback are
|
||||
* frameNumber is the frame number
|
||||
* expLength is the subframe number (32 bit eiger) or real time exposure time in 100ns (others)
|
||||
* packetNumber is the packet number
|
||||
* bunchId is the bunch id from beamline
|
||||
* timestamp is the time stamp with 10 MHz clock
|
||||
* modId is the unique module id (unique even for left, right, top, bottom)
|
||||
* xCoord is the x coordinate in the complete detector system
|
||||
* yCoord is the y coordinate in the complete detector system
|
||||
* zCoord is the z coordinate in the complete detector system
|
||||
* debug is for debugging purposes
|
||||
* roundRNumber is the round robin set number
|
||||
* detType is the detector type see :: detectorType
|
||||
* version is the version number of this structure format
|
||||
* 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).
|
||||
*/
|
||||
virtual void registerCallBackRawDataModifyReady(void (*func)(uint64_t, uint32_t,
|
||||
uint32_t, uint64_t, uint64_t, uint16_t, uint16_t, uint16_t,
|
||||
uint16_t, uint32_t, uint16_t, uint8_t, uint8_t,
|
||||
char*, uint32_t &,void*),void *arg) = 0;
|
||||
|
||||
|
||||
protected:
|
||||
|
@ -91,12 +91,36 @@ class slsReceiver : private virtual slsReceiverDefs {
|
||||
* detType is the detector type see :: detectorType
|
||||
* version is the version number of this structure format
|
||||
* dataPointer is the pointer to the data
|
||||
* dataSize in bytes is the size of the data in bytes. To write/stream a smaller size of processed data, change this value (only smaller value is allowed).
|
||||
* dataSize in bytes is the size of the data in bytes.
|
||||
*/
|
||||
void registerCallBackRawDataReady(void (*func)(uint64_t, uint32_t, uint32_t,
|
||||
uint64_t, uint64_t, uint16_t, uint16_t, uint16_t, uint16_t, uint32_t,
|
||||
uint16_t, uint8_t, uint8_t,
|
||||
char*, uint32_t*, void*),void *arg);
|
||||
char*, uint32_t, void*),void *arg);
|
||||
|
||||
/**
|
||||
* Call back for raw data (modified)
|
||||
* args to raw data ready callback are
|
||||
* frameNumber is the frame number
|
||||
* expLength is the subframe number (32 bit eiger) or real time exposure time in 100ns (others)
|
||||
* packetNumber is the packet number
|
||||
* bunchId is the bunch id from beamline
|
||||
* timestamp is the time stamp with 10 MHz clock
|
||||
* modId is the unique module id (unique even for left, right, top, bottom)
|
||||
* xCoord is the x coordinate in the complete detector system
|
||||
* yCoord is the y coordinate in the complete detector system
|
||||
* zCoord is the z coordinate in the complete detector system
|
||||
* debug is for debugging purposes
|
||||
* roundRNumber is the round robin set number
|
||||
* detType is the detector type see :: detectorType
|
||||
* version is the version number of this structure format
|
||||
* 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)(uint64_t, uint32_t,
|
||||
uint32_t, uint64_t, uint64_t, uint16_t, uint16_t, uint16_t,
|
||||
uint16_t, uint32_t, uint16_t, uint8_t, uint8_t,
|
||||
char*, uint32_t &,void*),void *arg);
|
||||
|
||||
|
||||
|
||||
|
@ -98,7 +98,32 @@ class slsReceiverTCPIPInterface : private virtual slsReceiverDefs {
|
||||
void registerCallBackRawDataReady(void (*func)(uint64_t, uint32_t, uint32_t,
|
||||
uint64_t, uint64_t, uint16_t, uint16_t, uint16_t, uint16_t, uint32_t,
|
||||
uint16_t, uint8_t, uint8_t,
|
||||
char*, uint32_t*, void*),void *arg);
|
||||
char*, uint32_t, void*),void *arg);
|
||||
|
||||
/**
|
||||
* Call back for raw data (modified)
|
||||
* args to raw data ready callback are
|
||||
* frameNumber is the frame number
|
||||
* expLength is the subframe number (32 bit eiger) or real time exposure time in 100ns (others)
|
||||
* packetNumber is the packet number
|
||||
* bunchId is the bunch id from beamline
|
||||
* timestamp is the time stamp with 10 MHz clock
|
||||
* modId is the unique module id (unique even for left, right, top, bottom)
|
||||
* xCoord is the x coordinate in the complete detector system
|
||||
* yCoord is the y coordinate in the complete detector system
|
||||
* zCoord is the z coordinate in the complete detector system
|
||||
* debug is for debugging purposes
|
||||
* roundRNumber is the round robin set number
|
||||
* detType is the detector type see :: detectorType
|
||||
* version is the version number of this structure format
|
||||
* 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)(uint64_t, uint32_t,
|
||||
uint32_t, uint64_t, uint64_t, uint16_t, uint16_t, uint16_t,
|
||||
uint16_t, uint32_t, uint16_t, uint8_t, uint8_t,
|
||||
char*, uint32_t &,void*),void *arg);
|
||||
|
||||
|
||||
private:
|
||||
|
||||
@ -346,11 +371,36 @@ class slsReceiverTCPIPInterface : private virtual slsReceiverDefs {
|
||||
* detType is the detector type see :: detectorType
|
||||
* version is the version number of this structure format
|
||||
* dataPointer is the pointer to the data
|
||||
* dataSize in bytes is the size of the data in bytes. To write/stream a smaller size of processed data, change this value (only smaller value is allowed).
|
||||
* dataSize in bytes is the size of the data in bytes.
|
||||
*/
|
||||
void (*rawDataReadyCallBack)(uint64_t, uint32_t, uint32_t, uint64_t, uint64_t,
|
||||
uint16_t, uint16_t, uint16_t, uint16_t, uint32_t, uint16_t, uint8_t, uint8_t,
|
||||
char*, uint32_t*, void*);
|
||||
char*, uint32_t, void*);
|
||||
|
||||
/**
|
||||
* Call back for raw data (modified)
|
||||
* args to raw data ready callback are
|
||||
* frameNumber is the frame number
|
||||
* expLength is the subframe number (32 bit eiger) or real time exposure time in 100ns (others)
|
||||
* packetNumber is the packet number
|
||||
* bunchId is the bunch id from beamline
|
||||
* timestamp is the time stamp with 10 MHz clock
|
||||
* modId is the unique module id (unique even for left, right, top, bottom)
|
||||
* xCoord is the x coordinate in the complete detector system
|
||||
* yCoord is the y coordinate in the complete detector system
|
||||
* zCoord is the z coordinate in the complete detector system
|
||||
* debug is for debugging purposes
|
||||
* roundRNumber is the round robin set number
|
||||
* detType is the detector type see :: detectorType
|
||||
* version is the version number of this structure format
|
||||
* 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 (*rawDataModifyReadyCallBack)(uint64_t, uint32_t,
|
||||
uint32_t, uint64_t, uint64_t, uint16_t, uint16_t, uint16_t,
|
||||
uint16_t, uint32_t, uint16_t, uint8_t, uint8_t,
|
||||
char*, uint32_t &, void*);
|
||||
|
||||
void *pRawDataReady;
|
||||
|
||||
|
||||
|
@ -69,8 +69,18 @@ public:
|
||||
*/
|
||||
void registerCallBackRawDataReady(void (*func)(uint64_t frameNumber, uint32_t expLength, uint32_t packetNumber, uint64_t bunchId, uint64_t timestamp,
|
||||
uint16_t modId, uint16_t xCoord, uint16_t yCoord, uint16_t zCoord, uint32_t debug, uint16_t roundRNumber, uint8_t detType, uint8_t version,
|
||||
char* datapointer, uint32_t* datasize, void*),void *arg);
|
||||
char* datapointer, uint32_t datasize, void*),void *arg);
|
||||
|
||||
|
||||
/**
|
||||
@sort register callback to be called when data are available (to process and/or save the data).
|
||||
\param func raw data ready callback. arguments are frameNumber, expLength, packetNumber, bunchId, timestamp, modId, xCoord, yCoord, zCoord, debug, roundRNumber, detType, version, dataPointer, revDatasize is the reference of data size in bytes. Can be modified to the new size to be written/streamed. (only smaller value).
|
||||
\returns nothing
|
||||
*/
|
||||
void registerCallBackRawDataModifyReady(void (*func)(uint64_t frameNumber, uint32_t expLength, uint32_t packetNumber, uint64_t bunchId, uint64_t timestamp,
|
||||
uint16_t modId, uint16_t xCoord, uint16_t yCoord, uint16_t zCoord, uint32_t debug, uint16_t roundRNumber, uint8_t detType, uint8_t version,
|
||||
char* datapointer, uint32_t &revDatasize, void*),void *arg);
|
||||
|
||||
//receiver object
|
||||
slsReceiver* receiver;
|
||||
};
|
||||
|
Reference in New Issue
Block a user