From 7fd3ff6715939467e3850763206d37fac8564e41 Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期一, 02 十二月 2024 11:15:26 +0800 Subject: [PATCH] 修改升级协议中的bug,未在下行数据中放入帧长度 --- pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V2/parse/global/GlCreate.java | 10 ++++++++++ 1 files changed, 10 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..cd7bcee 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,16 @@ 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] = bs[0] ; + }else if(bs != null && bs.length > 1){ + bytes[1] = bs[0] ; + bytes[2] = bs[1] ; + } + } /** * 鐢熸垚IC鍗$紪鐮� -- Gitblit v1.8.0