mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-22 22:40:02 +02:00
merged from 2.3 without udpstandard
This commit is contained in:
commit
bb52676f50
@ -1,9 +1,9 @@
|
||||
Path: slsDetectorsPackage/slsReceiverSoftware
|
||||
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
|
||||
Repsitory UUID: d3951bb7497e1de9feb70a03706c442324bc4323
|
||||
Revision: 529
|
||||
Branch: hdf5
|
||||
Repsitory UUID: 9f0ea629975864abb9bb3fd9f59c1d9188e0f3d1
|
||||
Revision: 512
|
||||
Branch: 2.3
|
||||
Last Changed Author: Dhanya_Maliakal
|
||||
Last Changed Rev: 529
|
||||
Last Changed Date: 2017-03-03 09:06:49 +0100
|
||||
Last Changed Rev: 512
|
||||
Last Changed Date: 2017-03-23 15:17:21 +0100
|
||||
|
@ -520,8 +520,7 @@ class UDPBaseImplementation : protected virtual slsReceiverDefs, public UDPInter
|
||||
*
|
||||
* return value is
|
||||
* 0 callback takes care of open,close,wrie file
|
||||
* 1 callback writes file, we have to open, close it
|
||||
* 2 we open, close, write file, callback does not do anything
|
||||
* 1 we open, close, write file, callback does not do anything
|
||||
*/
|
||||
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
|
||||
* 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)(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
|
||||
* 0 callback takes care of open,close,wrie file
|
||||
* 1 callback writes file, we have to open, close it
|
||||
* 2 we open, close, write file, callback does not do anything
|
||||
* 1 we open, close, write file, callback does not do anything
|
||||
*/
|
||||
int (*startAcquisitionCallBack)(char*, char*, uint64_t, uint32_t, void*);
|
||||
void *pStartAcquisition;
|
||||
@ -676,12 +674,13 @@ class UDPBaseImplementation : protected virtual slsReceiverDefs, public UDPInter
|
||||
* 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)(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;
|
||||
|
||||
private:
|
||||
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
|
@ -578,9 +578,8 @@ class UDPInterface {
|
||||
* datasize
|
||||
*
|
||||
* return value is
|
||||
* 0 callback takes care of open,close,wrie file
|
||||
* 1 callback writes file, we have to open, close it
|
||||
* 2 we open, close, write file, callback does not do anything
|
||||
* 0 callback takes care of open,close,write file
|
||||
* 1 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;
|
||||
|
||||
@ -609,10 +608,9 @@ class UDPInterface {
|
||||
* 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)(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:
|
||||
|
@ -240,6 +240,7 @@ private:
|
||||
* Verifies if the callbacks are registered for the callback variable
|
||||
* @returns OK or FAIL
|
||||
*/
|
||||
|
||||
int VerifyCallBackAction();
|
||||
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
//#define SVNPATH ""
|
||||
#define SVNURL "git@git.psi.ch:sls_detectors_software/sls_receiver_software.git"
|
||||
//#define SVNREPPATH ""
|
||||
#define SVNREPUUID "d3951bb7497e1de9feb70a03706c442324bc4323"
|
||||
//#define SVNREV 0x529
|
||||
#define SVNREPUUID "9f0ea629975864abb9bb3fd9f59c1d9188e0f3d1"
|
||||
//#define SVNREV 0x512
|
||||
//#define SVNKIND ""
|
||||
//#define SVNSCHED ""
|
||||
#define SVNAUTH "Dhanya_Maliakal"
|
||||
#define SVNREV 0x529
|
||||
#define SVNDATE 0x20170303
|
||||
#define SVNREV 0x512
|
||||
#define SVNDATE 0x20170323
|
||||
//
|
||||
|
@ -9,21 +9,18 @@
|
||||
#define RECEIVE_SOCKET_BUFFER_SIZE (100*1024*1024)
|
||||
#define MAX_SOCKET_INPUT_PACKET_QUEUE 250000
|
||||
|
||||
|
||||
//files
|
||||
#define DO_NOTHING 0
|
||||
#define CREATE_FILES 1
|
||||
#define DO_EVERYTHING 2
|
||||
#define DO_EVERYTHING 1
|
||||
|
||||
//binary file/ fifo
|
||||
|
||||
//#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
|
||||
//binary
|
||||
#define FILE_BUFFER_SIZE (16*1024*1024) //16mb
|
||||
|
||||
//fifo
|
||||
#define FIFO_HEADER_NUMBYTES 4
|
||||
|
||||
|
||||
//hdf5
|
||||
#define MAX_CHUNKED_IMAGES 1
|
||||
|
||||
|
@ -67,8 +67,7 @@ class slsReceiver : private virtual slsReceiverDefs {
|
||||
*
|
||||
* return value is
|
||||
* 0 callback takes care of open,close,wrie file
|
||||
* 1 callback writes file, we have to open, close it
|
||||
* 2 we open, close, write file, callback does not do anything
|
||||
* 1 we open, close, write file, callback does not do anything
|
||||
*/
|
||||
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
|
||||
* 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)(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:
|
||||
|
@ -66,8 +66,7 @@ class slsReceiverTCPIPInterface : private virtual slsReceiverDefs {
|
||||
*
|
||||
* return value is
|
||||
* 0 callback takes care of open,close,wrie file
|
||||
* 1 callback writes file, we have to open, close it
|
||||
* 2 we open, close, write file, callback does not do anything
|
||||
* 1 we open, close, write file, callback does not do anything
|
||||
*/
|
||||
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
|
||||
* 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)(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:
|
||||
|
||||
/**
|
||||
@ -311,8 +308,7 @@ private:
|
||||
*
|
||||
* return value is
|
||||
* 0 callback takes care of open,close,wrie file
|
||||
* 1 callback writes file, we have to open, close it
|
||||
* 2 we open, close, write file, callback does not do anything
|
||||
* 1 we open, close, write file, callback does not do anything
|
||||
*/
|
||||
int (*startAcquisitionCallBack)(char*, char*, uint64_t, uint32_t, void*);
|
||||
void *pStartAcquisition;
|
||||
@ -344,10 +340,9 @@ private:
|
||||
* 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)(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;
|
||||
|
||||
|
||||
|
@ -51,7 +51,7 @@ public:
|
||||
|
||||
@sort register calbback for starting the acquisition
|
||||
\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);
|
||||
|
||||
@ -67,12 +67,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 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
|
||||
*/
|
||||
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);
|
||||
char* datapointer, uint32_t datasize, void*),void *arg);
|
||||
|
||||
//receiver object
|
||||
slsReceiver* receiver;
|
||||
|
@ -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,
|
||||
char*, uint32_t, FILE*, void*),void *arg){
|
||||
char*, uint32_t, void*),void *arg){
|
||||
rawDataReadyCallBack=func;
|
||||
pRawDataReady=arg;
|
||||
}
|
||||
|
@ -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,
|
||||
char*, uint32_t, FILE*, void*),void *arg){
|
||||
char*, uint32_t, void*),void *arg){
|
||||
//tcpipInterface
|
||||
if(udp_interface)
|
||||
udp_interface->registerCallBackRawDataReady(func,arg);
|
||||
|
@ -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,
|
||||
char*, uint32_t, FILE*, void*),void *arg){
|
||||
char*, uint32_t, void*),void *arg){
|
||||
rawDataReadyCallBack=func;
|
||||
pRawDataReady=arg;
|
||||
}
|
||||
|
@ -17,7 +17,6 @@ void slsReceiverUsers::stop() {
|
||||
receiver->stop();
|
||||
}
|
||||
|
||||
|
||||
void slsReceiverUsers::closeFile(int p) {
|
||||
receiver->closeFile(p);
|
||||
}
|
||||
@ -26,7 +25,6 @@ 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);
|
||||
}
|
||||
@ -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,
|
||||
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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user