From ea689ef369a3ac975b99eddc433029c19e981dd4 Mon Sep 17 00:00:00 2001
From: DELL <DELL@WIN-3EOIPEE9ML1>
Date: 星期三, 21 二月 2024 17:00:49 +0800
Subject: [PATCH] V6.105 edit by lijun    @  2024-02-21 	1.新增sign_type 标识当前设备是标准1托1还是标准1托2设备 		[注意:在连接的设备是标准1托2时,电池信息配置中请选择标准1托2]

---
 iec61850_forFoShanAES_Model/src/com/dec/fbs9100/BTS_61850_SocketClient.java |  168 +++++++++++++++++++++++++++++--------------------------
 1 files changed, 89 insertions(+), 79 deletions(-)

diff --git a/iec61850_forFoShanAES_Model/src/com/dec/fbs9100/BTS_61850_SocketClient.java b/iec61850_forFoShanAES_Model/src/com/dec/fbs9100/BTS_61850_SocketClient.java
index 33b40a6..30f5960 100644
--- a/iec61850_forFoShanAES_Model/src/com/dec/fbs9100/BTS_61850_SocketClient.java
+++ b/iec61850_forFoShanAES_Model/src/com/dec/fbs9100/BTS_61850_SocketClient.java
@@ -69,6 +69,9 @@
 	String FBSDeviceIp = "192.168.0.18";
 	private List<BTS61850_EventRecord> events; // 浜嬩欢璁板綍琛�
 	
+	
+	private int sign_type;					   //楠岀绫诲瀷0-鏍囧噯1鎵�1   1-鏍囧噯1鎵�2
+	
 	private String ZJDYCPSS = "ZJDYCPSS";
 
 	/*********************************************************************************************/
