public class Flight_Settings
extends java.lang.Object
The file is found in resources/Flight_Settings.pvl, located at the
location of the HOGG package as determined by the class loader. If the file
cannot be read, or if it is missing parameters, or if the parameters contain
bad values, the hasError()
method returns true. If this
is the case, the settings methods may not return correct values. Check
the hasError()
method before first using this class's shared
instance.
Modifier and Type | Class and Description |
---|---|
static class |
Flight_Settings.Side
An enumeration defining the redundant electronics "sides" of HiRISE.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACTION_LABEL |
static java.lang.String |
ACTIVE_SIDE
The name of the parameter whose value is the active HiRISE electronics
side.
|
static int |
FAILURE
Exit status for an unsuccessful operation.
|
static java.lang.String |
FILENAME
The flight settings PVL file.
|
static java.lang.String |
ID
Class identification name with source code version and date.
|
static java.lang.String |
INACTIVE_CCDS
The name of the parameter whose value is the set of inactive HiRISE CCDs.
|
static int |
SUCCESS
Exit status for a successful operation.
|
Modifier and Type | Method and Description |
---|---|
Flight_Settings.Side |
getActiveSide()
Gets the active electronics side of HiRISE.
|
java.lang.String |
getErrorMessage()
Gets the error message associated with any errors in the flight settings
file.
|
java.util.List<java.lang.String> |
getInactiveCcds()
Gets a list of inactive CCDs.
|
static Flight_Settings |
getInstance()
Gets the shared flight settings instance.
|
java.lang.String |
getSettingsFilename()
Gets the full pathname to the settings file.
|
boolean |
hasError()
Indicates whether the flight settings have an error.
|
boolean |
isInactiveCcd(java.lang.String ccd)
Indicates whether the specified CCD is inactive.
|
boolean |
isInactiveCpmm(int cpmm)
Indicates whether the specified CPMM is inactive.
|
static void |
main(java.lang.String[] args) |
static javax.swing.Action |
makeViewerAction(java.awt.Component parent) |
static void |
showSettingsDialog(java.awt.Component parent) |
public static final java.lang.String ID
public static final java.lang.String FILENAME
resources directory
of the HOGG
package as determined by the class loader.public static final java.lang.String ACTIVE_SIDE
Flight_Settings.Side
enum are allowed, although they
are not case-sensitive.public static final java.lang.String INACTIVE_CCDS
Instrument.CCD_NAMES
,
Constant Field Valuespublic static final java.lang.String ACTION_LABEL
public static final int SUCCESS
public static final int FAILURE
public Flight_Settings.Side getActiveSide()
Note that if hasError()
is true, this method returns the
default value of Flight_Settings.Side.SIDE_A
, which may not be correct. Check
the error flag before using this method.
public java.util.List<java.lang.String> getInactiveCcds()
Note that if hasError()
is true, this method returns the
default empty list, which may not be correct. Check the error flag after
getting the shared instance.
public boolean isInactiveCcd(java.lang.String ccd)
Note that if hasError()
is true, this method returns
false for all CCD names, which may not be correct. Check the error
flag after getting the shared instance.
ccd
- the CCD name.public boolean isInactiveCpmm(int cpmm)
Note that if hasError()
is true, this method returns
false for all CPMM numbers, which may not be correct. Check the
error flag after getting the shared instance.
cpmm
- the CPMM number.public boolean hasError()
FILENAME
cannot be read, or when it is missing a
parameter, or when a parameter has an invalid value. If this method returns
true, the getErrorMessage()
method returns the associated
error message.
IMPORTANT: If this method returns true, then the methods describing the flight settings may not return correct values.
public java.lang.String getErrorMessage()
public java.lang.String getSettingsFilename()
public static Flight_Settings getInstance()
IMPORTANT: Before using the shared instance, check the hasError()
method. If it returns true, there was a problem with
the flight settings file and the methods describing the settings may not
return correct values.
public static javax.swing.Action makeViewerAction(java.awt.Component parent)
public static void showSettingsDialog(java.awt.Component parent)
public static void main(java.lang.String[] args)
Copyright \ (C) Arizona Board of Regents on behalf of the \ Planetary Image Research Laboratory, Lunar and \ Planetary Laboratory at the University of Arizona