confstruct.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #ifndef __CONF_STRUCT__
  2. #define __CONF_STRUCT__
  3. #pragma pack(1)
  4. struct ConfStruct
  5. {
  6. ConfStruct()
  7. {
  8. TimeAlarm_Closer=0;
  9. TimeAlarm_Remote=0;
  10. TimeWin=0;
  11. MaxScope=0;
  12. closer_slot = 0;
  13. remote_slot =0;
  14. split_win_minsec = 0;
  15. limit_sec= 0;
  16. max_scope_bigCar = 0;
  17. mid_car_length_goroup = 0;
  18. check_count = 0;
  19. response_alarm_time = 0;
  20. }
  21. static ConfStruct& getCs()
  22. {
  23. static ConfStruct g_cs;
  24. return g_cs;
  25. }
  26. double TimeAlarm_Closer;
  27. double TimeAlarm_Remote;
  28. int TimeWin;
  29. int MaxScope;
  30. int closer_slot;
  31. int remote_slot;
  32. int split_win_minsec;
  33. int limit_sec;
  34. double max_scope_bigCar;
  35. double mid_car_length_goroup;
  36. int check_count;
  37. int response_alarm_time;
  38. std::string to_str()
  39. {
  40. std::stringstream ss;
  41. ss<<"timeAlarm_Clo:"<<TimeAlarm_Closer<<" TimeAlarm_remo:"<<TimeAlarm_Remote<<" TimeWin:"<<TimeWin<<" maxscope:"<<MaxScope<<" remoteSlote:"<<remote_slot<<" cl:"<<closer_slot<<" sec:"<<limit_sec
  42. <<"checkcount:"<<check_count<<"response:"<<response_alarm_time;
  43. return std::move(ss.str());
  44. }
  45. };
  46. #endif