package com.example.agvcontroller.protocol;
|
|
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBufUtil;
|
|
/**
|
* 协议体
|
* Created by vincent on 2019-04-03
|
*/
|
public class PacBody {
|
|
private ByteBuf content;
|
|
private IMessageBody messageBody;
|
|
public ByteBuf getContent() {
|
return content;
|
}
|
|
public PacBody setContent(ByteBuf content) {
|
this.content = content.duplicate();
|
return this;
|
}
|
|
public IMessageBody getMessageBody() {
|
return messageBody;
|
}
|
|
public void setMessageBody(IMessageBody messageBody) {
|
this.messageBody = messageBody;
|
}
|
|
@Override
|
public String toString() {
|
return ByteBufUtil.hexDump(content);
|
}
|
|
}
|