#ifndef _SERVER_DEF_H
#define _SERVER_DEF_H

#define SERVER_NULLSTRING_W L""
#define SERVER_NULLSTRING ""

//DB
#define FILEPATH_SERVER_CONFIG "..\\config.ini"
#define CONF_SECT_DB "DB"
#define CONF_SECT_DB_BK "DB_2"
#define CONF_DB_KEY_HOST "host"
#define CONF_DB_KEY_USER "user"
#define CONF_DB_KEY_PWD "password"
#define CONF_DB_KEY_DBNAME "dbname"
#define CONF_DB_KEY_ENCODING "encoding"
#define CONF_DB_KEY_PORT "port"
#define CONF_DB_KEY_DB_BACKUP "dbbackup"

#define CONF_DB_DEFAULT_VALUE_HOST "123.57.155.179"
#define CONF_DB_DEFAULT_VALUE_USER "root"
#define CONF_DB_DEFAULT_VALUE_PWD "password"
#define CONF_DB_DEFAULT_VALUE_DBNAME "yaloc"
#define CONF_DB_DEFAULT_VALUE_ENCODING "gb2312"

#define CONF_SECT_SERVER_SETTING "SERVER_SETTING"
#define CONF_SERVER_WS_URL "websocket_url"
#define CONF_SERVER_TCP_HOST "tcp_host"
#define CONF_SERVER_WS_URL_BK "websocket_url_bk"
#define CONF_SERVER_USE_FILTER "use_filter"
#define CONF_SERVER_USE_FILTER_ODD "use_filter_odd"
#define CONF_SERVER_RECON_SERVER "recon_server"
#define CONF_SERVER_RECON_DB "recon_db"
#define CONF_SERVER_READER_LOST "reader_lost"
#define CONF_SERVER_CARD_LOST "card_lost"
#define CONF_SERVER_TIMING_INTERVAL "timing_interval"
#define CONF_SEND_JSON_POSION "interval_send_json_postion"
#define CONF_SEND_JSON_COUNTING "interval_send_json_counting"
#define CONF_SEND_JSON_ALARM "interval_send_json_alarm"
#define CONF_SEND_JSON_DEVICE "interval_send_json_device"
#define CONF_SEND_CALLINFO_INTERVAL "send_call_interval"
#define CONF_SEND_HELPINFO_INTERVAL "send_help_interval"
#define CONF_SEND_WS_CONNECT_INTERVAL "ws_connect_inteval"
#define CONF_SERVER_SAMPLING_INTERVAL "sampling_interval"
#define CONF_SERVER_HEART_INTERVAL "heart_interval"
#define CONF_SERVER_COORDINATE_ERROR "coor_error"
#define CONF_SERVER_RANGING_ERROR "ranging_error"
#define CONF_SERVER_MOVING_ERROR "moving_error"
#define CONF_SERVER_Z_OFFSET "z_offset"
#define CONF_SERVER_LOCATE_TYPE "locate_type"

#define CONF_SECT_SERVER_LOG "SERVER_LOG"
#define CONF_LOG_SYS_STATUS "system_status"
#define CONF_LOG_RAW_DATA "raw_data"
#define CONF_LOG_PARSE_DATA "parse_data"
#define CONF_LOG_SEND_EVENT "send_event"
#define CONF_LOG_REV_EVENT "rev_event"
#define CONF_LOG_LOCATE_DATA "locate_data"

#define CONF_SECT_MONITOR "MONITOR"
#define CONF_MONITOR_SERVER_HANDLE "server_handle"
#define CONF_MONITOR_SERVER_PATH "server_path"
#define CONF_MONITOR_MONITOR_HANDLE "monitor_handle"
#define CONF_MONITOR_MONITOR_PATH "monitor_path"
#define CONF_MONITOR_IS_MASTER "is_master"
#define CONF_MONITOR_IS_DEAFAULT "is_default"

#define CONF_SECT_READER "READER_SET"
#define CONF_READER_INTERVAL_TIME "interval_time"

#ifdef _DEBUG
#define SQL_EXECUTE_SENTENCE_COUNT_MAX       1
#else
#define SQL_EXECUTE_SENTENCE_COUNT_MAX       10
#endif // DEBUG



#define MAX_LOG_LENGTH 500

#define SQL_SENTENCE_LENGTH_MAX       2000

#endif