slsReceiver now uses the slsReceiverUsers class

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@501 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
bergamaschi 2013-04-04 09:46:16 +00:00
parent 4a133d8f6e
commit 34a2f92cb4
10 changed files with 22 additions and 20 deletions

View File

@ -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

View File

@ -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;

View File

@ -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++;

View File

@ -1 +1 @@
/afs/psi.ch/project/mythen/newMythenSoftware/slsDetectorSoftware/commonFiles/communication_funcs.c
../commonFiles/communication_funcs.c

View File

@ -1 +1 @@
/afs/psi.ch/project/mythen/newMythenSoftware/slsDetectorSoftware/commonFiles/communication_funcs.h
../commonFiles/communication_funcs.h

View File

@ -1 +1 @@
/afs/psi.ch/project/mythen/newMythenSoftware/slsDetectorSoftware/commonFiles/sls_detector_defs.h
../commonFiles/sls_detector_defs.h

View File

@ -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

View File

@ -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 <signal.h> //SIGINT
@ -14,14 +14,14 @@ using namespace std;
void closeFile(int p){
cout<<"close file in receiver"<<endl;
slsReceiverFuncs::closeFile(p);
slsReceiverUsers::closeFile(p);
exit(0);
}
int main(int argc, char *argv[]) {
int ret = slsDetectorDefs::OK;
slsReceiverFuncs *receiver = new slsReceiverFuncs(argc, argv, ret);
slsReceiverUsers *receiver = new slsReceiverUsers(argc, argv, ret);
if(ret==slsDetectorDefs::FAIL)
return -1;

View File

@ -19,12 +19,14 @@ void slsReceiverUsers::closeFile(int p) {
}
void slsReceiverUsers::registerCallBackStartAcquisition(int (*func)(char*, char*,int, int, void*),void *arg){slsReceiverList->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

View File

@ -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: