From 4fe39e9df868a8fdd40549f169adbea2e8bd622a Mon Sep 17 00:00:00 2001 From: zhubaomin <zhubaomin> Date: 星期三, 27 十一月 2024 15:34:09 +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/p206V202404/DriverV202404.java | 20 +++++++++++++------- 1 files changed, 13 insertions(+), 7 deletions(-) diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/DriverV202404.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/DriverV202404.java index 6f95d48..0c2e775 100644 --- a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/DriverV202404.java +++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/DriverV202404.java @@ -2,9 +2,12 @@ import com.dy.common.mw.protocol.*; import com.dy.common.mw.protocol.p206V1.ProtocolConstantV206V1; +import com.dy.common.mw.protocol.p206V2.ProtocolConstantV206V2; import com.dy.common.util.DateTime; -@AnnotationDriver(name= ProtocolConstantV206V202404.protocolName) +@AnnotationDriver(enable = true, + name= ProtocolConstantV206V202404.protocolName, + version= ProtocolConstantV206V202404.protocolVer) public class DriverV202404 extends Driver { private static String scanRootPackage = "com.dy.common.mw.protocol.p206V202404" ; @@ -14,7 +17,6 @@ private ParseParamsForDownV202404 downCpParams ; private Boolean reportOrResponse_trueOrFalse = null ; - private String rtuAddrInData = null ; public DriverV202404(){ upCpParams = new ParseParamsForUpV202404() ; @@ -33,7 +35,6 @@ this.downCpParams.clear(); } this.reportOrResponse_trueOrFalse = null ; - this.rtuAddrInData = null ; } /** @@ -60,9 +61,9 @@ String upCode = null ; try{ CommonV202404 cp = new CommonV202404() ; - cp.checkHead(upBuffer) ; + Boolean p202404TrueUgFalse = cp.protocolType_p206TrueUgFalse(upBuffer) ; cp.checkTail(upBuffer) ; - String crcStr = cp.checkCrc_str(upBuffer) ; + String crcStr = cp.checkCrc_str(upBuffer, p202404TrueUgFalse) ; if(crcStr != null){ return new MidResult[]{(new MidResultError(ProtocolConstantV206V202404.protocolName, rtuAddr, "涓ラ噸閿欒锛屼笂琛屾暟鎹瓹RC妫�鏌ュけ璐ワ紝" + crcStr, null))} ; } @@ -88,6 +89,7 @@ upData.setSubData(dV201) ; this.upCpParams.setValue(ProtocolConstantV206V202404.protocolName, + ProtocolConstantV206V202404.protocolVer, rtuAddr, upCode, upHex, @@ -101,7 +103,10 @@ @Override public void callback(Boolean flag) { reportOrResponse_trueOrFalse = flag ; - rtuAddrInData = dV201.getRtuAddr() ; + //rtuAddrInData = dV201.getRtuAddr() ; + } + @Override + public void notify(NotifyInfo ...infos) { } }); } @@ -136,7 +141,8 @@ this.downCpParams.setValue( RtuResultSendWebUrl, - ProtocolConstantV206V202404.protocolName, + ProtocolConstantV206V202404.protocolName, + command.protocolVersion==null?ProtocolConstantV206V202404.protocolVer:command.protocolVersion, rtuAddr, command.getId(), commandCode, -- Gitblit v1.8.0