This commit is contained in:
Ren RenJuan 2014-01-11 03:01:32 +00:00
parent 8034a4c87a
commit 7096205279
6 changed files with 24 additions and 25 deletions

View File

@ -88,7 +88,7 @@ void init(const std::string& system_props_file)
static const Init doInit(system_props_file);
}
std::string stdPropsPath(""/home/drde/etc/toolkit2.conf/toolkit2.conf");
std::string stdPropsPath("/home/drde/etc/toolkit2.conf/toolkit2.conf");
void scenario(int scenario)
{

View File

@ -14,6 +14,13 @@ using namespace std;
/*
* This is the shell for the Unix Client Server (Cliever) daemon.
* In this design, this "cliever" is more client than server and
* the main arch has the md as the thing the secondary name provder
* is using to talk to primary providers.
*
* It also contains a CLI for sending commands used in OTE testing
* to verify the EPP directives. This ruby swig binding of this
* is behind the final OTE test harness.
*
*/
void runCommander();
@ -60,20 +67,6 @@ void acClientServer() { // AKA "Cliever"
theseLogs.logN(0,CD_NAME " " CD_VERSION " compiled on " __DATE__ " @ " __TIME__);
theseLogs.logN(3,"Cliever processing(%d) begins for devices on port %s to MD at %s.",getpid(),thisConfig->telemetryPortStr.c_str(),thisConfig->mdAddress.c_str());
if (cdHasKb) {
thisConfig->clipsProcess = fork();
if (thisConfig->clipsProcess < 0) {
puts("Can't initialize CLIPS--!");
exit(1);
}
if (getpid() != gm->daemon_pid) {
#if defined(MD_MAND)
theseLogs.logN(0,"Creating CLIPS Environment.");
DACLIPS::init();
#endif
}
}
try {
boost::thread cliever(runCliever);

View File

@ -57,7 +57,6 @@
#include "clientDaemonConfig.h"
typedef std::map<std::string,mdObservable*> ObservablesOfInterest;
typedef std::map<std::string,mdOperationalDataElement*> ODEsOfInterest;
#include "cdLogger.h"
@ -74,9 +73,6 @@ class mdCliever;
clientDaemonConfig *thisConfig;
mdCliever *thisCliever;
#ifdef MD_MAND
DACLIPS::Environment rules[2]; // 0: batch, 1: commander
#endif
extern void runDataLayer();
extern void runCliever();
@ -91,9 +87,6 @@ class mdCliever;
extern clientDaemonConfig *thisConfig;
extern mdCliever *thisCliever;
#ifdef MD_MAND
extern DACLIPS::Environment *rules[2];
#endif
#endif

View File

@ -23,9 +23,13 @@ class ausRegEPPTK {
friend class masterDaemon;
public: int tkScenario;
int daysRunning;
// See the Toolkit Overview. At this level supposedly it can do everything.
ausRegEPPTK() { tkScenario = ACTK_OTEA; }
ausRegEPPTK() { tkScenario = ACTK_OTEA;
daysRunning = 0;
}
bool didInit(const std::string propertiesFilePath);
void doOTEA();

View File

@ -126,7 +126,7 @@ void masterDaemon::dispatch(const mdIncoming &what) {
int masterDaemon::initAusRegTK(void) {
int rc=OK;
const std::string nil(""/home/drde/etc/toolkit2.conf/toolkit2.conf");
const std::string nil("/home/drde/etc/toolkit2.conf/toolkit2.conf");
try {
@ -221,8 +221,15 @@ void masterDaemon::processEvent( const mdAPIFrame &thisFrame )
}
void oteA() {
theseLogs->logNdebug(MAX_DEBUG,0,"OTE Connectivity Test BOJ.");
int nthDay;
for (nthDay=0;nthDay<30;nthDay++) {
theseLogs->logNdebug(MAX_DEBUG,1,"OTE Connectivity day %d",nthDay);
thisService->artk->doOTEA();
theseLogs->logNdebug(MAX_DEBUG,1,"OTE Connectivity day %d",nthDay);
thisService->artk->daysRunning = nthDay;
}
}
void masterDaemon::run() {

View File

@ -26,6 +26,7 @@ void ausRegEPPTK::doOTEA()
int hours;
string op("newInstance");
if (!daysRunning)
scenario(tkScenario);
try {
@ -42,6 +43,7 @@ void ausRegEPPTK::doOTEA()
sleep(3630);
}
manager->shutdown();
}
catch (EPPException& e)
{ const char *eMsg = e.getMessage().c_str();