From e2c28bc98587c6edd6a38f06b972ff51d998028f Mon Sep 17 00:00:00 2001 From: wuzeyu <1223318623@qq.com> Date: 星期三, 27 十一月 2024 08:52: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/p206V202404/parse/Cd_68_Up.java | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/parse/Cd_68_Up.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/parse/Cd_68_Up.java index 190f7fa..201f0ca 100644 --- a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/parse/Cd_68_Up.java +++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/parse/Cd_68_Up.java @@ -5,7 +5,6 @@ import com.dy.common.mw.protocol.p206V202404.*; import com.dy.common.mw.protocol.p206V202404.upVos.DataCd68Vo; import com.dy.common.util.ByteUtil; -import com.dy.common.util.ByteUtilUnsigned; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -23,17 +22,18 @@ @Override public MidResult[] parse(Boolean isLowPower, CodeParseParams params, CodeParseCallback callback)throws Exception { ParseParamsForUpV202404 para = (ParseParamsForUpV202404)params ; - int bsLen = new CommonV202404().parseDataLen(para.upBuffer) ; + int bsLen = new CommonV202404().parseDataLen4P202404(para.upBuffer) ; if(bsLen > 0){ this.doParse(para.upBuffer, bsLen, para.upCode, para.data) ; } - log.info("鍒嗘瀽涓婅鏁版嵁<" + CodeV202404.getCodeName(para.upCode) + " RTU鍦板潃=" + para.rtuAddr + ">:\n" + para.data.toString()); + log.info("\n鍒嗘瀽鍛戒护搴旂瓟鏁版嵁<" + CodeV202404.getCodeName(para.upCode) + " RTU鍦板潃=" + para.rtuAddr + ">:\n" + para.data.toString()); MidResultFromRtu midRs = new MidResultFromRtu() ; midRs.protocolName = para.protocolName ;//鍗忚鍚嶇О + midRs.protocolVersion = para.protocolVersion ;//鍗忚鐗堟湰鍙� midRs.rtuAddr = para.rtuAddr ;//Rtu鍦板潃 midRs.upCode = para.upCode ;//涓婅鏁版嵁涓殑鍔熻兘鐮� midRs.upHex = para.upHex ;//涓婅鏁版嵁鍗佸叚杩涘埗褰㈠紡 @@ -55,7 +55,7 @@ */ protected void doParse(byte[] bs, int bsLen, String dataCode, Data data) throws Exception { DataV202404 dV1 = (DataV202404)data.getSubData() ; - DataCd68Vo cdData = new DataCd68Vo() ; + DataCd68Vo cdData = new DataCd68Vo(CodeV202404.getCodeName(dataCode)) ; dV1.subData = cdData ; int index = ProtocolConstantV206V202404.dataIndex ; cdData.controllerType = ByteUtil.bytes2Hex(bs, false, index, 1) ; -- Gitblit v1.8.0