00001 #ifndef CLIEVER_CONFIG 00002 #define CLIEVER_CONFIG 00003 00004 using namespace boost::gregorian; 00005 using namespace boost::posix_time; 00006 00007 class mdDataSource { 00008 00009 bool enabled; 00010 std::string fullName; 00011 int port; 00012 int ip; 00013 00014 }; 00015 00016 typedef std::map<std::string,mdDataSource*> localSourcesByClaimedName; 00017 00018 class clientDaemonConfig { 00019 public: 00020 00021 bool runCommander; 00022 bool terminateRequest; 00023 char configPath[256],logPath[256],origCmd[32]; 00024 pid_t daemonProcess; 00025 pid_t shellProcess; 00026 std::string mdAddress; 00027 std::string deviceName; 00028 std::string telemetryPortStr; 00029 int cluster, 00030 debugThreshold, 00031 instruments[MAX_INSTRUMENTS]; 00032 int telemetryPort; // talks to central server with this 00033 date epoch(CD_EPOCH); 00034 localSourcesByClaimedName localDevices; 00035 00036 clientDaemonConfig() { terminateRequest = false; 00037 mdAddress = std::string(MD_DEFAULT_IP); 00038 strcpy(configPath,"./"); 00039 deviceName = std::string("TEST"); 00040 debugThreshold = MAX_DEBUG; 00041 strcpy(logPath,"/tmp"); 00042 runCommander = true; 00043 memset(instruments,0,sizeof(instruments)); 00044 } 00045 00046 int loadMachineConfiguration(); 00047 00048 }; 00049 00050 typedef 00051 struct CD_GLOBAL { 00052 char id[7]; 00053 pid_t daemon_pid; 00054 bool cmdrShutdown; 00055 bool graceful; 00056 } 00057 auc_cd_global; 00058 00059 #endif
1.5.6