Package org.yamcs.cfdp.pdu
Class CfdpPacket
java.lang.Object
org.yamcs.cfdp.pdu.CfdpPacket
- Direct Known Subclasses:
AckPacket
,EofPacket
,FileDataPacket
,FinishedPacket
,KeepAlivePacket
,MetadataPacket
,NakPacket
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic CfdpPacket
static CfdpPacket
Reads a CFDP PDU from the ByteBuffer at the current position.abstract int
byte[]
toTuple
(long startTime) toTuple
(CfdpTransactionId id, long startTime) toTuple
(OngoingCfdpTransfer trans) protected abstract void
writeCFDPPacket
(ByteBuffer buffer) void
writeToBuffer
(ByteBuffer buffer)
-
Field Details
-
header
-
CFDP
-
-
Constructor Details
-
CfdpPacket
protected CfdpPacket() -
CfdpPacket
-
-
Method Details
-
getHeader
-
getDataFieldLength
public abstract int getDataFieldLength() -
getCFDPPacket
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
-
toTuple
-
toTuple
-
toTuple
-
fromTuple
-
getTransactionId
-
writeCFDPPacket
-