|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.nrao.sss.electronics.SignalMultiplier
public class SignalMultiplier
A device that multiplies the current frequencies of a signal.
Version Info:
$Revision: 1241 $ |
$Date: 2008-04-25 14:37:37 -0600 (Fri, 25 Apr 2008) $ |
$Author: dharland $ (last person to modify) |
Constructor Summary | |
---|---|
SignalMultiplier(String deviceName,
BigDecimal multiplicationFactor)
Creates a new multiplier that uses the given multiplicationFactor . |
|
SignalMultiplier(String deviceName,
String multiplicationFactor)
Creates a new multiplier that uses the given multiplicationFactor . |
Method Summary | |
---|---|
void |
eraseSignalMemory()
Erases this device's memory of its most recent execution. |
void |
execute()
Runs this device on the signal received from its input pipe and then executes the processor connected to its output pipe, if any. |
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. |
Signal |
getMostRecentInput()
Returns a copy of the input signal most recently processed by this device. |
Signal |
getMostRecentOutput()
Returns a copy of the output signal most recently produced by this device. |
BigDecimal |
getMultiplicationFactor()
Returns the amount by which this device multiplies its input signals. |
SignalPipe |
getOutputPipe()
Returns the output pipe of this device. |
Signal |
getSignal()
Returns a copy of the signal produced by the most recent execution of this device. |
Frequency |
multiply(Frequency input)
Multiplies input by this multiplier's factor and returns
the multiplied frequency. |
Signal |
multiply(Signal input)
Multiplies input by this multiplier's factor and returns
the multiplied signal. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SignalMultiplier(String deviceName, BigDecimal multiplicationFactor)
multiplicationFactor
.
deviceName
- an optional name for this multiplier. If this value is null
a default name will be used in its place.multiplicationFactor
- the amount by which this device will multiply its input signals.public SignalMultiplier(String deviceName, String multiplicationFactor)
multiplicationFactor
.
deviceName
- an optional name for this multiplier. If this value is null
a default name will be used in its place.multiplicationFactor
- the amount by which this device will multiply its input signals.Method Detail |
---|
public BigDecimal getMultiplicationFactor()
public SignalPipe getInputPipe()
myMultiplier.getInputPipe().connectInputTo(mySource);
public SignalPipe getOutputPipe()
myMultiplier.getOutputPipe().connectOutputTo(myProcessor);
public Signal getMostRecentInput()
processed
by this device.
If this processor has never been executed, or if the input signal
it processed most recently was null, the returned value will
be null.
public Signal getMostRecentOutput()
produced
by this device.
If this processor has never been executed, or if the input signal
it processed most recently was null, the returned value will
be null.
public void eraseSignalMemory()
getMostRecentInput()
,
getMostRecentOutput()
,
getSignal()
public Signal getSignal()
execution
of this device.
If this device has never been run, or if the input signal
it processed most recently was null, the returned value will
be null.
getSignal
in interface SignalSource
public void execute()
getMostRecentInput()
and getMostRecentOutput()
methods.
execute
in interface SignalProcessor
public void executeUpTo(SignalProcessor firstUnexecutedDevice)
SignalProcessor
firstUnexecutedDevice
.
See SignalProcessor.execute()
for more information about the linking
of processors.
executeUpTo
in interface SignalProcessor
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()
.public void executeFromStartOfChainUpTo(SignalProcessor firstUnexecutedDevice)
SignalProcessor
firstUnexecutedDevice
.
executeFromStartOfChainUpTo
in interface SignalProcessor
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.public Signal multiply(Signal input)
input
by this multiplier's factor and returns
the multiplied signal.
Note that the input
signal and this multiplier are
not affected by calls to this method. In other words this multiplier
will not remember the input signal sent in or the output
signal produced. This is in contrast to a call to the
execute()
methods.
input
- the signal to be multiplied.
input
by this multiplier's factor.public Frequency multiply(Frequency input)
input
by this multiplier's factor and returns
the multiplied frequency.
Note that the input
frequency and this multiplier are
not affected by calls to this method. In other words this multiplier
will not remember the input signal sent in or the output
signal produced. This is in contrast to a call to the
execute()
methods.
input
- the frequency to be multiplied.
input
by this multiplier's factor.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |