Class CfdpPacket

java.lang.Object
org.yamcs.cfdp.pdu.CfdpPacket
Direct Known Subclasses:
AckPacket, EofPacket, FileDataPacket, FinishedPacket, KeepAlivePacket, MetadataPacket, NakPacket

public abstract class CfdpPacket extends Object
  • Field Details

  • Constructor Details

    • CfdpPacket

      protected CfdpPacket()
    • CfdpPacket

      protected CfdpPacket(CfdpHeader header)
  • Method Details

    • getHeader

      public CfdpHeader getHeader()
    • getDataFieldLength

      public abstract int getDataFieldLength()
    • getCFDPPacket

      public static CfdpPacket getCFDPPacket(ByteBuffer bb) throws PduDecodingException
      Reads a CFDP PDU from the ByteBuffer at the current position.

      The buffer can contain more data than one PDU, at the end of the call the position will be set to the end of the PDU.

      In case of error (e.g. cannot decode header) a PduDecodingException is thrown and the position is undetermined.

      The return may be null if the PDU is not supported

      Throws:
      PduDecodingException
    • toByteArray

      public byte[] toByteArray()
    • writeToBuffer

      public void writeToBuffer(ByteBuffer buffer)
    • toTuple

      public Tuple toTuple(OngoingCfdpTransfer trans)
    • toTuple

      public Tuple toTuple(long startTime)
    • toTuple

      public Tuple toTuple(CfdpTransactionId id, long startTime)
    • fromTuple

      public static CfdpPacket fromTuple(Tuple tuple)
    • getTransactionId

      public CfdpTransactionId getTransactionId()
    • writeCFDPPacket

      protected abstract void writeCFDPPacket(ByteBuffer buffer)