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-common/src/main/java/com/dy/common/mw/protocol/p206V1/DriverV1.java | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1/DriverV1.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1/DriverV1.java index 2bd47f6..789ee94 100644 --- a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1/DriverV1.java +++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1/DriverV1.java @@ -3,7 +3,9 @@ import com.dy.common.mw.protocol.*; import com.dy.common.util.DateTime; -@AnnotationDriver(enable = true, name= ProtocolConstantV206V1.protocolName) +@AnnotationDriver(enable = true, + name= ProtocolConstantV206V1.protocolName, + version= ProtocolConstantV206V1.protocolVer) public class DriverV1 extends Driver { private static String scanRootPackage = "com.dy.common.mw.protocol.p206V1" ; @@ -112,7 +114,10 @@ isFail = true ; return new MidResult[]{(new MidResultError(ProtocolConstantV206V1.protocolName, rtuAddr, "涓ラ噸閿欒锛屽垎鏋怰tu鏁版嵁鍑洪敊锛佹暟鎹负锛�" + upHex + (e.getMessage() == null?"":("锛屽嚭閿欎俊鎭細" + e.getMessage())), e))} ; } finally{ - callback.callback(rtuAddr, upCode, CodeV1.getCodeName(upCode), upHex, reportOrResponse_trueOrFalse, isFail, rtuAddr); + if(upCode != null){ + //CRC楠岃瘉澶辫触鏃讹紝upCode涓簄ull锛屾鏃朵笉杩涜鍥炶皟 + callback.callback(rtuAddr, upCode, CodeV1.getCodeName(upCode), upHex, reportOrResponse_trueOrFalse, isFail, rtuAddr); + } } } -- Gitblit v1.8.0