@@ -214,6 +217,10 @@
 			
 			while (true == Get_AppAliveState()) {
 				try {
+					if(null != m_RTData[0]) {
+						sign_type = m_RTData[0].sign_type;
+					}					
+					
 					if (m_StatAndParam != null) {
 						if (0 == (DevReadCount % 2)) {
 							FBS9100_Task_Thread_SQL.queryFbs9100SetParamBydev_id(m_ConnPool, m_StatAndParam); // 鏌ヨ鏀剧數鍙傛暟琛�
@@ -1188,25 +1195,25 @@
 				sleep(1500);
  				**************************************************************************/
 				if (true == write_res_t) {
-					if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para1.setMag.f")) return false;
+					if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.Para1.setMag.f")) return false;
 					comm_res = 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")) return false;
+					if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.Para2.setMag.f")) return false;
 					comm_res = comm_res&&writeNodeData(FBSDeviceName + "/ncdGGIO1.Para2.setMag.f", "SP", (float) dis_hour_t);
-					if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para3.setMag.f")) return false;
+					if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.Para3.setMag.f")) return false;
 					comm_res = comm_res&&writeNodeData(FBSDeviceName + "/ncdGGIO1.Para3.setMag.f", "SP",	(float) m_StatAndParam.m_FBS_DiscParam.DisCap);
-					if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para4.setMag.f")) return false;
+					if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.Para4.setMag.f")) return false;
 					comm_res = comm_res&&writeNodeData(FBSDeviceName + "/ncdGGIO1.Para4.setMag.f", "SP",	(float) m_StatAndParam.m_FBS_DiscParam.getMonomerLowCount());
-					if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para5.setMag.f")) return false;
+					if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.Para5.setMag.f")) return false;
 					comm_res = comm_res&&writeNodeData(FBSDeviceName + "/ncdGGIO1.Para5.setMag.f", "SP",	(float) m_StatAndParam.m_FBS_DiscParam.GroupVol_LOW);
-					if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para6.setMag.f")) return false;
+					if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.Para6.setMag.f")) return false;
 					comm_res = comm_res&&writeNodeData(FBSDeviceName + "/ncdGGIO1.Para6.setMag.f", "SP",	(float) m_StatAndParam.m_FBS_DiscParam.MonomerVol_LOW);
-					if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para7.setMag.f")) return false;
+					if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.Para7.setMag.f")) return false;
 					comm_res = comm_res&&writeNodeData(FBSDeviceName + "/ncdGGIO1.Para7.setMag.f", "SP",	(float) m_StatAndParam.m_FBS_DiscParam.MonomerTmp_High);
-					if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/btgGGIO1.Para1.setMag.f")) return false;
+					if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/btgGGIO1.Para1.setMag.f")) return false;
 					comm_res = comm_res&&writeNodeData(FBSDeviceName + "/btgGGIO1.Para1.setMag.f", "SP",	(float) m_StatAndParam.m_FBS_DiscParam.ChargeCurrSet);
-					if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/btgGGIO1.Para2.setMag.f")) return false;
+					if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/btgGGIO1.Para2.setMag.f")) return false;
 					comm_res = comm_res&&writeNodeData(FBSDeviceName + "/btgGGIO1.Para2.setMag.f", "SP",	(float) m_StatAndParam.m_FBS_DiscParam.DCVolHighLimit);
 					
 					//sleep(2000);
@@ -1280,7 +1287,7 @@
 											FBSDeviceIp, m_FBS_DiscParamFromDev);
 				//-------------------------------------------------------------------------------------//
 			} else if (FBS9100_ComBase.CMD_Stop == cmd) {
-				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.SPCSO1")) return false;
+				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.SPCSO1")) return false;
 				comm_res = BTS_IEC61850_Write_CO_Node(FBSDeviceName + "/ncdGGIO1.SPCSO1.Oper", false);
 				int count = 1;
 				if (m_FBS_VCData.m_SysState.WorkState == 2 || m_FBS_VCData.m_SysState.WorkState == 3) {
@@ -1295,21 +1302,21 @@
 				logger.printf(Level.WARN, "DevIp:%s operate FBS9100_ComBase.CMD_Stop, res:%b", FBSDeviceIp, comm_res);
 				//-------------------------------------------------------------------------------------//
 			} else if (FBS9100_ComBase.CMD_StartDischarge == cmd) {
-				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.SPCSO1")) return false;
+				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.SPCSO1")) return false;
 				comm_res = BTS_IEC61850_Write_CO_Node(FBSDeviceName + "/ncdGGIO1.SPCSO1.Oper", true);
 				comm_res = checkMakeSuccess(0);
 				//---------------------------------Log Level.WARN-------------------------------------//
 				logger.printf(Level.WARN, "DevIp:%s DevId:%d operate FBS9100_ComBase.CMD_StartDischarge, res:%b", FBSDeviceIp,m_FBSDevId, comm_res);
 				//-------------------------------------------------------------------------------------//
 			} else if (FBS9100_ComBase.CMD_StartResDischarge == cmd) {
-				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.SPCSO2")) return false;
+				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.SPCSO2")) return false;
 				comm_res = BTS_IEC61850_Write_CO_Node(FBSDeviceName + "/ncdGGIO1.SPCSO2.Oper", true);
 				comm_res = checkMakeSuccess(2);
 				//---------------------------------Log Level.WARN-------------------------------------//
 				logger.printf(Level.WARN, "DevIp:%s operate FBS9100_ComBase.CMD_StartResDischarge, res:%b", FBSDeviceIp, comm_res);
 				//-------------------------------------------------------------------------------------//
 			} else if (FBS9100_ComBase.CMD_StartKIDI == cmd) {
-				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.SPCSO3")) return false;
+				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.SPCSO3")) return false;
 				comm_res = BTS_IEC61850_Write_CO_Node(FBSDeviceName + "/ncdGGIO1.SPCSO3.Oper", true);
 				comm_res = checkMakeSuccess(1);
 				//---------------------------------Log Level.WARN-------------------------------------//
@@ -1356,13 +1363,13 @@
 				long ip = Long.parseLong(Stringip.toString());
 				// System.out.println("ip锛�"+ip);
 				long ipWG = Long.parseLong(StringipWG.toString());
-				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para8.setMag.i")) return false;
+				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.Para8.setMag.i")) return false;
 				comm_res = writeNodeDataInt(FBSDeviceName + "/ncdGGIO1.Para8.setMag.i", "SP", ip);
-				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para9.setMag.i")) return false;
+				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.Para9.setMag.i")) return false;
 				comm_res = comm_res&&writeNodeDataInt(FBSDeviceName + "/ncdGGIO1.Para9.setMag.i", "SP", ipWG);
-				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para10.setMag.i")) return false;
+				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.Para10.setMag.i")) return false;
 				comm_res = comm_res&&writeNodeDataInt(FBSDeviceName + "/ncdGGIO1.Para10.setMag.i", "SP", ipYM);
-				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.SPCSO5")) return false;
+				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.SPCSO5")) return false;
 				comm_res = comm_res&&BTS_IEC61850_Write_CO_Node(FBSDeviceName + "/ncdGGIO1.SPCSO5.Oper", (FBS9100_ComBase.CMD_SetIp==cmd));
 				//---------------------------------Log Level.WARN-------------------------------------//
 				logger.printf(Level.WARN, "DevIp:%s operate FBS9100_ComBase.CMD_SetIp, op_bool:%b, "
@@ -1483,64 +1490,64 @@
 											FBSDeviceIp, m_StatAndParam.clParam);
 				//-------------------------------------------------------------------------------------//
 			} else if (FBS9100_ComBase.CMD_WriteFodParam == cmd) {
-				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para12.setMag.f"));
+				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.Para12.setMag.f"));
 				comm_res = writeNodeData(FBSDeviceName + "/ncdGGIO1.Para12.setMag.f", "SP",
 						(float) m_StatAndParam.clParam.STDCap_one);
-				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para13.setMag.f"));
+				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.Para13.setMag.f"));
 				comm_res = comm_res&&writeNodeData(FBSDeviceName + "/ncdGGIO1.Para13.setMag.f", "SP",
 						(float) m_StatAndParam.clParam.FloatVol_one);
-				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para14.setMag.f"));
+				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.Para14.setMag.f"));
 				comm_res = comm_res&&writeNodeData(FBSDeviceName + "/ncdGGIO1.Para14.setMag.f", "SP",
 						(float) m_StatAndParam.clParam.Strength_one);
-				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para15.setMag.f"));
+				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.Para15.setMag.f"));
 				comm_res = comm_res&&writeNodeData(FBSDeviceName + "/ncdGGIO1.Para15.setMag.f", "SP",
 						(float) m_StatAndParam.clParam.YHStrength_one);
-				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para16.setMag.f"));
+				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.Para16.setMag.f"));
 				comm_res = comm_res&&writeNodeData(FBSDeviceName + "/ncdGGIO1.Para16.setMag.f", "SP",
 						(float) m_StatAndParam.clParam.TimeLong_one);
-				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para18.setMag.f"));
+				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.Para18.setMag.f"));
 				comm_res = comm_res&&writeNodeData(FBSDeviceName + "/ncdGGIO1.Para18.setMag.f", "SP",
 						(float) m_StatAndParam.clParam.STDCap_two);
-				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para19.setMag.f"));
+				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.Para19.setMag.f"));
 				comm_res = comm_res&&writeNodeData(FBSDeviceName + "/ncdGGIO1.Para19.setMag.f", "SP",
 						(float) m_StatAndParam.clParam.FloatVol_two);
-				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para20.setMag.f"));
+				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.Para20.setMag.f"));
 				comm_res = comm_res&&writeNodeData(FBSDeviceName + "/ncdGGIO1.Para20.setMag.f", "SP",
 						(float) m_StatAndParam.clParam.Strength_two);
-				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para21.setMag.f"));
+				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.Para21.setMag.f"));
 				comm_res = comm_res&&writeNodeData(FBSDeviceName + "/ncdGGIO1.Para21.setMag.f", "SP",
 						(float) m_StatAndParam.clParam.YHStrength_two);
-				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para22.setMag.f"));
+				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.Para22.setMag.f"));
 				comm_res = comm_res&&writeNodeData(FBSDeviceName + "/ncdGGIO1.Para22.setMag.f", "SP",
 						(float) m_StatAndParam.clParam.TimeLong_two);
-				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para24.setMag.f"));
+				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.Para24.setMag.f"));
 				comm_res = comm_res&&writeNodeData(FBSDeviceName + "/ncdGGIO1.Para24.setMag.f", "SP",
 						(float) m_StatAndParam.clParam.STDCap_three);
-				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para25.setMag.f"));
+				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.Para25.setMag.f"));
 				comm_res = comm_res&&writeNodeData(FBSDeviceName + "/ncdGGIO1.Para25.setMag.f", "SP",
 						(float) m_StatAndParam.clParam.FloatVol_three);
-				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para26.setMag.f"));
+				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.Para26.setMag.f"));
 				comm_res = comm_res&&writeNodeData(FBSDeviceName + "/ncdGGIO1.Para26.setMag.f", "SP",
 						(float) m_StatAndParam.clParam.Strength_three);
-				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para27.setMag.f"));
+				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.Para27.setMag.f"));
 				comm_res = comm_res&&writeNodeData(FBSDeviceName + "/ncdGGIO1.Para27.setMag.f", "SP",
 						(float) m_StatAndParam.clParam.YHStrength_three);
-				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para28.setMag.f"));
+				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.Para28.setMag.f"));
 				comm_res = comm_res&&writeNodeData(FBSDeviceName + "/ncdGGIO1.Para28.setMag.f", "SP",
 						(float) m_StatAndParam.clParam.TimeLong_three);
-				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para30.setMag.f"));
+				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.Para30.setMag.f"));
 				comm_res = comm_res&&writeNodeData(FBSDeviceName + "/ncdGGIO1.Para30.setMag.f", "SP",
 						(float) m_StatAndParam.clParam.STDCap_four);
-				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para31.setMag.f"));
+				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.Para31.setMag.f"));
 				comm_res = comm_res&&writeNodeData(FBSDeviceName + "/ncdGGIO1.Para31.setMag.f", "SP",
 						(float) m_StatAndParam.clParam.FloatVol_four);
-				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para32.setMag.f"));
+				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.Para32.setMag.f"));
 				comm_res = comm_res&&writeNodeData(FBSDeviceName + "/ncdGGIO1.Para32.setMag.f", "SP",
 						(float) m_StatAndParam.clParam.Strength_four);
-				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para33.setMag.f"));
+				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.Para33.setMag.f"));
 				comm_res = comm_res&&writeNodeData(FBSDeviceName + "/ncdGGIO1.Para33.setMag.f", "SP",
 						(float) m_StatAndParam.clParam.YHStrength_four);
-				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para34.setMag.f"));
+				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.Para34.setMag.f"));
 				comm_res = comm_res&&writeNodeData(FBSDeviceName + "/ncdGGIO1.Para34.setMag.f", "SP",
 						(float) m_StatAndParam.clParam.TimeLong_four);
 				//comm_res = true;
@@ -1555,19 +1562,19 @@
 				// System.out.println(m_StatAndParam.clParam.num);
 				switch (m_StatAndParam.clParam.GroupNum) {
 				case 1:{
-					if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.SPCSO6")) return false;
+					if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.SPCSO6")) return false;
 					comm_res = BTS_IEC61850_Write_CO_Node(FBSDeviceName + "/ncdGGIO1.SPCSO6.Oper", true); // 妯″潡1闄ょ~
 				}break;
 				case 2:{
-					if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.SPCSO7")) return false;
+					if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.SPCSO7")) return false;
 					comm_res = BTS_IEC61850_Write_CO_Node(FBSDeviceName + "/ncdGGIO1.SPCSO7.Oper", true); // 妯″潡21闄ょ~
 				}break;
 				case 3:{
-					if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.SPCSO8")) return false;
+					if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.SPCSO8")) return false;
 					comm_res = BTS_IEC61850_Write_CO_Node(FBSDeviceName + "/ncdGGIO1.SPCSO8.Oper", true); // 妯″潡31闄ょ~
 				}break;
 				case 4:{
-					if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.SPCSO9")) return false;
+					if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.SPCSO9")) return false;
 					comm_res = BTS_IEC61850_Write_CO_Node(FBSDeviceName + "/ncdGGIO1.SPCSO9.Oper", true); // 妯″潡41闄ょ~
 				}break;
 				}
@@ -1580,27 +1587,27 @@
 				// System.out.println(m_StatAndParam.clParam.GroupNum);
 				switch (m_StatAndParam.clParam.GroupNum) {
 					case 1:{
-						if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.SPCSO6"));
+						if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.SPCSO6"));
 						comm_res = BTS_IEC61850_Write_CO_Node(FBSDeviceName + "/ncdGGIO1.SPCSO6.Oper", false);
-						if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.SPCSO10"));
+						if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.SPCSO10"));
 						comm_res = BTS_IEC61850_Write_CO_Node(FBSDeviceName + "/ncdGGIO1.SPCSO10.Oper", false);
 					}break;
 					case 2:{
-						if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.SPCSO7"));
+						if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.SPCSO7"));
 						comm_res = BTS_IEC61850_Write_CO_Node(FBSDeviceName + "/ncdGGIO1.SPCSO7.Oper", false);
-						if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.SPCSO11"));
+						if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.SPCSO11"));
 						comm_res = BTS_IEC61850_Write_CO_Node(FBSDeviceName + "/ncdGGIO1.SPCSO11.Oper", false);
 					}break;
 					case 3:{
-						if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.SPCSO8")) return false;
+						if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.SPCSO8")) return false;
 						comm_res = BTS_IEC61850_Write_CO_Node(FBSDeviceName + "/ncdGGIO1.SPCSO8.Oper", false);
-						if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.SPCS12"));
+						if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.SPCS12"));
 						comm_res = BTS_IEC61850_Write_CO_Node(FBSDeviceName + "/ncdGGIO1.SPCS12.Oper", false);
 					}break;
 					case 4:{
-						if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.SPCSO9")) return false;
+						if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.SPCSO9")) return false;
 						comm_res = BTS_IEC61850_Write_CO_Node(FBSDeviceName + "/ncdGGIO1.SPCSO9.Oper", false);
-						if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.SPCSO13"));
+						if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.SPCSO13"));
 						comm_res = BTS_IEC61850_Write_CO_Node(FBSDeviceName + "/ncdGGIO1.SPCSO13.Oper", false);
 					}break;
 				}
@@ -1612,19 +1619,19 @@
 			} else if (FBS9100_ComBase.CMD_Start_FODYH_test == cmd) {
 				switch (m_StatAndParam.clParam.GroupNum) {
 				case 1:{
-					if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.SPCSO10")) return false;
+					if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.SPCSO10")) return false;
 					comm_res = BTS_IEC61850_Write_CO_Node(FBSDeviceName + "/ncdGGIO1.SPCSO10.Oper", true);
 				}break;
 				case 2:{
-					if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.SPCSO11")) return false;
+					if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.SPCSO11")) return false;
 					comm_res = BTS_IEC61850_Write_CO_Node(FBSDeviceName + "/ncdGGIO1.SPCSO11.Oper", true);
 				}break;
 				case 3:{
-					if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.SPCSO12")) return false;
+					if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.SPCSO12")) return false;
 					comm_res = BTS_IEC61850_Write_CO_Node(FBSDeviceName + "/ncdGGIO1.SPCSO12.Oper", true);
 				}break;
 				case 4:{
-					if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.SPCSO13")) return false;
+					if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.SPCSO13")) return false;
 					comm_res = BTS_IEC61850_Write_CO_Node(FBSDeviceName + "/ncdGGIO1.SPCSO13.Oper", true);
 				}break;
 				}
@@ -1660,16 +1667,16 @@
 				boolean write_res_t = true;
 
 				if (true == write_res_t) {
-					if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para35.setMag.f")) return false;
+					if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.Para35.setMag.f")) return false;
 					// 绂荤嚎鍏绘姢鍛ㄦ湡
 					comm_res = writeNodeData(FBSDeviceName + "/ncdGGIO1.Para35.setMag.f", "SP",
 							(float) m_StatAndParam.m_FBS_DiscParam.OffLineYH_Cycle);
-					if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para36.setMag.f"));
+					if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.Para36.setMag.f"));
 					// 鍦ㄧ嚎鍘嬩綆
 					comm_res = comm_res&&writeNodeData(FBSDeviceName + "/ncdGGIO1.Para36.setMag.f", "SP",
 							(float) m_StatAndParam.m_FBS_DiscParam.OnLineVol_Low);
 					sleep(1500);
-					if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para7.setMag.f"));
+					if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.Para7.setMag.f"));
 					// 鍗曚綋娓╁害涓婇檺
 					comm_res = comm_res&&writeNodeData(FBSDeviceName + "/ncdGGIO1.Para7.setMag.f", "SP",
 							(float) m_StatAndParam.m_FBS_DiscParam.MonomerTmp_High);
@@ -1684,21 +1691,21 @@
 										m_StatAndParam.m_FBS_DiscParam.MonomerTmp_High);
 				//------------------------------------------------------------------------------------//
 			} else if (FBS9100_ComBase.CMD_StartOffLineYH == cmd) {
-				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.SPCSO14")) return false;
+				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.SPCSO14")) return false;
 				comm_res = BTS_IEC61850_Write_CO_Node(FBSDeviceName + "/ncdGGIO1.SPCSO14.Oper", true);
 				comm_res = checkMakeSuccess(5);
 				//---------------------------------Log Level.WARN-------------------------------------//
 				logger.printf(Level.WARN, "DevIp:%s operate FBS9100_ComBase.CMD_StartOffLineYH, res:%b", FBSDeviceIp, comm_res);
 				//------------------------------------------------------------------------------------//
 			} else if (FBS9100_ComBase.CMD_StopOffLineYH == cmd) {
-				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.SPCSO14")) return false;
+				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.SPCSO14")) return false;
 				comm_res = BTS_IEC61850_Write_CO_Node(FBSDeviceName + "/ncdGGIO1.SPCSO14.Oper", false);
 				comm_res = checkMakeSuccess(10);
 				//---------------------------------Log Level.WARN-------------------------------------//
 				logger.printf(Level.WARN, "DevIp:%s operate FBS9100_ComBase.CMD_StopOffLineYH, res:%b", FBSDeviceIp, comm_res);
 				//------------------------------------------------------------------------------------//
 			} else if (FBS9100_ComBase.CMD_ResetSystem == cmd) {
-				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.SPCSO4")) return false;
+				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.SPCSO4")) return false;
 				comm_res = BTS_IEC61850_Write_CO_Node(FBSDeviceName + "/ncdGGIO1.SPCSO4.Oper", true);
 				//鍒ゆ柇鏈�缁堥獙绛鹃獙璇佺粨鏋�
 				comm_res = checkSysRestartState();
@@ -1729,30 +1736,30 @@
 										+ "\n m_FBS_SysParam param:%s ", FBSDeviceIp, m_FBS_SysParam);
 				//-------------------------------------------------------------------------------------//
 			} else if (FBS9100_ComBase.CMD_SetSYSSetParam == cmd) {
-				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para37.setMag.f"));
+				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.Para37.setMag.f"));
 				// 鐢靛帇杩囦綆闃�鍊�
 				comm_res = writeNodeData(FBSDeviceName + "/ncdGGIO1.Para37.setMag.f", "SP",
 						(float) m_FBS_SysParam.POF_BG_Boost_VolStart);
-				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para38.setMag.f"));
+				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.Para38.setMag.f"));
 				// 鐢靛帇杩囬珮闃�鍊�
 				comm_res = comm_res&&writeNodeData(FBSDeviceName + "/ncdGGIO1.Para38.setMag.f", "SP",
 						(float) m_FBS_SysParam.POF_BG_Boost_VolStop);
-				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para39.setMag.f"));
+				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.Para39.setMag.f"));
 				// 鐢垫祦寮傚父闃�鍊�
 				comm_res = comm_res&&writeNodeData(FBSDeviceName + "/ncdGGIO1.Para39.setMag.f", "SP",
 						(float) m_FBS_SysParam.PowerBreakChargeCurr);
 
 				sleep(1500);
-				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para40.setMag.f"));
+				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.Para40.setMag.f"));
 				// 娴厖鐢垫祦闃�鍊�
 				comm_res = comm_res&&writeNodeData(FBSDeviceName + "/ncdGGIO1.Para40.setMag.f", "SP",
 						((float) m_FBS_SysParam.CurrentTyte) / 10);
-				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para41.setMag.f"));
+				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.Para41.setMag.f"));
 				// 鍦ㄧ嚎鐢靛帇浣庨榾鍊�
 				comm_res = comm_res&&writeNodeData(FBSDeviceName + "/ncdGGIO1.Para41.setMag.f", "SP",
 						((float) m_FBS_SysParam.GroupVolSorce) / 10);
 				sleep(1500);
-				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.Para42.setMag.f"));
+				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.Para42.setMag.f"));
 				// 璁剧疆涓讳粠鏈烘ā寮�
 				comm_res = comm_res&&writeNodeData(FBSDeviceName + "/ncdGGIO1.Para42.setMag.f", "SP", ((float) m_FBS_SysParam.MonomerOrder));
 				
@@ -1762,7 +1769,7 @@
 				logger.printf(Level.WARN, "DevIp:%s operate FBS9100_ComBase.CMD_SetSYSSetParam: %s", FBSDeviceIp, m_FBS_SysParam);
 				//------------------------------------------------------------------------------------//
 			} else if (FBS9100_ComBase.CMD_ClearSysAlarm == cmd) {
-				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.SPCSO15")) return false;
+				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.SPCSO15")) return false;
 				// 娓呴櫎璁惧鍛婅
 				comm_res = BTS_IEC61850_Write_CO_Node(FBSDeviceName + "/ncdGGIO1.SPCSO15.Oper", true);
 				//---------------------------------Log Level.WARN-------------------------------------//
@@ -1781,19 +1788,19 @@
 				//		"JunHeng_StCurr锛�"+m_FBS_SysParam.JunHeng_StCurr + "\t");
 			
 			}else if(FBS9100_ComBase.CMD_SetJuHengParam == cmd) {
-				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/btgGGIO1.Para3.setMag.f"));
+				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/btgGGIO1.Para3.setMag.f"));
 				//鍧囪 鍔熻兘鍚敤鐘舵��
 				comm_res = writeNodeData(FBSDeviceName + "/btgGGIO1.Para3.setMag.f", "SP",	m_FBS_SysParam.JunHeng_Enabled*1000);
-				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/btgGGIO1.Para4.setMag.f"));
+				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/btgGGIO1.Para4.setMag.f"));
 				//鍧囪 鍋滄鐢靛帇闃�鍊�
 				comm_res = comm_res&&writeNodeData(FBSDeviceName + "/btgGGIO1.Para4.setMag.f", "SP",(float)m_FBS_SysParam.JunHeng_StVol);
-				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/btgGGIO1.Para5.setMag.f"));
+				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/btgGGIO1.Para5.setMag.f"));
 				//鍧囪 鍋滄鐢垫祦闃�鍊�
 				comm_res = comm_res&&writeNodeData(FBSDeviceName + "/btgGGIO1.Para5.setMag.f", "SP",(float)m_FBS_SysParam.JunHeng_StCurr);
 			
 			}else if(FBS9100_ComBase.CMD_UpdateXZTime == cmd) {
 				long time_l = Long.parseLong(Com.get_DTF(m_StatAndParam.m_FBS_DiscParam.OffLineYHstarttime, Com.DTFYMDhms));
-				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName)+"/ncdGGIO1.SysTime_SYS.setMag.i"));
+				if(!setBTSPublicKeyY(getUKEYRootDomStr(FBSDeviceName,sign_type)+"/ncdGGIO1.SysTime_SYS.setMag.i"));
 				comm_res = writeNodeData_Int64(FBSDeviceName + "/ncdGGIO1.SysTime_SYS.setMag.i", "SP",time_l);
 				logger.printf(Level.WARN, "DevIp:%s operate FBS9100_ComBase.CMD_UpdateXZTime , SetTime:"+Com.getDateTimeFormat(m_StatAndParam.m_FBS_DiscParam.OffLineYHstarttime, Com.DTFYMDhms), FBSDeviceIp);
 			}
