merged from 2.3 without udpstandard

This commit is contained in:
Dhanya Maliakal 2017-03-24 10:34:31 +01:00
commit bb52676f50
13 changed files with 42 additions and 55 deletions

View File

@ -1,9 +1,9 @@
Path: slsDetectorsPackage/slsReceiverSoftware Path: slsDetectorsPackage/slsReceiverSoftware
URL: origin git@git.psi.ch:sls_detectors_software/sls_receiver_software.git URL: origin git@git.psi.ch:sls_detectors_software/sls_receiver_software.git
Repository Root: origin git@git.psi.ch:sls_detectors_software/sls_receiver_software.git Repository Root: origin git@git.psi.ch:sls_detectors_software/sls_receiver_software.git
Repsitory UUID: d3951bb7497e1de9feb70a03706c442324bc4323 Repsitory UUID: 9f0ea629975864abb9bb3fd9f59c1d9188e0f3d1
Revision: 529 Revision: 512
Branch: hdf5 Branch: 2.3
Last Changed Author: Dhanya_Maliakal Last Changed Author: Dhanya_Maliakal
Last Changed Rev: 529 Last Changed Rev: 512
Last Changed Date: 2017-03-03 09:06:49 +0100 Last Changed Date: 2017-03-23 15:17:21 +0100

View File

@ -520,8 +520,7 @@ class UDPBaseImplementation : protected virtual slsReceiverDefs, public UDPInter
* *
* return value is * return value is
* 0 callback takes care of open,close,wrie file * 0 callback takes care of open,close,wrie file
* 1 callback writes file, we have to open, close it * 1 we open, close, write file, callback does not do anything
* 2 we open, close, write file, callback does not do anything
*/ */
void registerCallBackStartAcquisition(int (*func)(char*, char*, uint64_t, uint32_t, void*),void *arg); void registerCallBackStartAcquisition(int (*func)(char*, char*, uint64_t, uint32_t, void*),void *arg);
@ -550,10 +549,10 @@ class UDPBaseImplementation : protected virtual slsReceiverDefs, public UDPInter
* version is the version number of this structure format * version is the version number of this structure format
* dataPointer is the pointer to the data * 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
* fileDescriptor is the file descriptor
*/ */
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, 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); char*, uint32_t, void*),void *arg);
@ -643,8 +642,7 @@ class UDPBaseImplementation : protected virtual slsReceiverDefs, public UDPInter
* *
* return value is * return value is
* 0 callback takes care of open,close,wrie file * 0 callback takes care of open,close,wrie file
* 1 callback writes file, we have to open, close it * 1 we open, close, write file, callback does not do anything
* 2 we open, close, write file, callback does not do anything
*/ */
int (*startAcquisitionCallBack)(char*, char*, uint64_t, uint32_t, void*); int (*startAcquisitionCallBack)(char*, char*, uint64_t, uint32_t, void*);
void *pStartAcquisition; void *pStartAcquisition;
@ -676,12 +674,13 @@ class UDPBaseImplementation : protected virtual slsReceiverDefs, public UDPInter
* version is the version number of this structure format * version is the version number of this structure format
* dataPointer is the pointer to the data * 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
* fileDescriptor is the file descriptor
*/ */
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, 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*); char*, uint32_t, void*);
void *pRawDataReady; void *pRawDataReady;
private:
private:
}; };

View File

@ -578,9 +578,8 @@ class UDPInterface {
* datasize * datasize
* *
* return value is * return value is
* 0 callback takes care of open,close,wrie file * 0 callback takes care of open,close,write file
* 1 callback writes file, we have to open, close it * 1 we open, close, write file, callback does not do anything
* 2 we open, close, write file, callback does not do anything
*/ */
virtual void registerCallBackStartAcquisition(int (*func)(char*, char*, uint64_t, uint32_t, void*),void *arg) = 0; virtual void registerCallBackStartAcquisition(int (*func)(char*, char*, uint64_t, uint32_t, void*),void *arg) = 0;
@ -609,10 +608,9 @@ class UDPInterface {
* version is the version number of this structure format * version is the version number of this structure format
* dataPointer is the pointer to the data * 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
* fileDescriptor is the file descriptor
*/ */
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, 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; char*, uint32_t, void*),void *arg) = 0;
protected: protected:

View File

@ -240,6 +240,7 @@ private:
* Verifies if the callbacks are registered for the callback variable * Verifies if the callbacks are registered for the callback variable
* @returns OK or FAIL * @returns OK or FAIL
*/ */
int VerifyCallBackAction(); int VerifyCallBackAction();

