diff --git a/slsDetectorSoftware/Makefile b/slsDetectorSoftware/Makefile index 3769c89d4..7a31e0f86 100644 --- a/slsDetectorSoftware/Makefile +++ b/slsDetectorSoftware/Makefile @@ -5,17 +5,17 @@ DFLAGS= -DDACS_INT -DTHIS_PATH='"$(shell pwd)"' #ASM=$(shell echo "/lib/modules/`uname -r`/build/include") -INCLUDES?= -IcommonFiles -IslsDetector -IMySocketTCP -IusersFunctions -ImultiSlsDetector -IslsDetectorUtils -IslsDetectorCommand -IslsDetectorAnalysis -IslsReceiverInterface -I$(ASM) +INCLUDES?= -IcommonFiles -IslsDetector -IMySocketTCP -IusersFunctions -ImultiSlsDetector -IslsDetectorUtils -IslsDetectorCommand -IslsDetectorAnalysis -IslsReceiverInterface -IslsReceiver -I$(ASM) #EPICSFLAGS=-D EPICS -I/usr/local/epics/base/include/ -I /usr/local/epics/base/include/os/Linux/ -L /usr/local/epics/base/lib/SL5-x86/ -Wl,-R/usr/local/epics/base/lib/SL5-x86 -lca -lCom CC=g++ -SRC_CLNT= slsDetectorAnalysis/fileIO.cpp MySocketTCP/MySocketTCP.cpp usersFunctions/usersFunctions.cpp slsDetector/slsDetectorUtils.cpp slsDetector/slsDetectorCommand.cpp slsDetectorAnalysis/angularConversion.cpp slsDetectorAnalysis/angularConversionStatic.cpp slsDetectorAnalysis/energyConversion.cpp slsDetector/slsDetectorActions.cpp slsDetectorAnalysis/postProcessing.cpp slsDetector/slsDetector.cpp multiSlsDetector/multiSlsDetector.cpp slsDetector/slsDetectorUsers.cpp slsDetectorAnalysis/postProcessingFuncs.cpp slsReceiverInterface/receiverInterface.cpp +SRC_CLNT= slsDetectorAnalysis/fileIO.cpp MySocketTCP/MySocketTCP.cpp usersFunctions/usersFunctions.cpp slsDetector/slsDetectorUtils.cpp slsDetector/slsDetectorCommand.cpp slsDetectorAnalysis/angularConversion.cpp slsDetectorAnalysis/angularConversionStatic.cpp slsDetectorAnalysis/energyConversion.cpp slsDetector/slsDetectorActions.cpp slsDetectorAnalysis/postProcessing.cpp slsDetector/slsDetector.cpp multiSlsDetector/multiSlsDetector.cpp slsDetector/slsDetectorUsers.cpp slsDetectorAnalysis/postProcessingFuncs.cpp slsReceiverInterface/receiverInterface.cpp slsReceiver/slsReceiverFunctionList.cpp slsReceiver/slsReceiver_funcs.cpp slsReceiver/slsReceiverUsers.cpp OBJS = $(SRC_CLNT:.cpp=.o) -HEADERS = $(SRC_CLNT:.cpp=.h) commonFiles/sls_detector_defs.h slsDetectorAnalysis/detectorData.h slsDetector/slsDetectorBase.h multiSlsDetector/multiSlsDetectorCommand.h slsDetectorAnalysis/enCalLogClass.h slsDetectorAnalysis/angCalLogClass.h slsDetectorAnalysis/angleConversionConstant.h usersFunctions/angleFunction.h slsReceiverInterface/receiverInterface.h slsDetector/svnInfoLib.h +HEADERS = $(SRC_CLNT:.cpp=.h) commonFiles/sls_detector_defs.h slsDetectorAnalysis/detectorData.h slsDetector/slsDetectorBase.h multiSlsDetector/multiSlsDetectorCommand.h slsDetectorAnalysis/enCalLogClass.h slsDetectorAnalysis/angCalLogClass.h slsDetectorAnalysis/angleConversionConstant.h usersFunctions/angleFunction.h slsReceiverInterface/receiverInterface.h slsDetector/svnInfoLib.h slsReceiver/circularFifo.h slsReceiver/slsReceiver_funcs.h slsReceiver/svnInfoReceiverTmp.h slsReceiver/receiver_defs.h slsReceiver/slsReceiverFunctionList.h slsReceiver/slsReceiverUsers.h slsReceiver/svnInfoReceiver.h diff --git a/slsDetectorSoftware/commonFiles/communication_funcs.c b/slsDetectorSoftware/commonFiles/communication_funcs.c index d5098bd05..f1031d734 100755 --- a/slsDetectorSoftware/commonFiles/communication_funcs.c +++ b/slsDetectorSoftware/commonFiles/communication_funcs.c @@ -432,8 +432,9 @@ int receiveModule(int file_des, sls_detector_module* myMod) { int nChans, nchanold=myMod->nchan, nchandiff; int nDacs, ndold=myMod->ndac, ndacdiff; int nAdcs, naold=myMod->nadc, nadcdiff; - // int id=0; - +#ifdef VERBOSE + int id=0; +#endif ts+= receiveDataOnly(file_des,myMod,sizeof(sls_detector_module)); myMod->dacs=dacptr; diff --git a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp index 4d84da743..21549e26d 100644 --- a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp +++ b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp @@ -95,6 +95,8 @@ int multiSlsDetector::initSharedMemory(int id=0) { multiSlsDetector::multiSlsDetector(int id) : slsDetectorUtils(), shmId(-1) { + + cout << "Contrustor" << endl; while (shmId<0) { shmId=initSharedMemory(id); id++; diff --git a/slsDetectorSoftware/mythenDetectorServer/communication_funcs.c b/slsDetectorSoftware/mythenDetectorServer/communication_funcs.c index 60b494ec5..87a4f95d1 120000 --- a/slsDetectorSoftware/mythenDetectorServer/communication_funcs.c +++ b/slsDetectorSoftware/mythenDetectorServer/communication_funcs.c @@ -1 +1 @@ -/afs/psi.ch/project/mythen/newMythenSoftware/slsDetectorSoftware/commonFiles/communication_funcs.c \ No newline at end of file +../commonFiles/communication_funcs.c \ No newline at end of file diff --git a/slsDetectorSoftware/mythenDetectorServer/communication_funcs.h b/slsDetectorSoftware/mythenDetectorServer/communication_funcs.h index f38b262d6..f220903b2 120000 --- a/slsDetectorSoftware/mythenDetectorServer/communication_funcs.h +++ b/slsDetectorSoftware/mythenDetectorServer/communication_funcs.h @@ -1 +1 @@ -/afs/psi.ch/project/mythen/newMythenSoftware/slsDetectorSoftware/commonFiles/communication_funcs.h \ No newline at end of file +../commonFiles/communication_funcs.h \ No newline at end of file diff --git a/slsDetectorSoftware/mythenDetectorServer/sls_detector_defs.h b/slsDetectorSoftware/mythenDetectorServer/sls_detector_defs.h index 75907fc9e..c5062e03f 120000 --- a/slsDetectorSoftware/mythenDetectorServer/sls_detector_defs.h +++ b/slsDetectorSoftware/mythenDetectorServer/sls_detector_defs.h @@ -1 +1 @@ -/afs/psi.ch/project/mythen/newMythenSoftware/slsDetectorSoftware/commonFiles/sls_detector_defs.h \ No newline at end of file +../commonFiles/sls_detector_defs.h \ No newline at end of file diff --git a/slsDetectorSoftware/slsReceiver/Makefile b/slsDetectorSoftware/slsReceiver/Makefile index 1887007fd..8fe4a34d5 100644 --- a/slsDetectorSoftware/slsReceiver/Makefile +++ b/slsDetectorSoftware/slsReceiver/Makefile @@ -3,7 +3,7 @@ CLAGS += -DSLS_RECEIVER_FUNCTION_LIST -DGOTTHARDD #-DUHRIXCALLBACK #-DTESTWR LDLIBS += -lm -lstdc++ -lpthread INCLUDES = -I ../MySocketTCP -I ../commonFiles -I ../usersFunctions -I ../slsDetectorAnalysis -I . -SRC_CLNT = slsReceiver.cpp ../MySocketTCP/MySocketTCP.cpp slsReceiver_funcs.cpp UHRIXCallback.cpp slsReceiverFunctionList.cpp ../usersFunctions/usersFunctions.cpp +SRC_CLNT = slsReceiver.cpp ../MySocketTCP/MySocketTCP.cpp slsReceiver_funcs.cpp UHRIXCallback.cpp slsReceiverFunctionList.cpp ../usersFunctions/usersFunctions.cpp slsReceiverUsers.cpp PROGS = slsReceiver DESTDIR ?= bin diff --git a/slsDetectorSoftware/slsReceiver/slsReceiver.cpp b/slsDetectorSoftware/slsReceiver/slsReceiver.cpp index 5f8144ed1..157e713e5 100644 --- a/slsDetectorSoftware/slsReceiver/slsReceiver.cpp +++ b/slsDetectorSoftware/slsReceiver/slsReceiver.cpp @@ -2,7 +2,7 @@ The port number is passed as an argument */ #include "sls_detector_defs.h" -#include "slsReceiver_funcs.h" +#include "slsReceiverUsers.h" #include //SIGINT @@ -14,14 +14,14 @@ using namespace std; void closeFile(int p){ cout<<"close file in receiver"<registerCallBackStartAcquisition(func,arg);};; +void slsReceiverUsers::registerCallBackStartAcquisition(int (*func)(char*, char*,int, int, void*),void *arg){ + receiver->registerCallBackStartAcquisition(func,arg); +} int slsReceiverUsers::registerCallBackAcquisitionFinished(void (*func)(int, void*),void *arg){ - receiver->registerCallBackAcquisitionFinished(func,arg); + receiver->registerCallBackAcquisitionFinished(func,arg); } @@ -33,6 +35,3 @@ int slsReceiverUsers::registerCallBackRawDataReady(void (*func)(int, char*, FILE }; - - -#endif diff --git a/slsDetectorSoftware/slsReceiver/slsReceiverUsers.h b/slsDetectorSoftware/slsReceiver/slsReceiverUsers.h index 981a1e51a..08481ceed 100644 --- a/slsDetectorSoftware/slsReceiver/slsReceiverUsers.h +++ b/slsDetectorSoftware/slsReceiver/slsReceiverUsers.h @@ -48,7 +48,7 @@ public: */ - void registerCallBackStartAcquisition(int (*func)(char*, char*,int, int, void*),void *arg){slsReceiverList->registerCallBackStartAcquisition(func,arg);};; + void registerCallBackStartAcquisition(int (*func)(char*, char*,int, int, void*),void *arg); /** @@ -58,7 +58,7 @@ public: */ - int registerCallBackAcquisitionFinished(void (*func)(int, void*),void *arg){slsReceiverList->registerCallBackAcquisitionFinished(func,arg);}; + int registerCallBackAcquisitionFinished(void (*func)(int, void*),void *arg); @@ -70,7 +70,7 @@ public: guidatapointer (NULL, no data required) */ - int registerCallBackRawDataReady(void (*func)(int, char*, FILE*, char*, void*),void *arg){slsReceiverList->registerCallBackRawDataReady(func,arg);}; + int registerCallBackRawDataReady(void (*func)(int, char*, FILE*, char*, void*),void *arg); private: