gov.nasa.gsfc.drl.rtstps.core.ccsds.path
Class SplitHeader

java.lang.Object
  extended by gov.nasa.gsfc.drl.rtstps.core.ccsds.path.SplitHeader

final class SplitHeader
extends java.lang.Object

This class contains a CCSDS packet header. I use this class to assemble a packet header that is split across two frames.


Field Summary
private  FrameAnnotation frameAnnotation
          This is the frame annotation from the frame that contributed the first half of the split header.
private  byte[] header
           
private  int index
           
 
Constructor Summary
SplitHeader()
           
 
Method Summary
(package private)  void begin(PacketZone zone, FrameAnnotation frameAnnotation)
          Begin a split packet header by moving the remaining bytes from the packet zone, which must be less that 6 bytes, to this split header container.
(package private)  void clear()
          Discard any bytes contained in this packet header.
(package private)  int finish(PacketZone zone)
          Finish a split header by moving a few bytes from the packet zone to end of this packet header.
(package private)  byte[] getData()
          Get the bytes in the packet header.
(package private)  int getFilledCount()
          Get the number of bytes already filled.
 FrameAnnotation getFrameAnnotation()
          Get the frame annotation from the frame that contributed the first half of the split header.
(package private)  int getToFill()
          Get the number of bytes yet to fill in this split packet header.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

header

private byte[] header

index

private int index

frameAnnotation

private FrameAnnotation frameAnnotation
This is the frame annotation from the frame that contributed the first half of the split header. I will need it when I construct the packet.

Constructor Detail

SplitHeader

SplitHeader()
Method Detail

clear

final void clear()
Discard any bytes contained in this packet header.


getData

final byte[] getData()
Get the bytes in the packet header.


getToFill

final int getToFill()
Get the number of bytes yet to fill in this split packet header.


getFilledCount

final int getFilledCount()
Get the number of bytes already filled.


getFrameAnnotation

public FrameAnnotation getFrameAnnotation()
Get the frame annotation from the frame that contributed the first half of the split header.


begin

final void begin(PacketZone zone,
                 FrameAnnotation frameAnnotation)
Begin a split packet header by moving the remaining bytes from the packet zone, which must be less that 6 bytes, to this split header container.


finish

final int finish(PacketZone zone)
Finish a split header by moving a few bytes from the packet zone to end of this packet header.

Returns:
The packet data length field from the packet header. (It does not include +7, which is the complete packet length.)