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/p206V2/parse/Cd_1602_Down.java | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V2/parse/Cd_1602_Down.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V2/parse/Cd_1602_Down.java index 153f46b..941a836 100644 --- a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V2/parse/Cd_1602_Down.java +++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V2/parse/Cd_1602_Down.java @@ -32,7 +32,7 @@ midRs.downCodeName = CodeV2.getCodeName(para.commandCode) ;//涓嬭鍛戒护鍔熻兘鐮佸悕绉�; midRs.downBuffer = bs ;//涓嬭鍛戒护鏁版嵁 midRs.downBufHex = ByteUtil.bytes2Hex(bs, true) ;//涓嬭鍛戒护鏁版嵁鍗佸叚杩涘埗褰㈠紡 - midRs.hasResponse = true ;//鏄惁鏈夊簲绛� + midRs.hasResponse = false ;//鏄惁鏈夊簲绛� midRs.maxSendTimes = null ;//鍛戒护鏈�澶у彂閫佹鏁�(褰撴敹涓嶅埌搴旂瓟鏃讹紝灏嗛噸鍙�)锛屽鏋滀笉璁剧疆锛屽懡浠ょ紦瀛樺櫒杩涜琛ュ厖璁剧疆 midRs.isCachForOffLine = false ;//RTU涓嶅湪绾匡紝鍛戒护鏄惁缂撳瓨锛屼綆鍔熻�楁椂涓簍rue @@ -70,8 +70,16 @@ index += 2 ; GlCreate.createRtuAddr4PUg(para.rtuAddr, preBytes, index); + if(para.param == null){ + throw new Exception("鍙傛暟涓虹┖") ; + } + Integer ramAddr = (Integer)para.param ; - byte[] bytes = ByteUtil.bytesMerge(preBytes, (byte[])para.attachment) ; + byte[] bs = new byte[4] ; + ByteUtil.int2Bytes_BE(bs, ramAddr, 0); + byte[] bytes = ByteUtil.bytesMerge(preBytes, bs) ; + + bytes = ByteUtil.bytesMerge(bytes, (byte[])para.attachment) ; byte[] bsTail = GlCreate.createCrcTail4Ug(bytes) ;//CRC鍜屽熬鍙犲姞瀛楄妭鏁扮粍涓� -- Gitblit v1.8.0