From 317dabcf4901fced12e75c0d3b442607fb479bec Mon Sep 17 00:00:00 2001
From: zhubaomin <zhubaomin>
Date: 星期四, 03 四月 2025 14:18:09 +0800
Subject: [PATCH] 代码优化

---
 pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/ProtocolConstantV206V202404.java |   33 ++++++++++++++++++++++++++++-----
 1 files changed, 28 insertions(+), 5 deletions(-)

diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/ProtocolConstantV206V202404.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/ProtocolConstantV206V202404.java
index da464ff..5d409b6 100644
--- a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/ProtocolConstantV206V202404.java
+++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/ProtocolConstantV206V202404.java
@@ -2,13 +2,11 @@
 
 public class ProtocolConstantV206V202404 {
 
-    public static final String version = "202404" ;
-
     /**
      * 娉ㄨВ鐩稿叧
      */
     public static final String protocolName = "p206V202404" ;
-    public static final Short protocolVer = 201 ;
+    public static final short protocolVer = 201 ;
     public static final int priority = 1 ;//浼樺厛绾�
     /**
      * RTU涓婄嚎鏁版嵁锛堜笂绾垮悗绗竴鍖呮暟鎹級鏈�灏忛暱搴︼紝璁剧疆璇ュ睘鎬т互澶囪繘琛屽畬鏁存�ф鏌ワ紝
@@ -24,13 +22,13 @@
     public static final int headMinLength = 3 ;
 
     //甯ц捣濮�
-    public static final byte P_Head_Byte = (byte)0x68 ;
+    public static final byte P_Head_Byte = (byte)0x69 ;
     public static final byte P_Tail_Byte = (byte)0x16 ;
 
     //00H鏃堕仴娴嬬粓绔湪鍏煎宸ヤ綔鐘舵�侊紱01H鏃堕仴娴嬬粓绔湪鑷姤宸ヤ綔鐘舵�侊紱02H鏃堕仴娴嬬粓绔湪鏌ヨ/搴旂瓟宸ヤ綔鐘舵�侊紱03H鏃堕仴娴嬬粓绔湪璋冭瘯/缁翠慨鐘舵�併��
     public static final byte P_Default_mode = (byte)0x00 ;//榛樿宸ヤ綔妯″紡
 
-    public static final String P_Head_Hex = "68" ;
+    public static final String P_Head_Hex = "69" ;
     public static final String P_Tail_Hex = "16" ;
 
     public static final byte lenHead2ctrl = 3 ; //浠庡ご鍒版帶鍒跺煙锛堜笉鍖呮嫭锛夊瓧鑺傛暟缁勯暱搴�
@@ -48,4 +46,29 @@
     public static final int codeIndex = 12 ;//鍔熻兘鐮佸瓧鑺傛暟缁勪笅鏍�
     public static final int dataIndex = 13 ;//鍏蜂綋鏁版嵁瀛楄妭鏁扮粍涓嬫爣
 
+    public static final String vsCardAddr = "00000000";//鏈郴缁熷簲鐢ㄧ殑铏氭嫙鍗★紝鍗$墿鐞嗗湴鍧�閲囩敤8涓�0浣滀负妯℃嫙
+
+    ////////////////////////////////////////////////
+    //
+    //杩滅▼鍗囩骇鐩稿叧
+    //
+    ////////////////////////////////////////////////
+    public static final byte UG_P_Head_Byte = (byte)0xAA ;
+    public static final byte UG_P_Tail_Byte = (byte)0x16 ;
+    public static final int UG_codeIndex = 4 ;//鍔熻兘鐮佸瓧鑺傛暟缁勪笅鏍�
+    public static final int UG_dataIndex = 12 ;//鍏蜂綋鏁版嵁瀛楄妭鏁扮粍涓嬫爣
+
+    public static final int UG_dataLenIndex_start = 1 ;//甯ч暱搴﹀紑濮嬫墍鍦� 瀛楄妭鏁扮粍璧峰涓嬫爣
+    public static final int UG_dataLenIndex_end = 2 ;//甯ч暱搴︾粨鏉熸墍鍦� 瀛楄妭鏁扮粍璧峰涓嬫爣
+
+    public static final int UG_rtuAddrIndex_start = 6 ;//鎺у埗鍣ㄥ湴鍧� 瀛楄妭鏁扮粍寮�濮嬩笅鏍�
+    public static final int UG_rtuAddrIndex_end = 11 ;//鎺у埗鍣ㄥ湴鍧� 瀛楄妭鏁扮粍寮�濮嬩笅鏍�
+
+    public static final byte UG_lenCmd = 2 ; //鍔熻兘鐮佸瓧鑺傛暟缁勯暱搴�
+    public static final byte UG_lenRtuAddr = 6 ; //鍔熻兘鐮佸瓧鑺傛暟缁勯暱搴�
+    public static final byte UG_lenHead2Cmd = 4 ; //浠庡ご鍒板姛鑳界爜锛堜笉鍖呮嫭锛夊瓧鑺傛暟缁勯暱搴�
+    public static final byte UG_lenTail = 3 ; //甯у熬閮ㄥ瓧鑺傛暟缁勯暱搴�
+    public static final byte UG_lenHead2RtuAddr = 12 ; //浠庡ご鍒癛TU鍦板潃锛堝寘鎷級瀛楄妭鏁扮粍闀垮害
+
+
 }
\ No newline at end of file

--
Gitblit v1.8.0