00001 #ifndef DEVICE_CONFIG
00002 #define DEVICE_CONFIG
00003
00004 using namespace boost::gregorian;
00005 using namespace boost::posix_time;
00006
00007 class deviceDaemonConfig {
00008 public:
00009
00010 bool cdConnected,terminateRequest,yield;
00011 char configPath[256],logPath[256],work[32];
00012 date epoch(MD_EPOCH);
00013 int debugThreshold,
00014 telemetryPort;
00015 md_device thisDeviceType;
00016 std::string cdAddress;
00017 unsigned short cdPort;
00018 std::string mdAddress;
00019 std::string mdPort;
00020 std::string deviceName;
00021 std::string telemetryPortStr;
00022
00023 deviceDaemonConfig() { cdConnected = terminateRequest = yield = false;
00024 mdAddress = std::string(MD_DEFAULT_IP);
00025 debugThreshold = MAX_DEBUG;
00026 thisDeviceType = MACHINE;
00027 deviceName = (thisDeviceType == MACHINE) ? std::string(MD_TYPE) : std::string("INSTRUMENT");
00028 #ifdef _WIN32_WINNT
00029 strcpy(configPath,".\\");
00030 strcpy(logPath,"c:\\openauc\\logs");
00031 #else
00032 strcpy(configPath,"./");
00033 strcpy(logPath,"/tmp");
00034 #endif
00035 telemetryPort = 4242;
00036 sprintf(work,"%d",telemetryPort);
00037 telemetryPortStr = std::string(work);
00038 }
00039
00040 int loadMachineConfiguration();
00041
00042 };
00043
00044 #endif