public class DefaultMessage extends Message implements SendableMessage
AX25Message.Precedence
appendCR, APRS_AND_OPENTRAC_AND_RAW, APRS_AND_RAW, comment, msgType, S_PERMANENT, S_PERMANENT_UC, symbolCode, symTableId
APRS_AND_OPENTRAC, ax25Frame, extensions, invalid, originatingCallsign, originatingDest, PERMANENT, rcptTime, thirdParty, timestamp, UTC
Constructor and Description |
---|
DefaultMessage(byte[] body,
int offset,
java.lang.String tp,
long rcvTimestamp)
Create a DefaultMessage from the bytes in a byte array (such as the body of an AX25Frame).
|
DefaultMessage(char type)
Create an empty DefaultMessage with the specified message type character.
|
Modifier and Type | Method and Description |
---|---|
void |
disableForTransmit()
Specify that message should no longer be transmitted.
|
byte[] |
getBody(boolean countTransmission,
ProtocolFamily protocolId,
AX25Frame frame)
Get an ASCII-text version of this message, suitable for transmitting.
|
java.util.Set<ProtocolFamily> |
getProtocols()
Get the protocol family or families that this message corresponds to, so
ports that don't support all protocols will not forward inappropriate packets.
|
boolean |
isEnabled()
Test if message should still be transmitted.
|
bodyEquals, compareTo, decodeDatestamp, decodeHurricaneParams, decodeTimestamp, decodeWeatherParams, decodeWeatherParams, dup, encodeTimestamp, extractComment, extractComment, extractSymbol, formatBody, getComment, getExtensionString, getMsgType, getPrecedence, getSymbolCode, getSymTableId, hasWeather, inferSymbol, isAppendCR, isSymbolInferred, looksLikeLongFormatLatitude, paramString, setAppendCR, setComment, setSymbolCode, setSymTableId, toString
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
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
dup
public DefaultMessage(byte[] body, int offset, java.lang.String tp, long rcvTimestamp)
body
- byte array containing the transmission format of the messageoffset
- index into the array where the message startstp
- String of third-party routing information (or null if this was not routed over another network)rcvTimestamp
- the time (in milliseconds in Jan 1970 UTC) when this message was receivedpublic DefaultMessage(char type)
type
- char type code of this message.public byte[] getBody(boolean countTransmission, ProtocolFamily protocolId, AX25Frame frame)
getBody
in interface SendableMessage
countTransmission
- number of times the message has been transmittedprotocolId
- ProtocolFamily to format this message inframe
- AX25Frame into which the message will be placed; the decoded message (as opposed to the byte
array encoding) should be stored into the field frame.parsedAX25MsgAX25Frame.parsedAX25Msg
public boolean isEnabled()
isEnabled
in interface SendableMessage
public void disableForTransmit()
disableForTransmit
in interface SendableMessage
public java.util.Set<ProtocolFamily> getProtocols()
getProtocols
in class Message