/****************************************************************************
** File name    :  FLTGlobal.h
** Description  :  global variable define
** Create date  :  2012.10.10
** Auther by    :  Liuyx
** Version info :  V1.0.01
** Copyrigth By:  xi'an huatek, Inc Co., Ltd
** Update record:  
** DATE         AUTHER   DESC 
** -------------------------------------------------------------------------               
** 2018.09.01   Liuyx    first build
****************************************************************************/
#pragma warning (disable:4786)
#include "HTGlobal.h"

TConfig     g_TConfig ;
int         g_Running;

int         g_seqno;               // 交换的流水号
mutex       g_seq_mutex;           // 流水号 

map<string,ST_IED_CONN_HANDLE>          g_MapIedConn;   // IED链接句柄
mutex                                   g_MapIedConn_mutex;

map<string, ST_DEVICE_INFO>             g_map_device;       // 装置设备缓存
mutex                                   g_map_device_mutex;

list<ST_FILES_ATTRIB>                   g_list_comtrad_files;  // 录播文件队列
mutex                                   g_list_comtrad_files_mutex;

list<ST_DB_BODY>                        g_list_db_body;  // 入库队列
mutex                                   g_list_db_body_mutex;

list<ST_DB_WARN>                        g_list_db_warn;  // 入库队列
mutex                                   g_list_db_warn_mutex;

map<string, ST_THRES_CONF>              g_thres_conf;    // 振动传感器阈值配置
mutex                                   g_thres_conf_mutex;

map<string, ST_CONTROL_CONF>            g_ctrl_conf;    // 振动传感器控制参数配置
mutex                                   g_ctrl_conf_mutex;

map<string, ST_HT_IEC61850>             g_ied;
mutex                                   g_ied_mutex;

map<string, ST_PARAM_BIND>              g_map_parambind;   // icd配置节点绑定关系,key=nodename
mutex                                   g_map_parambind_mutex;   // icd配置节点绑定关系,key=nodename


pthread_t   thread_handle_cache_proc;  // 内存数据同步线程句柄
pthread_t   thread_handle_database_proc; // 入库线程句柄
pthread_t   thread_handle_dbalarm_proc; // 入库线程句柄

pthread_t   thread_handle_sntpd;       // SNTP校时服务端线程句柄
pthread_t   thread_handle_sntpc;       // SNTP校时客户端线程句柄

pthread_t   thread_handle_iec61850_manager_proc;
pthread_t   thread_handle_modbus_service;  //Modbus服务线程句柄
pthread_t   thread_handle_modbus_recv;     //Modbus接收线程句柄
pthread_t   thread_handle_modbus_send;     //Modbus发送线程句柄

pthread_t   thread_handle_iec61850_service;  //iec61850服务线程句柄
pthread_t   thread_handle_iec61850_client;     //iec61850接收线程句柄
pthread_t   thread_handle_iec61850_server;     //iec61850发送线程句柄
