wonderly.jeaprs.aprs.packet
Class APRSObject

java.lang.Object
  |
  +--wonderly.jeaprs.aprs.packet.APRSData
        |
        +--wonderly.jeaprs.aprs.packet.APRSObject
All Implemented Interfaces:
APRSEventDataProcessor, APRSPositionData, java.io.Serializable
Direct Known Subclasses:
APRSItem

public class APRSObject
extends APRSData
implements APRSPositionData

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

Field Summary
protected  int color
           
protected  int course
           
static int DATA_AREAOBJ
           
static int DATA_CSESPD
           
static int DATA_DFSIGNAL
           
static int DATA_PHG
           
static int DATA_RANGE
           
protected  int direct
           
protected  int gain
           
protected  int height
           
static int HIGH_BLACK
           
static int HIGH_BLUE
           
static int HIGH_CYAN
           
static int HIGH_GRAY
           
static int HIGH_GREEN
           
static int HIGH_RED
           
static int HIGH_VIOLET
           
static int HIGH_YELLOW
           
protected  int latOff
           
protected  long latSecs
           
protected  boolean live
           
protected  int lonOff
           
protected  long lonSecs
           
static int LOW_BLACK
           
static int LOW_BLUE
           
static int LOW_CYAN
           
static int LOW_GRAY
           
static int LOW_GREEN
           
static int LOW_RED
           
static int LOW_VIOLET
           
static int LOW_YELLOW
           
protected  wonderly.jeaprs.ByteString msg
           
protected  wonderly.jeaprs.ByteString name
           
protected  int objType
           
protected  int power
           
protected  long range
           
protected  int speed
           
protected  byte sym
           
protected  byte tab
           
protected  long time
           
protected  int type
           
 
Fields inherited from class wonderly.jeaprs.aprs.packet.APRSData
altIcons, data, hasOverlaya, hasOverlayn, icon, overlay, packetType
 
Constructor Summary
APRSObject()
          Create a new APRSObject.
APRSObject(wonderly.jeaprs.ByteString data)
           
 
Method Summary
static java.lang.String colorTrans(int color)
           
 byte[] formatReportData()
          This method must be implemented by the various packet types to construct the APRS packet data that follows the PATH in a UI frame.
 int getColor()
           
 int getCourse()
           
 double getDirectivity()
           
 long getLatHundredthsSeconds()
           
 long getLonHundredthsSeconds()
           
 wonderly.jeaprs.ByteString getMessage()
           
 wonderly.jeaprs.ByteString getName()
           
 int getObjectType()
           
 double getRange()
           
 int getSpeedInHundredthsMPH()
           
 byte getSymChar()
           
 byte getSymTab()
           
 long getTime()
          Time on object in Java time
 boolean isAlive()
           
 void processData(wonderly.jeaprs.aprs.packet.APRSPacket pkt, wonderly.jeaprs.aprs.packet.APRSEventListener obj)
          This method needs to be called for any APRS packet that could produce multiple APRS data objects.
 void setAlive(boolean how)
           
 void setColor(int color)
           
 void setCourse(int cse)
          Select DATA_CSESPD type and specify the course
 void setDirectivity(int dir)
          Select DATA_PHG type and specify the direction
 void setLatHundredthsSeconds(long seconds)
           
 void setLonHundredthsSeconds(long seconds)
           
 void setMessage(wonderly.jeaprs.ByteString text)
          Set the text sent with the object.
 void setName(wonderly.jeaprs.ByteString nm)
           
 void setObjectType(int type)
           
 void setPowerHeightGain(int power, int height, int gain)
           
 void setRange(int range)
          Select DATA_RANGE type and specify the range
 void setSpeedInHundredthsMPH(int spd)
          Select DATA_CSESPD int and specify the speed
 void setSymChar(byte symbol)
           
 void setSymTab(byte table)
           
 void setTime(long millis)
           
 void setType(int type)
           
 
Methods inherited from class wonderly.jeaprs.aprs.packet.APRSData
addOtherAPRSData, ambiguousDistance, calcIconFrom, fixedToString, formatTime, getGridInfo, getIcon, getLatHundredthsSecondsToString, getLatHundrethsSecondsParts, getLatSecondsToString, getLonHundredthsSecondsToString, getLonHundrethsSecondsParts, getLonSecondsToString, getOtherAPRSData, getOverlayIndex, getPrintable, isAltIcon, isGridOnly, isNum, isOverlayAlpha, isOverlayNumeric, latHundredthsSecondsAsString, latLonParts, latSecondsAsString, log, lonHundredthsSecondsAsString, lonSecondsAsString, main, numToString, numToString, numToString, parseLat, parseLon, parseTime, sendPacket, toNum, zeroPad, zeroPad, zFill
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface wonderly.jeaprs.aprs.packet.APRSPositionData
getGridInfo, getIcon, getLatHundredthsSecondsToString, getLonHundredthsSecondsToString, getOverlayIndex, isAltIcon, isGridOnly, isOverlayAlpha, isOverlayNumeric
 

Field Detail

name

protected wonderly.jeaprs.ByteString name

type

protected int type

time

protected long time

tab

protected byte tab

sym

protected byte sym

live

protected boolean live

msg

protected wonderly.jeaprs.ByteString msg

lonSecs

protected long lonSecs

latSecs

protected long latSecs

course

protected int course

speed

protected int speed

power

protected int power

height

protected int height

gain

protected int gain

range

protected long range

direct

protected int direct

objType

protected int objType

latOff

protected int latOff