View File

@ -1,11 +1,11 @@
//#define SVNPATH "" //#define SVNPATH ""
#define SVNURL "git@git.psi.ch:sls_detectors_software/sls_receiver_software.git" #define SVNURL "git@git.psi.ch:sls_detectors_software/sls_receiver_software.git"
//#define SVNREPPATH "" //#define SVNREPPATH ""
#define SVNREPUUID "d3951bb7497e1de9feb70a03706c442324bc4323" #define SVNREPUUID "9f0ea629975864abb9bb3fd9f59c1d9188e0f3d1"
//#define SVNREV 0x529 //#define SVNREV 0x512
//#define SVNKIND "" //#define SVNKIND ""
//#define SVNSCHED "" //#define SVNSCHED ""
#define SVNAUTH "Dhanya_Maliakal" #define SVNAUTH "Dhanya_Maliakal"
#define SVNREV 0x529 #define SVNREV 0x512
#define SVNDATE 0x20170303 #define SVNDATE 0x20170323
// //

View File

@ -9,21 +9,18 @@
#define RECEIVE_SOCKET_BUFFER_SIZE (100*1024*1024) #define RECEIVE_SOCKET_BUFFER_SIZE (100*1024*1024)
#define MAX_SOCKET_INPUT_PACKET_QUEUE 250000 #define MAX_SOCKET_INPUT_PACKET_QUEUE 250000
//files //files
#define DO_NOTHING 0 #define DO_NOTHING 0
#define CREATE_FILES 1 #define DO_EVERYTHING 1
#define DO_EVERYTHING 2
//binary file/ fifo //binary
//#define FILE_FRAME_HDR_FNUM_SIZE 8
//#define FILE_FRAME_HDR_SNUM_SIZE 8
//#define FILE_FRAME_HDR_BID_SIZE 8
//#define FILE_FRAME_HEADER_SIZE (FILE_FRAME_HDR_FNUM_SIZE + FILE_FRAME_HDR_SNUM_SIZE + FILE_FRAME_HDR_BID_SIZE)
#define FIFO_HEADER_NUMBYTES 4
#define FILE_BUFFER_SIZE (16*1024*1024) //16mb #define FILE_BUFFER_SIZE (16*1024*1024) //16mb
//fifo
#define FIFO_HEADER_NUMBYTES 4
//hdf5 //hdf5
#define MAX_CHUNKED_IMAGES 1 #define MAX_CHUNKED_IMAGES 1

View File

@ -67,8 +67,7 @@ class slsReceiver : private virtual slsReceiverDefs {
* *
* return value is * return value is
* 0 callback takes care of open,close,wrie file * 0 callback takes care of open,close,wrie file
* 1 callback writes file, we have to open, close it * 1 we open, close, write file, callback does not do anything
* 2 we open, close, write file, callback does not do anything
*/ */
void registerCallBackStartAcquisition(int (*func)(char*, char*, uint64_t, uint32_t, void*),void *arg); void registerCallBackStartAcquisition(int (*func)(char*, char*, uint64_t, uint32_t, void*),void *arg);
@ -97,10 +96,10 @@ class slsReceiver : private virtual slsReceiverDefs {
* version is the version number of this structure format * version is the version number of this structure format
* dataPointer is the pointer to the data * 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
* fileDescriptor is the file descriptor
*/ */
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, 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); char*, uint32_t, void*),void *arg);
private: private:

View File

@ -66,8 +66,7 @@ class slsReceiverTCPIPInterface : private virtual slsReceiverDefs {
* *
* return value is * return value is
* 0 callback takes care of open,close,wrie file * 0 callback takes care of open,close,wrie file
* 1 callback writes file, we have to open, close it * 1 we open, close, write file, callback does not do anything
* 2 we open, close, write file, callback does not do anything
*/ */
void registerCallBackStartAcquisition(int (*func)(char*, char*, uint64_t, uint32_t, void*),void *arg); void registerCallBackStartAcquisition(int (*func)(char*, char*, uint64_t, uint32_t, void*),void *arg);
@ -96,11 +95,9 @@ class slsReceiverTCPIPInterface : private virtual slsReceiverDefs {
* version is the version number of this structure format * version is the version number of this structure format
* dataPointer is the pointer to the data * 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
* fileDescriptor is the file descriptor
*/ */
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, 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); char*, uint32_t, void*),void *arg);
private: private:
/** /**
@ -311,8 +308,7 @@ private:
* *
* return value is * return value is
* 0 callback takes care of open,close,wrie file * 0 callback takes care of open,close,wrie file
* 1 callback writes file, we have to open, close it * 1 we open, close, write file, callback does not do anything
* 2 we open, close, write file, callback does not do anything
*/ */
int (*startAcquisitionCallBack)(char*, char*, uint64_t, uint32_t, void*); int (*startAcquisitionCallBack)(char*, char*, uint64_t, uint32_t, void*);
void *pStartAcquisition; void *pStartAcquisition;
@ -344,10 +340,9 @@ private:
* version is the version number of this structure format * version is the version number of this structure format
* dataPointer is the pointer to the data * 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
* fileDescriptor is the file descriptor
*/ */
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, 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*); char*, uint32_t, void*);
void *pRawDataReady; void *pRawDataReady;

