gov.nasa.gsfc.drl.rtstps.core.ccsds
Class Cadu

java.lang.Object
  extended by gov.nasa.gsfc.drl.rtstps.core.Unit
      extended by gov.nasa.gsfc.drl.rtstps.core.ccsds.Cadu

public final class Cadu
extends Unit

This class is a CADU, which is a CCSDS version 2 frame. It is a unit itself, but it also encapsulates a frame, which it promotes to a CADU.


Field Summary
private  int dataZoneEndOffset
           
private  int dataZoneStartOffset
           
private static int FILL_MASK
           
private  Frame frame
           
private  int rsParityLength
           
private  int trailerLength
           
 
Fields inherited from class gov.nasa.gsfc.drl.rtstps.core.Unit
data, deleted, frameAnnotation, length, startOffset
 
Constructor Summary
Cadu()
          This CADU constructor is incomplete because it omits key elements, such as parity length.
Cadu(org.w3c.dom.Element element, Configuration configuration)
          Create a CADU with the characteristics defined by the setup.
 
Method Summary
 int getdataZoneEndOffset()
          Get the data zone end offset in bytes from the frame's start.
 int getdataZoneStartOffset()
          Get the data zone start offset in bytes from the frame's start.
 int getHeaderErrorControlWord()
          Get this frame's header error control word.
 int getReedSolomonParityLength()
          Get the CADU's Reed Solomon parity length.
 int getSequenceCount()
          Get this frame's sequence number.
 int getSpacecraft()
          Get the frame's spacecraft ID.
 int getVersion()
          Get the frame's CCSDS frame version number.
 int getVirtualChannel()
          Get the frame's virtual channel number.
 boolean isFillFrame()
          Determine if this is a fill (idle) frame.
 void setDeleted(boolean d)
          Mark this cadu as deleted or not deleted.
 void setFrame(Frame frame)
          Set this CADU's frame, which promotes the frame to a CADU and makes this class fully functional.
 void setFrameAnnotation(FrameAnnotation a)
          Set this cadu's frame annotation.
 
Methods inherited from class gov.nasa.gsfc.drl.rtstps.core.Unit
getData, getFrameAnnotation, getSize, getStartOffset, isDeleted
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILL_MASK

private static final int FILL_MASK
See Also:
Constant Field Values

frame

private Frame frame

dataZoneStartOffset

private int dataZoneStartOffset

dataZoneEndOffset

private int dataZoneEndOffset

trailerLength

private int trailerLength

rsParityLength

private int rsParityLength
Constructor Detail

Cadu

public Cadu(org.w3c.dom.Element element,
            Configuration configuration)
     throws RtStpsException
Create a CADU with the characteristics defined by the setup. The CADU does not contain a frame at this point. You must defer creating a CADU with this constructor until after the Builder has created all STPS nodes because CADU needs special information from them such as parity lengths.

Throws:
RtStpsException

Cadu

public Cadu()
This CADU constructor is incomplete because it omits key elements, such as parity length. Some services do not care about this because they simply want the CADU to interpret the CADU header and nothing more. This constructor is adequate for that purpose.

Method Detail

setFrame

public void setFrame(Frame frame)
Set this CADU's frame, which promotes the frame to a CADU and makes this class fully functional. You may use the same Cadu object with different frames.


getReedSolomonParityLength

public final int getReedSolomonParityLength()
Get the CADU's Reed Solomon parity length.


getdataZoneStartOffset

public final int getdataZoneStartOffset()
Get the data zone start offset in bytes from the frame's start.


getdataZoneEndOffset

public final int getdataZoneEndOffset()
Get the data zone end offset in bytes from the frame's start.


getVersion

public int getVersion()
Get the frame's CCSDS frame version number.


getSpacecraft

public int getSpacecraft()
Get the frame's spacecraft ID.


getVirtualChannel

public int getVirtualChannel()
Get the frame's virtual channel number.


isFillFrame

public boolean isFillFrame()
Determine if this is a fill (idle) frame.


getSequenceCount

public int getSequenceCount()
Get this frame's sequence number.


getHeaderErrorControlWord

public int getHeaderErrorControlWord()
Get this frame's header error control word.


setFrameAnnotation

public void setFrameAnnotation(FrameAnnotation a)
Set this cadu's frame annotation.

Overrides:
setFrameAnnotation in class Unit

setDeleted

public void setDeleted(boolean d)
Mark this cadu as deleted or not deleted.

Overrides:
setDeleted in class Unit