| | |
| | | sleep(1500);
|
| | | **************************************************************************/
|
| | | if (true == write_res_t) {
|
| | | if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para1.setMag.f"))
|
| | | if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para1.setMag.f"));
|
| | | writeNodeData(FBSDeviceName + "/ncdGGIO1.Para1.setMag.f", "SP",(float) m_StatAndParam.m_FBS_DiscParam.DisCurr);
|
| | | float dis_hour_t = m_StatAndParam.m_FBS_DiscParam.DisTime;
|
| | | dis_hour_t = dis_hour_t / 60;
|
| | | if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para2.setMag.f"))
|
| | | if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para2.setMag.f"));
|
| | | writeNodeData(FBSDeviceName + "/ncdGGIO1.Para2.setMag.f", "SP", (float) dis_hour_t);
|
| | | if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para3.setMag.f"))
|
| | | if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para3.setMag.f"));
|
| | | writeNodeData(FBSDeviceName + "/ncdGGIO1.Para3.setMag.f", "SP", (float) m_StatAndParam.m_FBS_DiscParam.DisCap);
|
| | | if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para4.setMag.f"))
|
| | | if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para4.setMag.f"));
|
| | | writeNodeData(FBSDeviceName + "/ncdGGIO1.Para4.setMag.f", "SP", (float) m_StatAndParam.m_FBS_DiscParam.getMonomerLowCount());
|
| | | if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para5.setMag.f"))
|
| | | if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para5.setMag.f"));
|
| | | writeNodeData(FBSDeviceName + "/ncdGGIO1.Para5.setMag.f", "SP", (float) m_StatAndParam.m_FBS_DiscParam.GroupVol_LOW);
|
| | | if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para6.setMag.f"))
|
| | | if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para6.setMag.f"));
|
| | | writeNodeData(FBSDeviceName + "/ncdGGIO1.Para6.setMag.f", "SP", (float) m_StatAndParam.m_FBS_DiscParam.MonomerVol_LOW);
|
| | | if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para7.setMag.f"));
|
| | | writeNodeData(FBSDeviceName + "/ncdGGIO1.Para7.setMag.f", "SP", (float) m_StatAndParam.m_FBS_DiscParam.MonomerTmp_High);
|
| | | if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/btgGGIO1.Para1.setMag.f"))
|
| | | if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/btgGGIO1.Para1.setMag.f"));
|
| | | writeNodeData(FBSDeviceName + "/btgGGIO1.Para1.setMag.f", "SP", (float) m_StatAndParam.m_FBS_DiscParam.ChargeCurrSet);
|
| | | //if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/btgGGIO1.Para2.setMag.f")) return false;
|
| | | //writeNodeData(FBSDeviceName + "/btgGGIO1.Para2.setMag.f", "SP", (float) m_StatAndParam.m_FBS_DiscParam.DCVolHighLimit);
|
| | |
| | | try {
|
| | | //System.out.println("YKey:"+m_StatAndParam.Crc32publicKeyY);
|
| | | //writeNodeDataString(FBSDeviceName+"/ncdGGIO1.key.setMag.i", "SP",m_StatAndParam.publicKeyY);
|
| | | //System.err.println("BTSID:"+m_StatAndParam.serialNumber+moderoot);
|
| | | logger.error("BTSID:"+m_StatAndParam.serialNumber+moderoot);
|
| | | //System.err.println(m_StatAndParam.serialNumber);
|
| | | //System.err.println("UKYID:"+m_StatAndParam.keyID);
|
| | | logger.error("UKYID:"+m_StatAndParam.keyID);
|
| | | //System.err.println("签名:"+signature);
|
| | | if(m_StatAndParam.serialNumber.trim().length() > 0 && m_StatAndParam.keyID.trim().length() > 0) {
|
| | | String signature = createSignature(m_StatAndParam.serialNumber+moderoot, m_StatAndParam.keyID); //生成签名
|
| | |
| | | Thread.sleep(900);
|
| | | return true;
|
| | | }
|
| | | Thread.sleep(900);
|
| | | //writeNodeDataString(FBSDeviceName+"/ncdGGIO1.sign.setVal", "SP",m_StatAndParam.publicKeyY);
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | logger.error(e.toString(), e);
|
| | | }
|
| | | return false;
|
| | | return true;
|
| | | }
|
| | |
|
| | |
|
| | |
| | | * 生成SM2数据签名
|
| | | * @return
|
| | | */
|
| | | public static String createSignature(String BTSID,String UkeyID) {
|
| | | public String createSignature(String BTSID,String UkeyID) {
|
| | | String str = "";
|
| | | BufferedReader stdout = null;
|
| | | try {
|
| | | Process proc=Runtime.getRuntime().exec("sign_test.exe "+BTSID+" "+UkeyID);
|
| | | String OS = System.getProperty("os.name").toLowerCase();
|
| | | String cmd = "";
|
| | | if(OS.contains("window")) {
|
| | | cmd = "sign_test.exe";
|
| | | }else {
|
| | | cmd = "./sign_test.exe";
|
| | | }
|
| | | |
| | | Process proc=Runtime.getRuntime().exec(cmd + " "+BTSID+" "+UkeyID);
|
| | | //Process proc=Runtime.getRuntime().exec("sign_calukey_x64.exe "+BTSID+" "+UkeyID);
|
| | | stdout = new BufferedReader(new InputStreamReader(proc.getInputStream()));
|
| | | str = stdout.readLine();
|
| | | System.out.println("内部验签计算签名:"+str);
|
| | | logger.info("内部验签计算签名:"+str);
|
| | | //System.out.println("调试----:"+stdout.readLine());
|
| | |
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | logger.error(e.toString(), e);
|
| | | } finally {
|
| | | if(null != stdout) {
|
| | | try {
|
| | | stdout.close();
|
| | | } catch (IOException e) {
|
| | | e.printStackTrace();
|
| | | logger.error(e.toString(), e);
|
| | | }
|
| | | }
|
| | | }
|