edu.nrao.sss.model.resource.evla
Class EvlaAntennaElectronics

java.lang.Object
  extended by edu.nrao.sss.model.resource.evla.EvlaAntennaElectronics
All Implemented Interfaces:
AntennaElectronics, Cloneable

public class EvlaAntennaElectronics
extends Object
implements AntennaElectronics

The electronics of an EVLA antenna. This class represents the hardware from the feed horns through the digitizers.

Version Info:

$Revision: 1701 $
$Date: 2008-11-07 16:24:23 -0700 (Fri, 07 Nov 2008) $
$Author: dharland $ (last person to modify)

Since:
2007-10-30
Author:
David M. Harland

Constructor Summary
EvlaAntennaElectronics()
          Creates a new instance.
 
Method Summary
 void addExecutionListener(ActionListener newListener)
          Registers a new listener that will be notified whenever the AntennaElectronics.execute() method is called.
 EvlaAntennaElectronics clone()
          Returns a copy of this electronics.
 boolean configureFor(ReceiverBand band)
          Configures these electronics to work with the given receiver band.
 boolean configureFor(Set<ReceiverBand> bands)
          This method is not yet programmed; it will send one band to configureFor(ReceiverBand).
 boolean configureFrom(AntennaElectronicsConfiguration configuration)
          Configures these electronics by setting switches and tuning local oscillators according to the instructions in the given configuration.
 boolean configureToProduce(Collection<DigitalSignal> signals)
          This method is not yet supported.
 boolean equals(Object o)
          Returns true if o is equal to this electronics.
 Collection<DigitalSignal> execute()
          Runs these electronics and returns a collection of the signals produced.
 SortedSet<AntennaFrontEnd> getActiveFrontEnds()
          Returns front end(s) for which these electronics were most recently configured.
 SortedSet<ReceiverBand> getActiveReceivers()
          Returns receiver(s) for which these electronics were most recently configured.
 AntennaElectronicsConfiguration getConfiguration()
          Returns a configuration that contains the current settings of the switches and local oscillators of these electronics.
 List<String> getConfigurationProblems()
          Returns a list of problems associated with the most recent attempt to configure these electronics.
 SortedMap<String,Digitizer> getDigitizers()
          Returns the digitizers used in these electronics.
 SortedMap<String,LocalOscillator> getLocalOscillators()
          Returns the local oscillators used in these electronics.
 List<List<DigitalSignal>> getSignalPairs()
          Returns the digital signals produced by the most recent execution of these electronics, organized into pairs.
 Collection<DigitalSignal> getSignals()
          Returns the digital signals produced by the most recent execution of these electronics.
 SortedMap<String,SignalSwitch> getSwitches()
          Returns those switches in these electronics that may be set externally.
 SortedMap<String,SignalTransferSwitch> getTransferSwitches()
          Returns those transfer switches in these electronics that may be set externally.
 int hashCode()
          Returns a hash code value for this electronics.
 void removeExecutionListener(ActionListener formerListener)
          Removes formerListener from this electronics' list of execution listeners.
 void setQuantization(char ifCode, int bits)
          Sets the quantization to bits for the given IF.
 void setQuantization(int ifA, int ifB, int ifC, int ifD)
          Sets the quantization levels of all IFs at once.
 void submitTuningPlan(Map<ReceiverBand,Map<String,Frequency>> plans)
          Allows clients to tell this electronics how to tune its oscillators for a set of receiver bands.
 void submitTuningPlan(ReceiverBand band, Map<String,Frequency> plan)
          Allows clients to tell this electronics how to tune its oscillators for a particular receiver band.
 void tuneTo(Frequency centerFreq8Bit1, Frequency centerFreq8bit2)
          Attempts to configure the EVLA antenna electronics to receive the given central sky frequencies.
 void tuneTo(Frequency centerFreq3Bit1, Frequency centerFreq3bit2, Frequency centerFreq8Bit)
          Attempts to configure the EVLA antenna electronics to receive the given central sky frequencies.
 void tuneTo(Frequency centerFreq3Bit1, Frequency centerFreq3bit2, Frequency centerFreq3Bit3, Frequency centerFreq3bit4)
          Attempts to configure the EVLA antenna electronics to receive the given central sky frequencies.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EvlaAntennaElectronics

public EvlaAntennaElectronics()
Creates a new instance.

Method Detail

execute

public Collection<DigitalSignal> execute()
Description copied from interface: AntennaElectronics
Runs these electronics and returns a collection of the signals produced.

Specified by:
execute in interface AntennaElectronics
Returns:
the signals produced by running these electronics.

