Package org.yamcs.tctm
Class CcsdsPacketInputStream
- java.lang.Object
-
- org.yamcs.tctm.CcsdsPacketInputStream
-
- All Implemented Interfaces:
PacketInputStream
public class CcsdsPacketInputStream extends Object implements PacketInputStream
Reads CCSDS packets from an input stream: first it reads 6 bytes primary header, it derives the length from the last two bytes and reads the remaining of the data. It also support a maxLength property to limit the size of the packet that is being read.
-
-
Constructor Summary
Constructors Constructor Description CcsdsPacketInputStream(InputStream inputStream)CcsdsPacketInputStream(InputStream inputStream, Map<String,Object> args)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]readPacket()read the next packet - blocking if necessary until all the data is available.
-
-
-
Constructor Detail
-
CcsdsPacketInputStream
public CcsdsPacketInputStream(InputStream inputStream, Map<String,Object> args)
-
CcsdsPacketInputStream
public CcsdsPacketInputStream(InputStream inputStream)
-
-
Method Detail
-
readPacket
public byte[] readPacket() throws IOExceptionDescription copied from interface:PacketInputStreamread the next packet - blocking if necessary until all the data is available.- Specified by:
readPacketin interfacePacketInputStream- Returns:
- the next packet read from the input stream.
- Throws:
EOFException- if this input stream reaches the end.IOException- an I/O error has occurred
-
-