org.ka2ddo.opentrac
Class TraceStep

java.lang.Object
  extended by org.ka2ddo.opentrac.TraceStep
All Implemented Interfaces:
java.io.Serializable

public class TraceStep
extends java.lang.Object
implements java.io.Serializable

This class defines one trace step in the OpenTracPathTrace element.

See Also:
Serialized Form

Field Summary
 java.lang.String callsign
          Callsign of relaying station.
 byte networkId
          Network of relaying station.
static int SIZE
          Number of bytes to encode a TraceStep.
 int ssid
          SSID of relaying station.
 
Constructor Summary
TraceStep()
          Construct an empty TraceStep.
TraceStep(java.lang.String baseCallsign, int ssid, byte networkId)
          Construct a TraceStep specifying the relay step taken.
 
Method Summary
 int computeBody(byte[] buf, int offset)
          Append this element to a message buffer
 boolean equals(java.lang.Object obj)
          Indicates whether some other object is "equal to" this one.
 int hashCode()
          Returns a hash code value for the object.
 java.lang.String valueString()
          Get the string representation of the value of this element.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SIZE

public static final int SIZE
Number of bytes to encode a TraceStep.

See Also:
Constant Field Values

callsign

public java.lang.String callsign
Callsign of relaying station.


ssid

public int ssid
SSID of relaying station.


networkId

public byte networkId
Network of relaying station.

See Also:
OpenTracTypes.NETWORKTYPE_APRSIS, OpenTracTypes.NETWORKTYPE_HF, OpenTracTypes.NETWORKTYPE_UHF, OpenTracTypes.NETWORKTYPE_VHF
Constructor Detail

TraceStep

public TraceStep()
Construct an empty TraceStep.


TraceStep

public TraceStep(java.lang.String baseCallsign,
                 int ssid,
                 byte networkId)
Construct a TraceStep specifying the relay step taken.

Parameters:
baseCallsign - String callsign of the relaying station
ssid - int SSID of the relaying station
networkId - the OpenTRAC network type used for the relay
Method Detail

computeBody

public int computeBody(byte[] buf,
                       int offset)
Append this element to a message buffer

Parameters:
buf - byte array to add the element to
offset - starting index to store the element
Returns:
index after the end of the stored element

valueString

public java.lang.String valueString()
Get the string representation of the value of this element.

Returns:
value string

equals

public boolean equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one.

Overrides:
equals in class java.lang.Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.

hashCode

public int hashCode()
Returns a hash code value for the object.

Overrides:
hashCode in class java.lang.Object
Returns:
a hash code value for this object.
See Also:
equals(Object)