@@ -2195,15 +2202,15 @@
 					double minvol = getMinMonomerVol(vc_data.vol);
 					// System.out.println("maxvol:"+maxvol);
 					// System.out.println("minvol:"+minvol);
-					m_FBS_DiscParamFromDev.HourRate = (int) GetHourRate(MonVolStd, vc_data.battcurr[n]);
-					float restcap = getResCapData(MonStdCap, m_FBS_DiscParamFromDev.HourRate, vc_data.battcap[n],
-							maxvol, minvol, MonVolStd, CapType_Rest);
-					float realcap = getResCapData(MonStdCap, m_FBS_DiscParamFromDev.HourRate, vc_data.battcap[n],
-							maxvol, minvol, MonVolStd, CapType_Real);
+//					m_FBS_DiscParamFromDev.HourRate = (int) GetHourRate(MonVolStd, vc_data.battcurr[n]);
+//					float restcap = getResCapData(MonStdCap, m_FBS_DiscParamFromDev.HourRate, vc_data.battcap[n],
+//							maxvol, minvol, MonVolStd, CapType_Rest);
+//					float realcap = getResCapData(MonStdCap, m_FBS_DiscParamFromDev.HourRate, vc_data.battcap[n],
+//							maxvol, minvol, MonVolStd, CapType_Real);
 					// System.out.println("restcap"+restcap);
 					// System.out.println("realcap"+realcap);
