From f8cb69b9e1b0e8443942e13bbd3f46b9d4203269 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期日, 28 四月 2024 08:54:08 +0800
Subject: [PATCH] 靳总离职前,应元谋二期项目要求(慧图),做了通信协议修改,在他离职后,从韩月处得到最新协议,并做了部分协议软件实现修改,发现新协议中有一些协议定义有重复,也有错误的,所以这版本协议未全部实现,但实现的部分可以用来测试测控一体阀(与段志强一起测试过)。目前情况下,这版本协议实现不能应用于实际项目中,如果必须实现,还需要结合硬件协议具体实现内容再实现通信中间件的协议解析与构造部分,还需要实现上行数据处理任务树部分。

---
 pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/CommonV1_0_1.java |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/CommonV1_0_1.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/CommonV1_0_1.java
index e9677bb..30df01f 100644
--- a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/CommonV1_0_1.java
+++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/CommonV1_0_1.java
@@ -81,7 +81,7 @@
 	 */
 	public String parseRtuAddr(byte[] bs)throws Exception{
 		String rtuAddrBCD = "" + ByteUtil.BCD2Long_BE(bs, ProtocolConstantV206V1_0_0.rtuAddr1Index_start, ProtocolConstantV206V1_0_0.rtuAddr1Index_end) ;
-		String rtuAddrStr = "" + ByteUtilUnsigned.bytes2Short_BE(bs, ProtocolConstantV206V1_0_0.rtuAddr2Index_start) ;
+		String rtuAddrStr = "" + ByteUtilUnsigned.bytes2Short_LE(bs, ProtocolConstantV206V1_0_0.rtuAddr2Index_start) ;
 		while(rtuAddrStr.length() < 5){
 			rtuAddrStr = "0" + rtuAddrStr ;
 		}
@@ -97,8 +97,8 @@
 	 * @throws Exception 寮傚父
 	 */
 	public String parseRtuAddr(byte[] bs, int index)throws Exception{
-		String rtuAddrBCD = "" + ByteUtil.BCD2Long_BE(bs, index, index + 2) ;
-		String rtuAddrStr = "" + ByteUtilUnsigned.bytes2Short_BE(bs, index + 3) ;
+		String rtuAddrBCD = "" + ByteUtil.BCD2Long_BE(bs, index, index + 2) ;//鍦板潃鏄ぇ绔ā寮�
+		String rtuAddrStr = "" + ByteUtilUnsigned.bytes2Short_LE(bs, index + 3) ;
 		while(rtuAddrStr.length() < 5){
 			rtuAddrStr = "0" + rtuAddrStr ;
 		}

--
Gitblit v1.8.0