getSignals

public Collection<DigitalSignal> getSignals()
Description copied from interface: AntennaElectronics
Returns the digital signals produced by the most recent execution of these electronics. The returned collection will never be null, but could be empty. None of the elements contained in the returned collection will be null.

Specified by:
getSignals in interface AntennaElectronics
Returns:
the digital signals produced by the most recent execution of these electronics.

getSignalPairs

public List<List<DigitalSignal>> getSignalPairs()
Description copied from interface: AntennaElectronics
Returns the digital signals produced by the most recent execution of these electronics, organized into pairs.

The returned collection will never be null, but could be empty. Each element of the collection is a list of size two. Normally both elements of the inner lists are non-null. However, it is possible for one, but not both, of the elements of the inner lists to be null. This occurs when a signal has no partner.

Specified by:
getSignalPairs in interface AntennaElectronics
Returns:
the digital signals produced by the most recent execution of these electronics, organized into pairs.

addExecutionListener

public void addExecutionListener(ActionListener newListener)
Description copied from interface: AntennaElectronics
Registers a new listener that will be notified whenever the AntennaElectronics.execute() method is called. Listeners will be notified after the execute method has already performed its work and may not be notified at all if there is an unexpected failure.

Specified by:
addExecutionListener in interface AntennaElectronics
Parameters:
newListener - an object that will be notified upon successful completion of the AntennaElectronics.execute() method.

removeExecutionListener

public void removeExecutionListener(ActionListener formerListener)
Description copied from interface: AntennaElectronics
Removes formerListener from this electronics' list of execution listeners. If formerListener is not currently a registered execution listener, this method does nothing.

Specified by:
removeExecutionListener in interface AntennaElectronics
Parameters:
formerListener - an object that no longer wishes to be notified upon successful completion of the AntennaElectronics.execute() method.

configureFor

public boolean configureFor(ReceiverBand band)
Configures these electronics to work with the given receiver band.

Specified by:
configureFor in interface AntennaElectronics
Parameters:
band - the receiver band, or frequency range, for which these electronics should be configured. If this band does not belong to the EVLA telescope, no reconfiguration will occur and this method will return false.
Returns:
true if the configuration occurred without any problems. If any problems were encountered, they will be listed in getConfigurationProblems().
See Also:
AntennaElectronics.configureFor(ReceiverBand)

configureFor

public boolean configureFor(Set<ReceiverBand> bands)
This method is not yet programmed; it will send one band to configureFor(ReceiverBand).

Specified by:
configureFor in interface AntennaElectronics
Parameters:
bands - the receiver bands, or frequency ranges, for which these electronics should be configured.
Returns:
true if the configuration occurred without any problems. If any problems were encountered, they will be listed in AntennaElectronics.getConfigurationProblems().

configureToProduce

public boolean configureToProduce(Collection<DigitalSignal> signals)
This method is not yet supported.

Specified by:
configureToProduce in interface AntennaElectronics
Parameters:
signals - the digital output for which these electronics should be configured.
Returns:
true if the configuration occurred without any problems. If any problems were encountered, they will be listed in AntennaElectronics.getConfigurationProblems().

getLocalOscillators

public SortedMap<String,LocalOscillator> getLocalOscillators()
Description copied from interface: AntennaElectronics
Returns the local oscillators used in these electronics. The returned map is keyed by the names of the local oscillators. While the local oscillators in the map are references to those held internally by these electronics, the returned map is not referenced internally, so changes made to it will have no effect on these electronics.

This method is normally used for discovering the frequencies to which the internal oscillators are tuned. This method also gives clients the opportunity to change the LO tunings. Clients must have some knowledge of the implementing class in order to do this in a meaningful way. Thus, this method is not generally used for manipulating the tunings.

Specified by:
getLocalOscillators in interface AntennaElectronics
Returns:
a map containing the local oscillators used in these electronics, keyed by the names of those LOs.

getSwitches

public SortedMap<String,SignalSwitch> getSwitches()
Description copied from interface: AntennaElectronics
Returns those switches in these electronics that may be set externally. The returned map is keyed by the names of the switches. While the switches in the map are references to those held internally by these electronics, the returned map is not referenced internally, so changes made to it will have no effect on these electronics.

This method is normally used for discovering the input and output poles to which the internal switches are set. This method also gives clients the opportunity to change the switch settings. Clients must have some knowledge of the implementing class in order to do this in a meaningful way. Thus, this method is not generally used for manipulating the switches.

