SunSPOT API V3.0


com.sun.spot.peripheral.radio.mhrp.aodv.messages
Class RREP

java.lang.Object
  extended by com.sun.spot.peripheral.radio.mhrp.aodv.messages.AODVMessage
      extended by com.sun.spot.peripheral.radio.mhrp.aodv.messages.RREP

public class RREP
extends AODVMessage

Version:
0.1
Author:
Allen Ajit George

Field Summary
 
Fields inherited from class com.sun.spot.peripheral.radio.mhrp.aodv.messages.AODVMessage
destAddress, destSeqNum, origAddress, origSeqNum, type
 
Constructor Summary
RREP()
          constructs a new route reply message
RREP(byte[] newMessage)
          constructs a new route reply message
RREP(RREQ message)
          constructs a new route reply message
 
Method Summary
 boolean getACKRequiredFlag()
          tells the status of the ackRequiredFlag
 short getHopCount()
          read the hop count of this route reply
 short getRouteCost()
          get the route cost
 short incrementHopCount()
          increment the hop count
 void setACKRequiredFlag(boolean flag)
          sets the ackRequiredFlag
 byte[] writeMessage()
          writes the properties into the appropriate bytes of the buffer
 
Methods inherited from class com.sun.spot.peripheral.radio.mhrp.aodv.messages.AODVMessage
getDestAddress, getDestSeqNum, getOrigAddress, getOrigSeqNum, getType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RREP

public RREP()
constructs a new route reply message


RREP

public RREP(RREQ message)
constructs a new route reply message

Parameters:
message - the route request that caused this route reply

RREP

public RREP(byte[] newMessage)
constructs a new route reply message

Parameters:
newMessage -
Method Detail

writeMessage

public byte[] writeMessage()
writes the properties into the appropriate bytes of the buffer

Specified by:
writeMessage in class AODVMessage
Returns:
message

getACKRequiredFlag

public boolean getACKRequiredFlag()
tells the status of the ackRequiredFlag

Returns:
ackRequired

setACKRequiredFlag

public void setACKRequiredFlag(boolean flag)
sets the ackRequiredFlag


getHopCount

public short getHopCount()
read the hop count of this route reply

Returns:
hopCount

incrementHopCount

public short incrementHopCount()
increment the hop count

Returns:
hopCount

getRouteCost

public short getRouteCost()
get the route cost

Returns:
route cost

SunSPOT API V3.0


Copyright © 2006, 2007 Sun Microsystems, Inc. All Rights Reserved.