|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ka2ddo.ax25.AX25Message
org.ka2ddo.opentrac.OpenTracMessage
public class OpenTracMessage
Outer layer of a generic OpenTRAC protocol message, containing entities and attributes of each entity.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.ka2ddo.ax25.AX25Message |
---|
AX25Message.Precedence |
Field Summary | |
---|---|
java.util.ArrayList<OpenTracEntity> |
entities
List of OpenTracEntity objects wrapped in this OpenTracMessage. |
Fields inherited from class org.ka2ddo.ax25.AX25Message |
---|
ax25Frame, invalid, ISO_8859_1, originatingCallsign, PERMANENT, rcptTime, thirdParty, timestamp, UTC, UTF8 |
Constructor Summary | |
---|---|
OpenTracMessage()
|
Method Summary | |
---|---|
void |
appendEntity(OpenTracEntity entity)
Add another entity of data to this message. |
protected boolean |
bodyEquals(AX25Message other)
Compare the contents of the body of the message, reporting if they match. |
int |
computeBody(byte[] buf,
int offset)
Convert an OpenTRAC message into a properly encoded byte array.. |
byte[] |
getBody(boolean countTransmission,
byte protocolId,
AX25Frame frame)
Get an instance of this message, suitable for transmitting. |
Connector |
getConnector()
Specify the Connector this message should be transmitted through. |
OpenTracEntity |
getEntity(java.lang.String callsign,
int ssid,
short extensionId)
Find the OpenTracEntity within this OpenTracMessage matching the specified identification. |
AX25Frame[] |
getFrames(boolean incrementXmtCount,
byte protocolId,
java.lang.String senderCallsign)
Get an AX25Frame of the data to transmit. |
OpenTracElement |
getMatchingElement(int type)
Get the first element of the specified OpenTrac element ID on any entity in this message. |
int |
getNumTransmitsBeforeDecay()
Get the number of cycles for a complete iteration over the proportional pathing digipeat path set. |
AX25Message.Precedence |
getPrecedence()
Report the traffic-handling precedence for this message instance. |
boolean |
hasPosition()
Report if this AX25Message contains position data. |
boolean |
hasWeather()
Report if this OpenTracMessage contains weather information. |
boolean |
isEnabled()
Test if message should still be transmitted. |
boolean |
isEveryEntityAddressed()
Test if every entity in this message has been properly addressed. |
java.util.Iterator<OpenTracEntity> |
iterator()
Returns an iterator over a set of elements of type OpenTracEntity. |
java.lang.String |
paramString()
Descriptive text about this message, to be included in the toString() method's response. |
java.lang.String |
toString()
Returns a string representation of the object. |
Methods inherited from class org.ka2ddo.ax25.AX25Message |
---|
compareTo, dup, equals, extractSource, getAx25Frame, getFirstDigipeat, getLastDigipeat, getOriginalDestination, getOriginalSource, getOriginatingCallsign, getRcptTime, getTimestamp, hashCode, hasThisFirstDigi, indexOf, indexOf, isInvalid, onlyDigits, onlyDigits, onlyDigitsOrPeriod, onlyDigitsOrSpace, onlyDigitsPlus, onlyPeriods, setAx25Frame, setInvalid, setOriginatingCallsign, setRcptTime, setTimestamp, split |
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 Detail |
---|
public java.util.ArrayList<OpenTracEntity> entities
Constructor Detail |
---|
public OpenTracMessage()
Method Detail |
---|
public int computeBody(byte[] buf, int offset)
buf
- byte array containing a transmission-format OpenTRAC messageoffset
- starting position in array that the message begins at
public java.lang.String paramString()
paramString
in class AX25Message
toString()
public java.lang.String toString()
toString
in class AX25Message
public OpenTracElement getMatchingElement(int type)
type
- OpenTRAC element ID
public void appendEntity(OpenTracEntity entity)
entity
- OpenTracEntity to append to this messagepublic AX25Frame[] getFrames(boolean incrementXmtCount, byte protocolId, java.lang.String senderCallsign)
getFrames
in interface AX25FrameSource
incrementXmtCount
- indicate whether the transmit counter (used to cycle through
proportional pathing) should be incrementedprotocolId
- AX.25 protocol to format message insenderCallsign
- String of local callsign sending this message (may be ignored if digipeating
a message from another station)
public byte[] getBody(boolean countTransmission, byte protocolId, AX25Frame frame)
getBody
in interface SendableMessage
countTransmission
- number of times the message has been transmittedprotocolId
- AX.25 protocol ID to generate the message in, or 0 for default protocol; currently,
only OpenTRAC are supported.frame
- AX25Frame into which the message will be placed, so any alternate AX25Message can be linked to it
AX25Frame.parsedAX25Msg
public boolean isEnabled()
isEnabled
in interface SendableMessage
public boolean hasWeather()
hasWeather
in class AX25Message
public boolean isEveryEntityAddressed()
public boolean hasPosition()
hasPosition
in class AX25Message
public AX25Message.Precedence getPrecedence()
getPrecedence
in class AX25Message
public int getNumTransmitsBeforeDecay()
getNumTransmitsBeforeDecay
in interface AX25FrameSource
public Connector getConnector()
getConnector
in interface AX25FrameSource
Connector.CAP_XMT_PACKET_DATA
public java.util.Iterator<OpenTracEntity> iterator()
iterator
in interface java.lang.Iterable<OpenTracEntity>
public OpenTracEntity getEntity(java.lang.String callsign, int ssid, short extensionId)
callsign
- String callsign of entityssid
- int SSID of entityextensionId
- short extension ID of entity
protected boolean bodyEquals(AX25Message other)
bodyEquals
in class AX25Message
other
- another AX25Message to compare against
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |