2014-01-03 05:52:15 +00:00
|
|
|
#ifndef MD_CONFIG
|
|
|
|
#define MD_CONFIG
|
|
|
|
|
|
|
|
typedef struct MDCLIENT {
|
|
|
|
md_device devType;
|
|
|
|
int mdStdDevIdx;
|
2014-01-06 19:19:17 +00:00
|
|
|
} mdACClient;
|
2014-01-03 05:52:15 +00:00
|
|
|
|
|
|
|
|
2014-01-06 19:19:17 +00:00
|
|
|
typedef std::map<int,mdACClient*> ClientsByHandle;
|
|
|
|
typedef std::map<int,mdPeer*> PeersByHandle;
|
2014-01-03 05:52:15 +00:00
|
|
|
|
|
|
|
class masterDaemonConfig {
|
|
|
|
|
|
|
|
friend class mdState;
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
2014-01-16 15:35:39 +00:00
|
|
|
int tkScenario; // How the AusRegistry toolkit used
|
2014-01-03 05:52:15 +00:00
|
|
|
bool daemonized;
|
|
|
|
bool halt;
|
|
|
|
bool shuttingDown;
|
|
|
|
bool shutdown;
|
|
|
|
const char *configPath,**err,*logPath,
|
|
|
|
*xmlrpcLogpath;
|
|
|
|
mdClientServer *cliever[MAX_CLIEVER];
|
|
|
|
mdMachine *machine[MAX_CLIEVER];
|
|
|
|
|
|
|
|
ClientsByHandle allClients;
|
2014-01-06 19:19:17 +00:00
|
|
|
PeersByHandle allEPPPeers;
|
2014-01-03 05:52:15 +00:00
|
|
|
|
2014-01-07 17:59:27 +00:00
|
|
|
//date epoch(MD_EPOCH);
|
|
|
|
|
2014-01-03 05:52:15 +00:00
|
|
|
int debugThreshold,nClients,nClievers,
|
|
|
|
servicePort,thisMachineContext,
|
|
|
|
clientPort;
|
|
|
|
pid_t daemonProcess, shellProcess;
|
|
|
|
std::string cfg_path,log_path;
|
|
|
|
std::string clievers[MAX_CLIEVER];
|
|
|
|
|
|
|
|
masterDaemonConfig();
|
|
|
|
|
2014-01-06 19:19:17 +00:00
|
|
|
int loadMachineConfiguration(int machineClass);
|
2014-01-03 05:52:15 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|