Administrator
2021-01-20 dbf01a183dc2c6600a2bb164e0f52dbfb1bb521c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
package main;
 
import com.base.Com;
import com.battdata_rt.BattData_RT_Array;
import com.config.AppConfig;
import com.config.AppParam;
import com.dev.fbs9600.FBS9600_Task_Thread;
import com.sql.MysqlConnPool;
import com.sql.Sql_Mysql;
import java.io.PrintStream;
import java.sql.SQLException;
import java.util.Date;
 
public class main_FBS9600XS {
    public static final boolean is_app_for_cmcc_only = false;
    public static final boolean is_app_for_fbo_data_only = false;
    public static final boolean is_app_for_fbs_free_only = false;
    public static final boolean is_app_for_bpm7100_only = false;
    public static final boolean is_app_for_FBS9100S_only = true;
    public static final boolean app_debug = false;
    public static final double m_VersionNum = 1.101D;
    public static final String m_Version = "Welcome To Use BattMonitorFBS9100S V1.101 RC_20180324";
    public static final int DEF_MysqlServerFBS9100S_Port = 3360;
    public static final int DEF_MysqlServer_Port = 5306;
    public static final int DEF_MysqlServerFBS_Port = 5307;
    public static final int DEF_MysqlServerFBO_Port = 5308;
    public static final int DEF_MysqlServerBPM7100_Port = 5309;
    public static final int DEF_Socket_Server_Port = 1982;
    public static final int DEF_Socket_ServerFBS_Port = 1992;
    public static final int DEF_Socket_ServerFBO_Port = 2002;
    public static final int DEF_Socket_ServerBPM7100_Port = 2001;
    public static final int DEF_Socket_Server_FBI_Port = 1983;
    public static final int DEF_Socket_Server_FBIFBS_Port = 1993;
    public static final int DEF_Socket_Server_FBIFBO_Port = 2003;
    public static final int DEF_Socket_Server_IDCE8200_Port = 8200;
    public static final int DEF_Socket_Server_IDCE8200FBS_Port = 8210;
    public static final int DEF_Socket_Server_IDCE8200FBO_Port = 8220;
    public static final int DEF_Socket_Server_MOBILE_Port = 2016;
    public static final int DEF_Socket_Server_MOBILEFBS_Port = 2026;
    public static final int DEF_Socket_Server_MOBILEFBO_Port = 2036;
    public static final int DEF_Socket_Server_MOBILEBPM7100_Port = 2037;
    public static final int DEF_FTP_Server_Port = 2110;
    public static final int DEF_FTP_ServerFBS_Port = 2116;
    public static final int DEF_FTP_ServerFBO_Port = 2122;
    public static final int DEF_FTP_ServerBPM7100_Port = 2123;
    public static int MysqlServer_Port = 5306;
    public static int Socket_Server_Port = 1982;
    public static int Socket_Server_FBI_Port = 1983;
    public static int Socket_Server_IDCE8200_Port = 8200;
    public static int Socket_Server_Mobile_Port = 2016;
    public static int FTP_Server_Port = 2110;
    private static AppConfig m_AppConfig;
    private static MysqlConnPool GB_MysqlConnPool;
    private static BattData_RT_Array GB_DataArray;
    public static AppParam GB_App_Param;
 
    public static void main(String[] args) {
        
        String ver = "Welcome To Use BattMonitorFBS9100S V1.101 RC_20180324";
 
        ver = ver + " app_for_FBS9100S_only";
        MysqlServer_Port = 3360;
        Socket_Server_Port = 1992;
        Socket_Server_FBI_Port = 1993;
        Socket_Server_IDCE8200_Port = 8210;
        Socket_Server_Mobile_Port = 2026;
        FTP_Server_Port = 2116;
 
        System.out.println("Server Started At DateTime: " + Com.getDateTimeFormat(new Date(), "yyyy-MM-dd HH:mm:ss"));
 
        m_AppConfig = new AppConfig();
 
        System.out.println("SQLserver IP:" + m_AppConfig.getMysqlServerIp() + ", port: " + MysqlServer_Port);
 
        GB_MysqlConnPool = new MysqlConnPool(m_AppConfig.getMysqlServerIp(), MysqlServer_Port,
                m_AppConfig.getMysqlConnCountMax());
 
        Sql_Mysql sql_ck = new Sql_Mysql(GB_MysqlConnPool.getConn());
        try {
            sql_ck.checkAndCreateDB();
        } catch (SQLException e1) {
            e1.printStackTrace();
        } finally {
            sql_ck.close_con();
        }
 
        GB_App_Param = new AppParam(GB_MysqlConnPool);
 
        GB_DataArray = new BattData_RT_Array(m_AppConfig, GB_App_Param, GB_MysqlConnPool);
        /******** *****************************/
        GB_DataArray.initBattDataRT_Inf(1.101D);
 
        FBS9600_Task_Thread task_9600 = new FBS9600_Task_Thread(GB_MysqlConnPool, GB_DataArray, m_AppConfig);
        task_9600.start();
        while (true) {
            try {
                Thread.sleep(100L);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}