-					m_RTData[n].mTestData.updatebattRestCap(restcap);
-					m_RTData[n].mTestData.updatebattRealCap(realcap);
+					//m_RTData[n].mTestData.updatebattRestCap(restcap);
+					//m_RTData[n].mTestData.updatebattRealCap(realcap);
 					// System.out.println(mTestData.battRestCap);
 					m_RTData[n].updata_BattRtData_To_RamDb();
 					m_RTData[n].updata_BattRtSate_To_RamDb();
@@ -2235,7 +2242,7 @@
 	 * @param agree
 	 * @return
 	 */
-	public static String getUKEYRootDomStr(String agree) {		
+	public static String getUKEYRootDomStr(String agree,int sign_type) {		
 		String str1=agree.substring(0, agree.indexOf("BTSE"));
 		/**
 		 * @lijun 鍏煎浣涘北涓夋湡鐗堟湰锛岀鍚嶄腑鐨凚TSE璺緞涓�鎷栦竴鍜屼竴鎷栦簩鍧囦负BTSE
@@ -2243,11 +2250,14 @@
 //		if(str1.length() > 0) {
 //			return "BTSE";
 //		}
+		if(sign_type == BattData_RT.SIGN_TYPE_Default) {
+			return "BTSE";
+		}
 	    return agree.substring(str1.length(), agree.length());
 	}
 	
 	public static void main(String[] args) {
-		System.out.println(getUKEYRootDomStr("ZJDYBTSE2"));
+		System.out.println(getUKEYRootDomStr("ZJDYBTSE",0));
 		String btsid = "1234567890BTSE/ncdGGIO1.SPCSO2";
 		String keyid = "37395256AD72043037395256AD720430";
 		

--
Gitblit v1.9.1