YAServer.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. // YAServer.h : PROJECT_NAME 应用程序的主头文件
  2. //
  3. #pragma once
  4. #ifndef __AFXWIN_H__
  5. #error "在包含此文件之前包含“stdafx.h”以生成 PCH 文件"
  6. #endif
  7. #include "resource.h" // 主符号
  8. #include <string>
  9. using namespace std;
  10. // CYAServerApp:
  11. // 有关此类的实现,请参阅 YAServer.cpp
  12. //
  13. class CYAServerApp : public CWinApp
  14. {
  15. public:
  16. CYAServerApp();
  17. // 重写
  18. public:
  19. virtual BOOL InitInstance();
  20. // 实现
  21. public:
  22. // db
  23. string dbhost;
  24. string dbuser;
  25. string dbpwd;
  26. string dbname;
  27. string dbencoding;
  28. int dbport;
  29. string dbbackup;
  30. string dbhost_bk;
  31. string dbuser_bk;
  32. string dbpwd_bk;
  33. string dbname_bk;
  34. string dbencoding_bk;
  35. int dbport_bk;
  36. bool bRunning;
  37. // sys
  38. string ws_url;
  39. string ws_url_bk;
  40. string tcp_host;
  41. int tcp_port;
  42. BOOL use_filter;
  43. BOOL use_filter_odd; // 奇数
  44. int recon_server;
  45. int recon_db;
  46. int reader_lost;
  47. int card_lost;
  48. int timing_interval; // 校时间隔
  49. double z_offset;
  50. double coor_error;
  51. double ranging_error;
  52. double move_error;
  53. double sampling_interval; // 卡尔曼采样间隔
  54. int locate_type; // 0 按照tof计算坐标; 1 按照分站计算
  55. // interval
  56. int send_json_postion; // 毫秒
  57. int send_json_counting;
  58. int send_json_alarm;
  59. int warning_point_alarm;//lemon
  60. int send_json_device;
  61. int time_send_call;
  62. int time_send_help;
  63. int ws_connect_interval;
  64. int heart_interval;
  65. int send_json_drivingface;
  66. int send_json_leader;
  67. int load_leader;
  68. int cal_vehicle_meeting;
  69. int send_sync_time; //下发校时间隔,以毫秒为单位,用于分站分时功能
  70. int shutdown_timeout_threshold; // 超时关机时间阈值
  71. int vibrate_threshold; // 振动阈值
  72. //分站发送间隔,以毫秒为单位,100ms
  73. int reader_interval_time;
  74. // log
  75. BOOL log_sys_status; //系统状态
  76. BOOL log_raw_data; //底层数据
  77. BOOL log_parse_data; //格式化数据
  78. BOOL log_send_package; //发送数据包,发送给web端的json数据包
  79. BOOL log_recv_package; //接收数据包,接受web端发的json数据包
  80. BOOL log_locate_data; //定位结果数据
  81. // monitor
  82. HWND m_hwnd_monitor; // monitor 句柄
  83. //char* m_path_monitor; // monitor 路径
  84. std::unique_ptr<char> m_path_monitor;
  85. void writeini(string section, string key, string value);
  86. void load_db_conf();
  87. void save_db_conf();
  88. void load_sys_conf();
  89. void save_sys_conf();
  90. void load_log_conf();
  91. void save_log_conf();
  92. void load_monitor_conf();
  93. void set_server_handle(HWND hwd);
  94. void save_interval_conf();
  95. void init_param();
  96. void load_conf();
  97. void load_reader_conf();
  98. void save_reader_conf();
  99. BOOL KillProcessFromName(CString strProcessName);
  100. DECLARE_MESSAGE_MAP()
  101. };
  102. extern CYAServerApp theApp;