From 9f68fc6f3b26be3b4bad659b40b9d4453291de7c Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Wed, 15 Mar 2017 15:00:25 +0100 Subject: [PATCH] fixed call backs with new standard header --- .../include/UDPBaseImplementation.h | 53 +++++++---- slsReceiverSoftware/include/UDPInterface.h | 26 ++++-- slsReceiverSoftware/include/receiver_defs.h | 7 +- slsReceiverSoftware/include/slsReceiver.h | 27 ++++-- .../include/slsReceiverTCPIPInterface.h | 52 +++++++---- .../include/slsReceiverUsers.h | 10 +- .../include/sls_receiver_defs.h | 34 +++++++ .../src/UDPBaseImplementation.cpp | 3 +- .../src/UDPStandardImplementation.cpp | 93 +++++++++++-------- slsReceiverSoftware/src/slsReceiver.cpp | 3 +- .../src/slsReceiverTCPIPInterface.cpp | 3 +- slsReceiverSoftware/src/slsReceiverUsers.cpp | 9 +- 12 files changed, 219 insertions(+), 101 deletions(-) diff --git a/slsReceiverSoftware/include/UDPBaseImplementation.h b/slsReceiverSoftware/include/UDPBaseImplementation.h index 728f39d6c..0519d1a56 100644 --- a/slsReceiverSoftware/include/UDPBaseImplementation.h +++ b/slsReceiverSoftware/include/UDPBaseImplementation.h @@ -503,15 +503,25 @@ class UDPBaseImplementation : protected virtual slsReceiverDefs, public UDPInter /** * Call back for raw data * args to raw data ready callback are - * index - * frame number - * timestamp/ bunch id - * exposure length/ sub frame number - * datapointer - * datasize in bytes - * file descriptor + * 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 + * fileDescriptor is the file descriptor */ - void registerCallBackRawDataReady(void (*func)(int, uint64_t, uint64_t, uint64_t, char*, uint32_t, FILE*, void*),void *arg); + 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, FILE*, void*),void *arg); @@ -628,18 +638,29 @@ class UDPBaseImplementation : protected virtual slsReceiverDefs, public UDPInter /** * Call back for raw data * args to raw data ready callback are - * index - * frame number - * timestamp/ bunch id - * exposure length/ sub frame number - * datapointer - * datasize in bytes - * file descriptor + * 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 + * fileDescriptor is the file descriptor */ - void (*rawDataReadyCallBack)(int, uint64_t, uint64_t, uint64_t, char*, uint32_t, FILE*, void*); + 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, FILE*, void*); void *pRawDataReady; + private: }; diff --git a/slsReceiverSoftware/include/UDPInterface.h b/slsReceiverSoftware/include/UDPInterface.h index 3c42dbfd1..de497a0b6 100644 --- a/slsReceiverSoftware/include/UDPInterface.h +++ b/slsReceiverSoftware/include/UDPInterface.h @@ -560,15 +560,25 @@ class UDPInterface { /** * Call back for raw data * args to raw data ready callback are - * index - * frame number - * timestamp/ bunch id - * exposure length/ sub frame number - * datapointer - * datasize in bytes - * file descriptor + * 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 + * fileDescriptor is the file descriptor */ - virtual void registerCallBackRawDataReady(void (*func)(int, uint64_t, uint64_t, uint64_t, char*, uint32_t, FILE*, 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, FILE*, void*),void *arg) = 0; protected: diff --git a/slsReceiverSoftware/include/receiver_defs.h b/slsReceiverSoftware/include/receiver_defs.h index 6f4b8fb83..6301f879a 100755 --- a/slsReceiverSoftware/include/receiver_defs.h +++ b/slsReceiverSoftware/include/receiver_defs.h @@ -58,9 +58,10 @@ typedef struct { #define HEADER_SIZE_NUM_PACKETS 1 #define ALL_MASK_32 0xFFFFFFFF -#define FILE_FRAME_HEADER_LENGTH (8*3) -#define FILE_HEADER_TIMESTAMP_OFFSET 8 //start of frame/ bunch id -#define FILE_HEADER_EXPLENGTH_OFFSET 16 //exposure length/ sub frame number +#define SLS_DETECTOR_HEADER_VERSION 0x1 +//#define FILE_FRAME_HEADER_LENGTH (8*3) +//#define FILE_HEADER_TIMESTAMP_OFFSET 8 //start of frame/ bunch id +//#define FILE_HEADER_EXPLENGTH_OFFSET 16 //exposure length/ sub frame number diff --git a/slsReceiverSoftware/include/slsReceiver.h b/slsReceiverSoftware/include/slsReceiver.h index 5a2118cab..35feec9f4 100644 --- a/slsReceiverSoftware/include/slsReceiver.h +++ b/slsReceiverSoftware/include/slsReceiver.h @@ -82,15 +82,26 @@ class slsReceiver : private virtual slsReceiverDefs { /** * Call back for raw data * args to raw data ready callback are - * index - * frame number - * timestamp/ bunch id - * exposure length/ sub frame number - * datapointer - * datasize in bytes - * file descriptor + * 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 + * fileDescriptor is the file descriptor */ - void registerCallBackRawDataReady(void (*func)(int, uint64_t, uint64_t, uint64_t, char*, uint32_t, FILE*, void*),void *arg); + 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, FILE*, void*),void *arg); + private: diff --git a/slsReceiverSoftware/include/slsReceiverTCPIPInterface.h b/slsReceiverSoftware/include/slsReceiverTCPIPInterface.h index c967d4335..bed74d936 100644 --- a/slsReceiverSoftware/include/slsReceiverTCPIPInterface.h +++ b/slsReceiverSoftware/include/slsReceiverTCPIPInterface.h @@ -82,15 +82,25 @@ class slsReceiverTCPIPInterface : private virtual slsReceiverDefs { /** * Call back for raw data * args to raw data ready callback are - * index - * frame number - * timestamp/ bunch id - * exposure length/ sub frame number - * datapointer - * datasize in bytes - * file descriptor + * 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 + * fileDescriptor is the file descriptor */ - void registerCallBackRawDataReady(void (*func)(int, uint64_t, uint64_t, uint64_t, char*, uint32_t, FILE*, void*),void *arg); + 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, FILE*, void*),void *arg); private: @@ -321,15 +331,25 @@ private: /** * Call back for raw data * args to raw data ready callback are - * index - * frame number - * timestamp/ bunch id - * exposure length/ sub frame number - * datapointer - * datasize in bytes - * file descriptor + * 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 + * fileDescriptor is the file descriptor */ - void (*rawDataReadyCallBack)(int, uint64_t, uint64_t, uint64_t, char*, uint32_t, FILE*, void*); + 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, FILE*, void*); void *pRawDataReady; diff --git a/slsReceiverSoftware/include/slsReceiverUsers.h b/slsReceiverSoftware/include/slsReceiverUsers.h index 45e6d62e0..c59e4cf13 100644 --- a/slsReceiverSoftware/include/slsReceiverUsers.h +++ b/slsReceiverSoftware/include/slsReceiverUsers.h @@ -72,10 +72,12 @@ public: /** @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 index, frame number, timestamp/ bunch id, exposure length/ sub frame number, datapointer, datasize in bytes, file descriptor - \returns nothing - */ - void registerCallBackRawDataReady(void (*func)(int index, uint64_t framenumber, uint64_t timestamp, uint64_t explength, char* datapointer, uint32_t datasize, FILE* filedescriptor, void*),void *arg); + \param func raw data ready callback. arguments are frameNumber, expLength, packetNumber, bunchId, timestamp, modId, xCoord, yCoord, zCoord, debug, roundRNumber, detType, version, dataPointer, dataSize, fileDescriptor + \returns nothing + */ + 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, FILE* filedescriptor, void*),void *arg); //receiver object slsReceiver* receiver; diff --git a/slsReceiverSoftware/include/sls_receiver_defs.h b/slsReceiverSoftware/include/sls_receiver_defs.h index ce0fad9fa..2dee3ddd1 100755 --- a/slsReceiverSoftware/include/sls_receiver_defs.h +++ b/slsReceiverSoftware/include/sls_receiver_defs.h @@ -116,6 +116,40 @@ public: STOPPED /**< acquisition stopped externally */ }; + + /** + @short structure for a Detector Packet or Image Header + @li frameNumber is the frame number + @li expLength is the subframe number (32 bit eiger) or real time exposure time in 100ns (others) + @li packetNumber is the packet number + @li bunchId is the bunch id from beamline + @li timestamp is the time stamp with 10 MHz clock + @li modId is the unique module id (unique even for left, right, top, bottom) + @li xCoord is the x coordinate in the complete detector system + @li yCoord is the y coordinate in the complete detector system + @li zCoord is the z coordinate in the complete detector system + @li debug is for debugging purposes + @li roundRNumber is the round robin set number + @li detType is the detector type see :: detectorType + @li version is the version number of this structure format + */ + typedef struct { + uint64_t frameNumber; /**< is the frame number */ + uint32_t expLength; /**< is the subframe number (32 bit eiger) or real time exposure time in 100ns (others) */ + uint32_t packetNumber; /**< is the packet number */ + uint64_t bunchId; /**< is the bunch id from beamline */ + uint64_t timestamp; /**< is the time stamp with 10 MHz clock */ + uint16_t modId; /**< is the unique module id (unique even for left, right, top, bottom) */ + uint16_t xCoord; /**< is the x coordinate in the complete detector system */ + uint16_t yCoord; /**< is the y coordinate in the complete detector system */ + uint16_t zCoord; /**< is the z coordinate in the complete detector system */ + uint32_t debug; /**< is for debugging purposes */ + uint16_t roundRNumber; /**< is the round robin set number */ + uint8_t detType; /**< is the detector type see :: detectorType */ + uint8_t version; /**< is the version number of this structure format */ + } sls_detector_header; + + #ifdef __cplusplus /** returns string from enabled/disabled \param b true or false diff --git a/slsReceiverSoftware/src/UDPBaseImplementation.cpp b/slsReceiverSoftware/src/UDPBaseImplementation.cpp index b2a5f69b0..8d184ed82 100644 --- a/slsReceiverSoftware/src/UDPBaseImplementation.cpp +++ b/slsReceiverSoftware/src/UDPBaseImplementation.cpp @@ -517,7 +517,8 @@ void UDPBaseImplementation::registerCallBackAcquisitionFinished(void (*func)(uin pAcquisitionFinished=arg; } -void UDPBaseImplementation::registerCallBackRawDataReady(void (*func)(int, uint64_t, uint64_t, uint64_t, char*, uint32_t, FILE*, void*),void *arg){ +void UDPBaseImplementation::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, FILE*, void*),void *arg){ rawDataReadyCallBack=func; pRawDataReady=arg; } diff --git a/slsReceiverSoftware/src/UDPStandardImplementation.cpp b/slsReceiverSoftware/src/UDPStandardImplementation.cpp index 09b86ac2e..216dfabb9 100644 --- a/slsReceiverSoftware/src/UDPStandardImplementation.cpp +++ b/slsReceiverSoftware/src/UDPStandardImplementation.cpp @@ -650,7 +650,7 @@ int UDPStandardImplementation::setDynamicRange(const uint32_t i){ if(latestData[i]){delete[] latestData[i];latestData[i] = 0;} } for(int i=0;iframeNumber = (uint64_t) (fnum + startAcquisitionIndex); + if (myDetectorType == EIGER && dynamicRange == 32) + header->expLength = (uint32_t) snum; + header->packetNumber = (uint32_t) packetsPerFrame; + if (myDetectorType == JUNGFRAU) + header->bunchId = (uint64_t) bnum; + header->xCoord = (uint16_t) detID * numberofListeningThreads + ithread; + header->detType = (uint8_t) myDetectorType; + header->version = (uint8_t) SLS_DETECTOR_HEADER_VERSION; + #ifdef VERBOSE - if(!ithread) cout << "fnum:" << (*((uint64_t*)(buffer[ithread] + HEADER_SIZE_NUM_TOT_PACKETS))) << endl; + if(!ithread) + cprintf(BLUE, + "framenumber:%llu\tsubfnum:%u\tpnum:%u\tbunchid:%llu\txcoord:%u\tdettype:%u\tversion:%u\n", + header->frameNumber, header->expLength, header->packetNumber, + header->bunchId, header->xCoord, header->detType, header->version); #endif - switch (myDetectorType) { - case JUNGFRAU: - (*((uint64_t*)(buffer[ithread] + HEADER_SIZE_NUM_TOT_PACKETS + FILE_HEADER_TIMESTAMP_OFFSET))) = bnum; - (*((uint64_t*)(buffer[ithread] + HEADER_SIZE_NUM_TOT_PACKETS + FILE_HEADER_EXPLENGTH_OFFSET))) = 0; - break; - case EIGER: - (*((uint64_t*)(buffer[ithread] + HEADER_SIZE_NUM_TOT_PACKETS + FILE_HEADER_TIMESTAMP_OFFSET))) = 0; - if (dynamicRange == 32) - (*((uint64_t*)(buffer[ithread] + HEADER_SIZE_NUM_TOT_PACKETS + FILE_HEADER_EXPLENGTH_OFFSET))) = snum; - else - (*((uint64_t*)(buffer[ithread] + HEADER_SIZE_NUM_TOT_PACKETS + FILE_HEADER_EXPLENGTH_OFFSET))) = 0; - break; - default: - (*((uint64_t*)(buffer[ithread] + HEADER_SIZE_NUM_TOT_PACKETS + FILE_HEADER_TIMESTAMP_OFFSET))) = 0; - (*((uint64_t*)(buffer[ithread] + HEADER_SIZE_NUM_TOT_PACKETS + FILE_HEADER_EXPLENGTH_OFFSET))) = 0; - break; - } //write packet count to buffer *((uint32_t*)(buffer[ithread])) = packetsPerFrame; @@ -2852,8 +2849,20 @@ void UDPStandardImplementation::handleWithoutDataCompression(int ithread, char* //callback to write data if (cbAction < DO_EVERYTHING) - rawDataReadyCallBack(detID*numberofListeningThreads+ithread, tempframenumber, - 0,0, + rawDataReadyCallBack( + tempframenumber,//frameNumber + 0,//expLength + 0,//packetNumber + 0,//bunchId + 0,//timestamp + 0,//modId + detID*numberofListeningThreads+ithread,//xCoord + 0,//yCoord + 0,//zCoord + 0,//debug + 0,//roundRNumber + (uint8_t)myDetectorType,//detType + SLS_DETECTOR_HEADER_VERSION,//version wbuffer + fifoBufferHeaderSize, bufferSize * numberofJobsPerBuffer + fifoBufferHeaderSize, sfilefd[ithread], pRawDataReady);//know which thread from sfilefd @@ -2898,15 +2907,25 @@ void UDPStandardImplementation::handleWithoutDataCompression(int ithread, char* void UDPStandardImplementation::handleCompleteFramesOnly(int ithread, char* wbuffer){ FILE_LOG(logDEBUG) << __AT__ << " called"; - //get current frame number - uint64_t tempframenumber = (*((uint64_t*)(wbuffer + HEADER_SIZE_NUM_TOT_PACKETS))); - uint64_t bnum = (*((uint64_t*)(wbuffer + HEADER_SIZE_NUM_TOT_PACKETS + FILE_HEADER_TIMESTAMP_OFFSET))); - uint64_t snum = (*((uint64_t*)(wbuffer + HEADER_SIZE_NUM_TOT_PACKETS + FILE_HEADER_EXPLENGTH_OFFSET))); - + //get header + sls_detector_header* header = (sls_detector_header*) (wbuffer + HEADER_SIZE_NUM_TOT_PACKETS); + uint64_t tempframenumber = header->frameNumber; if (cbAction < DO_EVERYTHING) - rawDataReadyCallBack(detID*numberofListeningThreads+ithread, tempframenumber, - bnum, snum, + rawDataReadyCallBack( + header->frameNumber, + header->expLength, + header->packetNumber, + header->bunchId, + header->timestamp, + header->modId, + header->xCoord, + header->yCoord, + header->zCoord, + header->debug, + header->roundRNumber, + header->detType, + header->version, wbuffer + fifoBufferHeaderSize, bufferSize * numberofJobsPerBuffer + fifoBufferHeaderSize, sfilefd[ithread], pRawDataReady); @@ -2916,7 +2935,7 @@ void UDPStandardImplementation::handleCompleteFramesOnly(int ithread, char* wbuf if((fileWriteEnable) && (sfilefd[ithread])){ if(tempframenumber && (tempframenumber%maxFramesPerFile) == 0) createNewFile(ithread); - fwrite(wbuffer + HEADER_SIZE_NUM_TOT_PACKETS, 1, (bufferSize + FILE_FRAME_HEADER_LENGTH), sfilefd[ithread]); + fwrite(wbuffer + HEADER_SIZE_NUM_TOT_PACKETS, 1, (bufferSize + sizeof(sls_detector_header)), sfilefd[ithread]); } tempframenumber -= startFrameIndex; @@ -3179,7 +3198,7 @@ void UDPStandardImplementation::copyFrameToGui(int ithread, char* buffer, uint32 strcpy(guiFileName[ithread],completeFileName[ithread]); if(excludeMissingPackets) //copy also the header - memcpy(latestData[ithread],buffer+HEADER_SIZE_NUM_TOT_PACKETS, bufferSize + FILE_FRAME_HEADER_LENGTH); + memcpy(latestData[ithread],buffer+ HEADER_SIZE_NUM_TOT_PACKETS, bufferSize + sizeof(sls_detector_header)); else //copy only the data memcpy(latestData[ithread],buffer+ fifoBufferHeaderSize , numpackets*onePacketSize); //let it know its got data diff --git a/slsReceiverSoftware/src/slsReceiver.cpp b/slsReceiverSoftware/src/slsReceiver.cpp index 85750c517..0db3dc793 100644 --- a/slsReceiverSoftware/src/slsReceiver.cpp +++ b/slsReceiverSoftware/src/slsReceiver.cpp @@ -179,7 +179,8 @@ void slsReceiver::registerCallBackAcquisitionFinished(void (*func)(uint64_t, voi } -void slsReceiver::registerCallBackRawDataReady(void (*func)(int, uint64_t, uint64_t, uint64_t, char*, uint32_t, FILE*, void*),void *arg){ +void slsReceiver::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, FILE*, void*),void *arg){ //tcpipInterface if(udp_interface) udp_interface->registerCallBackRawDataReady(func,arg); diff --git a/slsReceiverSoftware/src/slsReceiverTCPIPInterface.cpp b/slsReceiverSoftware/src/slsReceiverTCPIPInterface.cpp index 304476e56..a21bc8ca8 100644 --- a/slsReceiverSoftware/src/slsReceiverTCPIPInterface.cpp +++ b/slsReceiverSoftware/src/slsReceiverTCPIPInterface.cpp @@ -3403,7 +3403,8 @@ void slsReceiverTCPIPInterface::registerCallBackAcquisitionFinished(void (*func) pAcquisitionFinished=arg; } -void slsReceiverTCPIPInterface::registerCallBackRawDataReady(void (*func)(int, uint64_t, uint64_t, uint64_t, char*, uint32_t, FILE*, void*),void *arg){ +void slsReceiverTCPIPInterface::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, FILE*, void*),void *arg){ rawDataReadyCallBack=func; pRawDataReady=arg; } diff --git a/slsReceiverSoftware/src/slsReceiverUsers.cpp b/slsReceiverSoftware/src/slsReceiverUsers.cpp index 384ce86ea..512e838ac 100644 --- a/slsReceiverSoftware/src/slsReceiverUsers.cpp +++ b/slsReceiverSoftware/src/slsReceiverUsers.cpp @@ -17,7 +17,6 @@ void slsReceiverUsers::stop() { receiver->stop(); } - void slsReceiverUsers::closeFile(int p) { receiver->closeFile(p); } @@ -26,19 +25,17 @@ int64_t slsReceiverUsers::getReceiverVersion(){ return receiver->getReceiverVersion(); } - void slsReceiverUsers::registerCallBackStartAcquisition(int (*func)(char*, char*, uint64_t, uint32_t, void*),void *arg){ receiver->registerCallBackStartAcquisition(func,arg); } - - void slsReceiverUsers::registerCallBackAcquisitionFinished(void (*func)(uint64_t, void*),void *arg){ receiver->registerCallBackAcquisitionFinished(func,arg); } - -void slsReceiverUsers::registerCallBackRawDataReady(void (*func)(int, uint64_t, uint64_t, uint64_t, char*, uint32_t, FILE*, void*), void *arg){ +void slsReceiverUsers::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, FILE* filedescriptor, void*), void *arg){ receiver->registerCallBackRawDataReady(func,arg); }