From 24f53bb77f9ac80feb2e62e8ee670be4aa5f3c6e Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期四, 13 二月 2025 11:56:42 +0800
Subject: [PATCH] 1、远程模块remote模块实现: (1、系统启动时向通信中间件注册消息接收者; (2、消息接收者ctr实现(测试阶段); 2、在配置文件增加配置Springboot RestTemplate网络请求超时时长; 3、其他一些测试与优化。

---
 pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V2/DriverV2.java |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V2/DriverV2.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V2/DriverV2.java
index 5dba5f7..614e5b6 100644
--- a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V2/DriverV2.java
+++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V2/DriverV2.java
@@ -1,6 +1,7 @@
 package com.dy.common.mw.protocol.p206V2;
 
 import com.dy.common.mw.protocol.*;
+import com.dy.common.mw.protocol.p206V1.ProtocolConstantV206V1;
 import com.dy.common.util.DateTime;
 
 @AnnotationDriver(enable = true,
@@ -60,6 +61,7 @@
 		boolean isFail = false ;
 		String upCode = null ;
 		Short protocolVersion = null ;
+		Object[] codeDataGrp = {null};
 		try{
 			CommonV2 cp = new CommonV2() ;
 			Boolean p206TrueUgFalse = cp.protocolType_p206TrueUgFalse(upBuffer) ;
@@ -101,12 +103,14 @@
 			}else{
 				return codeParse.parse(isLowPower, this.upCpParams, new CodeParseCallback(){
 					@Override
-					public void callback(Boolean flag) {
+					public void callback(Boolean flag, Object codeData) {
 						reportOrResponse_trueOrFalse = flag ;
 						rtuAddrInData = dV2.getRtuAddr() ;
+						codeDataGrp[0] = codeData ;
 					}
 					@Override
 					public void notify(NotifyInfo ...infos) {
+						notify.notify(rtuAddr, ProtocolConstantV206V1.protocolName, ProtocolConstantV206V1.protocolVer, infos);
 					}
 				});
 			}
@@ -115,7 +119,7 @@
 			isFail = true ;
 			return new MidResult[]{(new MidResultError(ProtocolConstantV206V2.protocolName, rtuAddr, "涓ラ噸閿欒锛屽垎鏋怰tu鏁版嵁鍑洪敊锛佹暟鎹负锛�" + upHex + (e.getMessage() == null?"":("锛屽嚭閿欎俊鎭細" + e.getMessage())), e))} ;
 		} finally{
-			callback.callback(rtuAddr, upCode, CodeV2.getCodeName(upCode), upHex, reportOrResponse_trueOrFalse, isFail, rtuAddr);
+			callback.callback(rtuAddr, upCode, CodeV2.getCodeName(upCode), upHex, reportOrResponse_trueOrFalse, isFail, rtuAddr, codeDataGrp[0]);
 		}
 	}
 

--
Gitblit v1.8.0