diff --git a/manual/manual-api/mainReceiver.cpp b/manual/manual-api/mainReceiver.cpp index 25924e808..ac0eb2233 100644 --- a/manual/manual-api/mainReceiver.cpp +++ b/manual/manual-api/mainReceiver.cpp @@ -103,12 +103,12 @@ void AcquisitionFinished(uint64_t frames, void*p){ * @param detType detector type see :: detectorType * @param version version of standard header (structure format) * @param datapointer pointer to data - * @param datasize data size in bytes + * @param datasize data size in bytes. To write/stream a smaller size of processed data, change this value (only smaller value is allowed). * @param p pointer to object */ void GetData(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* p){ + char* datapointer, uint32_t* datasize, void* p){ PRINT_IN_COLOR (modId?modId:xCoord, "#### %d GetData: ####\n" @@ -117,7 +117,8 @@ void GetData(uint64_t frameNumber, uint32_t expLength, uint32_t packetNumber, ui "version: %u\t\tfirstbytedata: 0x%x\t\tdatsize: %u\n\n", xCoord, frameNumber, expLength, packetNumber, bunchId, timestamp, modId, xCoord, yCoord, zCoord, debug, roundRNumber, detType, version, - ((uint8_t)(*((uint8_t*)(datapointer)))), datasize); + ((uint8_t)(*((uint8_t*)(datapointer)))), *datasize); + *datasize = 26000; } diff --git a/slsReceiverSoftware/include/DataProcessor.h b/slsReceiverSoftware/include/DataProcessor.h index 4fd7654fd..1636b203b 100644 --- a/slsReceiverSoftware/include/DataProcessor.h +++ b/slsReceiverSoftware/include/DataProcessor.h @@ -33,12 +33,14 @@ class DataProcessor : private virtual slsReceiverDefs, public ThreadObject { * @param freq pointer to streaming frequency * @param timer pointer to timer if streaming frequency is random * @param dataReadycb pointer to data ready call back function - * @param pDataReadycb pointer to arguments of data ready call back function + * @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(Fifo*& f, fileFormat* ftype, bool fwenable, bool* dsEnable, bool* gpEnable, uint32_t* dr, uint32_t* freq, uint32_t* timer, - 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*), + 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*), void *pDataReadycb); /** @@ -393,10 +395,11 @@ class DataProcessor : private virtual slsReceiverDefs, public ThreadObject { * 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 + * 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*); + 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*); void *pRawDataReady; diff --git a/slsReceiverSoftware/include/DataStreamer.h b/slsReceiverSoftware/include/DataStreamer.h index fb66aeb9c..a08183a1e 100644 --- a/slsReceiverSoftware/include/DataStreamer.h +++ b/slsReceiverSoftware/include/DataStreamer.h @@ -166,12 +166,13 @@ class DataStreamer : private virtual slsReceiverDefs, public ThreadObject { /** * Create and send Json Header * @param header header of image + * @param size data size (could have been modified in call back) * @param nx number of pixels in x dim * @param ny number of pixels in y dim * @param dummy true if its a dummy header * @returns 0 if error, else 1 */ - int SendHeader(sls_detector_header* header, uint32_t nx = 0, uint32_t ny = 0, bool dummy = true); + int SendHeader(sls_detector_header* header, uint32_t size = 0, uint32_t nx = 0, uint32_t ny = 0, bool dummy = true); /** type of thread */ static const std::string TypeName; diff --git a/slsReceiverSoftware/include/UDPBaseImplementation.h b/slsReceiverSoftware/include/UDPBaseImplementation.h index ca1e6acdf..5babfc50c 100644 --- a/slsReceiverSoftware/include/UDPBaseImplementation.h +++ b/slsReceiverSoftware/include/UDPBaseImplementation.h @@ -600,10 +600,12 @@ class UDPBaseImplementation : protected virtual slsReceiverDefs, public UDPInter * 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 + * 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); + 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); @@ -736,10 +738,11 @@ class UDPBaseImplementation : protected virtual slsReceiverDefs, public UDPInter * 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 + * 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*); + 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*); void *pRawDataReady; diff --git a/slsReceiverSoftware/include/UDPInterface.h b/slsReceiverSoftware/include/UDPInterface.h index 0af8edbe1..35e756587 100644 --- a/slsReceiverSoftware/include/UDPInterface.h +++ b/slsReceiverSoftware/include/UDPInterface.h @@ -689,10 +689,10 @@ 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 + * 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). */ 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; + char*, uint32_t*, void*),void *arg) = 0; protected: diff --git a/slsReceiverSoftware/include/ZmqSocket.h b/slsReceiverSoftware/include/ZmqSocket.h index dd260dffb..8fc063670 100644 --- a/slsReceiverSoftware/include/ZmqSocket.h +++ b/slsReceiverSoftware/include/ZmqSocket.h @@ -24,6 +24,7 @@ using namespace rapidjson; #define MAX_STR_LENGTH 1000 //#define ZMQ_DETAIL +#define ROIVERBOSITY class ZmqSocket { @@ -426,7 +427,15 @@ public: memcpy(buf, (char*)zmq_msg_data(&message), size); } - //incorrect size + //incorrect size (smaller) + else if (length < size){ +#ifdef ROIVERBOSITY + cprintf(RED,"Error: Received smaller packet size %d for socket %d\n", length, index); +#endif + memcpy(buf, (char*)zmq_msg_data(&message), length); + memset(buf+length,0xFF,size-length); + } + //incorrect size (larger) else { cprintf(RED,"Error: Received weird packet size %d for socket %d\n", length, index); memset(buf,0xFF,size); diff --git a/slsReceiverSoftware/include/slsReceiver.h b/slsReceiverSoftware/include/slsReceiver.h index 348d90e8e..69155ad76 100644 --- a/slsReceiverSoftware/include/slsReceiver.h +++ b/slsReceiverSoftware/include/slsReceiver.h @@ -91,10 +91,12 @@ 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 + * 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); + 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); diff --git a/slsReceiverSoftware/include/slsReceiverTCPIPInterface.h b/slsReceiverSoftware/include/slsReceiverTCPIPInterface.h index 83e6198db..e75253f14 100644 --- a/slsReceiverSoftware/include/slsReceiverTCPIPInterface.h +++ b/slsReceiverSoftware/include/slsReceiverTCPIPInterface.h @@ -95,8 +95,10 @@ class slsReceiverTCPIPInterface : private virtual slsReceiverDefs { * 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); + 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); private: @@ -344,10 +346,11 @@ 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 + * 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*); + 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*); void *pRawDataReady; diff --git a/slsReceiverSoftware/include/slsReceiverUsers.h b/slsReceiverSoftware/include/slsReceiverUsers.h index c2dd0bc0d..8035d33b4 100644 --- a/slsReceiverSoftware/include/slsReceiverUsers.h +++ b/slsReceiverSoftware/include/slsReceiverUsers.h @@ -69,7 +69,7 @@ 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); //receiver object slsReceiver* receiver; diff --git a/slsReceiverSoftware/src/DataProcessor.cpp b/slsReceiverSoftware/src/DataProcessor.cpp index e2dfc9d8a..d78c8bc48 100644 --- a/slsReceiverSoftware/src/DataProcessor.cpp +++ b/slsReceiverSoftware/src/DataProcessor.cpp @@ -35,8 +35,9 @@ bool DataProcessor::SilentMode(false); DataProcessor::DataProcessor(Fifo*& f, fileFormat* ftype, bool fwenable, bool* dsEnable, bool* gpEnable, uint32_t* dr, uint32_t* freq, uint32_t* timer, - 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*), + 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*), void *pDataReadycb) : ThreadObject(NumberofDataProcessors), @@ -316,7 +317,7 @@ void DataProcessor::ThreadExecution() { return; } - ProcessAnImage(buffer + FIFO_HEADER_NUMBYTES); + ProcessAnImage(buffer); //stream (if time/freq to stream) or free if (*dataStreamEnable && SendToStreamer()) @@ -348,7 +349,7 @@ void DataProcessor::StopProcessing(char* buf) { /** buf includes only the standard header */ void DataProcessor::ProcessAnImage(char* buf) { - sls_detector_header* header = (sls_detector_header*) (buf); + sls_detector_header* header = (sls_detector_header*) (buf + FIFO_HEADER_NUMBYTES); uint64_t fnum = header->frameNumber; currentFrameIndex = fnum; uint32_t nump = header->packetNumber; @@ -381,7 +382,7 @@ void DataProcessor::ProcessAnImage(char* buf) { } if (*gapPixelsEnable && (*dynamicRange!=4)) - InsertGapPixels(buf + sizeof(sls_detector_header), *dynamicRange); + InsertGapPixels(buf + FIFO_HEADER_NUMBYTES + sizeof(sls_detector_header), *dynamicRange); // x coord is 0 for detector in pos [0,0,0] if (xcoordin1D) { @@ -409,14 +410,14 @@ void DataProcessor::ProcessAnImage(char* buf) { header->roundRNumber, header->detType, header->version, - buf + sizeof(sls_detector_header), - generalData->imageSize, + buf + FIFO_HEADER_NUMBYTES + sizeof(sls_detector_header), + (uint32_t*)buf, pRawDataReady); } if (file) - file->WriteToFile(buf, sizeof(sls_detector_header) + generalData->imageSize, fnum-firstMeasurementIndex, nump); + file->WriteToFile(buf + FIFO_HEADER_NUMBYTES, sizeof(sls_detector_header) + (uint32_t)(*((uint32_t*)buf)), fnum-firstMeasurementIndex, nump); diff --git a/slsReceiverSoftware/src/DataStreamer.cpp b/slsReceiverSoftware/src/DataStreamer.cpp index 8946c6e40..3dfced933 100644 --- a/slsReceiverSoftware/src/DataStreamer.cpp +++ b/slsReceiverSoftware/src/DataStreamer.cpp @@ -200,7 +200,7 @@ void DataStreamer::ThreadExecution() { return; } - ProcessAnImage(buffer + FIFO_HEADER_NUMBYTES); + ProcessAnImage(buffer); //free fifo->FreeAddress(buffer); @@ -216,7 +216,7 @@ void DataStreamer::StopProcessing(char* buf) { #endif sls_detector_header* header = (sls_detector_header*) (buf); //send dummy header and data - if (!SendHeader(header, 0, 0, true)) + if (!SendHeader(header, 0, 0, 0, true)) cprintf(RED,"Error: Could not send zmq dummy header for streamer %d\n", index); fifo->FreeAddress(buf); @@ -229,7 +229,7 @@ void DataStreamer::StopProcessing(char* buf) { /** buf includes only the standard header */ void DataStreamer::ProcessAnImage(char* buf) { - sls_detector_header* header = (sls_detector_header*) (buf); + sls_detector_header* header = (sls_detector_header*) (buf + FIFO_HEADER_NUMBYTES); uint64_t fnum = header->frameNumber; #ifdef VERBOSE cprintf(MAGENTA,"DataStreamer %d: fnum:%lu\n", index,fnum); @@ -245,11 +245,11 @@ void DataStreamer::ProcessAnImage(char* buf) { //shortframe gotthard if (completeBuffer) { - if (!SendHeader(header, generalData->nPixelsXComplete, generalData->nPixelsYComplete, false)) + if (!SendHeader(header, (uint32_t)(*((uint32_t*)buf)), generalData->nPixelsXComplete, generalData->nPixelsYComplete, false)) cprintf(RED,"Error: Could not send zmq header for fnum %lld and streamer %d\n", (long long int) fnum, index); - memcpy(completeBuffer + ((generalData->imageSize)**shortFrameEnable), buf + sizeof(sls_detector_header), generalData->imageSize); + memcpy(completeBuffer + ((generalData->imageSize)**shortFrameEnable), buf + FIFO_HEADER_NUMBYTES + sizeof(sls_detector_header), (uint32_t)(*((uint32_t*)buf)) ); // new size possibly from callback if (!zmqSocket->SendData(completeBuffer, generalData->imageSizeComplete)) cprintf(RED,"Error: Could not send zmq data for fnum %lld and streamer %d\n", (long long int) fnum, index); @@ -259,11 +259,11 @@ void DataStreamer::ProcessAnImage(char* buf) { //normal else { - if (!SendHeader(header, generalData->nPixelsX, generalData->nPixelsY, false)) + if (!SendHeader(header, (uint32_t)(*((uint32_t*)buf)), generalData->nPixelsX, generalData->nPixelsY, false)) // new size possibly from callback cprintf(RED,"Error: Could not send zmq header for fnum %lld and streamer %d\n", (long long int) fnum, index); - if (!zmqSocket->SendData(buf + sizeof(sls_detector_header), generalData->imageSize)) + if (!zmqSocket->SendData(buf + FIFO_HEADER_NUMBYTES + sizeof(sls_detector_header), (uint32_t)(*((uint32_t*)buf)) )) // new size possibly from callback cprintf(RED,"Error: Could not send zmq data for fnum %lld and streamer %d\n", (long long int) fnum, index); } @@ -271,7 +271,7 @@ void DataStreamer::ProcessAnImage(char* buf) { -int DataStreamer::SendHeader(sls_detector_header* header, uint32_t nx, uint32_t ny, bool dummy) { +int DataStreamer::SendHeader(sls_detector_header* header, uint32_t size, uint32_t nx, uint32_t ny, bool dummy) { if (dummy) return zmqSocket->SendHeaderData(index, dummy,SLS_DETECTOR_JSON_HEADER_VERSION); @@ -280,7 +280,7 @@ int DataStreamer::SendHeader(sls_detector_header* header, uint32_t nx, uint32_t uint64_t acquisitionIndex = header->frameNumber - firstAcquisitionIndex; return zmqSocket->SendHeaderData(index, dummy, SLS_DETECTOR_JSON_HEADER_VERSION, *dynamicRange, *fileIndex, - nx, ny,generalData->imageSize, + nx, ny, size, acquisitionIndex, frameIndex, fileNametoStream, header->frameNumber, header->expLength, header->packetNumber, header->bunchId, header->timestamp, header->modId, header->xCoord, header->yCoord, header->zCoord, diff --git a/slsReceiverSoftware/src/UDPBaseImplementation.cpp b/slsReceiverSoftware/src/UDPBaseImplementation.cpp index 4ac209004..64996cb74 100644 --- a/slsReceiverSoftware/src/UDPBaseImplementation.cpp +++ b/slsReceiverSoftware/src/UDPBaseImplementation.cpp @@ -614,8 +614,10 @@ void UDPBaseImplementation::registerCallBackAcquisitionFinished(void (*func)(uin pAcquisitionFinished=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, 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*, void*),void *arg){ rawDataReadyCallBack=func; pRawDataReady=arg; } diff --git a/slsReceiverSoftware/src/main.cpp b/slsReceiverSoftware/src/main.cpp index 0086df416..91c22db9a 100644 --- a/slsReceiverSoftware/src/main.cpp +++ b/slsReceiverSoftware/src/main.cpp @@ -42,7 +42,7 @@ void AcquisitionFinished(uint64_t frames, void*p){ void GetData(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* p){ + char* datapointer, uint32_t* datasize, void* p){ PRINT_IN_COLOR (xCoord, "#### %d GetData: ####\n" @@ -51,7 +51,7 @@ void GetData(uint64_t frameNumber, uint32_t expLength, uint32_t packetNumber, ui "version: %u\t\tfirstbytedata: 0x%x\t\tdatsize: %u\n\n", xCoord, frameNumber, expLength, packetNumber, bunchId, timestamp, modId, xCoord, yCoord, zCoord, debug, roundRNumber, detType, version, - ((uint8_t)(*((uint8_t*)(datapointer)))), datasize); + ((uint8_t)(*((uint8_t*)(datapointer)))), *datasize); } */ diff --git a/slsReceiverSoftware/src/slsReceiver.cpp b/slsReceiverSoftware/src/slsReceiver.cpp index baae6b1c8..9e54c3a45 100644 --- a/slsReceiverSoftware/src/slsReceiver.cpp +++ b/slsReceiverSoftware/src/slsReceiver.cpp @@ -150,8 +150,10 @@ void slsReceiver::registerCallBackAcquisitionFinished(void (*func)(uint64_t, voi } -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, 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*, 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 22c123ce7..9701e983f 100644 --- a/slsReceiverSoftware/src/slsReceiverTCPIPInterface.cpp +++ b/slsReceiverSoftware/src/slsReceiverTCPIPInterface.cpp @@ -170,8 +170,10 @@ void slsReceiverTCPIPInterface::registerCallBackAcquisitionFinished(void (*func) pAcquisitionFinished=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, 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*, void*),void *arg){ rawDataReadyCallBack=func; pRawDataReady=arg; } diff --git a/slsReceiverSoftware/src/slsReceiverUsers.cpp b/slsReceiverSoftware/src/slsReceiverUsers.cpp index bab16867f..1ce7de26b 100644 --- a/slsReceiverSoftware/src/slsReceiverUsers.cpp +++ b/slsReceiverSoftware/src/slsReceiverUsers.cpp @@ -31,7 +31,7 @@ void slsReceiverUsers::registerCallBackAcquisitionFinished(void (*func)(uint64_t 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, void*), void *arg){ + char* datapointer, uint32_t* datasize, void*), void *arg){ receiver->registerCallBackRawDataReady(func,arg); }