|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.nrao.sss.model.resource.CorrelatorConfiguration
public abstract class CorrelatorConfiguration
Configuration information for a correlator of a radio telescope.
Getting an Instance
Clients are discouraged from creating new instances of this type by using the
constructors of concrete subclasses. The preferred way to get an instance of
this type is to use the static factory method,
makeFor(CorrelatorName, AntennaElectronics)
.
The static method getSupportedCorrelators()
lists the
correlator supported by this configuration class.
Working with Basebands and Baseband Pairs
This configuration now has only one method for fetching basebands:
getBasebands()
. The method getBasebandPairs() has been
eliminated, but the CorrelatorBaseband
now has methods to determine
whether or not it is part of pair and, if so, who its parter is.
The basebands held by this configuration were
originally constructed based on the output signals of the
AntennaElectronics
provided to the factory method.
Listening for Changes
This configuration gives clients the ability to listen for changes in
the collection of basebands in this configuration. Clients
may register by using the
addBasebandCollectionListener
method.
Registered users will be notified when a baseband(s) is added to the
configuration, removed from the configuration, or both at once.
Note that a listener's
basebandCollectionChanged
method is called only when the collection itself
changes, not when properties of the contained basebands change.
Version Info:
$Revision: 2287 $ |
$Date: 2009-05-07 13:54:58 -0600 (Thu, 07 May 2009) $ |
$Author: dharland $ (last person to modify) |
Field Summary | |
---|---|
protected List<CorrelatorBasebandAbs> |
activeBBs
The basebands of this configuration. |
protected List<BasebandCollectionListener> |
bbListeners
Objects interested in changes to our collection of basebands. |
protected Map<String,CorrelatorBasebandAbs> |
inactiveBBs
Basebands that had been, but are not currently, active. |
protected AntennaElectronics |
signalSource
The provider of digital signals for the basebands of this configuration. |
Fields inherited from interface edu.nrao.sss.util.Identifiable |
---|
UNIDENTIFIED |
Constructor Summary | |
---|---|
protected |
CorrelatorConfiguration()
|
protected |
CorrelatorConfiguration(AntennaElectronics signalSrc)
Constructs a new configuration that is initialized from signalSrc . |
Method Summary | |
---|---|
void |
addBasebandCollectionListener(BasebandCollectionListener newListener)
Registers a new listener that will be notified whenever the collection of basebands in this configuration is changed. |
void |
clearId()
Resets this instance's ID, and the IDs of all its components, to a value that represents the unidentified state. |
CorrelatorConfiguration |
clone()
Returns a copy of this configuration. |
protected void |
createdBasebandsFromPersistentStore()
Called after basebands were created from a persistent store, such as a database or XMl file. |
boolean |
equals(Object o)
Returns true if o is equal to this configuration. |
List<CorrelatorBaseband> |
getBasebands()
Returns the basebands of this correlator configuration. |
Long |
getId()
|
protected List<CorrelatorBaseband> |
getOrderedBasebands()
Allows concrete subclasses to be in charge of the ordering of the basebands returned by getBasebands() . |
AntennaElectronics |
getSignalSource()
Returns the source of input signals for this configuration, if any. |
static List<CorrelatorName> |
getSupportedCorrelators()
Returns a list of the correlators that are supported by the factory
method of this class. |
BackendType |
getType()
Creates and initializes the active basebands for this configuration based on the antenna electronics that were sent to the constructor. |
int |
hashCode()
Returns a hash code value for this configuration. |
protected abstract CorrelatorBaseband |
makeBasebandFrom(DigitalSignal ds)
Creates a new baseband from the given digital signal. |
protected abstract CorrelatorBaseband |
makeBasebandFrom(DigitalSignal ds1,
DigitalSignal ds2)
Creates a new baseband from the given digital signals. |
static CorrelatorConfiguration |
makeFor(CorrelatorName correlator,
AntennaElectronics signalSrc)
Creates and returns a new configuration for the given correlator that is initialized from signalSrc . |
void |
removeBasebandCollectionListener(BasebandCollectionListener formerListener)
Removes formerListener from this configuration's list of baseband
collection listeners. |
void |
setId(Long id)
Sets the ID of this object; not recommended for most clients. |
void |
setSignalSource(AntennaElectronics newSource)
Sets the source of input signals for this configuration. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface edu.nrao.sss.model.resource.TelescopeBackend |
---|
configureFrom, getName |
Methods inherited from interface java.awt.event.ActionListener |
---|
actionPerformed |
Field Detail |
---|
protected List<CorrelatorBasebandAbs> activeBBs
protected Map<String,CorrelatorBasebandAbs> inactiveBBs
protected AntennaElectronics signalSource
protected List<BasebandCollectionListener> bbListeners
Constructor Detail |
---|
protected CorrelatorConfiguration(AntennaElectronics signalSrc)
signalSrc
.
signalSrc
- the antenna electronics that provide the input signals for the basebands
of this configuration.
IllegalArgumentException
- if signalSrc
is null.protected CorrelatorConfiguration()
Method Detail |
---|
public static CorrelatorConfiguration makeFor(CorrelatorName correlator, AntennaElectronics signalSrc)
signalSrc
.
correlator
- the name of a known correlator.signalSrc
- the antenna electronics that provide the input signals for the basebands
of this configuration.
IllegalArgumentException
- if correlator
is not one of the supported types.public static List<CorrelatorName> getSupportedCorrelators()
factory
method
of this class.
public Long getId()
getId
in interface Identifiable
public void setId(Long id)
TelescopeBackend
setId
in interface TelescopeBackend
id
- a new ID for this object.public void clearId()
TelescopeBackend
This method is useful for preparing an instance for storage in a database. The ID property (as of now, though this may change in the future) is used by our persistence mechanism to identify objects. If you are persisting this instance for the first time, you may need to call this method before performing a save. This is especially true if you have created this instance from XML, as the XML unmarshalling brings along the ID property.
clearId
in interface TelescopeBackend
public void setSignalSource(AntennaElectronics newSource)
setSignalSource
in interface TelescopeBackend
newSource
- a new source of input signals for this configuration.
A value of null is accepted here.public AntennaElectronics getSignalSource()
getSignalSource
in interface TelescopeBackend
protected List<CorrelatorBaseband> getOrderedBasebands()
getBasebands()
.
This default implementation returns a copy of the activeBBs list
without any reordering
public BackendType getType()
getType
in interface TelescopeBackend
protected abstract CorrelatorBaseband makeBasebandFrom(DigitalSignal ds)
This method is expected to produce a CorrelatorBaseband
whose CorrelatorBaseband.isSinglet()
property is
true.
ds
- the digital signal that serves as the signal source for the
newly created baseband.
ds
is null.protected abstract CorrelatorBaseband makeBasebandFrom(DigitalSignal ds1, DigitalSignal ds2)
This method is expected to produce a CorrelatorBaseband
whose CorrelatorBaseband.isPair()
property is
true.
ds1
- one of two digital signals that serve as the signal sources for the
newly created baseband.ds2
- one of two digital signals that serve as the signal sources for the
newly created baseband.
ds1
or ds2
is null.public List<CorrelatorBaseband> getBasebands()
While the basebands in the returned list are the actual basebands held internally by this configuration, the list itself is a new list created at the time this method is called and not referenced by this configuration. The returned list may be empty, but will never be null.
protected void createdBasebandsFromPersistentStore()
public void addBasebandCollectionListener(BasebandCollectionListener newListener)
newListener
- an object that will be notified when the collection of basebands held
by this configuration changes. A value of null will be ignored.public void removeBasebandCollectionListener(BasebandCollectionListener formerListener)
formerListener
from this configuration's list of baseband
collection listeners. If formerListener
is not currently a
registered baseband collection listener, this method does nothing.
formerListener
- an object that no longer wishes to be notified about changes in the
collection of basebands held by this configuration.public CorrelatorConfiguration clone()
If anything goes wrong during the cloning procedure,
a RuntimeException
will be thrown.
clone
in interface TelescopeBackend
clone
in class Object
public boolean equals(Object o)
o
is equal to this configuration.
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 |