Package org.yamcs.simulator
Class CCSDSPacket
- java.lang.Object
-
- org.yamcs.simulator.CCSDSPacket
-
public class CCSDSPacket extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected ByteBufferbufferprotected static HashMap<Integer,AtomicInteger>seqMap
-
Constructor Summary
Constructors Constructor Description CCSDSPacket(int apid, int userDataLength, int packetid)CCSDSPacket(int apid, int userDataLength, int packetid, boolean checksumPresent)CCSDSPacket(int apid, int userDataLength, int packetType, int packetid)CCSDSPacket(int apid, int userDataLength, int packetType, int packetid, boolean checksumPresent)CCSDSPacket(ByteBuffer buffer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappendUserDataBuffer(byte[] userData)voidfillChecksum()intgetApid()intgetPacketId()intgetPacketType()intgetSeq()ByteBuffergetUserDataBuffer()voidsetApid(int apid)voidsetPacketId(int packetId)voidsetTime(long instant)voidsetUserDataBuffer(ByteBuffer buffer)byte[]toByteArray()StringtoString()voidwriteTo(OutputStream os)
-
-
-
Field Detail
-
seqMap
protected static HashMap<Integer,AtomicInteger> seqMap
-
buffer
protected ByteBuffer buffer
-
-
Constructor Detail
-
CCSDSPacket
public CCSDSPacket(ByteBuffer buffer)
-
CCSDSPacket
public CCSDSPacket(int apid, int userDataLength, int packetid)
-
CCSDSPacket
public CCSDSPacket(int apid, int userDataLength, int packetid, boolean checksumPresent)
-
CCSDSPacket
public CCSDSPacket(int apid, int userDataLength, int packetType, int packetid)
-
CCSDSPacket
public CCSDSPacket(int apid, int userDataLength, int packetType, int packetid, boolean checksumPresent)
-
-
Method Detail
-
setTime
public void setTime(long instant)
-
setApid
public void setApid(int apid)
-
getUserDataBuffer
public ByteBuffer getUserDataBuffer()
-
appendUserDataBuffer
public void appendUserDataBuffer(byte[] userData)
-
setUserDataBuffer
public void setUserDataBuffer(ByteBuffer buffer)
-
getPacketId
public int getPacketId()
-
setPacketId
public void setPacketId(int packetId)
-
getPacketType
public int getPacketType()
-
getSeq
public int getSeq()
-
writeTo
public void writeTo(OutputStream os) throws IOException
- Throws:
IOException
-
fillChecksum
public void fillChecksum()
-
toByteArray
public byte[] toByteArray()
-
getApid
public int getApid()
-
-