New file |
| | |
| | | package com.config;
|
| | |
|
| | | import java.sql.ResultSet;
|
| | | import java.sql.SQLException;
|
| | | import java.util.ArrayList;
|
| | |
|
| | | import org.apache.log4j.LogManager;
|
| | | import org.apache.log4j.Logger;
|
| | |
|
| | | import com.sql.MysqlConnPool;
|
| | | import com.sql.Sql_Mysql;
|
| | |
|
| | |
|
| | | /**
|
| | | * 软件的各种参数信息
|
| | | * @author 军
|
| | | *
|
| | | */
|
| | | public class AppParam {
|
| | | public final static String AppParamTableName = "tb_app_param";
|
| | | public final static String AppLog4jTableName = "tb_batt_ms_x64_fbsdev_log4j";
|
| | | |
| | | public final static int AppParam_Discharge = 0;
|
| | | public final static int AppParam_Charge = 1;
|
| | | public final static int AppParam_PowerOff = 2;
|
| | | |
| | | private MysqlConnPool m_Conn_Pool;
|
| | | private boolean MysqlDataTable_Exist = false;
|
| | | private MonitorParam m_MonitorParam = new MonitorParam();
|
| | | private Logger logger = null;
|
| | | |
| | | public AppParam()
|
| | | {
|
| | | logger = LogManager.getLogger(this.getClass());
|
| | | }
|
| | | |
| | | public AppParam(MysqlConnPool pool)
|
| | | {
|
| | | logger = LogManager.getLogger(this.getClass());
|
| | | |
| | | m_Conn_Pool = pool;
|
| | | getAppParam();
|
| | | }
|
| | | /*
|
| | | public void checkAndCreateLog4jTable() {
|
| | | Sql_Mysql sql = null;
|
| | | try {
|
| | | sql = new Sql_Mysql(m_Conn_Pool);
|
| | | sql.sqlMysqlUseDB(Sql_Mysql.DB_AppSys);
|
| | | if(false == sql.sqlMysqlCheckIfTableExist(AppLog4jTableName)) {
|
| | | FBS9100_Task_Thread_SQL.createAppLog4jTable(m_Conn_Pool, |
| | | Sql_Mysql.DB_AppSys + ".`" + AppLog4jTableName + "`");
|
| | | logger.warn(Sql_Mysql.DB_AppSys + ".`" + AppLog4jTableName + "`" + " dose not exist, create now..." );
|
| | | }
|
| | | } catch (Exception e) {
|
| | | logger.error(e.toString(), e);
|
| | | } finally {
|
| | | try {
|
| | | sql.close_con();
|
| | | } catch (Exception e) {
|
| | | logger.error(e.toString(), e);
|
| | | }
|
| | | }
|
| | | }
|
| | | |
| | | public void checkAndDeleteLog4jOldData() {
|
| | | Sql_Mysql sql = null;
|
| | | try {
|
| | | sql = new Sql_Mysql(m_Conn_Pool);
|
| | | FBS9100_Task_Thread_SQL.deleteAppLog4jTableOldData(m_Conn_Pool, |
| | | Sql_Mysql.DB_AppSys + ".`" + AppLog4jTableName + "`");
|
| | | } catch (Exception e) {
|
| | | logger.error(e.toString(), e);
|
| | | } finally {
|
| | | try {
|
| | | sql.close_con();
|
| | | } catch (Exception e) {
|
| | | logger.error(e.toString(), e);
|
| | | }
|
| | | }
|
| | | }
|
| | | */
|
| | | /**
|
| | | * 将param对象中的属性值复制 到的当前对象的m_MonitorParam属性中
|
| | | * @param param
|
| | | */
|
| | | public void copyAppParam(AppParam param)
|
| | | {
|
| | | m_MonitorParam.discharge_SaveDataTimeInterval = param.m_MonitorParam.discharge_SaveDataTimeInterval;
|
| | | m_MonitorParam.discharge_TestTimeLongMinimum = param.m_MonitorParam.discharge_TestTimeLongMinimum;
|
| | | m_MonitorParam.discharge_BattTestGroupCountMax = param.m_MonitorParam.discharge_BattTestGroupCountMax;
|
| | | m_MonitorParam.discharge_MonVolChangeLevel = param.m_MonitorParam.discharge_MonVolChangeLevel;
|
| | | m_MonitorParam.discharge_TestDataRecordCountMax = param.m_MonitorParam.discharge_TestDataRecordCountMax;
|
| | | |
| | | m_MonitorParam.charge_SaveDataTimeInterval = param.m_MonitorParam.charge_SaveDataTimeInterval;
|
| | | m_MonitorParam.charge_TestTimeLongMinimum = param.m_MonitorParam.charge_TestTimeLongMinimum;
|
| | | m_MonitorParam.charge_BattTestGroupCountMax = param.m_MonitorParam.charge_BattTestGroupCountMax;
|
| | | m_MonitorParam.charge_MonVolChangeLevel = param.m_MonitorParam.charge_MonVolChangeLevel;
|
| | | m_MonitorParam.charge_TestDataRecordCountMax = param.m_MonitorParam.charge_TestDataRecordCountMax;
|
| | | |
| | | m_MonitorParam.poweroff_SaveDataTimeInterval = param.m_MonitorParam.poweroff_SaveDataTimeInterval;
|
| | | m_MonitorParam.poweroff_TestTimeLongMinimum = param.m_MonitorParam.poweroff_TestTimeLongMinimum;
|
| | | m_MonitorParam.poweroff_BattTestGroupCountMax = param.m_MonitorParam.poweroff_BattTestGroupCountMax;
|
| | | m_MonitorParam.poweroff_MonVolChangeLevel = param.m_MonitorParam.poweroff_MonVolChangeLevel;
|
| | | m_MonitorParam.poweroff_TestDataRecordCountMax = param.m_MonitorParam.poweroff_TestDataRecordCountMax;
|
| | | }
|
| | | |
| | | class MonitorParam {
|
| | | public int discharge_SaveDataTimeInterval = 10;
|
| | | public float discharge_MonVolChangeLevel = (float) 0.05;
|
| | | public int discharge_TestTimeLongMinimum = 60;
|
| | | public int discharge_TestDataRecordCountMax = 10000;
|
| | | public int discharge_BattTestGroupCountMax = 10;
|
| | | |
| | | public int charge_SaveDataTimeInterval = 10;
|
| | | public float charge_MonVolChangeLevel = (float) 0.05;
|
| | | public int charge_TestTimeLongMinimum = 60;
|
| | | public int charge_TestDataRecordCountMax = 10000;
|
| | | public int charge_BattTestGroupCountMax = 10;
|
| | | |
| | | public int poweroff_SaveDataTimeInterval = 10;
|
| | | public float poweroff_MonVolChangeLevel = (float) 0.05;
|
| | | public int poweroff_TestTimeLongMinimum = 1800;
|
| | | public int poweroff_TestDataRecordCountMax = 10000;
|
| | | public int poweroff_BattTestGroupCountMax = 10;
|
| | | |
| | | public boolean BattJunHengFN = false;
|
| | | }
|
| | | |
| | | |
| | | /**
|
| | | * 根据type获取当前是那种类型的测试,获取存储数据的时间间隔
|
| | | * @param type
|
| | | * @return
|
| | | */
|
| | | public int getSaveDataTimeInterval(int type)
|
| | | {
|
| | | int val = 0;
|
| | | switch(type)
|
| | | {
|
| | | case AppParam_Discharge: val = m_MonitorParam.discharge_SaveDataTimeInterval; |
| | | break;
|
| | | case AppParam_Charge: val = m_MonitorParam.charge_SaveDataTimeInterval; |
| | | break;
|
| | | case AppParam_PowerOff: val = m_MonitorParam.poweroff_SaveDataTimeInterval; |
| | | break;
|
| | | }
|
| | | return val;
|
| | | }
|
| | | |
| | | /**
|
| | | * 根据type获取MonVolChangeLevel
|
| | | * @param type
|
| | | * @return
|
| | | */
|
| | | public float getMonVolChangeLevel(int type)
|
| | | {
|
| | | float val = 0;
|
| | | switch(type)
|
| | | {
|
| | | case AppParam_Discharge: val = m_MonitorParam.discharge_MonVolChangeLevel; |
| | | break;
|
| | | case AppParam_Charge: val = m_MonitorParam.charge_MonVolChangeLevel; |
| | | break;
|
| | | case AppParam_PowerOff: val = m_MonitorParam.poweroff_MonVolChangeLevel; |
| | | break;
|
| | | }
|
| | | return val;
|
| | | }
|
| | | |
| | | /**
|
| | | * 根据type获取TestTimeLongMinimum值
|
| | | * @param type
|
| | | * @return
|
| | | */
|
| | | public int getTestTimeLongMinimum(int type)
|
| | | {
|
| | | int val = 0;
|
| | | switch(type)
|
| | | {
|
| | | case AppParam_Discharge: val = m_MonitorParam.discharge_TestTimeLongMinimum; |
| | | break;
|
| | | case AppParam_Charge: val = m_MonitorParam.charge_TestTimeLongMinimum; |
| | | break;
|
| | | case AppParam_PowerOff: val = m_MonitorParam.poweroff_TestTimeLongMinimum; |
| | | break;
|
| | | }
|
| | | return val;
|
| | | }
|
| | | |
| | | /**
|
| | | * 根据type 获取数据中的TestDataRecordCountMax值
|
| | | * @param type
|
| | | * @return
|
| | | */
|
| | | public int getTestDataRecordCountMax(int type)
|
| | | {
|
| | | int val = 0;
|
| | | switch(type)
|
| | | {
|
| | | case AppParam_Discharge: val = m_MonitorParam.discharge_TestDataRecordCountMax; |
| | | break;
|
| | | case AppParam_Charge: val = m_MonitorParam.charge_TestDataRecordCountMax; |
| | | break;
|
| | | case AppParam_PowerOff: val = m_MonitorParam.poweroff_TestDataRecordCountMax; |
| | | break;
|
| | | }
|
| | | return val;
|
| | | }
|
| | | |
| | | /**
|
| | | * 根据type获取BattTestGroupCountMax值
|
| | | * @param type
|
| | | * @return
|
| | | */
|
| | | public int getBattTestGroupCountMax(int type)
|
| | | {
|
| | | int val = 0;
|
| | | switch(type)
|
| | | {
|
| | | case AppParam_Discharge: val = m_MonitorParam.discharge_BattTestGroupCountMax; |
| | | break;
|
| | | case AppParam_Charge: val = m_MonitorParam.charge_BattTestGroupCountMax; |
| | | break;
|
| | | case AppParam_PowerOff: val = m_MonitorParam.poweroff_BattTestGroupCountMax; |
| | | break;
|
| | | }
|
| | | return val;
|
| | | }
|
| | | |
| | | /**
|
| | | * 获取当前对象属性 m_MonitorParam.BattJunHengFN值
|
| | | * @return
|
| | | */
|
| | | public boolean getBattJunHengFN()
|
| | | {
|
| | | return m_MonitorParam.BattJunHengFN;
|
| | | }
|
| | | |
| | | /**
|
| | | * 从数据库中获取参数的值,并且创建tb_app_param表
|
| | | */
|
| | | public void getAppParam()
|
| | | {
|
| | | Sql_Mysql sql = new Sql_Mysql(m_Conn_Pool.getConn());
|
| | | String sql_str;
|
| | | ResultSet res = null;
|
| | | sql_str = "INSERT INTO " + Sql_Mysql.App_Param_Table
|
| | | + " (param_name, "
|
| | | + "param_value, "
|
| | | + "param_caption)"
|
| | | + " VALUES ";
|
| | | try {
|
| | | res = sql.sqlMysqlQuery("SELECT * FROM " + Sql_Mysql.App_Param_Table + " WHERE param_name = 'discharge_SaveDataTimeInterval'");
|
| | | if(!res.next()) {
|
| | | sql.sqlMysqlExecute(sql_str + "('discharge_SaveDataTimeInterval', '" + this.m_MonitorParam.discharge_SaveDataTimeInterval + "','discharge_TimeInterval for every data insert into db_batt_testdata by seconds')");
|
| | | }
|
| | | |
| | | res = sql.sqlMysqlQuery("SELECT * FROM " + Sql_Mysql.App_Param_Table + " WHERE param_name = 'discharge_MonVolChangeLevel'");
|
| | | if(!res.next()) {
|
| | | sql.sqlMysqlExecute(sql_str + "('discharge_MonVolChangeLevel', '" + this.m_MonitorParam.discharge_MonVolChangeLevel+ "', "+ "'discharge_MonVolChangeLevel for batt test data to save');");
|
| | | } |
| | | |
| | | res = sql.sqlMysqlQuery("SELECT * FROM " + Sql_Mysql.App_Param_Table + " WHERE param_name = 'discharge_TestTimeLongMinimum'");
|
| | | if(!res.next()) {
|
| | | sql.sqlMysqlExecute(sql_str + "('discharge_TestTimeLongMinimum', '" + this.m_MonitorParam.discharge_TestTimeLongMinimum + "', " + "'discharge_TestTimeLongMinimum for batttest data to store');");
|
| | | }
|
| | | |
| | | res = sql.sqlMysqlQuery("SELECT * FROM " + Sql_Mysql.App_Param_Table + " WHERE param_name = 'discharge_TestDataRecordCountMax'");
|
| | | if(!res.next()) {
|
| | | sql.sqlMysqlExecute(sql_str + "('discharge_TestDataRecordCountMax', '" + this.m_MonitorParam.discharge_TestDataRecordCountMax + "', " + "'discharge_TestDataRecordCountMax for batttest data count to insert to mysql server');");
|
| | | } |
| | | |
| | | res = sql.sqlMysqlQuery("SELECT * FROM " + Sql_Mysql.App_Param_Table + " WHERE param_name = 'discharge_BattTestGroupCountMax'");
|
| | | if(!res.next()) {
|
| | | sql.sqlMysqlExecute(sql_str + "('discharge_BattTestGroupCountMax', '" + this.m_MonitorParam.discharge_BattTestGroupCountMax + "', " + "'discharge_BattTestGroupCountMax for batttest thread count to work at the same time');");
|
| | | }
|
| | | //-------------------------------------------------------------------------------//
|
| | | res = sql.sqlMysqlQuery("SELECT * FROM " + Sql_Mysql.App_Param_Table + " WHERE param_name = 'charge_SaveDataTimeInterval'");
|
| | | if(!res.next()) {
|
| | | sql.sqlMysqlExecute(sql_str + "('charge_SaveDataTimeInterval', '" + this.m_MonitorParam.charge_SaveDataTimeInterval + "', " + "'charge_TimeInterval for every data insert into db_batt_testdata by seconds');");
|
| | | }
|
| | | |
| | | res = sql.sqlMysqlQuery("SELECT * FROM " + Sql_Mysql.App_Param_Table + " WHERE param_name = 'charge_MonVolChangeLevel'");
|
| | | if(!res.next()) {
|
| | | sql.sqlMysqlExecute(sql_str + "('charge_MonVolChangeLevel', '" + this.m_MonitorParam.charge_MonVolChangeLevel + "', " + "'charge_MonVolChangeLevel for batt test data to save');");
|
| | | }
|
| | | |
| | | res = sql.sqlMysqlQuery("SELECT * FROM " + Sql_Mysql.App_Param_Table + " WHERE param_name = 'charge_TestTimeLongMinimum'");
|
| | | if(!res.next()) {
|
| | | sql.sqlMysqlExecute(sql_str + "('charge_TestTimeLongMinimum', '" + this.m_MonitorParam.charge_TestTimeLongMinimum + "', " + "'charge_TestTimeLongMinimum for batttest data to store');");
|
| | | }
|
| | | |
| | | res = sql.sqlMysqlQuery("SELECT * FROM " + Sql_Mysql.App_Param_Table + " WHERE param_name = 'charge_TestDataRecordCountMax'");
|
| | | if(!res.next()) {
|
| | | sql.sqlMysqlExecute(sql_str + "('charge_TestDataRecordCountMax', '" + this.m_MonitorParam.charge_TestDataRecordCountMax + "', " + "'charge_TestDataRecordCountMax for batttest data count to insert to mysql server');");
|
| | | }
|
| | | |
| | | res = sql.sqlMysqlQuery("SELECT * FROM " + Sql_Mysql.App_Param_Table + " WHERE param_name = 'charge_BattTestGroupCountMax'");
|
| | | if(!res.next()) {
|
| | | sql.sqlMysqlExecute(sql_str + "('charge_BattTestGroupCountMax', '" + this.m_MonitorParam.charge_BattTestGroupCountMax + "', " + "'charge_BattTestGroupCountMax for batttest thread count to work at the same time')");
|
| | | }
|
| | | //-------------------------------------------------------------------------------//
|
| | | |
| | | res = sql.sqlMysqlQuery("SELECT * FROM " + Sql_Mysql.App_Param_Table + " WHERE param_name = 'poweroff_SaveDataTimeInterval'");
|
| | | if(!res.next()) {
|
| | | sql.sqlMysqlExecute(sql_str + "('poweroff_SaveDataTimeInterval', '" + this.m_MonitorParam.poweroff_SaveDataTimeInterval + "', " + "'poweroff_TimeInterval for every data insert into db_batt_testdata by seconds');");
|
| | | }
|
| | | |
| | | res = sql.sqlMysqlQuery("SELECT * FROM " + Sql_Mysql.App_Param_Table + " WHERE param_name = 'poweroff_MonVolChangeLevel'");
|
| | | if(!res.next()) {
|
| | | sql.sqlMysqlExecute(sql_str + "('poweroff_MonVolChangeLevel', '" + this.m_MonitorParam.poweroff_MonVolChangeLevel + "', " + "'poweroff_MonVolChangeLevel for batt test data to save');");
|
| | | }
|
| | | |
| | | res = sql.sqlMysqlQuery("SELECT * FROM " + Sql_Mysql.App_Param_Table + " WHERE param_name = 'poweroff_TestTimeLongMinimum'");
|
| | | if(!res.next()) {
|
| | | sql.sqlMysqlExecute(sql_str + "('poweroff_TestTimeLongMinimum', '" + this.m_MonitorParam.poweroff_TestTimeLongMinimum + "', " + "'poweroff_TestTimeLongMinimum for batttest data to store')");
|
| | | }
|
| | | |
| | | res = sql.sqlMysqlQuery("SELECT * FROM " + Sql_Mysql.App_Param_Table + " WHERE param_name = 'poweroff_TestDataRecordCountMax'");
|
| | | if(!res.next()) {
|
| | | sql.sqlMysqlExecute(sql_str + "('poweroff_TestDataRecordCountMax', '" + this.m_MonitorParam.poweroff_TestDataRecordCountMax + "', " + "'poweroff_TestDataRecordCountMax for batttest data count to insert to mysql server')");
|
| | | }
|
| | | |
| | | res = sql.sqlMysqlQuery("SELECT * FROM " + Sql_Mysql.App_Param_Table + " WHERE param_name = 'poweroff_BattTestGroupCountMax'");
|
| | | if(!res.next()) {
|
| | | sql.sqlMysqlExecute(sql_str + "('poweroff_BattTestGroupCountMax', '" + this.m_MonitorParam.poweroff_BattTestGroupCountMax + "', " + "'poweroff_BattTestGroupCountMax for batttest thread count to work at the same time')");
|
| | | }
|
| | | |
| | | //-------------------------------------------------------------------------------//
|
| | | res = sql.sqlMysqlQuery("SELECT * FROM " + Sql_Mysql.App_Param_Table + " WHERE param_name = 'BattJunHengFN'");
|
| | | if(!res.next()) {
|
| | | sql.sqlMysqlExecute(sql_str + "('BattJunHengFN', '" + this.m_MonitorParam.BattJunHengFN + "', " + "'BattJunHengFN for batt monomer to be balance')");
|
| | | }
|
| | | |
| | | sql_str = "SELECT * FROM " + Sql_Mysql.App_Param_Table;
|
| | | res = sql.sqlMysqlQuery(sql_str);
|
| | | String pm_name;
|
| | | while(res.next())
|
| | | {
|
| | | pm_name = res.getString("param_name");
|
| | | //---------------------------------------------------------------------------//
|
| | | if(pm_name.equals("discharge_SaveDataTimeInterval"))
|
| | | m_MonitorParam.discharge_SaveDataTimeInterval = res.getInt("param_value");
|
| | | else if(pm_name.equals("discharge_MonVolChangeLevel"))
|
| | | m_MonitorParam.discharge_MonVolChangeLevel = res.getFloat("param_value");
|
| | | else if(pm_name.equals("discharge_TestTimeLongMinimum"))
|
| | | m_MonitorParam.discharge_TestTimeLongMinimum = res.getInt("param_value");
|
| | | else if(pm_name.equals("discharge_TestDataRecordCountMax"))
|
| | | m_MonitorParam.discharge_TestDataRecordCountMax = res.getInt("param_value");
|
| | | else if(pm_name.equals("discharge_BattTestGroupCountMax"))
|
| | | m_MonitorParam.discharge_BattTestGroupCountMax = res.getInt("param_value");
|
| | | //---------------------------------------------------------------------------//
|
| | | else if(pm_name.equals("charge_SaveDataTimeInterval"))
|
| | | m_MonitorParam.charge_SaveDataTimeInterval = res.getInt("param_value");
|
| | | else if(pm_name.equals("charge_MonVolChangeLevel"))
|
| | | m_MonitorParam.charge_MonVolChangeLevel = res.getFloat("param_value");
|
| | | else if(pm_name.equals("charge_TestTimeLongMinimum"))
|
| | | m_MonitorParam.charge_TestTimeLongMinimum = res.getInt("param_value");
|
| | | else if(pm_name.equals("charge_TestDataRecordCountMax"))
|
| | | m_MonitorParam.charge_TestDataRecordCountMax = res.getInt("param_value");
|
| | | else if(pm_name.equals("charge_BattTestGroupCountMax"))
|
| | | m_MonitorParam.charge_BattTestGroupCountMax = res.getInt("param_value");
|
| | | //---------------------------------------------------------------------------//
|
| | | else if(pm_name.equals("poweroff_SaveDataTimeInterval"))
|
| | | m_MonitorParam.poweroff_SaveDataTimeInterval = res.getInt("param_value");
|
| | | else if(pm_name.equals("poweroff_MonVolChangeLevel"))
|
| | | m_MonitorParam.poweroff_MonVolChangeLevel = res.getFloat("param_value");
|
| | | else if(pm_name.equals("poweroff_TestTimeLongMinimum"))
|
| | | m_MonitorParam.poweroff_TestTimeLongMinimum = res.getInt("param_value");
|
| | | else if(pm_name.equals("poweroff_TestDataRecordCountMax"))
|
| | | m_MonitorParam.poweroff_TestDataRecordCountMax = res.getInt("param_value");
|
| | | else if(pm_name.equals("poweroff_BattTestGroupCountMax"))
|
| | | m_MonitorParam.poweroff_BattTestGroupCountMax = res.getInt("param_value");
|
| | | //---------------------------------------------------------------------------//
|
| | | else if(pm_name.equals("BattJunHengFN"))
|
| | | m_MonitorParam.BattJunHengFN = res.getBoolean("param_value");
|
| | | }
|
| | | } catch (SQLException e) {
|
| | | logger.error(e.toString(), e);
|
| | | } finally {
|
| | | sql.close_con();
|
| | | }
|
| | | //--------------------------------------------------------------------------------------------------------//
|
| | | if(m_MonitorParam.discharge_SaveDataTimeInterval < 5) m_MonitorParam.discharge_SaveDataTimeInterval = 5;
|
| | | if(m_MonitorParam.discharge_SaveDataTimeInterval > 600) m_MonitorParam.discharge_SaveDataTimeInterval = 600;
|
| | | |
| | | if(m_MonitorParam.discharge_MonVolChangeLevel < 0.001) m_MonitorParam.discharge_MonVolChangeLevel = (float) 0.001;
|
| | | if(m_MonitorParam.discharge_MonVolChangeLevel > 1) m_MonitorParam.discharge_MonVolChangeLevel = 1;
|
| | | |
| | | if(m_MonitorParam.discharge_TestTimeLongMinimum < 60) m_MonitorParam.discharge_TestTimeLongMinimum = 60;
|
| | | if(m_MonitorParam.discharge_TestTimeLongMinimum > 3600) m_MonitorParam.discharge_TestTimeLongMinimum = 3600;
|
| | | |
| | | if(m_MonitorParam.discharge_TestDataRecordCountMax < 5000) m_MonitorParam.discharge_TestDataRecordCountMax = 5000;
|
| | | if(m_MonitorParam.discharge_TestDataRecordCountMax > 20000) m_MonitorParam.discharge_TestDataRecordCountMax = 20000;
|
| | | |
| | | if(m_MonitorParam.discharge_BattTestGroupCountMax < 10) m_MonitorParam.discharge_BattTestGroupCountMax = 10;
|
| | | if(m_MonitorParam.discharge_BattTestGroupCountMax > 350) m_MonitorParam.discharge_BattTestGroupCountMax = 350;
|
| | | //--------------------------------------------------------------------------------------------------------//
|
| | | if(m_MonitorParam.charge_SaveDataTimeInterval < 5) m_MonitorParam.charge_SaveDataTimeInterval = 5;
|
| | | if(m_MonitorParam.charge_SaveDataTimeInterval > 600) m_MonitorParam.charge_SaveDataTimeInterval = 600;
|
| | | |
| | | if(m_MonitorParam.charge_MonVolChangeLevel < 0.001) m_MonitorParam.charge_MonVolChangeLevel = (float) 0.001;
|
| | | if(m_MonitorParam.charge_MonVolChangeLevel > 1) m_MonitorParam.charge_MonVolChangeLevel = 1;
|
| | | |
| | | if(m_MonitorParam.charge_TestTimeLongMinimum < 60) m_MonitorParam.charge_TestTimeLongMinimum = 60;
|
| | | if(m_MonitorParam.charge_TestTimeLongMinimum > 3600) m_MonitorParam.charge_TestTimeLongMinimum = 3600;
|
| | | |
| | | if(m_MonitorParam.charge_TestDataRecordCountMax < 5000) m_MonitorParam.charge_TestDataRecordCountMax = 5000;
|
| | | if(m_MonitorParam.charge_TestDataRecordCountMax > 20000) m_MonitorParam.charge_TestDataRecordCountMax = 20000;
|
| | | |
| | | if(m_MonitorParam.charge_BattTestGroupCountMax < 10) m_MonitorParam.charge_BattTestGroupCountMax = 10;
|
| | | if(m_MonitorParam.charge_BattTestGroupCountMax > 350) m_MonitorParam.charge_BattTestGroupCountMax = 350;
|
| | | //--------------------------------------------------------------------------------------------------------//
|
| | | if(m_MonitorParam.poweroff_SaveDataTimeInterval < 5) m_MonitorParam.poweroff_SaveDataTimeInterval = 5;
|
| | | if(m_MonitorParam.poweroff_SaveDataTimeInterval > 600) m_MonitorParam.poweroff_SaveDataTimeInterval = 600;
|
| | | |
| | | if(m_MonitorParam.poweroff_MonVolChangeLevel < 0.001) m_MonitorParam.poweroff_MonVolChangeLevel = (float) 0.001;
|
| | | if(m_MonitorParam.poweroff_MonVolChangeLevel > 1) m_MonitorParam.poweroff_MonVolChangeLevel = 1;
|
| | | |
| | | if(m_MonitorParam.poweroff_TestTimeLongMinimum < 60) m_MonitorParam.poweroff_TestTimeLongMinimum = 60;
|
| | | if(m_MonitorParam.poweroff_TestTimeLongMinimum > 3600) m_MonitorParam.poweroff_TestTimeLongMinimum = 3600;
|
| | | |
| | | if(m_MonitorParam.poweroff_TestDataRecordCountMax < 5000) m_MonitorParam.poweroff_TestDataRecordCountMax = 5000;
|
| | | if(m_MonitorParam.poweroff_TestDataRecordCountMax > 20000) m_MonitorParam.poweroff_TestDataRecordCountMax = 20000;
|
| | | |
| | | if(m_MonitorParam.poweroff_BattTestGroupCountMax < 10) m_MonitorParam.poweroff_BattTestGroupCountMax = 10;
|
| | | if(m_MonitorParam.poweroff_BattTestGroupCountMax > 350) m_MonitorParam.poweroff_BattTestGroupCountMax = 350;
|
| | | //--------------------------------------------------------------------------------------------------------//
|
| | | }
|
| | | }
|