jist.swans.route
Class RouteAodv.HelloMessage

java.lang.Object
  extended by jist.swans.route.RouteAodv.HelloMessage
All Implemented Interfaces:
JistAPI.Timeless, Message
Enclosing class:
RouteAodv

private static class RouteAodv.HelloMessage
extends java.lang.Object
implements Message

Represents a HELLO message.


Field Summary
private  NetAddress ip
          Net address of node issuing HELLO message.
private static int MESSAGE_SIZE
          Size of HELLO Message in bytes.
private  int seqNum
          Sequence number of node issuing HELLO message.
 
Fields inherited from interface jist.swans.misc.Message
NULL
 
Constructor Summary
RouteAodv.HelloMessage(NetAddress ip, int seqNum)
          Constructs new HELLO Message object.
 
Method Summary
 void getBytes(byte[] msg, int offset)
          Store packet into byte array.
 NetAddress getIp()
          Returns HELLO message ip field.
 int getSize()
          Return size of packet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MESSAGE_SIZE

private static final int MESSAGE_SIZE
Size of HELLO Message in bytes.

See Also:
Constant Field Values

ip

private NetAddress ip
Net address of node issuing HELLO message.


seqNum

private int seqNum
Sequence number of node issuing HELLO message.

Constructor Detail

RouteAodv.HelloMessage

public RouteAodv.HelloMessage(NetAddress ip,
                              int seqNum)
Constructs new HELLO Message object.

Parameters:
ip - net address of this node
seqNum - sequence number of this node
Method Detail

getIp

public NetAddress getIp()
Returns HELLO message ip field.

Returns:
Hello message ip field

getSize

public int getSize()
Return size of packet.

Specified by:
getSize in interface Message
Returns:
size of packet

getBytes

public void getBytes(byte[] msg,
                     int offset)
Store packet into byte array.

Specified by:
getBytes in interface Message
Parameters:
msg - destination byte array
offset - byte array starting offset