package com.example.agvcontroller.protocol2;
|
|
import com.example.agvcontroller.protocol.PacBody;
|
import com.example.agvcontroller.protocol.PacErrorType;
|
import com.example.agvcontroller.protocol.PacHeader;
|
|
import io.netty.buffer.ByteBuf;
|
|
public class AgvPackage {
|
|
/**
|
* 源数据包缓冲区(引用)
|
*/
|
private ByteBuf sourceBuff;
|
|
/**
|
* 原始消息对应的16进制字符串
|
*/
|
private String sourceHexStr;
|
|
/**
|
* 消息头部
|
*/
|
private PacHeader header;
|
|
/**
|
* 消息体
|
*/
|
private PacBody body;
|
|
public ByteBuf getSourceBuff() {
|
return sourceBuff;
|
}
|
|
public void setSourceBuff(ByteBuf sourceBuff) {
|
this.sourceBuff = sourceBuff;
|
}
|
|
public String getSourceHexStr() {
|
return sourceHexStr;
|
}
|
|
public void setSourceHexStr(String sourceHexStr) {
|
this.sourceHexStr = sourceHexStr;
|
}
|
|
public PacHeader getHeader() {
|
return header;
|
}
|
|
public void setHeader(PacHeader header) {
|
this.header = header;
|
}
|
|
public int getValidCode() {
|
return validCode;
|
}
|
|
public void setValidCode(int validCode) {
|
this.validCode = validCode;
|
}
|
|
public PacBody getBody() {
|
return body;
|
}
|
|
public void setBody(PacBody body) {
|
this.body = body;
|
}
|
|
public boolean isErrorPac() {
|
return errorPac;
|
}
|
|
public void setErrorPac(boolean errorPac) {
|
this.errorPac = errorPac;
|
}
|
|
public PacErrorType getPacErrorType() {
|
return pacErrorType;
|
}
|
|
public void setPacErrorType(PacErrorType pacErrorType) {
|
this.pacErrorType = pacErrorType;
|
}
|
|
/**
|
* 消息的校正码
|
*/
|
private int validCode;
|
|
/**
|
* 是否为校验异常包
|
*/
|
private boolean errorPac;
|
|
/**
|
* 校验异常类型
|
*/
|
private PacErrorType pacErrorType;
|
}
|