| | |
| | | import com.config.AppConfig; |
| | | import com.data.Motor_inf; |
| | | import com.data.Comm.Central_DataParsing_Thread_SQL; |
| | | import com.data.Comm.Central_Data_SocketServer_Thread; |
| | | import com.data.Comm.Central_Data_Task_SQL; |
| | | import com.data.history.Central_Data_RealRecord_Thread; |
| | | import com.sql.MysqlConnPool; |
| | | |
| | | public class main_Central_Monitor { |
| | |
| | | //创建config.xml文件 |
| | | m_AppConfig = new AppConfig(); |
| | | |
| | | logger.info("SQLserver IP:" + m_AppConfig.getMysqlServerIp() + ", port: "+MysqlServer_Port); |
| | | logger.info("SQLserver IP: " + m_AppConfig.getMysqlServerIp() + ", port: "+MysqlServer_Port); |
| | | checkingMySQLServerStart(); //检测数据库服务是否启动 |
| | | |
| | | |
| | |
| | | Central_DataParsing_Thread_SQL.loadDeviceData(GB_MysqlConnPool, motors); //加载集中监控系统设备信息 |
| | | |
| | | |
| | | /********************* 实时数据读取线程 ************************************************************/ |
| | | { |
| | | Central_Data_SocketServer_Thread server = new Central_Data_SocketServer_Thread(GB_MysqlConnPool, motors); |
| | | server.start(); |
| | | } |
| | | |
| | | /********************* 历史实时数据记录线程 ************************************************************/ |
| | | { |
| | | Central_Data_RealRecord_Thread record_thread = new Central_Data_RealRecord_Thread(GB_MysqlConnPool, motors); |
| | | record_thread.start(); |
| | | } |
| | | |
| | | while(true) { |
| | | try { |