|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--wonderly.jeaprs.aprs.packet.APRSData
This class is the base class for all APRS data objects. The APRSData objects hold all of the information pertaining to specific APRS packet types. The APRSPacket object contains just the 4 basic pieces of information about an APRS packet.
Field Summary | |
protected boolean |
altIcons
Whether or not the icon is in the alt icons group |
protected java.util.Vector |
data
The extra APRSData objects extracted from a packet. |
protected boolean |
hasOverlaya
True if there is an alpha character overlay. |
protected boolean |
hasOverlayn
True if there is a numeric character overlay. |
protected int |
icon
The icon index number computed by calcIconFrom() |
protected int |
overlay
The overlay character/numeric offset. |
protected char |
packetType
The character used as the first character in this packet |
Constructor Summary | |
APRSData()
|
Method Summary | |
void |
addOtherAPRSData(wonderly.jeaprs.aprs.packet.APRSData dt)
Adds extra APRSData to this object. |
static int |
ambiguousDistance(wonderly.jeaprs.ByteString val)
Returns the distance ambiguity of the passed lat/long string representation based on where the space characters start. |
void |
calcIconFrom(byte tab,
byte sym)
Calculates all the associated icon information based on the specified symbol table and icon character. |
protected static java.lang.String |
fixedToString(long val,
int sz)
zero fill of fixed point value from the MathFP package. |
abstract 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. |
static java.lang.String |
formatTime(long time)
|
wonderly.jeaprs.ByteString |
getGridInfo()
|
int |
getIcon()
Returns the icon number, from 0 to 127, associated with this packet. |
java.lang.String |
getLatHundredthsSecondsToString(long lat)
|
static int[] |
getLatHundrethsSecondsParts(long val)
|
java.lang.String |
getLatSecondsToString(long lat)
|
java.lang.String |
getLonHundredthsSecondsToString(long lon)
|
static int[] |
getLonHundrethsSecondsParts(long val)
|
java.lang.String |
getLonSecondsToString(long lon)
|
java.util.Vector |
getOtherAPRSData()
Returns the Vector of extra APRS data associated with this object. |
int |
getOverlayIndex()
Returns a value from 0 through 9 if the icon has a numeric character overlay, or a value from 0 through 25 if the icon has an alpha character overlay. |
java.lang.String |
getPrintable()
Returns a printable/readable version of the packet. |
boolean |
isAltIcon()
Returns true if the icon specification refers to the alternate icon set, false if it refers to the primary icon set. |
boolean |
isGridOnly()
|
protected boolean |
isNum(wonderly.jeaprs.ByteString str)
|
boolean |
isOverlayAlpha()
Returns true if the icon has an alpha character overlay |
boolean |
isOverlayNumeric()
Returns true if the icon has a numeric character overlay |
static java.lang.String |
latHundredthsSecondsAsString(long lat)
|
static int[] |
latLonParts(wonderly.jeaprs.ByteString val)
|
static java.lang.String |
latSecondsAsString(long lat)
|
protected void |
log(java.lang.String str)
|
static java.lang.String |
lonHundredthsSecondsAsString(long lon)
|
static java.lang.String |
lonSecondsAsString(long lon)
|
static void |
main(java.lang.String[] arg)
|
protected static java.lang.String |
numToString(int val)
Default padding of numeric to zero filled 3 char string |
protected static java.lang.String |
numToString(int val,
int sz)
zero fill of numeric string to indicated length |
protected static java.lang.String |
numToString(long val,
int sz)
zero fill of numeric string to indicated length |
static long |
parseLat(wonderly.jeaprs.ByteString slat)
Parses a latitude specification and turns it into a decimal number without regard to the intermixing of degrees and minutes. |
static long |
parseLon(wonderly.jeaprs.ByteString slon)
Parses a longitude specification and turns it into a decimal number without regard to the intermixing of degrees and minutes. |
static long |
parseTime(wonderly.jeaprs.ByteString str)
parses the passed APRS timestring and converts it into a Java time value that is relative to 1/1/70 00:00 GMT. |
void |
processData(wonderly.jeaprs.aprs.packet.APRSPacket pkt,
wonderly.jeaprs.aprs.packet.APRSEventListener context)
This method needs to be called for any APRS packet that could produce multiple APRS data objects. |
void |
sendPacket(wonderly.jeaprs.io.aprs.APRSOutput os)
This method must be implemented by all APRSData subclasses. |
protected static int |
toNum(wonderly.jeaprs.ByteString str)
replaces space chars in str with 0 and then coverts str to an integer |
protected java.lang.String |
zeroPad(int d)
|
protected java.lang.String |
zeroPad(int d,
int cnt)
|
protected static java.lang.String |
zFill(int v,
int sz)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.Vector data
protected int icon
protected int overlay
hasOverlaya
,
hasOverlayn
protected boolean altIcons
protected boolean hasOverlaya
protected boolean hasOverlayn
protected char packetType
Constructor Detail |
public APRSData()
Method Detail |
public void sendPacket(wonderly.jeaprs.io.aprs.APRSOutput os) throws java.io.IOException
os
to write that
data to the passed APRSOutput reference.
java.io.IOException
- if an output error occurs.public wonderly.jeaprs.ByteString getGridInfo()
public boolean isGridOnly()
public int getIcon()
isOverlayAlpha()
,
isOverlayNumeric()
,
getOverlayIndex()
,
isAltIcon()
public boolean isOverlayAlpha()
public boolean isOverlayNumeric()
public int getOverlayIndex()
getIcon()
public boolean isAltIcon()
public java.lang.String getPrintable()
public void addOtherAPRSData(wonderly.jeaprs.aprs.packet.APRSData dt)
getOtherAPRSData()
,
data
protected void log(java.lang.String str)
public java.util.Vector getOtherAPRSData()
Vector.size()
will be 0 if there is no extra
data.
protected java.lang.String zeroPad(int d)
protected java.lang.String zeroPad(int d, int cnt)
public static java.lang.String latHundredthsSecondsAsString(long lat)
public static java.lang.String lonHundredthsSecondsAsString(long lon)
public static java.lang.String latSecondsAsString(long lat)
public static java.lang.String lonSecondsAsString(long lon)
public java.lang.String getLatHundredthsSecondsToString(long lat)
public java.lang.String getLonHundredthsSecondsToString(long lon)
public java.lang.String getLatSecondsToString(long lat)
public java.lang.String getLonSecondsToString(long lon)
protected static java.lang.String zFill(int v, int sz)
public static long parseTime(wonderly.jeaprs.ByteString str)
public static java.lang.String formatTime(long time)
public static void main(java.lang.String[] arg)
public static int ambiguousDistance(wonderly.jeaprs.ByteString val)
public static long parseLat(wonderly.jeaprs.ByteString slat)
public static int[] latLonParts(wonderly.jeaprs.ByteString val)
public static int[] getLatHundrethsSecondsParts(long val)
public static int[] getLonHundrethsSecondsParts(long val)
public static long parseLon(wonderly.jeaprs.ByteString slon)
public void calcIconFrom(byte tab, byte sym)
getIcon()
protected boolean isNum(wonderly.jeaprs.ByteString str)
protected static int toNum(wonderly.jeaprs.ByteString str)
protected static java.lang.String numToString(int val)
protected static java.lang.String numToString(int val, int sz)
val
- the valuesz
- the needed length of the string, zero filled to thisprotected static java.lang.String numToString(long val, int sz)
val
- the valuesz
- the needed length of the string, zero filled to thisprotected static java.lang.String fixedToString(long val, int sz)
val
- the valuesz
- the needed length of the string, zero filled to thispublic abstract byte[] formatReportData() throws InvalidPacketConfigurationException
">My status".getBytes()
.
InvalidPacketConfigurationException
- if the packet data is not completely
established so that the packet can be formatted correctly.public void processData(wonderly.jeaprs.aprs.packet.APRSPacket pkt, wonderly.jeaprs.aprs.packet.APRSEventListener context)
processData
in interface APRSEventDataProcessor
APRSPosition.processData(APRSPacket,APRSEventListener)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |