Class YAAC

java.lang.Object
org.ka2ddo.yaac.YAAC
All Implemented Interfaces:
GpsDataListener, BeaconChangeListener

public class YAAC extends Object implements BeaconChangeListener, GpsDataListener
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:

  • gui - no parameters. force bringing up the GUI; default depends on O/S and (for Unix derivatives) whether the X server can be found.
  • nogui - no parameters. force not bringing up the GUI; default depends on O/S and (for Unix derivatives) whether the X server can be found.
  • clear - no parameters, but discards all existing saved preferences and Port definitions.
  • clearPorts - no parameters, but discards all existing Port definitions in preferences; other preferences will be preserved.
  • plugindir - pathname to directory where plugin JAR files will be searched for, defaults to installation_directory/plugins.
Author:
Andrew Pavlin, KA2DDO
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Support class for loading plugins that may have circular dependencies.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The command line option that specifies turning on debug messages.
    static final String
    Boolean TRUE or FALSE if GUI is going to be invoked.
    static final String
    String name of first window to use for launching YAAC.
    static final String
    Symbolic ket name for the last chosen digipeat path used for text messaging.
    static final String
    Symbolic key name by which the path to the logging file directory is cached in the properties.
    static final String
    Symbolic key name by which the path to the message logging directory is cached in the properties.
    static final String
    Symbolic key name by which the path to the map rendering tile directory is cached in the properties.
    static final String
    The key value in the YAAC properties for the generic name of the CPU architecture (distilled from value in Java system properties).
    static final String
    The key value in the YAAC properties for the generic name of the host operating system (distilled from value in Java system properties).
    static final String
    Symbolic name for Microsoft Windows operating systems, associated with OSNAME key in properties table.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Register a ShutdownHandler to be invoked when YAAC is shut down.
    static void
    Add a UnitEnumChangeListener for being informed of unit changes,
    void
    This method is called for registered implementors when changed beacon data is stored to preferences.
    findMenuAction(String preLocalizedTagName)
    Find a menu entry with the specified tag name,
    static File
    Get the root directory of the YAAC installation.
    static BeaconData
    Get the default BeaconData information for this station.
    static BeaconData
    getBeaconData(String beaconName)
    Get the BeaconData information for this station.
    Return a read-only Map of all the currently defined beacons.
    static String
    Get the primary callsign set for this station running YAAC.
    Get the logger used to track YAAC's error messages.
    static int
    Get the version of the Provider API that this build of YAAC was compiled with.
    static File
    Get the root directory of the per-user YAAC data directory.
    Get the currently set unit for distance display.
    Get the top-level Filter for selectively choosing which Messages to see in the various YAAC display windows.
    static GuiIfc
    Get the object representing the front-end user interface.
    Get the last of the daisy-chained list of ClassLoaders for YAAC and all its accepted plugins.
    Pop the most recently remaining registered ShutdownHandler from the stack.
    Get the StationState object containing the status of the local station.
    Get a list of all currently defined potential menu items for inclusion in a menubar menu in the map window.
    Ontain the information for the last plugin loaded into the system, or with the greatest amount of dependencies if called after sorting the plugin list.
    static String
    getMsg(String tagName)
    Get the appropriate localized String corresponding to a ResourceBundle tag name in a specific ResourceBundle.
    static String
    getMsg(String bundleBaseName, String tagName)
    Get the appropriate localized String corresponding to a ResourceBundle tag name in a specific ResourceBundle.
    Get the appropriate locale-specific message bundle for YAAC.
    getMsgBundle(String altBundleName)
    Get the appropriate locale-specific variant of some message bundle in one or more of the provided plugins.
    static String[]
    Return the original command-line arguments used to start YAAC.
    Get a list of all currently defined potential menu items for inclusion in a popup menu in the map window.
    Get a handle to the Java Preferences node at the root of the subtree used to store YAAC preferences.
    Get the currently set unit for pressure display.
    static String
    Get the name of the profile being used to store configuration data.
    static Properties
    Get the Properties object used to efficiently cache preferences that are used frequently by YAAC.
    static Provider
    getProvider(Class<? extends Provider> clazz)
    Get the instance of the specified Provider subclass currently loaded into YAAC.
    static Provider
    getProviderByClassName(String providerClassName)
    Get the instance of the specified Provider subclass currently loaded into YAAC.
    static Provider
    getProviderByJarName(String providerJarName)
    Get the instance of the specified Provider subclass currently loaded into YAAC.
    static Provider
    getProviderByName(String providerName)
    Get the instance of the specified Provider subclass currently loaded into YAAC.
    static List<Provider>
    Get a List of all the Provider objects loaded into YAAC.
    Get the data structure used to cache all received raw AX.25 packets.
    Get the object used to produce sound effects.
    static long
    Report the Unix time in milliseconds when YAAC was started.
    static StatusData
    Get the StatusData information for this station.
    Get the currently set unit for temperature display.
    static int
    Set the time interval after which no user action indicates the station is unattended.
    Get the Filter controlling the maximum age of displayed message traffic.
    static Enum<? extends UnitEnum>
    getUnit(Class<? extends UnitEnum> cls)
    Get the current preferred value of the unit-specifying Enum class.
    static WeightUnit
    Get the currently set unit for weight display.
    void
    gpsDataUpdated(GPSDistributor distributor, GpsFix currentFix, boolean isLocal, String source)
    Called by the GPSDistributor when the GPS data has been updated.
    static void
    initOnePlugin(Provider provider, String pluginContainerName)
    Activate the features defined by the specified Provider subclass instance.
    static boolean
    Report whether received APRS text messages should be automatically replied to without human input.
    static boolean
    Indicate if the local station's callsign has been set.
    static boolean
    Indicate if debug messages should be printed out.
    static boolean
    isDebug(String categoryName)
    Indicate if a specific category of debug messages should be printed out.
    static boolean
    Efficiently test if APRS packets should be logged to disk.
    static boolean
    Efficiently test if GPS NMEA sentences should be logged to disk.
    static boolean
    Test if human user has been active within the tolerance for inactivity.
    static boolean
    Indicate if beacons should use the 'O' overlay to indicate an operator is present at the station.
    static boolean
    Report whether APRS 1.2 extended symbols are available and will be used if needed.
    static boolean
    loadOnePlugin(File pluginJar)
    Attempt to load one JAR file as a plugin.
    static void
    main(String[] args)
    Main program entry point.
    static void
    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
    Update last time human user did something on the UI.
    static void
    putBeaconData(String beaconName, BeaconData bd)
    Add a new BeaconData record under a unique name.
    static boolean
    Remove an extra BeaconData record.
    static void
    Unregister a ShutdownHandler that is no longer needed.
    static void
    Remove a UnitEnumChangeListener from being informed of unit changes,
    void
    satDataUpdated(GPSDistributor distributor, SatelliteCatalog satCatalog, boolean isLocal, String source)
    Called when the satellite constellation in use changes.
    static void
    setAutoReply(boolean autoReply)
    Specify whether received APRS text messages should be automatically replied to without human input.
    static void
    Change the current unit for scaling distance display, and store the change in the YAAC preferences.
    static void
    Fix the ClassLoader used by YAAC to account for dynamically loaded plugins.
    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
    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
    Specify the object used to produce sound effects.
    static void
    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
    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 Details

    • OPT_GUI

      public static final String OPT_GUI
      Boolean TRUE or FALSE if GUI is going to be invoked.
      See Also:
    • OPT_GUI_FIRST

      public static final String OPT_GUI_FIRST
      String name of first window to use for launching YAAC.
      See Also:
    • OPT_DEBUG

      public static final String OPT_DEBUG
      The command line option that specifies turning on debug messages.
      See Also:
    • OSNAME

      public static final 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).
      See Also:
    • OSARCH

      public static final String OSARCH
      The key value in the YAAC properties for the generic name of the CPU architecture (distilled from value in Java system properties).
      See Also:
    • OPT_OSM_TILE_DIR

      public static final String OPT_OSM_TILE_DIR
      Symbolic key name by which the path to the map rendering tile directory is cached in the properties.
      See Also:
    • OPT_LOG_DIR

      public static final String OPT_LOG_DIR
      Symbolic key name by which the path to the logging file directory is cached in the properties.
      See Also:
    • OPT_MSG_LOG

      public static final String OPT_MSG_LOG
      Symbolic key name by which the path to the message logging directory is cached in the properties.
      See Also:
    • OPT_LAST_CHOSEN_PATH

      public static final String OPT_LAST_CHOSEN_PATH
      Symbolic ket name for the last chosen digipeat path used for text messaging.
      See Also:
    • WINDOWS

      public static final String WINDOWS
      Symbolic name for Microsoft Windows operating systems, associated with OSNAME key in properties table.
      See Also:
  • Method Details

    • main

      public static void main(String[] args)
      Main program entry point.
      Parameters:
      args - command line arguments
    • moveNewUpgraderToLib

      public static void moveNewUpgraderToLib() throws IOException
      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).
      Throws:
      IOException - if upgrade.jar could not successfully be moved for some reason
    • beaconChanged

      public void beaconChanged(BeaconData beaconData)
      This method is called for registered implementors when changed beacon data is stored to preferences.
      Specified by:
      beaconChanged in interface BeaconChangeListener
      Parameters:
      beaconData - BeaconData record that has been changed
    • gpsDataUpdated

      public void gpsDataUpdated(GPSDistributor distributor, GpsFix currentFix, boolean isLocal, String source)
      Called by the GPSDistributor when the GPS data has been updated.
      Specified by:
      gpsDataUpdated in interface GpsDataListener
      Parameters:
      distributor - instance of the GPSDistributor
      currentFix - current GpsFix
      isLocal - boolean true if this is GPS data for the local station, false if for a remote GPS receiver
      source - String name assigned to remote GPS receiver, or null if for the local receiver
    • satDataUpdated

      public void satDataUpdated(GPSDistributor distributor, SatelliteCatalog satCatalog, boolean isLocal, String source)
      Called when the satellite constellation in use changes.
      Specified by:
      satDataUpdated in interface GpsDataListener
      Parameters:
      distributor - instance of the GPSDistributor
      satCatalog - updated SatelliteCatalog instance
      isLocal - boolean true if this is GPS data for the local station, false if for a remote GPS receiver
      source - String name assigned to remote GPS receiver, or null if for the local receiver
    • setLastCL

      public static void setLastCL(ClassLoader lastCL)
      Fix the ClassLoader used by YAAC to account for dynamically loaded plugins. For use by this class and the plugin store.
      Parameters:
      lastCL - ClassLoader chain to replace chain of ClassLoader
    • loadOnePlugin

      public static boolean loadOnePlugin(File pluginJar)
      Attempt to load one JAR file as a plugin. This only determines if the plugin can be safely loaded; the plugin is not fully initialized until all loadable plugins are identified nd sorted by their dependency tree.
      Parameters:
      pluginJar - File identifying the JAR file assumed to be the root of a plugin
      Returns:
      boolean true if activation succeeded, false if not (for any reason including runInitializersBefore() rejection)
      See Also:
    • getMostRecentPlugin

      public static YAAC.PluginContext getMostRecentPlugin()
      Ontain the information for the last plugin loaded into the system, or with the greatest amount of dependencies if called after sorting the plugin list. This method is intended for use by the plugin store so newly downloaded plugins can be activated.
      Returns:
      last PluginContext, or null if no plugins
    • initOnePlugin

      public static void initOnePlugin(Provider provider, String pluginContainerName)
      Activate the features defined by the specified Provider subclass instance. Note this Provider's Provider.runInitializersBefore(int) method must have returned true, otherwise the behavior is not predictable.
      Parameters:
      provider - Provider subclass instance to activate
      pluginContainerName - the name of the JAR file containing the Provider
    • findMenuAction

      public static AbstractMenuAction findMenuAction(String preLocalizedTagName)
      Find a menu entry with the specified tag name,
      Parameters:
      preLocalizedTagName - pre-localized tag name String to search for
      Returns:
      first AbstractMenuAction with the specified name, or null if no match found
    • getMsgBundle

      public static ResourceBundle getMsgBundle()
      Get the appropriate locale-specific message bundle for YAAC.
      Returns:
      a ResourceBundle that is the most locale-specific possible for the runtime environment
    • getMsgBundle

      public static ResourceBundle getMsgBundle(String altBundleName)
      Get the appropriate locale-specific variant of some message bundle in one or more of the provided plugins.
      Parameters:
      altBundleName - String base name of the ResourceBundle to search for
      Returns:
      a ResourceBundle that is the most locale-specific possible for the runtime environment
    • getMsg

      public static String getMsg(String tagName) throws MissingResourceException
      Get the appropriate localized String corresponding to a ResourceBundle tag name in a specific ResourceBundle. If the tagName String contains a colon ':', this is the delimiter between the ResourceBundle name and the name of the resource within the bundle; otherwise, the entire tagName string is considered to be the name of the resource within the default bundle.
      Parameters:
      tagName - String name to look up
      Returns:
      localized String corresponding to the tag, or NoSuchResourceException if the if the tag cannot be found
      Throws:
      MissingResourceException - if the tag cannot be found
    • getMsg

      public static String getMsg(String bundleBaseName, String tagName) throws MissingResourceException
      Get the appropriate localized String corresponding to a ResourceBundle tag name in a specific ResourceBundle.
      Parameters:
      bundleBaseName - String name of bundle containing the tag
      tagName - String name to look up
      Returns:
      localized String corresponding to the tag, or NoSuchResourceException if the if the tag cannot be found
      Throws:
      MissingResourceException - if the bundle or tag cannot be found
    • getProps

      public static Properties getProps()
      Get the Properties object used to efficiently cache preferences that are used frequently by YAAC.
      Returns:
      java.util.Properties object containing the property values
    • getGui

      public static GuiIfc getGui()
      Get the object representing the front-end user interface.
      Returns:
      GuiIfc implementing object
    • getPreferences

      public static Preferences getPreferences()
      Get a handle to the Java Preferences node at the root of the subtree used to store YAAC preferences.
      Returns:
      java.util.prefs.Preferences
    • getFilter

      public static CumulativeBooleanAndFilter getFilter()
      Get the top-level Filter for selectively choosing which Messages to see in the various YAAC display windows.
      Returns:
      CumulativeBooleanAndFilter containing all other Filter instances in use.
    • getTimeFilter

      public static RelativeTimeFilter getTimeFilter()
      Get the Filter controlling the maximum age of displayed message traffic.
      Returns:
      RelativeTimeFilter
    • getProviderList

      public static List<Provider> getProviderList()
      Get a List of all the Provider objects loaded into YAAC.
      Returns:
      read-only List of Provider subclasses
    • getCoreProviderVersion

      public static int getCoreProviderVersion()
      Get the version of the Provider API that this build of YAAC was compiled with. Note that you can't just hack this number to get compatibility; the documentation for Provider.PROVIDER_API_VERSION explains what functionality was added to core YAAC for each increment in the version number and is expected to be there and working for the plugin to use.
      Returns:
      PROVIDER_API_VERSION for this build of YAAC
      See Also:
    • getProvider

      public static Provider getProvider(Class<? extends Provider> clazz)
      Get the instance of the specified Provider subclass currently loaded into YAAC.
      Parameters:
      clazz - Class object of the Provider
      Returns:
      Provider subclass instance currently registered in YAAC, or null if no such Provider is loaded into YAAC
    • getProviderByName

      public static Provider getProviderByName(String providerName)
      Get the instance of the specified Provider subclass currently loaded into YAAC.
      Parameters:
      providerName - String name of Provider object, as available from the Provider.getName() method
      Returns:
      Provider subclass instance currently registered in YAAC, or null if no such Provider is loaded into YAAC
    • getProviderByJarName

      public static Provider getProviderByJarName(String providerJarName)
      Get the instance of the specified Provider subclass currently loaded into YAAC.
      Parameters:
      providerJarName - String name of JAR file containing the plugin provider
      Returns:
      Provider subclass instance currently registered in YAAC, or null if no such Provider is loaded into YAAC
    • getProviderByClassName

      public static Provider getProviderByClassName(String providerClassName)
      Get the instance of the specified Provider subclass currently loaded into YAAC.
      Parameters:
      providerClassName - String name of Provider class, as available from the Class#getName() or Class#getSimpleName() methods
      Returns:
      Provider subclass instance currently registered in YAAC, or null if no such Provider is loaded into YAAC
    • getBeaconData

      public static BeaconData getBeaconData()
      Get the default BeaconData information for this station.
      Returns:
      the default BeaconData record
    • getBeaconData

      public static BeaconData getBeaconData(String beaconName)
      Get the BeaconData information for this station.
      Parameters:
      beaconName - String name of the BeaconData record to retrieve
      Returns:
      the corresponding BeaconData record
    • getBeaconDataMap

      public static Map<String,BeaconData> getBeaconDataMap()
      Return a read-only Map of all the currently defined beacons.
      Returns:
      Map of beacons
    • putBeaconData

      public static void putBeaconData(String beaconName, BeaconData bd) throws IllegalArgumentException
      Add a new BeaconData record under a unique name.
      Parameters:
      beaconName - String name of beacon
      bd - BeaconData structure to add
      Throws:
      IllegalArgumentException - if beaconName already exists in collection of BeaconData structures
    • removeBeaconData

      public static boolean removeBeaconData(String beaconName)
      Remove an extra BeaconData record.
      Parameters:
      beaconName - String name of beacon
      Returns:
      boolean true if beacon record was deleted
    • isCallsignSet

      public static boolean isCallsignSet()
      Indicate if the local station's callsign has been set.
      Returns:
      boolean true if callsign is filled in
    • getStatusData

      public static StatusData getStatusData()
      Get the StatusData information for this station.
      Returns:
      the corresponding StatusData record
    • getCallsign

      public static String getCallsign()
      Get the primary callsign set for this station running YAAC.
      Returns:
      String of the callsign (usually the callsign used in the primary TNC port)
    • getSnifferDataModel

      public static SnifferDataModel getSnifferDataModel()
      Get the data structure used to cache all received raw AX.25 packets.
      Returns:
      the SnifferTableModel
    • getMenuBarActionList

      public static ArrayList<AbstractMenuAction> getMenuBarActionList()
      Get a list of all currently defined potential menu items for inclusion in a menubar menu in the map window.
      Returns:
      ArrayList of AbstractPopupMenuActions
    • getPopupMenuActionList

      public static ArrayList<AbstractPopupMenuAction> getPopupMenuActionList()
      Get a list of all currently defined potential menu items for inclusion in a popup menu in the map window.
      Returns:
      ArrayList of AbstractPopupMenuActions
    • getDistanceUnit

      public static DistanceUnit getDistanceUnit()
      Get the currently set unit for distance display.
      Returns:
      DistanceUnit for scaling displayed distances.
    • setDistanceUnit

      public static void setDistanceUnit(DistanceUnit distanceUnit)
      Change the current unit for scaling distance display, and store the change in the YAAC preferences.
      Parameters:
      distanceUnit - DistanceUnit to use for all future distance displays
    • getTemperatureUnit

      public static TemperatureUnit getTemperatureUnit()
      Get the currently set unit for temperature display.
      Returns:
      TemperatureUnit for scaling displayed temperatures.
    • setTemperatureUnit

      public static void setTemperatureUnit(TemperatureUnit temperatureUnit)
      Change the current unit for scaling temperature display, and store the change in the YAAC preferences.
      Parameters:
      temperatureUnit - TemperatureUnit to use for all future temperature displays
    • getPressureUnit

      public static PressureUnit getPressureUnit()
      Get the currently set unit for pressure display.
      Returns:
      PressureUnit for scaling displayed pressures.
    • setPressureUnit

      public static void setPressureUnit(PressureUnit pressureUnit)
      Change the current unit for scaling pressure display, and store the change in the YAAC preferences.
      Parameters:
      pressureUnit - PressureUnit to use for all future pressure displays
    • getWeightUnit

      public static WeightUnit getWeightUnit()
      Get the currently set unit for weight display.
      Returns:
      WeightUnit for scaling displayed weights.
    • setWeightUnit

      public static void setWeightUnit(WeightUnit weightUnit)
      Change the current unit for scaling weight display, and store the change in the YAAC preferences.
      Parameters:
      weightUnit - WeightUnit to use for all future weight displays
    • getUnit

      public static Enum<? extends UnitEnum> getUnit(Class<? extends UnitEnum> cls)
      Get the current preferred value of the unit-specifying Enum class.
      Parameters:
      cls - subclass of Enum that implements the UnitEnum tag interface
      Returns:
      preferred value of the specified Enum class
    • addUnitEnumChangeListener

      public static void addUnitEnumChangeListener(UnitEnumChangeListener l)
      Add a UnitEnumChangeListener for being informed of unit changes,
      Parameters:
      l - UnitEnumChangeListener to register
    • removeUnitEnumChangeListener

      public static void removeUnitEnumChangeListener(UnitEnumChangeListener l)
      Remove a UnitEnumChangeListener from being informed of unit changes,
      Parameters:
      l - UnitEnumChangeListener to deregister
    • isLogAPRS

      public static boolean isLogAPRS()
      Efficiently test if APRS packets should be logged to disk.
      Returns:
      boolean true if logging should occur
    • isLogGPS

      public static boolean isLogGPS()
      Efficiently test if GPS NMEA sentences should be logged to disk.
      Returns:
      boolean true if logging should occur
    • setLogAPRS

      public static void setLogAPRS(boolean logAPRS)
      Remember if APRS packets should be logged to disk.
      Parameters:
      logAPRS - boolean true if logging should occur in the future
    • setLogGPS

      public static void setLogGPS(boolean logGPS)
      Remember if GPS NMEA sentences should be logged to disk.
      Parameters:
      logGPS - boolean true if logging should occur in the future
    • isDebug

      public static boolean isDebug()
      Indicate if debug messages should be printed out.
      Returns:
      boolean true if debug messages should be printed
    • isDebug

      public static boolean isDebug(String categoryName)
      Indicate if a specific category of debug messages should be printed out.
      Parameters:
      categoryName - String name of category to enable debug logging for
      Returns:
      boolean true if the named category of debug messages should be printed
    • isShowOperatorPresent

      public static boolean isShowOperatorPresent()
      Indicate if beacons should use the 'O' overlay to indicate an operator is present at the station.
      Returns:
      boolean true if operator-present overlay should be used for alternate set symbols
    • setShowOperatorPresent

      public static void setShowOperatorPresent(boolean showOperatorPresent)
      Indicate if beacons should use the 'O' overlay to indicate an operator is present at the station.
      Parameters:
      showOperatorPresent - boolean true if operator-present overlay should be used for alternate set symbols
    • isAutoReply

      public static boolean isAutoReply()
      Report whether received APRS text messages should be automatically replied to without human input.
      Returns:
      boolean true if receipt of a text message should cause the auto ack message to be transmitted in reply
    • setAutoReply

      public static void setAutoReply(boolean autoReply)
      Specify whether received APRS text messages should be automatically replied to without human input.
      Parameters:
      autoReply - boolean true if receipt of a text message should cause the auto ack message to be transmitted in reply
    • isUseExtendedSymbols

      public static boolean isUseExtendedSymbols()
      Report whether APRS 1.2 extended symbols are available and will be used if needed.
      Returns:
      boolean true if known APRS 1.2 extended symbols are loaded
    • setUseExtendedSymbols

      public 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.
      Parameters:
      useExtendedSymbols - boolean true if APRS 1.2 extended symbols should be used if needed
    • getTimeBeforeInactive

      public static int getTimeBeforeInactive()
      Set the time interval after which no user action indicates the station is unattended.
      Returns:
      time in minutes before inactivity
    • setTimeBeforeInactive

      public static void setTimeBeforeInactive(int minutesBeforeInactive)
      Set the time interval after which no user action indicates the station is unattended.
      Parameters:
      minutesBeforeInactive - time in minutes before inactivity
    • operatorActed

      public static void operatorActed()
      Update last time human user did something on the UI.
    • isOperatorPresent

      public static boolean isOperatorPresent(long now)
      Test if human user has been active within the tolerance for inactivity.
      Parameters:
      now - current time in milliseconds since Jan 1 1970 UTC
      Returns:
      boolean true if user have been active recently
    • getStartupTime

      public static long getStartupTime()
      Report the Unix time in milliseconds when YAAC was started.
      Returns:
      milliseconds since Jan 1, 1970 UTC when this invocation of YAAC was started
    • getLocalStation

      public static StationState getLocalStation()
      Get the StationState object containing the status of the local station.
      Returns:
      the StationState object corresponding to the local station
    • addShutdownHandler

      public static void addShutdownHandler(ShutdownHandler sh)
      Register a ShutdownHandler to be invoked when YAAC is shut down.
      Parameters:
      sh - ShutdownHandler to register
    • removeShutdownHandler

      public static void removeShutdownHandler(ShutdownHandler sh)
      Unregister a ShutdownHandler that is no longer needed.
      Parameters:
      sh - ShutdownHandler to remove
    • getLastShutdownHandler

      public static ShutdownHandler getLastShutdownHandler()
      Pop the most recently remaining registered ShutdownHandler from the stack.
      Returns:
      last ShutdownHandler, or null if no handlers left
    • getCheckpointingLogger

      public static CheckpointingLogger getCheckpointingLogger()
      Get the logger used to track YAAC's error messages.
      Returns:
      the CheckpointingLogger copying standard output and standard error
    • getProfileName

      public static String getProfileName()
      Get the name of the profile being used to store configuration data.
      Returns:
      String profile name, or null if using the default profile
    • getBaseDir

      public static File getBaseDir()
      Get the root directory of the YAAC installation.
      Returns:
      File of the YAAC installation directory (where YAAC.jar lives)
    • getDataDir

      public static File getDataDir()
      Get the root directory of the per-user YAAC data directory. This ensures that there will be a directory that the user can write to if YAAC is installed as a system application (i.e., YAAC installation directory owned by administrator instead of executing user).
      Returns:
      File of the YAAC per-user YAAC data directory (where logdir and tiledir are located by default)
    • getLastClassLoader

      public static ClassLoader getLastClassLoader()
      Get the last of the daisy-chained list of ClassLoaders for YAAC and all its accepted plugins.
      Returns:
      ClassLoader to use for all dynamic class lookups
    • getSoundMaker

      public static MsgEventListener getSoundMaker()
      Get the object used to produce sound effects.
      Returns:
      current SoundMaker implementation
    • setSoundMaker

      public static void setSoundMaker(MsgEventListener soundMaker)
      Specify the object used to produce sound effects.
      Parameters:
      soundMaker - new SoundMaker implementation to provide audio outputs
    • getOriginalArguments

      public static String[] getOriginalArguments()
      Return the original command-line arguments used to start YAAC.
      Returns:
      String of operating system command-line arguments to YAAC