| | |
| | | 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";
|
| | | // }
|
| | | |
| | | //兼容正常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"));
|
| | | }
|
| | |
|
| | | /*********************************************************************************************/
|