Package com.automation_pros.odva.cpf
Class CommonPacketFormat
- java.lang.Object
-
- com.automation_pros.odva.cpf.CommonPacketFormat
-
- Direct Known Subclasses:
CommServiceCPF
,ConxAddrCPF
,DataCPF
,NullAddrCPF
,SeqAddrCPF
,SocketCPF
public class CommonPacketFormat extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description CommonPacketFormat(short type)
CommonPacketFormat(short type, byte[] payload)
CommonPacketFormat(short type, java.nio.ByteBuffer payload)
CommonPacketFormat(java.nio.ByteBuffer source, CpfWrapper parent)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getItemLen()
short
getItemType()
CpfWrapper
getParent()
java.nio.ByteBuffer
getPayload()
static CommonPacketFormat
parseInstance(java.nio.ByteBuffer source, CpfWrapper parent)
void
putBytes(java.nio.ByteBuffer dest)
void
putPayload(java.nio.ByteBuffer dest)
static java.lang.Class<? extends CommonPacketFormat>
registerHandler(short itype, java.lang.Class<? extends CommonPacketFormat> handler)
void
setItemType(short itemType)
void
setParent(CpfWrapper newParent)
void
setPayload(java.nio.ByteBuffer source)
java.lang.String
toString()
io.netty.buffer.ByteBuf
writeBytes(io.netty.buffer.ByteBuf dest)
-
-
-
Constructor Detail
-
CommonPacketFormat
public CommonPacketFormat(short type)
-
CommonPacketFormat
public CommonPacketFormat(short type, java.nio.ByteBuffer payload)
-
CommonPacketFormat
public CommonPacketFormat(short type, byte[] payload)
-
CommonPacketFormat
public CommonPacketFormat(java.nio.ByteBuffer source, CpfWrapper parent)
-
-
Method Detail
-
registerHandler
public static java.lang.Class<? extends CommonPacketFormat> registerHandler(short itype, java.lang.Class<? extends CommonPacketFormat> handler)
-
parseInstance
public static CommonPacketFormat parseInstance(java.nio.ByteBuffer source, CpfWrapper parent)
-
getItemType
public short getItemType()
-
setItemType
public void setItemType(short itemType)
-
setPayload
public void setPayload(java.nio.ByteBuffer source)
-
getItemLen
public int getItemLen()
-
setParent
public void setParent(CpfWrapper newParent)
-
getParent
public CpfWrapper getParent()
-
writeBytes
public io.netty.buffer.ByteBuf writeBytes(io.netty.buffer.ByteBuf dest)
-
putBytes
public void putBytes(java.nio.ByteBuffer dest)
-
getPayload
public java.nio.ByteBuffer getPayload()
-
putPayload
public void putPayload(java.nio.ByteBuffer dest)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-