Package org.ka2ddo.aprs
Class Query
java.lang.Object
org.ka2ddo.ax25.AX25Message
org.ka2ddo.aprs.Message
org.ka2ddo.aprs.Query
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable<AX25Message>
,CommentedMessage
,ScopeableMessage
,SendableMessage
This class defines a broadcast general Query message (APRS protocol specification chapter 15).
Queries can be both transmitted and received.
- Author:
- Andrew Pavlin, KA2DDO
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.ka2ddo.ax25.AX25Message
AX25Message.Precedence
-
Field Summary
Modifier and TypeFieldDescriptionfinal String
Query type (text between question marks '?' in the message).double
Radius of range limit in statute miles.double
Latitude in fractional degrees North of center of query range limit.double
Longitude in fractional degrees East of center of query range limit.Fields inherited from class org.ka2ddo.aprs.Message
appendCR, APRS_AND_OPENTRAC_AND_RAW, APRS_AND_RAW, comment, msgType, S_PERMANENT, S_PERMANENT_UC, symbolCode, symTableId
Fields inherited from class org.ka2ddo.ax25.AX25Message
APRS_AND_OPENTRAC, ax25Frame, extensions, invalid, originatingCallsign, originatingDest, PERMANENT, rcptTime, thirdParty, timestamp, UTC
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Specify that message should no longer be transmitted.byte[]
getBody
(boolean countTransmission, ProtocolFamily protocolId, AX25Frame frame) Get an instance of this message, suitable for transmitting.getScope()
Get the transmission scope for this message (so the digipeat path can be derived).boolean
Test if message should still be transmitted.Descriptive text about this message, to be included in the toString() method's response.Methods inherited from class org.ka2ddo.aprs.Message
bodyEquals, compareTo, decodeDatestamp, decodeHurricaneParams, decodeTimestamp, decodeWeatherParams, decodeWeatherParams, dup, encodeTimestamp, extractComment, extractComment, extractSymbol, formatBody, getComment, getExtensionString, getMsgType, getPrecedence, getProtocols, getSymbolCode, getSymTableId, hasWeather, inferSymbol, isAppendCR, isSymbolInferred, looksLikeLongFormatLatitude, setAppendCR, setComment, setSymbolCode, setSymTableId, toString
Methods inherited from class org.ka2ddo.ax25.AX25Message
equals, extractSource, getAx25Frame, getExtension, getFirstDigipeat, getLastDigipeat, getNthDigipeat, getOriginalDestination, getOriginalSource, getOriginatingCallsign, getOriginatingDest, getRcptTime, getReadOnlyExtensionMap, getTimestamp, hashCode, hasPosition, hasThisFirstDigi, indexOf, indexOf, isDirect, isInvalid, isRf, onlyDigits, onlyDigits, onlyDigitsOrMinus, onlyDigitsOrPeriod, onlyDigitsOrSpace, onlyDigitsPlus, onlyPeriods, setAx25Frame, setInvalid, setOriginatingCallsign, setRcptTime, setTimestamp, split, storeExtension
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.ka2ddo.ax25.SendableMessage
dup
-
Field Details
-
queryType
Query type (text between question marks '?' in the message). -
rangeLatitude
public double rangeLatitudeLatitude in fractional degrees North of center of query range limit. -
rangeLongitude
public double rangeLongitudeLongitude in fractional degrees East of center of query range limit. -
rangeDistance
public double rangeDistanceRadius of range limit in statute miles.
-
-
Constructor Details
-
Query
Constructor for Query message when decoding a binary AX.25 frame.- Parameters:
body
- byte array of frame bodyoffset
- int array index offset for start of message (non-zero for encapsulated messages)tp
- third-party relay String for encapsulated messages, or null for no third-party wrapperrcvTimestamp
- Unix time when message was actually received by YAAC
-
Query
Constructor for locally-originated (outbound) general Query message.- Parameters:
queryType
- String of general query to make
-
-
Method Details
-
paramString
Descriptive text about this message, to be included in the toString() method's response.- Overrides:
paramString
in classMessage
- Returns:
- String describing the contents of this message
- See Also:
-
getBody
Get an instance of this message, suitable for transmitting.- Specified by:
getBody
in interfaceSendableMessage
- Parameters:
countTransmission
- ignored, because queries are always the sameprotocolId
- AX.25 protocol to format message inframe
- AX25Frame into which the message will be placed, so any alternate AX25Message can be linked to it- Returns:
- byte array of message
- See Also:
-
isEnabled
public boolean isEnabled()Test if message should still be transmitted.- Specified by:
isEnabled
in interfaceSendableMessage
- Returns:
- boolean true if message should still be transmitted
-
disableForTransmit
public void disableForTransmit()Specify that message should no longer be transmitted.- Specified by:
disableForTransmit
in interfaceSendableMessage
-
getScope
Get the transmission scope for this message (so the digipeat path can be derived).- Specified by:
getScope
in interfaceScopeableMessage
- Returns:
- Scope of this message
-