From cdce015a7143b5e9d0fb003b80b9aa307906c14b Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期一, 02 十二月 2024 11:48:25 +0800
Subject: [PATCH] 修改升级协议中的bug,帧长度由大端模式改为小端模式
---
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V2/parse/global/GlCreate.java | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V2/parse/global/GlCreate.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V2/parse/global/GlCreate.java
index 9875718..f39c11a 100644
--- a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V2/parse/global/GlCreate.java
+++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V2/parse/global/GlCreate.java
@@ -54,6 +54,17 @@
bsNoTail[ProtocolConstantV206V2.dataLenIndex] = (byte)len ;
}
+ public static void createLen4PUg(byte[] bytes) throws Exception {
+ int len = bytes.length - 4;
+ byte[] bs = ByteUtil.int2BCD_LE(len) ;
+ if(bs != null && bs.length == 1){
+ bytes[1] = 0 ;
+ bytes[2] = bs[0] ;
+ }else if(bs != null && bs.length > 1){
+ bytes[1] = bs[1] ;
+ bytes[2] = bs[0] ;
+ }
+ }
/**
* 鐢熸垚IC鍗$紪鐮�
--
Gitblit v1.8.0