org.ka2ddo.aprs
Class APRSStack

java.lang.Object
  extended by org.ka2ddo.aprs.APRSStack

public class APRSStack
extends java.lang.Object

This class parses incoming binary messages into the appropriate classes of APRS message objects.

See Also:
Message

Field Summary
static boolean debug
          Flag to enable extra debugging stack traces for common cases that don't normally need stack traces.
 
Method Summary
static Message parse(byte[] body, int offset, AX25Callsign src, AX25Callsign dest, java.lang.String tp, long rcvTimestamp, Connector connector)
          Analyze the contents of an AX.25 packet that appears to be identified as an APRS packet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

public static boolean debug
Flag to enable extra debugging stack traces for common cases that don't normally need stack traces.

Method Detail

parse

public static Message parse(byte[] body,
                            int offset,
                            AX25Callsign src,
                            AX25Callsign dest,
                            java.lang.String tp,
                            long rcvTimestamp,
                            Connector connector)
Analyze the contents of an AX.25 packet that appears to be identified as an APRS packet.

Parameters:
body - byte array containing the packet body
offset - zero-based starting index in the body array where the message is supposed to start
src - AX25Callsign of transmitting station
dest - AX25Callsign of destination station (or tocall)
tp - String of third party prefix, or null if no third-party prefix detected yet
rcvTimestamp - time (in milliseconds since Jan 1 1970 UTC) that message was received
connector - Connector that received the packet
Returns:
Message object of the decoded APRS frame (if not valid APRS, it will be an instance of DefaultMessage marked invalid)