View File

@ -51,7 +51,7 @@ public:
@sort register calbback for starting the acquisition @sort register calbback for starting the acquisition
\param func callback to be called when starting the acquisition. Its arguments are filepath, filename, fileindex, datasize \param func callback to be called when starting the acquisition. Its arguments are filepath, filename, fileindex, datasize
\returns 0 callback takes care of open,close,write file; 1 callback writes file, we have to open, close it; 2 we open, close, write file, callback does not do anything \returns 0 callback takes care of open,close,write file; 1 we open, close, write file, callback does not do anything
*/ */
void registerCallBackStartAcquisition(int (*func)(char* filepath, char* filename, uint64_t fileindex, uint32_t datasize, void*),void *arg); void registerCallBackStartAcquisition(int (*func)(char* filepath, char* filename, uint64_t fileindex, uint32_t datasize, void*),void *arg);
@ -67,12 +67,12 @@ public:
/** /**
@sort register callback to be called when data are available (to process and/or save the data). @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, dataSize, fileDescriptor \param func raw data ready callback. arguments are frameNumber, expLength, packetNumber, bunchId, timestamp, modId, xCoord, yCoord, zCoord, debug, roundRNumber, detType, version, dataPointer, dataSize
\returns nothing \returns nothing
*/ */
void registerCallBackRawDataReady(void (*func)(uint64_t frameNumber, uint32_t expLength, uint32_t packetNumber, uint64_t bunchId, uint64_t timestamp, 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, 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); char* datapointer, uint32_t datasize, void*),void *arg);
//receiver object //receiver object
slsReceiver* receiver; slsReceiver* receiver;

View File

@ -552,7 +552,7 @@ void UDPBaseImplementation::registerCallBackAcquisitionFinished(void (*func)(uin
} }
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, 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){ char*, uint32_t, void*),void *arg){
rawDataReadyCallBack=func; rawDataReadyCallBack=func;
pRawDataReady=arg; pRawDataReady=arg;
} }

View File

@ -180,7 +180,7 @@ 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, 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){ char*, uint32_t, void*),void *arg){
//tcpipInterface //tcpipInterface
if(udp_interface) if(udp_interface)
udp_interface->registerCallBackRawDataReady(func,arg); udp_interface->registerCallBackRawDataReady(func,arg);

View File

@ -2691,7 +2691,7 @@ void slsReceiverTCPIPInterface::registerCallBackAcquisitionFinished(void (*func)
} }
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, 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){ char*, uint32_t, void*),void *arg){
rawDataReadyCallBack=func; rawDataReadyCallBack=func;
pRawDataReady=arg; pRawDataReady=arg;
} }

View File

@ -17,7 +17,6 @@ void slsReceiverUsers::stop() {
receiver->stop(); receiver->stop();
} }
void slsReceiverUsers::closeFile(int p) { void slsReceiverUsers::closeFile(int p) {
receiver->closeFile(p); receiver->closeFile(p);
} }
@ -26,7 +25,6 @@ int64_t slsReceiverUsers::getReceiverVersion(){
return receiver->getReceiverVersion(); return receiver->getReceiverVersion();
} }
void slsReceiverUsers::registerCallBackStartAcquisition(int (*func)(char*, char*, uint64_t, uint32_t, void*),void *arg){ void slsReceiverUsers::registerCallBackStartAcquisition(int (*func)(char*, char*, uint64_t, uint32_t, void*),void *arg){
receiver->registerCallBackStartAcquisition(func,arg); receiver->registerCallBackStartAcquisition(func,arg);
} }
@ -37,7 +35,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, 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, 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){ char* datapointer, uint32_t datasize, void*), void *arg){
receiver->registerCallBackRawDataReady(func,arg); receiver->registerCallBackRawDataReady(func,arg);
} }