diff --git a/.cproject b/.cproject index 75372de..4c37262 100644 --- a/.cproject +++ b/.cproject @@ -57,36 +57,28 @@ make - clean true true true - + make all true true true - + make + tests true true true - - make - clean - true - true - true - make - cliever true true @@ -94,6 +86,7 @@ make + clean true true @@ -101,11 +94,36 @@ make + distclean true true true + + make + + all + true + true + true + + + make + + tests + true + true + true + + + make + + clean + true + true + true + diff --git a/ACTK1_3_2/Makefile b/ACTK1_3_2/Makefile index 33af21d..75ffc57 100644 --- a/ACTK1_3_2/Makefile +++ b/ACTK1_3_2/Makefile @@ -48,7 +48,7 @@ test_execs = $(subst .o,,$(test_objs)) calc_deps = \ $(CC) -MT '$(build_obj_dir)/$(basename $(notdir $@)).o $@' -MF $@ -MM $(CPPFLAGS) $(INCLUDE_DIR) $< -all: dirs $(objs) $(BUILD_LIB_DIR)/libAusRegEPPTK.so +all: dirs $(objs) $(BUILD_LIB_DIR)/libACTK1_3_2.so %.d: %.c $(calc_deps) @@ -78,7 +78,7 @@ $(BUILD_OBJ_DIR)/%.o: %.c $(CC) $(CPPFLAGS) -c -o $@ $(INCLUDE_DIR) $< -LDFLAGS_TESTS = -L$(BUILD_LIB_DIR) -lAusRegEPPTK \ +LDFLAGS_TESTS = -L$(BUILD_LIB_DIR) -lACTK1_3_2 \ -L$(XALAN_LIB_DIR) -lxalan-c -lxalanMsg\ -L$(XERCES_LIB_DIR) -lxerces-c \ -lssl \ @@ -90,7 +90,7 @@ $(BUILD_OBJ_DIR)/%: $(BUILD_OBJ_DIR)/%.o .PHONY: doc clean dclean ####### Build rules -#libAusreg_EPP_toolkit.a: $(OBJECTS) +#libACTK1_3_2.a: $(OBJECTS) # $(LIB_ARCHIVER) $(LIB_FLAGS) $(BUILD_LIB_DIR)/$@ $^ @@ -103,15 +103,15 @@ dirs: -mkdir -p $(BUILD_LIB_DIR) -mkdir -p $(BUILD_OBJ_DIR) -libAusRegEPPTK.so: -$(BUILD_LIB_DIR)/libAusRegEPPTK.so: $(objs) +libACTK1_3_2.so: +$(BUILD_LIB_DIR)/libACTK1_3_2.so: $(objs) $(CXX) $(LDFLAGS) $(SHARED_CXXFLAGS) -shared $^ -o $@ doc: doxygen etc/Doxyfile clean: - $(RM) $(objs) $(BUILD_LIB_DIR)/libAusRegEPPTK.so *~ + $(RM) $(objs) $(BUILD_LIB_DIR)/libACTK1_3_2.so *~ $(RM) -r $(BUILD_OBJ_DIR) $(RM) -r $(BUILD_LIB_DIR) diff --git a/AusRegCliever/Makefile b/AusRegCliever/Makefile index 325d117..112d3af 100644 --- a/AusRegCliever/Makefile +++ b/AusRegCliever/Makefile @@ -6,11 +6,11 @@ CC=g++ Cc=gcc BOSTLIB=-L/usr/lib/boost - BOSINCL=-L/usr/include/boost + BOSINCL=-I/usr/include/boost LOG4LIB=-L/usr/lib ifeq ($(LOCATION),authoring) - ARTKLIB=-L/home/jdaugherty/clients/reg.de/git/ACTK1_3_2/build + ARTKLIB=-L/home/jdaugherty/clients/reg.de/git/ACTK1_3_2/lib ARTKINCL=-I/home/jdaugherty/clients/reg.de/git/ACTK1_3_2/common endif @@ -19,7 +19,7 @@ ifeq ($(LOCATION),testing) ARTKINCL=I/home/drde/git/ACTK1_3_2/common endif -SLIBS= -L/usr/lib $(BOSTLIB) $(LOG4LIB) -l boost_system -l boost_thread -l log4cpp +SLIBS= -L/usr/lib $(BOSTLIB) $(LOG4LIB) $(ARTKLIB) -l boost_system -l boost_thread -l log4cpp ifeq ($(LOCATION),authoring) SINCL= -I include -I /usr/include/log4cpp $(BOSINCL) @@ -40,7 +40,14 @@ CLFLAGS= -Wall -Wundef -Wpointer-arith -Wshadow \ -Wstrict-prototypes -Waggregate-return -Wno-implicit ACOBJS= build/cliever.o build/mdLogger.o build/masterDaemonConfig.o build/masterDaemon.o \ - build/mdHost.o build/mdState.o build/mdAusReg.o + build/mdHost.o build/mdState.o + + +ARTKDEPS = -L$(BUILD_LIB_DIR) -lACTK1_3_2 \ + -L$(XALAN_LIB_DIR) -lxalan-c -lxalanMsg\ + -L$(XERCES_LIB_DIR) -lxerces-c \ + -lssl \ + -lrt # --- targets # @@ -76,7 +83,7 @@ build/mdAusReg.o: server/mdAusReg.cpp include/*.h $(CC) $(CFLAGS) server/mdAusReg.cpp -c -o build/mdAusReg.o $(SINCL) $(ARTKINCL) build/drde-cliever: $(ACOBJS) - $(CC) $(CFLAGS) -o build/drde-cliever $(SINCL) $(LIBS) $(ACOBJS) $(SLIBS) + $(CC) $(CFLAGS) -o build/drde-cliever $(SINCL) $(LIBS) $(ACOBJS) $(SLIBS) $(ARTKDEPS) doxygen/index.html: etc/doxygen.config doxygen etc/doxygen.config diff --git a/AusRegCliever/include/ausRegPeer.h b/AusRegCliever/include/ausRegPeer.h index 3505e4e..04252cf 100644 --- a/AusRegCliever/include/ausRegPeer.h +++ b/AusRegCliever/include/ausRegPeer.h @@ -5,8 +5,7 @@ class ausRegPeer { - - Init acTkInit; + bool gotIt(std::string propertiesFilePath); }; diff --git a/AusRegCliever/include/cliever-md.h b/AusRegCliever/include/cliever-md.h index d3b2118..a4b8fe2 100644 --- a/AusRegCliever/include/cliever-md.h +++ b/AusRegCliever/include/cliever-md.h @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/AusRegCliever/include/masterDaemonConfig.h b/AusRegCliever/include/masterDaemonConfig.h index 92dc29c..66dda07 100644 --- a/AusRegCliever/include/masterDaemonConfig.h +++ b/AusRegCliever/include/masterDaemonConfig.h @@ -28,7 +28,8 @@ public: ClientsByHandle allClients; PeersByHandle allEPPPeers; -// date epoch(MD_EPOCH); + //date epoch(MD_EPOCH); + int debugThreshold,nClients,nClievers, servicePort,thisMachineContext, clientPort; @@ -40,7 +41,6 @@ public: int loadMachineConfiguration(int machineClass); - }; #endif diff --git a/AusRegCliever/include/mdHost.h b/AusRegCliever/include/mdHost.h index 43f084d..fae6545 100644 --- a/AusRegCliever/include/mdHost.h +++ b/AusRegCliever/include/mdHost.h @@ -5,8 +5,7 @@ * General abstraction of all MD clients * * For historical reasons all clients are considered to be - * devices, though mdclient and US clients have a non-device - * client type. The central device of the system has zero + * devices. The central device of the system has zero * device type. * */ @@ -19,15 +18,15 @@ class mdHost { public: bool isSingleton; - int clieverGroup, // masterDaemonConfig.thisMachineContext + int clieverGroup, // masterDaemonConfig.thisMachineContext handle,mdStdDevIdx; md_device type; mdState state; udp::endpoint ip; - // Only Machine and Instrument use below - InstructionSet cmds; + // Superset of the RFC speced + InstructionSet cmds; // Some parameters initially here are now all uniformly ODEs // defined in the COOL scripts. @@ -66,7 +65,6 @@ public: mdPeer() : mdHost( MDDEV_PEER ) { -//rrj cmds["RST"] = new mdCommand(MD_SCPI,std::string("RST")); cmds["RST"] = new mdCommand((md_mand)0,std::string("RST")); } mdPeer *validateClient(int handle, const mdClientBirth &c, mdResponse &r); diff --git a/AusRegCliever/include/mdcommon.h b/AusRegCliever/include/mdcommon.h index 9a5e16e..906913e 100644 --- a/AusRegCliever/include/mdcommon.h +++ b/AusRegCliever/include/mdcommon.h @@ -74,7 +74,7 @@ using boost::asio::ip::udp; #define MD_NAME CLIEVER_APP " " MD_COMPONENT #define MD_VERSION " 1.0 " // Version #define MD_REFRESH 10 // default milliseconds between API frame updates -#define MD_TYPE "EPPCLIENT" +#define MD_TYPE "EPPPEER" #define NORMAL_DEBUG 10 #ifndef CURRENT_DEBUG #define CURRENT_DEBUG NORMAL_DEBUG @@ -260,17 +260,14 @@ struct MD_CONTROL_BLOCK typedef std::map mdStdDevicePODMap; // MD Standard Device Map - /* - *\brief stdDev: collection with MD at: 0, CD in: 1 - MAX_CLIEVER, - * MACHINEs in: MAX_CLIEVER+1 - MAX_CLIEVER*2, - * Servers in: (MAX_CLIEVER*2)+1 - (((MAX_CLIEVER*2)+1)+(MAX_CLIEVER*MAX_INSTRUMENTS)), - * Clients in: (MAX_CLIEVER*MAX_INSTRUMENTS)+1 - MAX_CLIENT - * localhost at: MAX_CLIENT+1 + *\brief stdDev: collection with MD at: 0, CD in: 1 to MAX_CLIEVER, + * PEERS in: MAX_CLIEVER + 1 to - MAX_CLIEVER+1+MAX_PEER, * * The mdStdDevIdx of a device is its index above. * Within intervals clients are assigned compactly in the same order as thier handles are created and assigned. */ -#if (defined(MD_MAIN) || defined(CD_MAIN) || defined(DV_DLL_MAIN)) +#if (defined(MD_MAIN) || defined(CD_MAIN) ) mdStdDevicePODMap cb; int myStdDevIdx=MAX_CLIENTS+1; // global default to localhost #else @@ -369,7 +366,7 @@ class mdDGChannel bool connect_to (boost::asio::ip::udp::endpoint &ep,boost::system::error_code &ec,int &step,int stdDevIdx=-1) { - bool value = false; + bool value = false; stdDevIdx = stdDevIdx == -1 ? mdStdDevIdx : stdDevIdx; map::iterator iter = cb.find(stdDevIdx); diff --git a/AusRegCliever/server/mdAusReg.cpp b/AusRegCliever/server/mdAusReg.cpp index 64863a3..3ea7c76 100644 --- a/AusRegCliever/server/mdAusReg.cpp +++ b/AusRegCliever/server/mdAusReg.cpp @@ -1,3 +1,22 @@ #include "cliever-md.h" #include "ausRegPeer.h" + + +bool ausRegPeer::gotIt(std::string propPath) { + + bool did=false; + + try { + + init(propPath); + did = true; + + } + catch(std::exception &e) { + + } + + return did; + +} diff --git a/AusRegCliever/server/mdLogger.cpp b/AusRegCliever/server/mdLogger.cpp index 423b104..f4fc56a 100644 --- a/AusRegCliever/server/mdLogger.cpp +++ b/AusRegCliever/server/mdLogger.cpp @@ -20,15 +20,15 @@ using namespace log4cpp; void mdLogger::init() { - const char *mainLogFileName = "auc-md.log", - *xmlrpcLogFileName = "auc-xmlrpc.log"; + const char *mainLogFileName = "drde-cliever.log", + *actkLogFileName = "actk1_3_2.log"; logPath = new char [strlen(thisConfig->logPath) + - strlen(xmlrpcLogFileName) + 2]; + strlen(actkLogFileName) + 2]; strcpy(logPath,thisConfig->logPath); strcat(logPath,"/"); - strcat(logPath,xmlrpcLogFileName); + strcat(logPath,actkLogFileName); thisConfig->xmlrpcLogpath = logPath; diff --git a/AusRegEPPTK/Makefile b/AusRegEPPTK/Makefile index 33af21d..32e857f 100644 --- a/AusRegEPPTK/Makefile +++ b/AusRegEPPTK/Makefile @@ -8,15 +8,15 @@ CXX = g++ CC = gcc #SHARED_CXXFLAGS += -O2 -SHARED_CXXFLAGS += -g +SHARED_CXXFLAGS += -g CXXFLAGS = $(SHARED_CXXFLAGS) -Wall -Wpointer-arith -Wcast-qual -D_REENTRANT -fPIC -CPPFLAGS = -fPIC -D_GNU_SOURCE -CXXFLAGS += -D_GNU_SOURCE -O0 +CPPFLAGS = -fPIC -D_GNU_SOURCE +CXXFLAGS += -D_GNU_SOURCE -O0 -#XERCES_HOME = /usr/local/xerces-c-src_2_7_0 +#XERCES_HOME = /usr/local/xerces-c-src_2_7_0 #XERCES_LIB_DIR = ${XERCES_HOME}/lib -#XERCES_LIB = xerces-c2_7_0 +#XERCES_LIB = xerces-c2_7_0 #XALAN_HOME = /usr/local/xalan-c_1_10_0 #XALAN_LIB_DIR = $(XALAN_HOME)/lib @@ -79,7 +79,7 @@ $(BUILD_OBJ_DIR)/%.o: %.c LDFLAGS_TESTS = -L$(BUILD_LIB_DIR) -lAusRegEPPTK \ - -L$(XALAN_LIB_DIR) -lxalan-c -lxalanMsg\ + -L$(XALAN_LIB_DIR) -lxalan-c -lxalanMsg -licuuc -licudata \ -L$(XERCES_LIB_DIR) -lxerces-c \ -lssl \ -lrt