V2.102 edit by lijun @ 2023-08-16
1.当前版本修改为南瑞协转的通信程序
2.兼容正常1托2和常规1托2
| | |
| | |
|
| | | V2.102 edit by lijun @ 2023-08-16
|
| | | 1.当前版本修改为南瑞协转的通信程序
|
| | | 2.兼容正常1托2和常规1托2
|
| | |
|
| | |
|
| | | V6.102 edit by lijun @ 2023-08-16
|
| | |
| | | <SizeBasedTriggeringPolicy size="20MB"/>
|
| | | </Policies>
|
| | | <!--保存日志文件个数-->
|
| | | <DefaultRolloverStrategy max="9"/>
|
| | | <DefaultRolloverStrategy max="15">
|
| | | <Delete basePath="${LOG_HOME}/" maxDepth="2">
|
| | | <IfFileName glob="*.log.gz" >
|
| | | <IfAny>
|
| | | <IfAccumulatedFileCount exceeds="14" />
|
| | | </IfAny>
|
| | | </IfFileName>
|
| | | <!--!Note: 这里的age必须和filePattern协调, 后者是精确到dd, 这里就要写成xd, xD就不起作用,另外, 数字最好>2, 否则可能造成删除的时候, 最近的文件还处于被占用状态,导致删除不成功!-->
|
| | | <!--30天-->
|
| | | </Delete>
|
| | | </DefaultRolloverStrategy>
|
| | | </RollingFile>
|
| | |
|
| | | <!--error级别日志输出-->
|
| | |
| | | <SizeBasedTriggeringPolicy size="20MB"/>
|
| | | </Policies>
|
| | | <!--保存日志文件个数-->
|
| | | <DefaultRolloverStrategy max="9"/>
|
| | | <DefaultRolloverStrategy max="15">
|
| | | <Delete basePath="${LOG_HOME}/" maxDepth="2">
|
| | | <IfFileName glob="*.log.gz" >
|
| | | <IfAny>
|
| | | <IfAccumulatedFileCount exceeds="14" />
|
| | | </IfAny>
|
| | | </IfFileName>
|
| | | <!--!Note: 这里的age必须和filePattern协调, 后者是精确到dd, 这里就要写成xd, xD就不起作用,另外, 数字最好>2, 否则可能造成删除的时候, 最近的文件还处于被占用状态,导致删除不成功!-->
|
| | | <!--30天-->
|
| | | </Delete>
|
| | | </DefaultRolloverStrategy>
|
| | | </RollingFile>
|
| | |
|
| | | <!--error级别日志输出-->
|
| | |
| | | public int mSaveDataTimeInterval = 10;
|
| | | private float mDataHistoryNewLevel = (float) 0.01;
|
| | | private int mTestDataRecordCountMax = 10000;
|
| | |
|
| | | public int sign_type;
|
| | |
|
| | | Logger logger = null;
|
| | | /*********************************************************************************/
|
| | |
| | |
|
| | | String sql_str = "SELECT DISTINCT "
|
| | | + " FBSDeviceId,FBSDeviceIp,BattGroupName6,GroupIndexInFBSDevice,FBSDeviceName,"
|
| | | + " BattGroupId,BattGroupNum,MonCount,BattFloatCurrent,FloatVolLevel,MonCapStd,MonVolStd"
|
| | | + " BattGroupId,BattGroupNum,MonCount,BattFloatCurrent,FloatVolLevel,MonCapStd,MonVolStd,sign_type"
|
| | | + " FROM " + Sql_Mysql.BattInf_Table
|
| | | + " WHERE FLOOR(FBSDeviceId/10000)=61850"
|
| | | + " ORDER BY BattGroupId ASC";
|
| | |
| | | float float_vol_lev = res.getFloat("FloatVolLevel");
|
| | | float float_curr_lev = res.getFloat("BattFloatCurrent");
|
| | | int GroupIndexInFBSDevice = res.getInt("GroupIndexInFBSDevice");
|
| | | int sign_type = res.getInt("sign_type");
|
| | | if(GroupIndexInFBSDevice > 3) {
|
| | | GroupIndexInFBSDevice = 3;
|
| | | }
|
| | |
| | | brt.GroupIndexInFBSDevice = GroupIndexInFBSDevice;
|
| | | param_changed = true;
|
| | | }
|
| | | if(sign_type != brt.sign_type) {
|
| | | brt.sign_type = sign_type;
|
| | | param_changed = true;
|
| | | }
|
| | |
|
| | | if(true == param_changed) {
|
| | | FBS9100_Task_Thread_SQL.update_BTS_BattGroupState_Table(m_Conn_Pool, brt.FBSDeviceId, brt.BattGroupId,
|
| | |
| | | rtdata.FBSDeviceName = res.getString("FBSDeviceName").trim();
|
| | | rtdata.setDevRegCode(res.getString("BattGroupName6").trim());
|
| | | rtdata.GroupIndexInFBSDevice = res.getInt("GroupIndexInFBSDevice");
|
| | | rtdata.sign_type = res.getInt("sign_type");
|
| | | if(rtdata.GroupIndexInFBSDevice > 3) {
|
| | | rtdata.GroupIndexInFBSDevice = 3;
|
| | | }
|
| | |
| | | import org.openmuc.openiec61850.clientgui.databind.Int64DataBind;
|
| | | import org.openmuc.openiec61850.clientgui.databind.VisibleStringDataBind;
|
| | |
|
| | | import com.base.AppConfig;
|
| | | import com.base.Com;
|
| | | import com.battdata_rt.BattData_RT;
|
| | | import com.battdata_rt.BattData_RT_Array;
|
| | |
| | |
|
| | | /****************************************************************************************************/
|
| | | public class BTS_61850_SocketClient extends Thread {
|
| | | public static final int Sign_Type_Default = 0;
|
| | | public static final int Sign_Type_InTow = 1; //正常1托2
|
| | | |
| | | private boolean m_App_IsAlive = true;
|
| | | private FBS9100_VCData m_FBS_VCData = null;
|
| | | private FBS9100_ParamDischarge m_FBS_DiscParam = null;
|
| | |
| | | * @param agree
|
| | | * @return
|
| | | */
|
| | | public static String getUKEYRootDomStr(String agree) { |
| | | public String getUKEYRootDomStr(String agree) { |
| | | String str1=agree.substring(0, agree.indexOf("BTSE"));
|
| | | /**
|
| | | * @lijun 兼容佛山三期版本,签名中的BTSE路径一拖一和一拖二均为BTSE
|
| | |
| | | // if(str1.length() > 0) {
|
| | | // return "BTSE";
|
| | | // }
|
| | | return agree.substring(str1.length(), agree.length());
|
| | | |
| | | //兼容正常1托2
|
| | | if((null != m_RTData[0]) && (m_RTData[0].sign_type == Sign_Type_InTow)) { |
| | | return agree.substring(str1.length(), agree.length());
|
| | | }else {
|
| | | return "BTSE";
|
| | | }
|
| | | |
| | | }
|
| | |
|
| | | public static void main(String[] args) {
|
| | | System.out.println(getUKEYRootDomStr("ZJDYBTSE2"));
|
| | | //System.out.println(getUKEYRootDomStr("ZJDYBTSE2"));
|
| | | String btsid = "1234567890BTSE/ncdGGIO1.SPCSO2";
|
| | | String keyid = "37395256AD72043037395256AD720430";
|
| | | |
| | | System.out.println(createSignature(btsid, keyid));
|
| | | |
| | | |
| | | MysqlConnPool pool = new MysqlConnPool("127.0.0.1", 3360, 10);
|
| | | BTS_61850_SocketClient ce = new BTS_61850_SocketClient(pool, new FBS9100_StatAndParam("127.0.01", 618500001), new BattData_RT_Array(new AppConfig(), new AppParam(), pool) , null);
|
| | | ce.m_RTData[0] = new BattData_RT(new AppConfig(), new AppParam(), pool);
|
| | | ce.m_RTData[0].sign_type = 0;
|
| | | |
| | | |
| | | System.out.println(ce.getUKEYRootDomStr("ZJDYBTSE2"));
|
| | | }
|
| | |
|
| | | /*********************************************************************************************/
|
| | |
| | |
|
| | | V2.102 edit by lijun @ 2023-08-16
|
| | | 1.当前版本修改为南瑞协转的通信程序
|
| | | 2.兼容正常1托2和常规1托2
|
| | |
|
| | |
|
| | | V6.102 edit by lijun @ 2023-08-16
|