wonderly.jeaprs.aprs
Class APRSPosit

java.lang.Object
  |
  +--wonderly.jeaprs.ClientImpl
        |
        +--wonderly.jeaprs.aprs.APRSPosit
All Implemented Interfaces:
Client, java.util.EventListener, java.beans.PropertyChangeListener, java.lang.Runnable, java.io.Serializable

public class APRSPosit
extends ClientImpl
implements java.lang.Runnable, java.io.Serializable, java.beans.PropertyChangeListener

This is a JeAPRS APRSClient that implements the sending of position reports based on the configured parameters. It includes support for smart beaconing (per KA9MVA's HamHUD originated algorithms).

Version:
1.0
Author:
Gregg Wonderly - The information contained in this document is Copyright 2001-2003, Gregg Wonderly, all rights reserved.
See Also:
Serialized Form

Nested Class Summary
 class APRSPosit.APRSIcon
           
 
Field Summary
 
Fields inherited from class wonderly.jeaprs.ClientImpl
actions, APRS, dirty, evLis, ins, me, name, outs, stopped, strmLis
 
Constructor Summary
APRSPosit()
           
 
Method Summary
 void buildActions()
          Put code in here to register all of the actions that you want to use.
protected  javax.swing.JMenuBar buildMenu()
          Override this default implementation (which returns null to indicate no menu bar is to be used) to create your clients menu bar.
 javax.swing.JPanel buildPanel(javax.swing.JFrame parent)
          Builds the applications user interface.
 wonderly.jeaprs.aprs.packet.APRSEventListener createEventListener()
          This method needs to be implemented by subclasses and should return an APRSEventListener implementation that is applicable for their client.
 java.io.OutputStream createStreamListener()
          We don't need direct TNC stream access, so we just return null here.
protected  void doMeteorMode()
           
 boolean getDebug()
           
 int getRepeatDelay()
           
 int getSmartBeaconFastRate()
           
 int getSmartBeaconHighSpeed()
           
 int getSmartBeaconLowSpeed()
           
 int getSmartBeaconStoppedDelay()
           
 int getSmartBeaconTurnMin()
           
 int getSmartBeaconTurnThreshold()
           
 int getSmartBeaconTurnTime()
           
 java.lang.String getStaticLocation()
           
 java.lang.String getStationEmailAddress()
           
 java.lang.String getStationMeteorInfo()
           
 boolean isBeaconing()
           
 boolean isMeteorMode()
           
 boolean isStaticPosit()
           
 boolean isStatusing()
           
protected  void processQuery(wonderly.jeaprs.aprs.packet.APRSPacket pkt, wonderly.jeaprs.aprs.packet.APRSQuery msg)
           
 void propertyChange(java.beans.PropertyChangeEvent ev)
           
 void run()
           
 void setBeaconing(boolean how)
           
 void setDebug(boolean how)
           
 void setMeteorMode(boolean how)
           
 void setRepeatDelay(int cnt)
          Millisecond delay for repeat beaconing delay must be a value related to .1, .25, .5, 1, 2, 3, 4, 5, 10, 20 or 30 minutes.
 void setSmartBeaconFastRate(int spd)
           
 void setSmartBeaconHighSpeed(int spd)
           
 void setSmartBeaconLowSpeed(int spd)
           
 void setSmartBeaconStoppedDelay(int spd)
           
 void setSmartBeaconTurnMin(int spd)
           
 void setSmartBeaconTurnThreshold(int spd)
           
 void setSmartBeaconTurnTime(int spd)
           
 void setStaticLocation(java.lang.String str)
           
 void setStaticPosit(boolean how)
           
 void setStationEmailAddress(java.lang.String val)
           
 void setStationMeteorInfo(java.lang.String val)
           
 void setStatusing(boolean how)
           
 void start()
          Starts this client 'running' or whatever it needs when the user opens the client via the menus.
 void stop()
          Stops the client when the user closes the window or deactivates it via the menus
 
Methods inherited from class wonderly.jeaprs.ClientImpl
addAPRSEventGenerator, addAPRSOutputStream, getAction, getAPRSEventGenerators, getAPRSOutputStreams, getName, getUIFactory, isDirty, isInputUser, isOutputUser, removeAPRSEventGenerator, removeAPRSOutputStream, setDirty, setName, toString, write, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

APRSPosit

public APRSPosit()
Method Detail

start

public void start()
Description copied from class: ClientImpl
Starts this client 'running' or whatever it needs when the user opens the client via the menus.

Specified by:
start in interface Client
Overrides:
start in class ClientImpl

stop

public void stop()
Description copied from class: ClientImpl
Stops the client when the user closes the window or deactivates it via the menus

Specified by:
stop in interface Client
Overrides:
stop in class ClientImpl

getStationMeteorInfo

public java.lang.String getStationMeteorInfo()

setStationMeteorInfo

public void setStationMeteorInfo(java.lang.String val)

getStationEmailAddress

public java.lang.String getStationEmailAddress()

setStationEmailAddress

public void setStationEmailAddress(java.lang.String val)

setMeteorMode

public void setMeteorMode(boolean how)

isMeteorMode

public boolean isMeteorMode()

setDebug

public void setDebug(boolean how)

getDebug

public boolean getDebug()

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent ev)
Specified by:
propertyChange in interface java.beans.PropertyChangeListener

