moved all the common header files from receiverSoftware to commonFiles

This commit is contained in:
maliakal_d 2018-10-02 16:32:37 +02:00
parent 757bc89d05
commit 100c1b81f8
56 changed files with 50 additions and 64 deletions

View File

@ -1,19 +1,22 @@
#pragma once
#include "utilities.h"
#include "logger.h"
#include "sls_receiver_defs.h"
#include <iostream> #include <iostream>
#include <string> #include <string>
#include <sstream> #include <sstream>
#include <iostream> #include <iostream>
#include <stdio.h>
#include <fstream>
#include <map> #include <map>
#include <fstream>
#include "utilities.h" #include <stdio.h>
#include "logger.h"
int read_config_file(std::string fname, int *tcpip_port_no, std::map<std::string, std::string> * configuration_map ){
int read_config_file(std::string fname, int *tcpip_port_no, std::map<std::string, std::string> * configuration_map) {
std::ifstream infile; std::ifstream infile;
std::string sLine,sargname, sargvalue; std::string sLine,sargname, sargvalue;
@ -74,7 +77,5 @@ int read_config_file(std::string fname, int *tcpip_port_no, std::map<std::string
return success; return success;
} }
}

View File

@ -3,7 +3,7 @@ set(SOURCES
) )
include_directories( include_directories(
../../slsReceiverSoftware/include ../../commonFiles/include
../../slsDetectorSoftware/slsDetectorAnalysis ../../slsDetectorSoftware/slsDetectorAnalysis
../../build/bin ../../build/bin
../../slsdetectorSoftware/slsDetector ../../slsdetectorSoftware/slsDetector

View File

@ -1,9 +1,9 @@
PKGDIR = ../.. PKGDIR = ../..
LIBDIR = $(PKGDIR)/build/bin LIBDIR = $(PKGDIR)/build/bin
INCLUDES = -I . -I$(PKGDIR)/slsReceiverSoftware/include -I$(PKGDIR)/slsDetectorSoftware/slsDetectorAnalysis -I$(LIBDIR) -I$(PKGDIR)/slsDetectorSoftware/slsDetector INCLUDES = -I . -I$(PKGDIR)/commonFiles -I$(PKGDIR)/slsDetectorSoftware/slsDetectorAnalysis -I$(LIBDIR) -I$(PKGDIR)/slsDetectorSoftware/slsDetector
SRC_DET = mainClient.cpp SRC_DET = mainClient.cpp
SRC_REC = mainReceiver.cpp SRC_REC = mainReceiver.cpp
ZMQLIBDIR = $(PKGDIR)/slsReceiverSoftware/include ZMQLIBDIR = $(PKGDIR)/commonFiles
LDFLAG_DET = -I. -L$(LIBDIR) -Wl,-rpath=$(LIBDIR) -lSlsDetector -L/usr/lib64/ -pthread -lrt -L$(ZMQLIBDIR) -Wl,-rpath=$(ZMQLIBDIR) -lzmq LDFLAG_DET = -I. -L$(LIBDIR) -Wl,-rpath=$(LIBDIR) -lSlsDetector -L/usr/lib64/ -pthread -lrt -L$(ZMQLIBDIR) -Wl,-rpath=$(ZMQLIBDIR) -lzmq
LDFLAG_REC = -I. -L$(LIBDIR) -Wl,-rpath=$(LIBDIR) -lSlsReceiver -L/usr/lib64/ -pthread -lrt -L$(ZMQLIBDIR) -Wl,-rpath=$(ZMQLIBDIR) -lzmq LDFLAG_REC = -I. -L$(LIBDIR) -Wl,-rpath=$(LIBDIR) -lSlsReceiver -L/usr/lib64/ -pthread -lrt -L$(ZMQLIBDIR) -Wl,-rpath=$(ZMQLIBDIR) -lzmq
DESTDIR ?= ../docs DESTDIR ?= ../docs

View File

@ -25,8 +25,6 @@ slsDetectorCommand
slsDetectorAnalysis slsDetectorAnalysis
slsReceiverInterface slsReceiverInterface
threadFiles threadFiles
../slsReceiverSoftware/include
../slsReceiverSoftware/MySocketTCP
) )
add_definitions( add_definitions(
@ -49,7 +47,7 @@ add_library(slsDetectorShared SHARED
add_library(zmq STATIC IMPORTED GLOBAL) add_library(zmq STATIC IMPORTED GLOBAL)
set(ZMQ_STATIC_ARCHIVE ${CMAKE_CURRENT_SOURCE_DIR}/../slsReceiverSoftware/include/libzmq.a) set(ZMQ_STATIC_ARCHIVE ${CMAKE_CURRENT_SOURCE_DIR}/../commonFiles/libzmq.a)
set_target_properties(zmq PROPERTIES set_target_properties(zmq PROPERTIES
IMPORTED_LOCATION ${ZMQ_STATIC_ARCHIVE} IMPORTED_LOCATION ${ZMQ_STATIC_ARCHIVE}
) )
@ -63,6 +61,7 @@ set(PUBLICHEADERS
../commonFiles/sls_detector_funcs.h ../commonFiles/sls_detector_funcs.h
../commonFiles/error_defs.h ../commonFiles/error_defs.h
../commonFiles/versionAPI.h ../commonFiles/versionAPI.h
../commonFiles/sls_receiver_exceptions.h
sharedMemory/SharedMemory.h sharedMemory/SharedMemory.h
slsDetector/slsDetectorUtils.h slsDetector/slsDetectorUtils.h
slsDetector/slsDetector.h slsDetector/slsDetector.h
@ -72,7 +71,6 @@ set(PUBLICHEADERS
slsDetectorAnalysis/detectorData.h slsDetectorAnalysis/detectorData.h
multiSlsDetector/multiSlsDetector.h multiSlsDetector/multiSlsDetector.h
slsReceiverInterface/receiverInterface.h slsReceiverInterface/receiverInterface.h
../slsReceiverSoftware/include/sls_receiver_exceptions.h
) )
set_target_properties(slsDetectorShared PROPERTIES set_target_properties(slsDetectorShared PROPERTIES
LIBRARY_OUTPUT_NAME SlsDetector LIBRARY_OUTPUT_NAME SlsDetector

View File

@ -13,11 +13,11 @@ INCLUDES?= -I../commonFiles -IslsDetector -I../slsReceiverSoftware/MySocketTCP
#EPICSFLAGS=-D EPICS -I/usr/local/epics/base/include/ -I /usr/local/epics/base/include/os/Linux/ -L /usr/local/epics/base/lib/$(EPICS_HOST_ARCH) -Wl,-R/usr/local/epics/base/lib/$(EPICS_HOST_ARCH) -lca -lCom #EPICSFLAGS=-D EPICS -I/usr/local/epics/base/include/ -I /usr/local/epics/base/include/os/Linux/ -L /usr/local/epics/base/lib/$(EPICS_HOST_ARCH) -Wl,-R/usr/local/epics/base/lib/$(EPICS_HOST_ARCH) -lca -lCom
LIBZMQDIR = ../slsReceiverSoftware/include LIBZMQDIR = ../commonFiles
LIBZMQ = -L$(LIBZMQDIR) -Wl,-rpath=$(LIBZMQDIR) -lzmq LIBZMQ = -L$(LIBZMQDIR) -Wl,-rpath=$(LIBZMQDIR) -lzmq
SRC_CLNT= slsDetector/slsDetectorUtils.cpp slsDetector/slsDetectorCommand.cpp slsDetectorAnalysis/postProcessing.cpp slsDetector/slsDetector.cpp multiSlsDetector/multiSlsDetector.cpp slsReceiverInterface/receiverInterface.cpp slsDetector/slsDetectorUsers.cpp threadFiles/CondVar.cpp threadFiles/Mutex.cpp threadFiles/ThreadPool.cpp sharedMemory/SharedMemory.cpp #../slsReceiverSoftware/MySocketTCP/MySocketTCP.cpp SRC_CLNT= slsDetector/slsDetectorUtils.cpp slsDetector/slsDetectorCommand.cpp slsDetectorAnalysis/postProcessing.cpp slsDetector/slsDetector.cpp multiSlsDetector/multiSlsDetector.cpp slsReceiverInterface/receiverInterface.cpp slsDetector/slsDetectorUsers.cpp threadFiles/CondVar.cpp threadFiles/Mutex.cpp threadFiles/ThreadPool.cpp sharedMemory/SharedMemory.cpp #../slsReceiverSoftware/MySocketTCP/MySocketTCP.cpp
DEPSINCLUDES = $(LIBZMQDIR)/sls_receiver_defs.h $(LIBZMQDIR)/sls_receiver_funcs.h $(LIBZMQDIR)/ansi.h ../commonFiles/sls_detector_defs.h ../commonFiles/sls_detector_funcs.h ../commonFiles/error_defs.h slsDetector/slsDetectorBase.h slsDetectorAnalysis/detectorData.h threadFiles/Global.h threadFiles/Task.h sharedMemory/SharedMemory.h $(LIBZMQDIR)/sls_receiver_exceptions.h ../commonFiles/versionAPI.h DEPSINCLUDES = ../commonFiles/sls_receiver_defs.h ../commonFiles/sls_receiver_funcs.h ../commonFiles/ansi.h ../commonFiles/sls_detector_defs.h ../commonFiles/sls_detector_funcs.h ../commonFiles/error_defs.h slsDetector/slsDetectorBase.h slsDetectorAnalysis/detectorData.h threadFiles/Global.h threadFiles/Task.h sharedMemory/SharedMemory.h ../commonFiles/sls_receiver_exceptions.h ../commonFiles/versionAPI.h

View File

@ -80,10 +80,18 @@ LATEX_HIDE_INDICES = YES
PREDEFINED = __cplusplus PREDEFINED = __cplusplus
INPUT = ../commonfiles/communication_funcs.h \ INPUT = ../commonfiles/communication_funcs.h \
../commonfiles/error_defs.h \ ../commonfiles/error_defs.h \
../commonfiles/sls_detector_defs.h \ ../commonfiles/sls_detector_defs.h \
../commonfiles/sls_detector_funcs.h \ ../commonfiles/sls_detector_funcs.h \
../commonfiles/ansi.h \
../commonfiles/include/genericSocket.h \
../commonfiles/include/logger.h \
../commonfiles/include/MySocketTCP.h \
../commonfiles/include/sls_receiver_defs.h \
../commonfiles/include/sls_receiver_funcs.h \
../commonfiles/include/utilities.h \
../commonfiles/include/ZmqSocket.h \
multiSlsDetector/multiSlsDetectorClient.h \ multiSlsDetector/multiSlsDetectorClient.h \
multiSlsDetector/multiSlsDetectorCommand.h \ multiSlsDetector/multiSlsDetectorCommand.h \
multiSlsDetector/multiSlsDetector.h \ multiSlsDetector/multiSlsDetector.h \
@ -102,7 +110,6 @@ INPUT = ../commonfiles/communication_funcs.h \
threadFiles/Single.h \ threadFiles/Single.h \
threadFiles/Task.h \ threadFiles/Task.h \
threadFiles/ThreadPool.h \ threadFiles/ThreadPool.h \
../slsReceiverSoftware/include/ansi.h \
../slsReceiverSoftware/include/BinaryFile.h \ ../slsReceiverSoftware/include/BinaryFile.h \
../slsReceiverSoftware/include/BinaryFileStatic.h \ ../slsReceiverSoftware/include/BinaryFileStatic.h \
../slsReceiverSoftware/include/circularFifo.h \ ../slsReceiverSoftware/include/circularFifo.h \
@ -111,24 +118,18 @@ INPUT = ../commonfiles/communication_funcs.h \
../slsReceiverSoftware/include/Fifo.h \ ../slsReceiverSoftware/include/Fifo.h \
../slsReceiverSoftware/include/File.h \ ../slsReceiverSoftware/include/File.h \
../slsReceiverSoftware/include/GeneralData.h \ ../slsReceiverSoftware/include/GeneralData.h \
../slsReceiverSoftware/include/genericSocket.h \
../slsReceiverSoftware/include/HDF5File.h \ ../slsReceiverSoftware/include/HDF5File.h \
../slsReceiverSoftware/include/HDF5FileStatic.h \ ../slsReceiverSoftware/include/HDF5FileStatic.h \
../slsReceiverSoftware/include/Listener.h \ ../slsReceiverSoftware/include/Listener.h \
../slsReceiverSoftware/include/logger.h \
../slsReceiverSoftware/include/MySocketTCP.h \
../slsReceiverSoftware/include/receiver_defs.h \ ../slsReceiverSoftware/include/receiver_defs.h \
../slsReceiverSoftware/include/sls_receiver_defs.h \
../slsReceiverSoftware/include/sls_receiver_funcs.h \
../slsReceiverSoftware/include/slsReceiver.h \ ../slsReceiverSoftware/include/slsReceiver.h \
../slsReceiverSoftware/include/slsReceiverTCPIPInterface.h \ ../slsReceiverSoftware/include/slsReceiverTCPIPInterface.h \
../slsReceiverSoftware/include/slsReceiverUsers.h \ ../slsReceiverSoftware/include/slsReceiverUsers.h \
../slsReceiverSoftware/include/ThreadObject.h \ ../slsReceiverSoftware/include/ThreadObject.h \
../slsReceiverSoftware/include/UDPBaseImplementation.h \ ../slsReceiverSoftware/include/UDPBaseImplementation.h \
../slsReceiverSoftware/include/UDPInterface.h \ ../slsReceiverSoftware/include/UDPInterface.h \
../slsReceiverSoftware/include/UDPStandardImplementation.h \ ../slsReceiverSoftware/include/UDPStandardImplementation.h
../slsReceiverSoftware/include/utilities.h \
../slsReceiverSoftware/include/ZmqSocket.h

View File

@ -39,11 +39,12 @@ add_definitions(
include_directories( include_directories(
include include
../commonFiles
) )
add_library(zmq STATIC IMPORTED GLOBAL) add_library(zmq STATIC IMPORTED GLOBAL)
set(ZMQ_STATIC_ARCHIVE ${CMAKE_CURRENT_SOURCE_DIR}/include/libzmq.a) set(ZMQ_STATIC_ARCHIVE ${CMAKE_CURRENT_SOURCE_DIR}/../commonFiles/libzmq.a)
set_target_properties(zmq PROPERTIES set_target_properties(zmq PROPERTIES
IMPORTED_LOCATION ${ZMQ_STATIC_ARCHIVE} IMPORTED_LOCATION ${ZMQ_STATIC_ARCHIVE}
) )
@ -63,13 +64,13 @@ add_library(slsReceiverShared SHARED
) )
set(PUBLICHEADERS set(PUBLICHEADERS
include/sls_receiver_defs.h ../commonfiles/sls_receiver_defs.h
include/ansi.h ../commonfiles/ansi.h
include/sls_receiver_funcs.h ../commonfiles/sls_receiver_funcs.h
include/MySocketTCP.h ../commonfiles/MySocketTCP.h
include/genericSocket.h ../commonfiles/genericSocket.h
include/logger.h ../commonfiles/logger.h
include/sls_receiver_exceptions.h ../commonfiles/sls_receiver_exceptions.h
) )

View File

@ -5,6 +5,7 @@ LIBDIR ?= ../bin
DOCDIR ?= docs DOCDIR ?= docs
SRCDIR = src SRCDIR = src
INCDIR = include INCDIR = include
COMMONDIR = ../commonFiles
TESTDIR = test TESTDIR = test
BUILDDIR = build BUILDDIR = build
PROGS = $(DESTDIR)/slsReceiver PROGS = $(DESTDIR)/slsReceiver
@ -15,18 +16,18 @@ CFLAGS= -g -DC_ONLY -fPIC
DFLAGS= -g -DDACS_INT -DSLS_RECEIVER_UDP_FUNCTIONS #-DVERBOSE DFLAGS= -g -DDACS_INT -DSLS_RECEIVER_UDP_FUNCTIONS #-DVERBOSE
INCLUDES?= $(INCLUDESRXR) -I include/ INCLUDES?= $(INCLUDESRXR) -I $(INCDIR) -I $(COMMONDIR)
############################################################## ##############################################################
# ZMQ specific: in this case, you need ZMQ libraries already included in this package # ZMQ specific: in this case, you need ZMQ libraries already included in this package
########################################################### ###########################################################
LIBZMQDIR = include LIBZMQDIR = ../commonFiles
LIBZMQ = -L$(LIBZMQDIR) -Wl,-rpath=$(LIBZMQDIR) -lzmq LIBZMQ = -L$(LIBZMQDIR) -Wl,-rpath=$(LIBZMQDIR) -lzmq
SRC_CLNT = MySocketTCP.cpp ThreadObject.cpp Listener.cpp DataProcessor.cpp DataStreamer.cpp Fifo.cpp File.cpp BinaryFile.cpp UDPInterface.cpp UDPBaseImplementation.cpp UDPStandardImplementation.cpp slsReceiverTCPIPInterface.cpp slsReceiver.cpp slsReceiverUsers.cpp utilities.cpp SRC_CLNT = MySocketTCP.cpp ThreadObject.cpp Listener.cpp DataProcessor.cpp DataStreamer.cpp Fifo.cpp File.cpp BinaryFile.cpp UDPInterface.cpp UDPBaseImplementation.cpp UDPStandardImplementation.cpp slsReceiverTCPIPInterface.cpp slsReceiver.cpp slsReceiverUsers.cpp utilities.cpp
DEPSINCLUDES = $(INCDIR)/ansi.h $(INCDIR)/sls_receiver_defs.h $(INCDIR)/sls_receiver_funcs.h $(INCDIR)/GeneralData.h $(INCDIR)/circularFifo.h $(INCDIR)/genericSocket.h $(INCDIR)/logger.h $(INCDIR)/receiver_defs.h $(INCDIR)/UDPInterface.h $(INCDIR)/utilities.h $(INCDIR)/ZmqSocket.h $(INCDIR)/BinaryFileStatic.h $(INCDIR)/HDF5FileStatic.h $(INCDIR)/sls_receiver_exceptions.h DEPSINCLUDES = $(COMMONDIR)/ansi.h $(COMMONDIR)/sls_receiver_defs.h $(COMMONDIR)/sls_receiver_funcs.h $(COMMONDIR)/GeneralData.h $(INCDIR)/circularFifo.h $(COMMONDIR)/genericSocket.h $(COMMONDIR)/logger.h $(INCDIR)/receiver_defs.h $(INCDIR)/UDPInterface.h $(COMMONDIR)/utilities.h $(COMMONDIR)/ZmqSocket.h $(INCDIR)/BinaryFileStatic.h $(INCDIR)/HDF5FileStatic.h $(COMMONDIR)/sls_receiver_exceptions.h
ifeq ($(HDF5),yes) ifeq ($(HDF5),yes)
@ -54,7 +55,7 @@ dummy: $(DESTDIR)/dummyReceiver
intdoc: $(SRC_H) $(SRC_CLNT) intdoc: $(SRC_H) $(SRC_CLNT)
doxygen doxy.config doxygen doxy.config
$(BUILDDIR)/%.o : $(SRCDIR)/%.cpp $(INCDIR)/%.h $(DEPSINCLUDES) Makefile $(BUILDDIR)/%.o : $(SRCDIR)/%.cpp $(INCDIR)/%.h $(COMMONDIR)/%.h $(DEPSINCLUDES) Makefile
ifeq ($(ROOTSLS),yes) ifeq ($(ROOTSLS),yes)
$(CXX) -DROOTSLS -o $@ -c $< $(INCLUDES) $(DFLAGS) $(ROOTFLAGS) -fPIC $(EPICSFLAGS) $(LDFLAGRXR) -L/usr/lib64/ $(FLAGS) $(CXX) -DROOTSLS -o $@ -c $< $(INCLUDES) $(DFLAGS) $(ROOTFLAGS) -fPIC $(EPICSFLAGS) $(LDFLAGRXR) -L/usr/lib64/ $(FLAGS)
else else

View File

@ -1,15 +0,0 @@
#pragma once
#include <iostream>
#include <string>
#include <sstream>
#include <iostream>
#include <map>
#include "sls_receiver_defs.h"
/* uncomment next line to enable debug output */
//#define EIGER_DEBUG
int read_config_file(std::string fname, int *tcpip_port_no, std::map<std::string, std::string> * configuration_map);

View File

@ -1 +0,0 @@
../../slsDetectorSoftware/commonFiles/versionAPI.h