|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.nrao.sss.electronics.LocalOscillator
public class LocalOscillator
A frequency generator.
The frequency generated by this device is usually mixed with a signal in order to move that signal to an intermediate frequency.
Version Info:
$Revision: 1707 $ |
$Date: 2008-11-14 10:23:59 -0700 (Fri, 14 Nov 2008) $ |
$Author: dharland $ (last person to modify) |
Constructor Summary | |
---|---|
LocalOscillator(FrequencyRange tunableRange)
Creates a continuously tunable oscillator whose frequencies are limited to the given range. |
|
LocalOscillator(FrequencyRange tunableRange,
Frequency tuningStepSize)
Creates an oscillator whose tunings are limited to the given range and whose "dial" moves in increments of tuningStepSize . |
Method Summary | |
---|---|
LocalOscillator |
clone()
Creates and returns a copy of this oscillator. |
boolean |
equals(Object o)
Returns true if o is equal to this local oscillator. |
Frequency |
getClosestTunableFrequency(Frequency potentialTuning)
Returns the legal tuning that is closed to potentialTuning . |
Frequency |
getCurrentTuning()
Returns the frequency to which this oscillator is currently tuned. |
String |
getName()
Returns the name of this oscillator. |
Signal |
getSignal()
Returns a signal holding the frequency to which this oscillator is currently tuned. |
Frequency |
getStepSize()
Returns the distance between adjacent tunings of this oscillator. |
FrequencyRange |
getTunableRange()
Returns the frequency range over which this oscillator may be tuned. |
int |
hashCode()
Returns a hash code value for this signal. |
boolean |
isContinuouslyTunable()
Returns true if this oscillator is continuously tunable. |
boolean |
isTunableTo(Frequency potentialTuning)
Returns true if this oscillator can be tuned to the given frequency. |
void |
setName(String newName)
Sets a new name for this oscillator. |
Frequency |
tuneTo(Frequency desiredFrequency)
Attempts to change the output frequency of this oscillator to desiredFrequency . |
Frequency |
tuneToCenter()
Tunes this local oscillator as closely as possible to the center of its range. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LocalOscillator(FrequencyRange tunableRange)
This oscillator will be initially tuned to its lowest frequency.
tunableRange
- the minimum and maximum frequencies to which this oscillator
may be tuned.
If this value is null a NullPointerException
will be thrown.public LocalOscillator(FrequencyRange tunableRange, Frequency tuningStepSize)
tuningStepSize
.
The minimum frequency to which this oscillator may be tuned is
tunableRange.getLowFrequency()
. The next lowest frequency is
tunableRange.getLowFrequency() + tuningStepSize
. The highest
frequency is given by the largest value N such that
tunableRange.getLowFrequency() + tuningStepSize * N <=
tunableRange.getHighFrequency()
. That is, the greatest frequency
to which this oscillator may be tuned might be lower than the high
frequency of tunableRange
.
This oscillator will be initially tuned to its lowest frequency.
tunableRange
- the minimum and maximum frequencies to which this oscillator
may be tuned.
If this value is null a NullPointerException
will be thrown.tuningStepSize
- the distance, in frequency units, between two adjacent tunings of
this oscillator.
If this value is null a NullPointerException
will be thrown.Method Detail |
---|
public boolean isContinuouslyTunable()
public Frequency getStepSize()
The returned frequency is a copy of the one held internally by this object, so changes made to it after this call will not be reflected herein.
The returned frequency will never be null.
public FrequencyRange getTunableRange()
The returned range is a copy of the one held internally by this object, so changes made to it after this call will not be reflected herein.
The returned range will never be null.
public Frequency getCurrentTuning()
public Frequency tuneTo(Frequency desiredFrequency)
desiredFrequency
.
An attempt to tune to a frequency below this oscillator's minimum will result in a tuning equal to the lowest allowable frequency, and likewise for exceeding this oscillator's maximum.
If this oscillator is not continuously tunable, then this method
will tune to the allowable frequency that is closest to
desiredFrequency
. If the desiredFrequency
is
not a tunable frequency and is
equally distant from two allowable tuning frequencies, this
oscillator will be tuned to the lower of those frequencies.
public Frequency tuneToCenter()
It may not be possible to tune a discretely tunable LO to the center of
its range. In that situation the closest legal tuning will be chosen.
If there are two such tunings, the one chosen will be determined as
outlined in tuneTo(Frequency)
.
public boolean isTunableTo(Frequency potentialTuning)
potentialTuning
- the frequency to be tested.
potentialTuning
.public Frequency getClosestTunableFrequency(Frequency potentialTuning)
potentialTuning
.
If two frequencies are equally close, the lower is returned.
potentialTuning
- a frequency to which this oscillator might be tuned.
potentialTuning
.public void setName(String newName)
If newName
is null or the empty string
(""), the request to change the name will be
denied and the current name will remain in place.
newName
- the new name of this oscillator.public String getName()
public Signal getSignal()
getSignal
in interface SignalSource
public LocalOscillator clone()
If anything goes wrong during the cloning procedure,
a RuntimeException
will be thrown.
clone
in class Object
public boolean equals(Object o)
o
is equal to this local oscillator.
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |