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

java.lang.Object
  extended by gov.nasa.gsfc.drl.rtstps.core.RtStpsNode
      extended by gov.nasa.gsfc.drl.rtstps.core.FrameSenderNode
          extended by gov.nasa.gsfc.drl.rtstps.core.ccsds.CaduService
All Implemented Interfaces:
FrameReceiver, Receiver, Sender, java.lang.Cloneable

public final class CaduService
extends FrameSenderNode
implements FrameReceiver

This node receives all frames that require CCSDS processing. It sorts frames and redirects them to service processors based on the spacecraft and virtual channel numbers.


Nested Class Summary
(package private)  class CaduService.VcKey
          This class holds spacecraft and virtual channel ids so they can be stored as a key in a map.
 
Field Summary
private  Cadu cadu
           
static java.lang.String CLASSNAME
          This is a class name for this STPS node type, which is also the element name.
private  FrameReceiver deadletters
           
private  LongStatusItem fillFrames
           
private  CaduService.VcKey lookup
           
private  LongStatusItem outputFrames
           
private  java.util.HashMap<CaduService.VcKey,FrameReceiver> outputMap
           
private  org.w3c.dom.NodeList svlinks
           
private  LongStatusItem unrouteableCadus
           
 
Fields inherited from class gov.nasa.gsfc.drl.rtstps.core.FrameSenderNode
output
 
Fields inherited from class gov.nasa.gsfc.drl.rtstps.core.RtStpsNode
linkName, statusItemList, typeName
 
Constructor Summary
CaduService()
          Create a CaduService object.
 
Method Summary
 void addFrameReceiver(int spid, int vcid, FrameReceiver fr)
          Add a FrameReceiver to the outputMap list.
 void finishSetup(Configuration configuration)
          Finish the configuration.
 void flush()
          Flush the pipeline.
 void load(org.w3c.dom.Element element, Configuration configuration)
          Set up this stps node with a configuration.
 void putFrame(Frame frame)
          Give a frame to CaduService.
 void putFrames(Frame[] frames)
          Give an array of frames to CaduService.
 void setDeadletterPath(FrameReceiver fr)
          CaduService sends frames with no frame receiver with a matching spacecraft and virtual channel id to this frame receiver.
 
Methods inherited from class gov.nasa.gsfc.drl.rtstps.core.FrameSenderNode
addReceiver, setOutputIsRequired
 
Methods inherited from class gov.nasa.gsfc.drl.rtstps.core.RtStpsNode
clear, clone, getElementName, getLinkName, getStatusItems, setLinkName, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface gov.nasa.gsfc.drl.rtstps.core.FrameReceiver
getLinkName
 

Field Detail

CLASSNAME

public static final java.lang.String CLASSNAME
This is a class name for this STPS node type, which is also the element name.

See Also:
Constant Field Values

outputMap

private java.util.HashMap<CaduService.VcKey,FrameReceiver> outputMap

deadletters

private FrameReceiver deadletters

lookup

private CaduService.VcKey lookup

cadu

private Cadu cadu

svlinks

private org.w3c.dom.NodeList svlinks

unrouteableCadus

private LongStatusItem unrouteableCadus

fillFrames

private LongStatusItem fillFrames

outputFrames

private LongStatusItem outputFrames
Constructor Detail

CaduService

public CaduService()
Create a CaduService object.

Method Detail

load

public void load(org.w3c.dom.Element element,
                 Configuration configuration)
          throws RtStpsException
Set up this stps node with a configuration.

Specified by:
load in class FrameSenderNode
Throws:
RtStpsException

finishSetup

public void finishSetup(Configuration configuration)
                 throws RtStpsException
Finish the configuration. The CaduService class at this time links to the specific targets.

Overrides:
finishSetup in class FrameSenderNode
Throws:
RtStpsException

addFrameReceiver

public void addFrameReceiver(int spid,
                             int vcid,
                             FrameReceiver fr)
Add a FrameReceiver to the outputMap list. CaduService sends a frame to this receiver if the frame has a matching spacecraft and virtual channel id.

Parameters:
spid - A spacecraft id.
vcid - A virtual channel id.
fr - The frame receiver.

setDeadletterPath

public void setDeadletterPath(FrameReceiver fr)
CaduService sends frames with no frame receiver with a matching spacecraft and virtual channel id to this frame receiver. Otherwise, it discards unrouteable frames.


flush

public void flush()
           throws RtStpsException
Flush the pipeline.

Specified by:
flush in interface FrameReceiver
Specified by:
flush in interface Receiver
Overrides:
flush in class FrameSenderNode
Throws:
RtStpsException

putFrames

public void putFrames(Frame[] frames)
               throws RtStpsException
Give an array of frames to CaduService.

Specified by:
putFrames in interface FrameReceiver
Throws:
RtStpsException

putFrame

public void putFrame(Frame frame)
              throws RtStpsException
Give a frame to CaduService.

Specified by:
putFrame in interface FrameReceiver
Throws:
RtStpsException