edu.nrao.sss.electronics
Class SignalManifold

java.lang.Object
  extended by edu.nrao.sss.electronics.SignalManifold
All Implemented Interfaces:
SignalProcessor, SignalSource

public class SignalManifold
extends Object
implements SignalProcessor, SignalSource

A device that takes an input signal and replicates it on all of its outputs.

Version Info:

$Revision: 1006 $
$Date: 2007-11-16 11:19:54 -0700 (Fri, 16 Nov 2007) $
$Author: dharland $ (last person to modify)

Since:
2007-10-24
Author:
David M. Harland

Constructor Summary
SignalManifold(int numberOfOutputs)
          Creates a new manifold with the given number of outputs.
 
Method Summary
 void execute()
          Executes the output pipes of this device.
 void executeFromStartOfChainUpTo(SignalProcessor firstUnexecutedDevice)
          Retreats upstream from this processor to the source of the stream and executes that device(s), telling it to stop execution at firstUnexecutedDevice.
 void executeUpTo(SignalProcessor firstUnexecutedDevice)
          Executes this device and all downstream devices up to, but not including, the firstUnexecutedDevice.
 SignalPipe getInputPipe()
          Returns the input pipe of this device.
 int getNumberOfOutputs()
          Returns the number of outputs from this manifold.
 SignalPipe getOutputPipe(int index)
          Returns the indexth output pipe of this device.
 Signal getSignal()
          Returns the signal provided by the input pipe of this device.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SignalManifold

public SignalManifold(int numberOfOutputs)
Creates a new manifold with the given number of outputs.

Parameters:
numberOfOutputs - the number of outputs eminating from this manifold.
Throws:
IllegalArgumentException - if numberOfOutputs is negative.
Method Detail

getNumberOfOutputs

public int getNumberOfOutputs()
Returns the number of outputs from this manifold.

Returns:
the number of outputs from this manifold.

getInputPipe

public SignalPipe getInputPipe()
Returns the input pipe of this device. A typical usage pattern for this method is:
 myFork.getInputPipe().connectInputTo(mySource);

Returns:
the input pipe of this device.

getOutputPipe

public SignalPipe getOutputPipe(int index)
Returns the indexth output pipe of this device. A typical usage pattern for this method is:
 myFork.getOutputPipe(p).connectOutputTo(myProcessor);

Indexing begins at zero.

Returns:
the indexth output pipe of this device.

getSignal

public Signal getSignal()
Returns the signal provided by the input pipe of this device. If nothing is connected to the input pipe, or if the connected source has a null signal, null will be returned.

Specified by:
getSignal in interface SignalSource
Returns:
the signal provided by this device.

execute

public void execute()
Executes the output pipes of this device.

Specified by:
execute in interface SignalProcessor

executeUpTo

public void executeUpTo(SignalProcessor firstUnexecutedDevice)
Description copied from interface: SignalProcessor
Executes this device and all downstream devices up to, but not including, the firstUnexecutedDevice. See SignalProcessor.execute() for more information about the linking of processors.

Specified by:
executeUpTo in interface SignalProcessor
Parameters:
firstUnexecutedDevice - the first device downstream that is not to be executed. If all downstream devices should be executed you may use a null value here or call SignalProcessor.execute().

executeFromStartOfChainUpTo

public void executeFromStartOfChainUpTo(SignalProcessor firstUnexecutedDevice)
Description copied from interface: SignalProcessor
Retreats upstream from this processor to the source of the stream and executes that device(s), telling it to stop execution at firstUnexecutedDevice.

Specified by:
executeFromStartOfChainUpTo in interface SignalProcessor
Parameters:
firstUnexecutedDevice - the first device in a chain of processors that is not to be executed. If all devices should be executed you may use a null value here. The first unexecuted device should be downstream of this device.


Copyright © 2009. All Rights Reserved.