| package com.dy.rtuMw3rd.tcp4Bjnl.protocol; | 
|   | 
| import java.nio.charset.StandardCharsets; | 
|   | 
| /** | 
|  * @Author: liurunyu | 
|  * @Date: 2025/3/18 11:54 | 
|  * @Description | 
|  */ | 
| public class BjnlProtocol { | 
|     public static final String ProtocolName = "beiJingNongLin" ;//北京市农林科学院智能装备技术研究中心 | 
|     public static final String ProtocolVersion = "1.0" ;//版本号 | 
|     public static final String Protocolcode = "v1.0" ;//协议号 | 
|   | 
|     public static final byte MinDataLength = 4 ;//数据最小长度(即帧头4个字节) | 
|     public static final byte[] FrameHeadBytes = new byte[]{(byte)0xCA, (byte)0xFE, (byte)0xBA, (byte)0xBE} ; | 
|     public static final byte[] FrameTailBytes = "&_#".getBytes(StandardCharsets.UTF_8) ; | 
|   | 
|     public static final String SuccessCode = "200" ; | 
|     public static final String ResultTypeAuth = "auth" ; | 
|     public static final String ResultTypeData = "data" ; | 
|     public static final String ResultTypeControl = "control" ; | 
|   | 
|     public static final byte[] HeartBeat = "ping".getBytes(StandardCharsets.UTF_8) ; | 
| } |