From 427d87e5572d72d0e3aaa4364e4f53569222e321 Mon Sep 17 00:00:00 2001
From: zhubaomin <zhubaomin>
Date: 星期二, 25 三月 2025 21:40:05 +0800
Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV

---
 pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1/DriverV1.java |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 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..b1c73a6 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" ;
@@ -57,6 +59,7 @@
 		this.clear();
 		boolean isFail = false ;
 		String upCode = null ;
+		Object[] codeDataGrp = {null};
 		try{
 			CommonV1 cp = new CommonV1() ;
 			Boolean p206TrueUgFalse = cp.protocolType_p206TrueUgFalse(upBuffer) ;
@@ -98,21 +101,25 @@
 			}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 = dV1.getRtuAddr() ;
+						codeDataGrp[0] = codeData ;
 					}
 					@Override
 					public void notify(NotifyInfo ...infos) {
+						notify.notify(rtuAddr, ProtocolConstantV206V1.protocolName, ProtocolConstantV206V1.protocolVer, infos);
 					}
 				});
 			}
-				
 		} catch (Exception e) {
 			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, codeDataGrp[0]);
+			}
 		}
 	}
 

--
Gitblit v1.8.0