Package org.ka2ddo.opentrac
Class OpenTracParser
java.lang.Object
org.ka2ddo.opentrac.OpenTracParser
- All Implemented Interfaces:
AX25Parser
Parser class for converting AX.25 UI frames of of PID OPENTRAC to structured
OpenTracMessage objects.
- Author:
- Andrew Pavlin, KA2DDO
-
Method Summary
Modifier and TypeMethodDescriptionstatic OpenTracParser
Get the singleton instance of the OpenTracParser.parse
(byte[] body, AX25Callsign src, AX25Callsign dest, AX25Callsign[] digipeaters, long rcvTimestamp, Connector connector) Parse a message to the appropriate object class.
-
Method Details
-
getInstance
Get the singleton instance of the OpenTracParser.- Returns:
- OpenTracParser instance
-
parse
public AX25Message parse(byte[] body, AX25Callsign src, AX25Callsign dest, AX25Callsign[] digipeaters, long rcvTimestamp, Connector connector) Parse a message to the appropriate object class.- Specified by:
parse
in interfaceAX25Parser
- Parameters:
body
- byte array containing the message to be parsedsrc
- AX25Callsign of the sending stationdest
- AX25Callsign of the destination (probably an APRS alias)digipeaters
- array of digipeaters AX25Callsigns from the original RF frame, or null to indicate no digipeatersrcvTimestamp
- the time in Java/Unix milliseconds since midnight Jan 1, 1970 UTC when this message was actually received (as opposed to any timestamp that might be embedded in the message body)connector
- Connector over which the message was received (null if from a file)- Returns:
- the decoded AX25Message (if not decipherable, a DefaultMessage is returned)
-