|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.nrao.sss.electronics.SignalTransferSwitch
public class SignalTransferSwitch
A special kind of switch that provides a one-to-one mapping of its N input poles to its N output poles. A given input may be connected to either its immediate clockwise or immediate counterclockwise neighbor.
The following is an example taken from the EVLA Antenna Block Diagram whose N value is 2: |
Version Info:
$Revision: 1035 $ |
$Date: 2008-01-10 16:49:07 -0700 (Thu, 10 Jan 2008) $ |
$Author: dharland $ (last person to modify) |
Constructor Summary | |
---|---|
SignalTransferSwitch(String deviceName,
int numInputs)
Creates a new transfer switch with the number of input and output poles set to numInputs . |
Method Summary | |
---|---|
void |
execute()
Runs the inputs to this switch from their beginnings and then 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(int index)
Returns the index th input pipe of this device. |
String |
getName()
Returns the name of this switch. |
SignalPipe |
getOutputPipe(int index)
Returns the index th output pipe of this device. |
boolean |
isSetToClockwise()
Returns true if this switch is set such that the inputs are piped to the outputs in a clockwise direction. |
void |
setToClockwiseOutputs()
Sets this switch so that its inputs are connected to their clockwise outputs. |
void |
setToCounterclockwiseOutputs()
Sets this switch so that its inputs are connected to their anticlockwise outputs. |
void |
twist()
Turns this switch so that all the inputs now use their other outputs. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SignalTransferSwitch(String deviceName, int numInputs)
numInputs
. The returned switch is initially configured
so that inputs are connected to their clockwise outputs.
deviceName
- an optional name for this switch. If this value is null
a default name will be used in its place.numInputs
- the number of input and output poles on this switch.Method Detail |
---|
public String getName()
public void twist()
public void setToClockwiseOutputs()
public void setToCounterclockwiseOutputs()
public boolean isSetToClockwise()
public SignalPipe getInputPipe(int index)
index
th input pipe of this device.
A typical usage pattern for this method is:mySwitch.getInputPipe(p).connectInputTo(mySource);
Indexing begins at zero.
index
th input pipe of this device.public SignalPipe getOutputPipe(int index)
index
th output pipe of this device.
A typical usage pattern for this method is:mySwitch.getOutputPipe(p).connectOutputTo(myProcessor);
Indexing begins at zero.
index
th output pipe of this device.public void execute()
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |