|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ka2ddo.yaac.YAAC
public class YAAC
This is the main program for the YAAC program, and is a singleton. It accepts the command line arguments to override any saved preferences, then starts up the backend and GUI (if GUI is requested).
Command-line parameters are of the form "-key value" or "-key" (no value) and correspond to the names used in the Preferences nodes used to persist the values. There are a few special values defined by the core code of the this application:
installation_directory/plugins
.
Note that the JRE property java.library.path
must be set correctly
so YAAC can find any native libraries needed (such as those that support the
RXTX serial port library). The YAACBootstrap
class
exists to help set up the command-line environment for invoking YAAC.
Field Summary | |
---|---|
static java.lang.String |
OPT_GUI
Boolean TRUE or FALSE if GUI is going to be invoked. |
static java.lang.String |
OPT_LAST_CHOSEN_PATH
Symbolic ket name for the last chosen digipeat path used for text messaging. |
static java.lang.String |
OPT_LOG_DIR
Symbolic key name by which the path to the logging file directory is cached in the properties. |
static java.lang.String |
OPT_MSG_LOG
Symbolic key name by which the path to the message logging directory is cached in the properties. |
static java.lang.String |
OPT_OSM_TILE_DIR
Symbolic key name by which the path to the map rendering tile directory is cached in the properties. |
static java.lang.String |
OSNAME
The key value in the YAAC properties for the generic name of the host operating system (distilled from value in Java system properties). |
static java.lang.String |
WINDOWS
Symbolic name for Microsoft Windows operating systems, associated with OSNAME key in properties table. |
Method Summary | |
---|---|
static void |
addShutdownHandler(ShutdownHandler sh)
Register a ShutdownHandler to be invoked when YAAC is shut down. |
void |
beaconChanged(BeaconData beaconData)
This method is called for registered implementors when changed beacon data is stored to preferences. |
static AbstractMenuAction |
findMenuAction(java.lang.String preLocalizedTagName)
Find a menu entry with the specified tag name, |
static java.io.File |
getBaseDir()
Get the root directory of the YAAC installation. |
static BeaconData |
getBeaconData()
Get the BeaconData information for this station. |
static java.lang.String |
getCallsign()
Get the primary callsign set for this station running YAAC. |
static CheckpointingLogger |
getCheckpointingLogger()
Get the logger used to track YAAC's error messages. |
static DistanceUnit |
getDistanceUnit()
Get the currently set unit for distance display. |
static CumulativeBooleanAndFilter |
getFilter()
Get the top-level Filter for selectively choosing which Messages to see in the various YAAC display windows. |
static GuiIfc |
getGui()
Get the object representing the front-end user interface main window. |
static java.lang.ClassLoader |
getLastClassLoader()
Get the last of the daisy-chained list of ClassLoaders for YAAC and all its accepted plugins. |
static ShutdownHandler |
getLastShutdownHandler()
Pop the most recently remaining registered ShutdownHandler from the stack. |
static StationState |
getLocalStation()
Get the StationState object containing the status of the local station. |
static java.util.ArrayList<AbstractMenuAction> |
getMenuBarActionList()
Get a list of all currently defined potential menu items for inclusion in a popup menu in the map window. |
static java.lang.String |
getMsg(java.lang.String tagName)
Get the appropriate localized String corresponding to a ResourceBundle tag name in a specific ResourceBundle. |
static java.lang.String |
getMsg(java.lang.String bundleBaseName,
java.lang.String tagName)
Get the appropriate localized String corresponding to a ResourceBundle tag name in a specific ResourceBundle. |
static java.util.ResourceBundle |
getMsgBundle()
Get the appropriate locale-specific message bundle for YAAC. |
static java.util.ResourceBundle |
getMsgBundle(java.lang.String altBundleName)
Get the appropriate locale-specific variant of some message bundle in one or more of the provided plugins. |
static java.util.ArrayList<AbstractPopupMenuAction> |
getPopupMenuActionList()
Get a list of all currently defined potential menu items for inclusion in a popup menu in the map window. |
static java.util.prefs.Preferences |
getPreferences()
Get a handle to the Java Preferences node at the root of the subtree used to store YAAC preferences. |
static PressureUnit |
getPressureUnit()
Get the currently set unit for pressure display. |
static java.lang.String |
getProfileName()
Get the name of the profile being used to store configuration data. |
static java.util.Properties |
getProps()
Get the Properties object used to efficiently cache preferences that are used frequently by YAAC. |
static java.util.List<Provider> |
getProviderList()
Get a List of all the Provider objects loaded into YAAC. |
static SnifferDataModel |
getSnifferDataModel()
Get the data structure used to cache all received raw AX.25 packets. |
static SoundMaker |
getSoundMaker()
Get the object used to produce sound effects. |
static long |
getStartupTime()
Report the Unix time in milliseconds when YAAC was started. |
static StatusData |
getStatusData()
Get the StatusData information for this station. |
static TemperatureUnit |
getTemperatureUnit()
Get the currently set unit for temperature display. |
static int |
getTimeBeforeInactive()
Set the time interval after which no user action indicates the station is unattended. |
static RelativeTimeFilter |
getTimeFilter()
Get the Filter controlling the maximum age of displayed message traffic. |
static java.lang.Enum<? extends UnitEnum> |
getUnit(java.lang.Class<? extends UnitEnum> cls)
Get the current preferred value of the unit-specifying Enum class. |
static WeightUnit |
getWeightUnit()
Get the currently set unit for weight display. |
void |
gpsDataUpdated(GPSDistributor distributor,
GpsFix currentFix,
boolean isLocal,
java.lang.String source)
Called by the GPSDistributor when the GPS data has been updated. |
static boolean |
isCallsignSet()
Indicate if the local station's callsign has been set. |
static boolean |
isDebug()
Indicate if debug messages should be printed out. |
static boolean |
isLogAPRS()
Efficiently test if APRS packets should be logged to disk. |
static boolean |
isLogGPS()
Efficiently test if GPS NMEA sentences should be logged to disk. |
static boolean |
isOperatorPresent(long now)
Test if human user has been active within the tolerance for inactivity. |
static boolean |
isShowOperatorPresent()
Indicate if beacons should use the 'O' overlay to indicate an operator is present at the station. |
static boolean |
isUseExtendedSymbols()
Report whether APRS 1.2 extended symbols are available and will be used if needed. |
static void |
loadOnePlugin(java.io.File pluginJar)
Attempt to load one JAR file as a plugin |
static void |
main(java.lang.String[] args)
Main program entry point. |
static void |
moveNewUpgraderToLib()
Upon startup of a freshly upgraded installation of YAAC, move the installed upgrade.jar file to the directory location it will be executed from for upgrades, so that the new upgrade.jar and the old executing one will not collide (an operation prohibited by Microsoft Windows). |
static void |
operatorActed()
Update last time human user did something on the UI. |
static void |
removeShutdownHandler(ShutdownHandler sh)
Unregister a ShutdownHandler that is no longer needed. |
void |
satDataUpdated(GPSDistributor distributor,
SatelliteCatalog satCatalog,
boolean isLocal,
java.lang.String source)
Called when the satellite constellation in use changes. |
static void |
setDistanceUnit(DistanceUnit distanceUnit)
Change the current unit for scaling distance display, and store the change in the YAAC preferences. |
static void |
setLogAPRS(boolean logAPRS)
Remember if APRS packets should be logged to disk. |
static void |
setLogGPS(boolean logGPS)
Remember if GPS NMEA sentences should be logged to disk. |
static void |
setPressureUnit(PressureUnit pressureUnit)
Change the current unit for scaling pressure display, and store the change in the YAAC preferences. |
static void |
setShowOperatorPresent(boolean showOperatorPresent)
Indicate if beacons should use the 'O' overlay to indicate an operator is present at the station. |
static void |
setSoundMaker(SoundMaker soundMaker)
Specify the object used to produce sound effects. |
static void |
setTemperatureUnit(TemperatureUnit temperatureUnit)
Change the current unit for scaling temperature display, and store the change in the YAAC preferences. |
static void |
setTimeBeforeInactive(int minutesBeforeInactive)
Set the time interval after which no user action indicates the station is unattended. |
static void |
setUseExtendedSymbols(boolean useExtendedSymbols)
Specify whether APRS 1.2 extended symbols should be used to render stations reporting known overlays of alternate table symbols. |
static void |
setWeightUnit(WeightUnit weightUnit)
Change the current unit for scaling weight display, and store the change in the YAAC preferences. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String OPT_GUI
public static final java.lang.String OSNAME
getProps()
,
Constant Field Valuespublic static final java.lang.String OPT_OSM_TILE_DIR
getProps()
,
Constant Field Valuespublic static final java.lang.String OPT_LOG_DIR
getProps()
,
Constant Field Valuespublic static final java.lang.String OPT_MSG_LOG
getProps()
,
Constant Field Valuespublic static final java.lang.String OPT_LAST_CHOSEN_PATH
getProps()
,
Constant Field Valuespublic static final java.lang.String WINDOWS
OSNAME
,
Constant Field ValuesMethod Detail |
---|
public static void main(java.lang.String[] args)
args
- command line argumentspublic static void moveNewUpgraderToLib() throws java.io.IOException
java.io.IOException
- if upgrade.jar could not successfully be moved for some reasonpublic void beaconChanged(BeaconData beaconData)
beaconChanged
in interface BeaconChangeListener
beaconData
- BeaconData record that has been changedpublic void gpsDataUpdated(GPSDistributor distributor, GpsFix currentFix, boolean isLocal, java.lang.String source)
gpsDataUpdated
in interface GpsDataListener
distributor
- instance of the GPSDistributorcurrentFix
- current GpsFixisLocal
- boolean true if this is GPS data for the local station, false if for a remote GPS receiversource
- String name assigned to remote GPS receiver, or null if for the local receiverpublic void satDataUpdated(GPSDistributor distributor, SatelliteCatalog satCatalog, boolean isLocal, java.lang.String source)
satDataUpdated
in interface GpsDataListener
distributor
- instance of the GPSDistributorsatCatalog
- updated SatelliteCatalog instanceisLocal
- boolean true if this is GPS data for the local station, false if for a remote GPS receiversource
- String name assigned to remote GPS receiver, or null if for the local receiverpublic static void loadOnePlugin(java.io.File pluginJar)
pluginJar
- File identifying the JAR file assumed to be the root of a pluginpublic static AbstractMenuAction findMenuAction(java.lang.String preLocalizedTagName)
preLocalizedTagName
- pre-localized tag name String to search for
public static java.util.ResourceBundle getMsgBundle()
public static java.util.ResourceBundle getMsgBundle(java.lang.String altBundleName)
altBundleName
- String base name of the ResourceBundle to search for
public static java.lang.String getMsg(java.lang.String tagName) throws java.util.MissingResourceException
tagName
- String name to look up
java.util.MissingResourceException
- if the tag cannot be foundpublic static java.lang.String getMsg(java.lang.String bundleBaseName, java.lang.String tagName) throws java.util.MissingResourceException
bundleBaseName
- String name of bundle containing the tagtagName
- String name to look up
java.util.MissingResourceException
- if the bundle or tag cannot be foundpublic static java.util.Properties getProps()
public static GuiIfc getGui()
public static java.util.prefs.Preferences getPreferences()
public static CumulativeBooleanAndFilter getFilter()
public static RelativeTimeFilter getTimeFilter()
public static java.util.List<Provider> getProviderList()
public static BeaconData getBeaconData()
public static boolean isCallsignSet()
public static StatusData getStatusData()
public static java.lang.String getCallsign()
getBeaconData()
public static SnifferDataModel getSnifferDataModel()
public static java.util.ArrayList<AbstractMenuAction> getMenuBarActionList()
public static java.util.ArrayList<AbstractPopupMenuAction> getPopupMenuActionList()
public static DistanceUnit getDistanceUnit()
public static void setDistanceUnit(DistanceUnit distanceUnit)
distanceUnit
- DistanceUnit to use for all future distance displayspublic static TemperatureUnit getTemperatureUnit()
public static void setTemperatureUnit(TemperatureUnit temperatureUnit)
temperatureUnit
- TemperatureUnit to use for all future temperature displayspublic static PressureUnit getPressureUnit()
public static void setPressureUnit(PressureUnit pressureUnit)
pressureUnit
- PressureUnit to use for all future pressure displayspublic static WeightUnit getWeightUnit()
public static void setWeightUnit(WeightUnit weightUnit)
weightUnit
- WeightUnit to use for all future weight displayspublic static java.lang.Enum<? extends UnitEnum> getUnit(java.lang.Class<? extends UnitEnum> cls)
cls
- subclass of Enum that implements the UnitEnum tag interface
public static boolean isLogAPRS()
public static boolean isLogGPS()
public static void setLogAPRS(boolean logAPRS)
logAPRS
- boolean true if logging should occur in the futurepublic static void setLogGPS(boolean logGPS)
logGPS
- boolean true if logging should occur in the futurepublic static boolean isDebug()
public static boolean isShowOperatorPresent()
public static void setShowOperatorPresent(boolean showOperatorPresent)
showOperatorPresent
- boolean true if operator-present overlay should be used for alternate set symbolspublic static boolean isUseExtendedSymbols()
public static void setUseExtendedSymbols(boolean useExtendedSymbols)
useExtendedSymbols
- boolean true if APRS 1.2 extended symbols should be used if neededpublic static int getTimeBeforeInactive()
public static void setTimeBeforeInactive(int minutesBeforeInactive)
minutesBeforeInactive
- time in minutes before inactivitypublic static void operatorActed()
public static boolean isOperatorPresent(long now)
now
- current time in milliseconds since Jan 1 1970 UTC
public static long getStartupTime()
public static StationState getLocalStation()
public static void addShutdownHandler(ShutdownHandler sh)
sh
- ShutdownHandler to registerpublic static void removeShutdownHandler(ShutdownHandler sh)
sh
- ShutdownHandler to removepublic static ShutdownHandler getLastShutdownHandler()
public static CheckpointingLogger getCheckpointingLogger()
public static java.lang.String getProfileName()
public static java.io.File getBaseDir()
public static java.lang.ClassLoader getLastClassLoader()
public static SoundMaker getSoundMaker()
public static void setSoundMaker(SoundMaker soundMaker)
soundMaker
- new SoundMaker implementation to provide audio outputs
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |