Package org.yamcs.tctm
Class CcsdsPacket
- java.lang.Object
-
- org.yamcs.tctm.CcsdsPacket
-
public class CcsdsPacket extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected ByteBufferbbstatic intMAX_CCSDS_SIZE
-
Constructor Summary
Constructors Constructor Description CcsdsPacket(byte[] packet)CcsdsPacket(ByteBuffer bb)
-
Method Summary
-
-
-
Field Detail
-
MAX_CCSDS_SIZE
public static final int MAX_CCSDS_SIZE
- See Also:
- Constant Field Values
-
bb
protected ByteBuffer bb
-
-
Constructor Detail
-
CcsdsPacket
public CcsdsPacket(byte[] packet)
-
CcsdsPacket
public CcsdsPacket(ByteBuffer bb)
-
-
Method Detail
-
getSecondaryHeaderFlag
public int getSecondaryHeaderFlag()
-
getSecondaryHeaderFlag
public static boolean getSecondaryHeaderFlag(byte[] packet)
-
getSequenceCount
public int getSequenceCount()
-
getSequenceCount
public static int getSequenceCount(byte[] packet)
-
setSequenceCount
public void setSequenceCount(short seqCount)
-
getSequenceCount
public static short getSequenceCount(ByteBuffer bb)
-
getAPID
public int getAPID()
-
setAPID
public void setAPID(int apid)
-
getAPID
public static short getAPID(ByteBuffer bb)
-
getCccsdsPacketLength
public static int getCccsdsPacketLength(ByteBuffer bb)
-
getCccsdsPacketLength
public int getCccsdsPacketLength()
-
setCccsdsPacketLength
public void setCccsdsPacketLength(short length)
-
getLength
public int getLength()
returns the length of the packet, normally equals ccsdslength+7
-
getCoarseTime
public long getCoarseTime()
- Returns:
- time in seconds since 6 Jan 1980
-
getTimeId
public int getTimeId()
-
setCoarseTime
public void setCoarseTime(int time)
-
getCoarseTime
public static long getCoarseTime(ByteBuffer bb)
-
getFineTime
public int getFineTime()
-
setFineTime
public void setFineTime(short fineTime)
-
getFineTime
public static int getFineTime(ByteBuffer bb)
-
getChecksumIndicator
public boolean getChecksumIndicator()
-
getChecksumIndicator
public static boolean getChecksumIndicator(byte[] packet)
-
getPacketID
public int getPacketID()
-
setPacketID
public void setPacketID(int id)
-
getBytes
public byte[] getBytes()
-
getByteBuffer
public ByteBuffer getByteBuffer()
-
getPrivateHeaderClass
public int getPrivateHeaderClass()
-
getPrivateHeaderType
public int getPrivateHeaderType()
-
getPrivateHeaderSource
public int getPrivateHeaderSource()
-
fillCheckword
public void fillCheckword()
-
getPacketFromStream
public static CcsdsPacket getPacketFromStream(InputStream input) throws IOException
- Throws:
IOException
-
getAPID
public static short getAPID(byte[] packet)
-
getCccsdsPacketLength
public static int getCccsdsPacketLength(byte[] buf)
-
-