2014-01-03 05:52:15 +00:00
|
|
|
#include <cassert>
|
|
|
|
#include <cstdarg>
|
|
|
|
#include <cstdlib>
|
|
|
|
#include <iostream>
|
|
|
|
#include <boost/thread.hpp>
|
2014-01-07 17:59:27 +00:00
|
|
|
#include <boost/date_time/gregorian/gregorian.hpp>
|
2014-01-03 05:52:15 +00:00
|
|
|
#include <boost/statechart/event.hpp>
|
|
|
|
#include <boost/statechart/state_machine.hpp>
|
|
|
|
#include <boost/statechart/simple_state.hpp>
|
|
|
|
#include <boost/statechart/transition.hpp>
|
|
|
|
#include <boost/bind.hpp>
|
|
|
|
#include <boost/asio.hpp>
|
|
|
|
#include <boost/shared_ptr.hpp>
|
|
|
|
#include <Category.hh>
|
|
|
|
#include <FileAppender.hh>
|
|
|
|
#include <PatternLayout.hh>
|
|
|
|
#include <map>
|
|
|
|
#include <utility>
|
|
|
|
#include <map>
|
|
|
|
#include <string>
|
|
|
|
#include <queue>
|
2014-01-03 07:51:51 +00:00
|
|
|
#include "Listener.h"
|
|
|
|
#include "EventSender.h"
|
|
|
|
#include "TimeStampedEvent.h"
|
|
|
|
#include "PolymorphEvent.h"
|
2014-01-03 05:52:15 +00:00
|
|
|
|
|
|
|
namespace fsm = boost::statechart;
|
|
|
|
|
|
|
|
#include "mdcommon.h"
|
|
|
|
#include "mdevents.h"
|
|
|
|
#include "mdLogger.h"
|
2014-01-05 22:58:00 +00:00
|
|
|
#include "mdBehavior.h"
|
2014-01-06 19:19:17 +00:00
|
|
|
#include "mdState.h"
|
2014-01-05 22:58:00 +00:00
|
|
|
#include "mdHost.h"
|
2014-01-03 05:52:15 +00:00
|
|
|
|
2014-01-11 00:58:45 +00:00
|
|
|
#include "ausRegTK.h"
|
|
|
|
|
2014-01-05 22:58:00 +00:00
|
|
|
#define MD_HAUSHALT 2000 // milliseconds between attention routine
|
2014-01-03 05:52:15 +00:00
|
|
|
#define MD_LOCK_FILE "cliever-md.lock"
|
|
|
|
|
|
|
|
#include "masterDaemonConfig.h"
|
|
|
|
|
|
|
|
#ifdef MD_MAIN
|
|
|
|
|
2014-01-05 22:58:00 +00:00
|
|
|
mdHostFabrik *deviceFactory;
|
|
|
|
mdLogger *theseLogs;
|
2014-01-03 05:52:15 +00:00
|
|
|
masterDaemonConfig *thisConfig;
|
|
|
|
|
|
|
|
extern void runMasterDaemon();
|
2014-01-05 22:58:00 +00:00
|
|
|
extern void runAPILayer();
|
2014-01-03 05:52:15 +00:00
|
|
|
|
|
|
|
#else
|
|
|
|
|
2014-01-05 22:58:00 +00:00
|
|
|
extern mdHostFabrik *deviceFactory;
|
|
|
|
extern mdLogger *theseLogs;
|
|
|
|
extern masterDaemonConfig *thisConfig;
|
2014-01-03 05:52:15 +00:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|