lonOff

protected int lonOff

color

protected int color

DATA_CSESPD

public static final int DATA_CSESPD
See Also:
Constant Field Values

DATA_PHG

public static final int DATA_PHG
See Also:
Constant Field Values

DATA_RANGE

public static final int DATA_RANGE
See Also:
Constant Field Values

DATA_DFSIGNAL

public static final int DATA_DFSIGNAL
See Also:
Constant Field Values

DATA_AREAOBJ

public static final int DATA_AREAOBJ
See Also:
Constant Field Values

HIGH_BLACK

public static final int HIGH_BLACK
See Also:
Constant Field Values

HIGH_BLUE

public static final int HIGH_BLUE
See Also:
Constant Field Values

HIGH_GREEN

public static final int HIGH_GREEN
See Also:
Constant Field Values

HIGH_CYAN

public static final int HIGH_CYAN
See Also:
Constant Field Values

HIGH_RED

public static final int HIGH_RED
See Also:
Constant Field Values

HIGH_VIOLET

public static final int HIGH_VIOLET
See Also:
Constant Field Values

HIGH_YELLOW

public static final int HIGH_YELLOW
See Also:
Constant Field Values

HIGH_GRAY

public static final int HIGH_GRAY
See Also:
Constant Field Values

LOW_BLACK

public static final int LOW_BLACK
See Also:
Constant Field Values

LOW_BLUE

public static final int LOW_BLUE
See Also:
Constant Field Values

LOW_GREEN

public static final int LOW_GREEN
See Also:
Constant Field Values

LOW_CYAN

public static final int LOW_CYAN
See Also:
Constant Field Values

LOW_RED

public static final int LOW_RED
See Also:
Constant Field Values

LOW_VIOLET

public static final int LOW_VIOLET
See Also:
Constant Field Values

LOW_YELLOW

public static final int LOW_YELLOW
See Also:
Constant Field Values

LOW_GRAY

public static final int LOW_GRAY
See Also:
Constant Field Values
Constructor Detail

APRSObject

public APRSObject()
Create a new APRSObject. The object is used to depict non-station entities on the map. The supported type of data from the spec allows all the DATA_* type reports to be constructed. The types DATA_DFS and DATA_AREAOBJ must be declared explicitly via setType(int)


APRSObject

public APRSObject(wonderly.jeaprs.ByteString data)
Method Detail

setPowerHeightGain

public void setPowerHeightGain(int power,
                               int height,
                               int gain)

setRange

public void setRange(int range)
Select DATA_RANGE type and specify the range


getRange

public double getRange()

setType

public void setType(int type)
Parameters:
type - one of the DATA_* values.

getName

public wonderly.jeaprs.ByteString getName()
Specified by:
getName in interface APRSPositionData

setName

public void setName(wonderly.jeaprs.ByteString nm)

setAlive

public void setAlive(boolean how)

isAlive

public boolean isAlive()

setCourse

public void setCourse(int cse)
Select DATA_CSESPD type and specify the course


getCourse

public int getCourse()
Specified by:
getCourse in interface APRSPositionData

setSpeedInHundredthsMPH

public void setSpeedInHundredthsMPH(int spd)
Select DATA_CSESPD int and specify the speed


getSpeedInHundredthsMPH

public int getSpeedInHundredthsMPH()
Specified by:
getSpeedInHundredthsMPH in interface APRSPositionData

setSymTab

public void setSymTab(byte table)

getSymTab

public byte getSymTab()

setSymChar

public void setSymChar(byte symbol)

getSymChar

public byte getSymChar()

setLatHundredthsSeconds

public void setLatHundredthsSeconds(long seconds)

setDirectivity

public void setDirectivity(int dir)
Select DATA_PHG type and specify the direction


getDirectivity

public double getDirectivity()

setLonHundredthsSeconds

public void setLonHundredthsSeconds(long seconds)

getLonHundredthsSeconds

public long getLonHundredthsSeconds()
Specified by:
getLonHundredthsSeconds in interface APRSPositionData

getLatHundredthsSeconds

public long getLatHundredthsSeconds()
Specified by:
getLatHundredthsSeconds in interface APRSPositionData

setObjectType

public void setObjectType(int type)

getObjectType

public int getObjectType()

getTime

public long getTime()
Time on object in Java time

See Also:
Date, Calendar

setTime

public void setTime(long millis)

setMessage

public void setMessage(wonderly.jeaprs.ByteString text)
Set the text sent with the object. This might me a description of a wreck, the Storm Data for a hurricane or other useful information.


getMessage

public wonderly.jeaprs.ByteString getMessage()
Specified by:
getMessage in interface APRSPositionData

formatReportData

public byte[] formatReportData()
Description copied from class: APRSData
This method must be implemented by the various packet types to construct the APRS packet data that follows the PATH in a UI frame. Thus, if a status packet was to be sent out, this method should return something such as ">My status".getBytes().

Specified by:
formatReportData in class APRSData

setColor

public void setColor(int color)

getColor

public int getColor()

colorTrans

public static java.lang.String colorTrans(int color)

processData

public void processData(wonderly.jeaprs.aprs.packet.APRSPacket pkt,
                        wonderly.jeaprs.aprs.packet.APRSEventListener obj)
Description copied from class: APRSData
This method needs to be called for any APRS packet that could produce multiple APRS data objects.

Specified by:
processData in interface APRSEventDataProcessor
Overrides:
processData in class APRSData
See Also:
APRSPosition.processData(APRSPacket,APRSEventListener)