Specified by:
getSwitches in interface AntennaElectronics
Returns:
a map containing the internal switches of these electronics, keyed by the names of those switches.

getTransferSwitches

public SortedMap<String,SignalTransferSwitch> getTransferSwitches()
Description copied from interface: AntennaElectronics
Returns those transfer switches in these electronics that may be set externally. The returned map is keyed by the names of the switches. While the switches in the map are references to those held internally by these electronics, the returned map is not referenced internally, so changes made to it will have no effect on these electronics.

This method is normally used for discovering the orientation to which the internal switches are set. This method also gives clients the opportunity to change the orientations. Clients must have some knowledge of the implementing class in order to do this in a meaningful way. Thus, this method is not generally used for manipulating the switches.

Specified by:
getTransferSwitches in interface AntennaElectronics
Returns:
a map containing the internal transfer switches of these electronics, keyed by the names of those switches.

getDigitizers

public SortedMap<String,Digitizer> getDigitizers()
Description copied from interface: AntennaElectronics
Returns the digitizers used in these electronics. The returned map is keyed by the names of the digitizers. While the digitizers in the map are references to those held internally by these electronics, the returned map is not referenced internally, so changes made to it will have no effect on these electronics.

This method is normally used for discovering the bit-per-sample values that the digitizers are set to produce. This method also gives clients the opportunity to change those values. Clients must have some knowledge of the implementing class in order to do this in a meaningful way. Thus, this method is not generally used for manipulating the valuess.

Specified by:
getDigitizers in interface AntennaElectronics
Returns:
a map containing the digitizers used in these electronics, keyed by the names of those digitizers.

configureFrom

public boolean configureFrom(AntennaElectronicsConfiguration configuration)
Description copied from interface: AntennaElectronics
Configures these electronics by setting switches and tuning local oscillators according to the instructions in the given configuration.

Specified by:
configureFrom in interface AntennaElectronics
Parameters:
configuration - a container of switch settings and local oscillator tunings that should be used to configure these electronics.
Returns:
true if the configuration occurred without any problems. If any problems were encountered, they will be listed in AntennaElectronics.getConfigurationProblems().

getConfiguration

public AntennaElectronicsConfiguration getConfiguration()
Description copied from interface: AntennaElectronics
Returns a configuration that contains the current settings of the switches and local oscillators of these electronics.

Specified by:
getConfiguration in interface AntennaElectronics
Returns:
an object that represents the current configuration of these electronics.

submitTuningPlan

public void submitTuningPlan(Map<ReceiverBand,Map<String,Frequency>> plans)
Description copied from interface: AntennaElectronics
Allows clients to tell this electronics how to tune its oscillators for a set of receiver bands.

It is expected that implementing classes will already know how to configure themselves, including tuning their LOs, for a given band. However, this method exists for those clients who have enough knowledge to meaningfully change that plan. The submitted map need not contain a plan for every receiver band handled by this electronics.

Note that a tuning plan as specified may be unimplementable. This can happen when a specified frequency is too high or too low for a given LO, or when a specified frequency is in between the tunable frequencies of a discretely tunable LO. In both these situations the LOs will be tuned as closely as they can to the plan.

Specified by:
submitTuningPlan in interface AntennaElectronics
Parameters:
plans - a set of LO tuning plans for particular receiver bands. The map that is the value object of the outer map has a key whose value is the name of a contained LO. The value object of this inner map is the frequency to which that LO should be tuned.

submitTuningPlan

public void submitTuningPlan(ReceiverBand band,
                             Map<String,Frequency> plan)
Description copied from interface: AntennaElectronics
Allows clients to tell this electronics how to tune its oscillators for a particular receiver band.

See AntennaElectronics.submitTuningPlan(Map) for more information concerning the use of this method.

Specified by:
submitTuningPlan in interface AntennaElectronics
Parameters:
band - the band for which the plan applies.
plan - A map whose key is the name of local oscillator contained by this electronics, and whose value is the frequency to which that LO should be tuned.

getActiveReceivers

public SortedSet<ReceiverBand> getActiveReceivers()
Description copied from interface: AntennaElectronics
Returns receiver(s) for which these electronics were most recently configured.

Note that the returned set is not held internally by this class, therefore changes made to it will not be reflected herein. To change the active receivers, use one of the configureFor methods.

Specified by:
getActiveReceivers in interface AntennaElectronics
Returns:
the receivers these electronics are configured to use.

getActiveFrontEnds

public SortedSet<AntennaFrontEnd> getActiveFrontEnds()
Description copied from interface: AntennaElectronics
Returns front end(s) for which these electronics were most recently configured.