isBeaconing

public boolean isBeaconing()

setBeaconing

public void setBeaconing(boolean how)

isStatusing

public boolean isStatusing()

setStatusing

public void setStatusing(boolean how)

getRepeatDelay

public int getRepeatDelay()

createStreamListener

public java.io.OutputStream createStreamListener()
We don't need direct TNC stream access, so we just return null here.

Specified by:
createStreamListener in class ClientImpl

setRepeatDelay

public void setRepeatDelay(int cnt)
Millisecond delay for repeat beaconing delay must be a value related to .1, .25, .5, 1, 2, 3, 4, 5, 10, 20 or 30 minutes. -1 will disable beaconing.


isStaticPosit

public boolean isStaticPosit()

setStaticPosit

public void setStaticPosit(boolean how)

setStaticLocation

public void setStaticLocation(java.lang.String str)

getStaticLocation

public java.lang.String getStaticLocation()

createEventListener

public wonderly.jeaprs.aprs.packet.APRSEventListener createEventListener()
Description copied from class: ClientImpl
This method needs to be implemented by subclasses and should return an APRSEventListener implementation that is applicable for their client. Many times, a simple inner class is all that is needed as in.
  return new APRSEventAdapter() {
		public void message( APRSPacket pkt, APRSMessage msg ) {
			// Do something with message
		}
	};
	
This will create a new object that is an instance of the APRSEventAdapter class. That class implements the APRSEventListener interface with empty methods so that you can just override the methods that you want APRS packets for, and not have to deal with implementing all methods. Just return null here if you don't need an event listener.

Specified by:
createEventListener in class ClientImpl
See Also:
APRSEventAdapter, APRSEventListener

processQuery

protected void processQuery(wonderly.jeaprs.aprs.packet.APRSPacket pkt,
                            wonderly.jeaprs.aprs.packet.APRSQuery msg)

buildMenu

protected javax.swing.JMenuBar buildMenu()
Override this default implementation (which returns null to indicate no menu bar is to be used) to create your clients menu bar.

Overrides:
buildMenu in class ClientImpl

buildPanel

public javax.swing.JPanel buildPanel(javax.swing.JFrame parent)
Description copied from class: ClientImpl
Builds the applications user interface. The returned panel should contain all of the controls needed to provide the user with convienent access to the features of this client/module, except for a menu bar. The buildMenu() method can be used to create a menu bar if neededed.

Specified by:
buildPanel in class ClientImpl
See Also:
ClientImpl.buildMenu()

doMeteorMode

protected void doMeteorMode()

getSmartBeaconLowSpeed

public int getSmartBeaconLowSpeed()

setSmartBeaconLowSpeed

public void setSmartBeaconLowSpeed(int spd)

getSmartBeaconStoppedDelay

public int getSmartBeaconStoppedDelay()

setSmartBeaconStoppedDelay

public void setSmartBeaconStoppedDelay(int spd)

getSmartBeaconTurnTime

public int getSmartBeaconTurnTime()

setSmartBeaconTurnTime

public void setSmartBeaconTurnTime(int spd)

getSmartBeaconTurnMin

public int getSmartBeaconTurnMin()

setSmartBeaconTurnMin

public void setSmartBeaconTurnMin(int spd)

getSmartBeaconTurnThreshold

public int getSmartBeaconTurnThreshold()

setSmartBeaconTurnThreshold

public void setSmartBeaconTurnThreshold(int spd)

getSmartBeaconHighSpeed

public int getSmartBeaconHighSpeed()

setSmartBeaconHighSpeed

public void setSmartBeaconHighSpeed(int spd)

getSmartBeaconFastRate

public int getSmartBeaconFastRate()

setSmartBeaconFastRate

public void setSmartBeaconFastRate(int spd)

buildActions

public void buildActions()
Description copied from class: ClientImpl
Put code in here to register all of the actions that you want to use.
                actions.put(  "MyAction", act = new AbstractAction( "MyAction" ) {
                        public void actionPerformed( ActionEvent ev ) {
                                //...do something here
                        }
                });
                act.putValue( Action.NAME, "MyAction" );
 

Specified by:
buildActions in class ClientImpl
See Also:
ClientImpl.getAction(String)

run

public void run()
Specified by:
run in interface java.lang.Runnable