package com.fzzy.protocol.zldz.data; import lombok.Data; /** * 字符串值均采用十六进制,方便校验和开发 */ @Data public class Message { private String begin; private String sourceId;// 源 ID private String targetId="FFFF";// 目标ID private String sendId;//发送者ID private String gateway1 = "0100";//路由1 private String gateway2 = "0000";//路由2 private String messageType;// 消息类型 private String result ="00";// 处理结果 private String companyId;// 组织编码 private String hexCrc8;//crc8包头校验 private MessageBody body; private String hexCrc16;//crc16校验 private String end; private byte[] byteMsg;// 当前命令的字节信息 private String strMsg;// 当前命令转换为字符串的信息 @Override public String toString() { return "Message [sourceId=" + sourceId + ", targetId=" + targetId + ", messageType=" + messageType + ", result=" + result + ", companyId=" + companyId + ", hexCrc8=" + hexCrc8 + ", body=" + body + ", hexCrc16=" + hexCrc16 + ", strMsg=" + strMsg + "]"; } }