sync to work on test machine

This commit is contained in:
Ren RenJuan 2014-01-07 17:59:27 +00:00
parent a86d612f94
commit 83c6117308
11 changed files with 89 additions and 51 deletions

View File

@ -57,36 +57,28 @@
<buildTargets>
<target name="clean" path="ACTK1_3_2" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>clean</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="AusRegEPPTK.so" path="AusRegEPPTK" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<target name="all" path="ACTK1_3_2" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildTarget>all</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="tests" path="AusRegEPPTK" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<target name="tests" path="ACTK1_3_2" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>tests</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="clean" path="AusRegEPPTK" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildTarget>clean</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="cliever" path="AusRegCliever" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>cliever</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
@ -94,6 +86,7 @@
</target>
<target name="clean" path="AusRegCliever" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>clean</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
@ -101,11 +94,36 @@
</target>
<target name="distclean" path="AusRegCliever" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>distclean</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="AusRegEPPTK.so" path="AusRegEPPTK" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>all</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="tests" path="AusRegEPPTK" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>tests</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="clean" path="AusRegEPPTK" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>clean</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
</buildTargets>
</storageModule>
</cproject>

View File

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

View File

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

View File

@ -5,8 +5,7 @@
class ausRegPeer {
Init acTkInit;
bool gotIt(std::string propertiesFilePath);
};

View File

@ -3,7 +3,7 @@
#include <cstdlib>
#include <iostream>
#include <boost/thread.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/date_time/gregorian/gregorian.hpp>
#include <boost/statechart/event.hpp>
#include <boost/statechart/state_machine.hpp>
#include <boost/statechart/simple_state.hpp>

View File

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

View File

@ -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.
*
*/
@ -26,7 +25,7 @@ public:
udp::endpoint ip;
// Only Machine and Instrument use below
// Superset of the RFC speced
InstructionSet cmds;
// Some parameters initially here are now all uniformly ODEs
@ -66,7 +65,6 @@ public:
mdPeer() : mdHost<mdPeer>( 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);

View File

@ -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<int,mdCB*> 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

View File

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

View File

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

View File

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