gov.nasa.gsfc.drl.rtstps.core
Class FrameSenderNode

java.lang.Object
  extended by gov.nasa.gsfc.drl.rtstps.core.RtStpsNode
      extended by gov.nasa.gsfc.drl.rtstps.core.FrameSenderNode
All Implemented Interfaces:
Sender, java.lang.Cloneable
Direct Known Subclasses:
CaduService, CrcDecoder, FrameStatus, FrameSynchronizer, PnDecoder, ReedSolomonDecoder, TerraDecoder

public abstract class FrameSenderNode
extends RtStpsNode
implements Sender, java.lang.Cloneable

This is a type of RtStpsNode that sends frames to a frame output receiver. It makes no input demands. Nodes that send frames are not required to use this class. I provide it as a convenience.


Field Summary
private  FrameOutputTool fotool
          I use this tool to create the output link.
private  boolean isOutputRequired
          Most FrameSenderNodes demand an output link, but setting this to false makes that optional.
protected  FrameReceiver output
          Where my frames go -- my output link.
 
Fields inherited from class gov.nasa.gsfc.drl.rtstps.core.RtStpsNode
linkName, statusItemList, typeName
 
Constructor Summary
FrameSenderNode(java.lang.String elementName)
          Create a FrameSenderNode.
FrameSenderNode(java.lang.String elementName, java.lang.String linkName)
          Create a FrameSenderNode.
 
Method Summary
 void addReceiver(Receiver receiver)
          Add a Receiver to this sender's list of receivers.
 void finishSetup(Configuration configuration)
          Finish the setup.
 void flush()
          Flush the pipeline.
abstract  void load(org.w3c.dom.Element element, Configuration configuration)
          Set up this RT-STPS node with a configuration.
protected  void setOutputIsRequired(boolean ok)
          By default, FrameSenderNode demands a non-null output link.
 
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
 

Field Detail

output

protected FrameReceiver output
Where my frames go -- my output link.


isOutputRequired

private boolean isOutputRequired
Most FrameSenderNodes demand an output link, but setting this to false makes that optional.


fotool

private FrameOutputTool fotool
I use this tool to create the output link. The tool hides the fact that the output may be more than one receiver.

Constructor Detail

FrameSenderNode

public FrameSenderNode(java.lang.String elementName)
Create a FrameSenderNode.


FrameSenderNode

public FrameSenderNode(java.lang.String elementName,
                       java.lang.String linkName)
Create a FrameSenderNode.

Method Detail

setOutputIsRequired

protected final void setOutputIsRequired(boolean ok)
By default, FrameSenderNode demands a non-null output link. You may override this feature by setting this to false.


load

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

Specified by:
load in class RtStpsNode
Throws:
RtStpsException

addReceiver

public void addReceiver(Receiver receiver)
                 throws RtStpsException
Add a Receiver to this sender's list of receivers.

Specified by:
addReceiver in interface Sender
Parameters:
receiver - If the receiver is not of the expected type, then the method throws an RtStpsException.
Throws:
RtStpsException

finishSetup

public void finishSetup(Configuration configuration)
                 throws RtStpsException
Finish the setup. When this method is called, you may assume all nodes have been created and exist by name in the map, and all standard links have been resolved. This is a last chance to prepare for data flow. If a derived class overrides this method, make sure it calls super.finishSetup(configuration).

Specified by:
finishSetup in class RtStpsNode
Throws:
RtStpsException

flush

public void flush()
           throws RtStpsException
Flush the pipeline.

Throws:
RtStpsException