|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.nrao.sss.electronics.SignalMixer
public class SignalMixer
A device that mixes a signal
with another frequency.
The output of this mixing is a third signal that represents the
first, but that has been transformed to an intermediate frequency.
In contrast to a true signal mixer, this object produces a single signal that contains either the sum or difference of the input signals and the mixing signal. A true mixer produces both the sum and difference simultaneously.
Version Info:
$Revision: 1204 $ |
$Date: 2008-04-07 16:53:41 -0600 (Mon, 07 Apr 2008) $ |
$Author: dharland $ (last person to modify) |
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. |
SignalPipe |
getLocalOscillatorInputPipe()
Returns the pipe that carries a local oscillator's signal into this mixer. |
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. |
String |
getName()
Returns the name of this mixer. |
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. |
static SignalMixer |
makeAdditiveMixer(String deviceName)
Creates and returns a new mixer that produces an output signal by adding an input signal to a local oscillator signal. |
static SignalMixer |
makeSubtractiveMixer(String deviceName)
Creates and returns a new mixer that produces an output signal by subtracting an input signal from a local oscillator signal. |
Signal |
mix(Signal input)
Creates and returns a new signal that is the result of applying this mixer to the given input signal. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static SignalMixer makeAdditiveMixer(String deviceName)
deviceName
- an optional name for this mixer. If this value is null
a default name will be used in its place.
public static SignalMixer makeSubtractiveMixer(String deviceName)
deviceName
- an optional name for this mixer. If this value is null
a default name will be used in its place.
public SignalPipe getLocalOscillatorInputPipe()
myMixer.getLocalOscillatorInputPipe().connectInputTo(myOscillator);
Note that any SignalSource
, not just a LocalOscillator
,
can be connected to input of the returned pipe.
public SignalPipe getInputPipe()
myMixer.getInputPipe().connectInputTo(mySource);
public SignalPipe getOutputPipe()
myMixer.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 String getName()
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 mix(Signal input)
Note that the input
signal and this mixer are
not affected by calls to this method. In other words this mixer
will not remember the input signal sent in or the output
signal produced. This is in contrast to a call to the
execute()
methods. Note also that in order to ensure
an up to date local oscillator signal, this method executes the
devices chained to this mixer's LO pipe from the beginning of that
chain.
input
- the signal to be mixed.
input
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |