From bda423b1aae1d5322116511651ae03a54cdcd231 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期二, 26 十一月 2024 17:25:39 +0800
Subject: [PATCH] 1、几个测试模块系统的log4j.xml配置中的编码修改; 2、RTU升级模拟器增加命令行设置服务端IP和端口功能; 3、应王江海要求,井电双控协议中也实现远程升级功能,因井电双控协议、阀控器协议不同,而双方协议中的升级子协议相同,所以通信中间件做增量开发、适应性修改,以适应这种混合协议情况,同时也提高通信中间件运行效率。

---
 pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/forTcp/TcpDownCommandCache.java |   25 ++++++++++++++++++++++++-
 1 files changed, 24 insertions(+), 1 deletions(-)

diff --git a/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/forTcp/TcpDownCommandCache.java b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/forTcp/TcpDownCommandCache.java
index 54d5ecd..bae9ac6 100644
--- a/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/forTcp/TcpDownCommandCache.java
+++ b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/forTcp/TcpDownCommandCache.java
@@ -25,6 +25,29 @@
 		return instance ;
 	}
 
+
+	public static Integer[] info(){
+		Integer comTotalDown = 0 ;//缂撳瓨鐨勪笅琛屽懡浠ゆ�绘暟
+		Integer comNoResTotalDownByOnLine = 0 ;//RTU鍦ㄧ嚎锛屼絾瀵瑰叾涓嬭鍛戒护鏈敹鍒板簲绛旂殑鎬绘暟
+		Integer comNoResTotalDownByOffLine = 0 ;//RTU绂荤嚎锛屼絾瀵瑰叾涓嬭鍛戒护鏈敹鍒板簲绛旂殑鎬绘暟
+		MidResultToRtu res ;
+		TcpDownCommandObj obj ;
+		Node node = cacheQueue.getFirstNode() ;
+		while(node != null && node.obj != null){
+			obj = (TcpDownCommandObj)node.obj;
+			res = obj.result ;
+			if(!obj.onceReceivedResult){
+				comTotalDown ++ ;
+				if(TcpSessionCache.isConnect(res.rtuAddr)){
+					comNoResTotalDownByOnLine ++ ;
+				}else{
+					comNoResTotalDownByOffLine ++ ;
+				}
+			}
+		}
+		return new Integer[]{comTotalDown, comNoResTotalDownByOnLine, comNoResTotalDownByOffLine} ;
+	}
+
 	/**
 	 * 缂撳瓨鍛戒护
 	 * @param result
@@ -62,7 +85,7 @@
 				obj.onceReceivedResult = true ;//鏍囪瘑宸茬粡鏀跺埌鍛戒护缁撴灉
 				return res ;
 			}else{
-				node = node.pre ;
+				node = node.next ;
 			}
 		}
 		

--
Gitblit v1.8.0