Note that the returned set is not held internally by this class, therefore changes made to it will not be reflected herein. To change the active front ends, use one of the configureFor methods.

Specified by:
getActiveFrontEnds in interface AntennaElectronics
Returns:
the front ends these electronics are configured to use.
See Also:
AntennaElectronics.getActiveReceivers()

getConfigurationProblems

public List<String> getConfigurationProblems()
Description copied from interface: AntennaElectronics
Returns a list of problems associated with the most recent attempt to configure these electronics.

The returned list will never be null, but it will be empty if there were no problems with the latest configuration or if no attempt at configuration has ever been made. The returned list is not held internally by this object, so changes made to it will have no effect on this object.

Specified by:
getConfigurationProblems in interface AntennaElectronics
Returns:
a list of problems with the most recent configuration attempt.

setQuantization

public void setQuantization(char ifCode,
                            int bits)
Sets the quantization to bits for the given IF. This is a convenience method that sets several switches into the proper positions for the type of output requested for the given IF.

Parameters:
ifCode - a single letter, case insensitive, code for one of the intermediate frequency singles of the EVLA antennas. The following list illustrates what happens when a set of signals in 3-bit mode are changed to 8-bits:
  • 'A' results in the replacement of A1 & C1 with A0.
  • 'B' results in the replacement of B1 & D1 with B0.
  • 'C' results in the replacement of A2, C1, & C2 with C0.
  • 'D' results in the replacement of B2, D1, & D2 with D0.
If this value is not in the range 'A'-'D' then this method will do nothing.
bits - the only legal values are 3 and 8, however this method will accept any integer. If the value is less than 6, 3 will be used, otherwise 8 will be used.
Since:
2008-10-20
See Also:
setQuantization(int, int, int, int)

setQuantization

public void setQuantization(int ifA,
                            int ifB,
                            int ifC,
                            int ifD)
Sets the quantization levels of all IFs at once.

For all parameters the only legal values are 3 and 8, however this method will accept any integer. If the value is less than 6, 3 will be used, otherwise 8 will be used.

Parameters:
ifA - the number of bits for the 'A' IF.
ifB - the number of bits for the 'B' IF.
ifC - the number of bits for the 'C' IF.
ifD - the number of bits for the 'D' IF.
Since:
2008-10-23

tuneTo

public void tuneTo(Frequency centerFreq3Bit1,
                   Frequency centerFreq3bit2,
                   Frequency centerFreq3Bit3,
                   Frequency centerFreq3bit4)
Attempts to configure the EVLA antenna electronics to receive the given central sky frequencies.

Parameters:
centerFreq3Bit1 - the central sky frequency of a 2.048GHz, 3-bit, signal.
centerFreq3bit2 - the central sky frequency of a 2.048GHz, 3-bit, signal.
centerFreq3Bit3 - the central sky frequency of a 2.048GHz, 3-bit, signal.
centerFreq3bit4 - the central sky frequency of a 2.048GHz, 3-bit, signal.
Since:
2008-10-24

tuneTo

public void tuneTo(Frequency centerFreq8Bit1,
                   Frequency centerFreq8bit2)
Attempts to configure the EVLA antenna electronics to receive the given central sky frequencies.

Parameters:
centerFreq8Bit1 - the central sky frequency of a 1.024GHz, 8-bit, signal.
centerFreq8bit2 - the central sky frequency of a 1.024GHz, 8-bit, signal.
Since:
2008-10-24

tuneTo

public void tuneTo(Frequency centerFreq3Bit1,
                   Frequency centerFreq3bit2,
                   Frequency centerFreq8Bit)
Attempts to configure the EVLA antenna electronics to receive the given central sky frequencies.

Parameters:
centerFreq3Bit1 - the central sky frequency of a 2.048GHz, 3-bit, signal.
centerFreq3bit2 - the central sky frequency of a 2.048GHz, 3-bit, signal.
centerFreq8Bit - the central sky frequency of a 1.024GHz, 8-bit, signal.
Since:
2008-10-24

clone

public EvlaAntennaElectronics clone()
Returns a copy of this electronics.

If anything goes wrong during the cloning procedure, a RuntimeException will be thrown.

Specified by:
clone in interface AntennaElectronics
Overrides:
clone in class Object

equals

public boolean equals(Object o)
Returns true if o is equal to this electronics.

Overrides:
equals in class Object

hashCode

public int hashCode()
Returns a hash code value for this electronics.

Overrides:
hashCode in class Object


Copyright © 2009. All Rights Reserved.