Class Packet
- java.lang.Object
-
- jmri.jmrix.ipocs.protocol.packets.Packet
-
- Direct Known Subclasses:
AcknowledgementPacket
,AlarmPacket
,ApplicationDataPacket
,ConnectionRequestPacket
,ConnectionResponsePacket
,ControllerStatusPacket
,DerailerStatusPacket
,DisconnectPacket
,ElectricalPointsLockStatusPacket
,InputStatusPacket
,LevelCrossingStatusPacket
,LocalReleasePacket
,OutputStatusPacket
,PointsStatusPacket
,RequestStatusPacket
,ResetControllerPacket
,SetDerailerPacket
,SetElectricalPointsLockPacket
,SetLevelCrossingPacket
,SetOutputPacket
,SignOfLifePacket
,SignOfLifeTimerPacket
,ThrowPointsPacket
public abstract class Packet extends java.lang.Object
Base packet functionality- Since:
- 4.21.2
-
-
Constructor Summary
Constructors Constructor Description Packet()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description byte
getAck()
abstract byte
getId()
byte
getLength()
static Packet
parse(java.nio.ByteBuffer buffer)
protected abstract void
parseSpecific(java.nio.ByteBuffer buffer)
java.nio.ByteBuffer
serialize()
protected abstract byte[]
serializeSpecific()
void
setAck(byte ack)
void
setLength(byte length)
-
-
-
Constructor Detail
-
Packet
public Packet()
-
-
Method Detail
-
getId
public abstract byte getId()
-
getAck
public byte getAck()
-
setAck
public void setAck(byte ack)
-
getLength
public byte getLength()
-
setLength
public void setLength(byte length)
-
serialize
public java.nio.ByteBuffer serialize()
-
parseSpecific
protected abstract void parseSpecific(java.nio.ByteBuffer buffer)
-
serializeSpecific
protected abstract byte[] serializeSpecific()
-
-