edu.nrao.sss.electronics
Class SignalProcessorSink

java.lang.Object
  extended by edu.nrao.sss.electronics.SignalProcessorSink
All Implemented Interfaces:
SignalProcessor

public class SignalProcessorSink
extends Object
implements SignalProcessor

A signal processor that does not propagate its signal.

Version Info:

$Revision: 1198 $
$Date: 2008-04-02 18:59:31 -0600 (Wed, 02 Apr 2008) $
$Author: dharland $ (last person to modify)

Since:
2007-11-07
Author:
David M. Harland

Constructor Summary
SignalProcessorSink()
          Creates a new sink that has no source.
 
Method Summary
 void eraseSignalMemory()
          Erases this device's memory of its most recent execution.
 void execute()
          Does nothing.
 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)
          Does nothing.
 SignalPipe getInputPipe()
          Returns the input pipe of this device.
 Signal getMostRecentSignal()
          Returns a copy of the signal most recently sent to this sink.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SignalProcessorSink

public SignalProcessorSink()
Creates a new sink that has no source.

Method Detail

getInputPipe

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

Returns:
the input pipe of this device.

getMostRecentSignal

public Signal getMostRecentSignal()
Returns a copy of the signal most recently sent to this sink. If this the chain leading to this sink has never been executed, or if that execution produced a null signal, the returned value will be null.

Returns:
the signal most recently sent to this sink.

eraseSignalMemory

public void eraseSignalMemory()
Erases this device's memory of its most recent execution.

See Also:
getMostRecentSignal()

execute

public void execute()
Does nothing.

Specified by:
execute in interface SignalProcessor

executeUpTo

public void executeUpTo(SignalProcessor firstUnexecutedDevice)
Does nothing.

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.