// YAServer.h : PROJECT_NAME 应用程序的主头文件 // #pragma once #ifndef __AFXWIN_H__ #error "在包含此文件之前包含“stdafx.h”以生成 PCH 文件" #endif #include "resource.h" // 主符号 #include using namespace std; // CYAServerApp: // 有关此类的实现,请参阅 YAServer.cpp // class CYAServerApp : public CWinApp { public: CYAServerApp(); // 重写 public: virtual BOOL InitInstance(); // 实现 public: // db string dbhost; string dbuser; string dbpwd; string dbname; string dbencoding; int dbport; string dbbackup; string dbhost_bk; string dbuser_bk; string dbpwd_bk; string dbname_bk; string dbencoding_bk; int dbport_bk; bool bRunning; // sys string ws_url; string ws_url_bk; string tcp_host; int tcp_port; BOOL use_filter; BOOL use_filter_odd; // 奇数 int recon_server; int recon_db; int reader_lost; int card_lost; int timing_interval; // 校时间隔 double z_offset; double coor_error; double ranging_error; double move_error; double sampling_interval; // 卡尔曼采样间隔 int locate_type; // 0 按照tof计算坐标; 1 按照分站计算 // interval int send_json_postion; // 毫秒 int send_json_counting; int send_json_alarm; int warning_point_alarm;//lemon int send_json_device; int time_send_call; int time_send_help; int ws_connect_interval; int heart_interval; int send_json_drivingface; int send_json_leader; int load_leader; int cal_vehicle_meeting; int send_sync_time; //下发校时间隔,以毫秒为单位,用于分站分时功能 int shutdown_timeout_threshold; // 超时关机时间阈值 int vibrate_threshold; // 振动阈值 //分站发送间隔,以毫秒为单位,100ms int reader_interval_time; // log BOOL log_sys_status; //系统状态 BOOL log_raw_data; //底层数据 BOOL log_parse_data; //格式化数据 BOOL log_send_package; //发送数据包,发送给web端的json数据包 BOOL log_recv_package; //接收数据包,接受web端发的json数据包 BOOL log_locate_data; //定位结果数据 // monitor HWND m_hwnd_monitor; // monitor 句柄 //char* m_path_monitor; // monitor 路径 std::unique_ptr m_path_monitor; void writeini(string section, string key, string value); void load_db_conf(); void save_db_conf(); void load_sys_conf(); void save_sys_conf(); void load_log_conf(); void save_log_conf(); void load_monitor_conf(); void set_server_handle(HWND hwd); void save_interval_conf(); void init_param(); void load_conf(); void load_reader_conf(); void save_reader_conf(); BOOL KillProcessFromName(CString strProcessName); DECLARE_MESSAGE_MAP() }; extern CYAServerApp theApp;