SunSPOT API V5.0


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

java.lang.Object
  extended by com.sun.spot.peripheral.radio.mhrp.lqrp.messages.LQRPMessage
      extended by com.sun.spot.peripheral.radio.mhrp.lqrp.messages.RREP

public class RREP
extends LQRPMessage

Version:
0.1
Author:
Allen Ajit George modified by Pradip De

Field Summary
 
Fields inherited from class com.sun.spot.peripheral.radio.mhrp.lqrp.messages.LQRPMessage
destAddress, destSeqNum, origAddress, origSeqNum, type
 
Constructor Summary
RREP(byte[] newMessage)
          constructs a new route reply message
RREP(RREQ request)
          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
 int getLowLQlinkCount()
           
 double getRevLastHopCost()
          get the link cost for the last hop
 double getRouteCostToDest()
          get the route cost
 short incrementHopCount()
          increment the hop count
 void setACKRequiredFlag(boolean flag)
          sets the ackRequiredFlag
 double updateRouteCostToDest(long nextHop)
          update the route cost metric of this message
 byte[] writeMessage()
          writes the properties into the appropriate bytes of the buffer
 
Methods inherited from class com.sun.spot.peripheral.radio.mhrp.lqrp.messages.LQRPMessage
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(RREQ request)
constructs a new route reply message

Parameters:
request - 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 LQRPMessage
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

updateRouteCostToDest

public double updateRouteCostToDest(long nextHop)
update the route cost metric of this message

Returns:
route cost to destination

getRouteCostToDest

public double getRouteCostToDest()
get the route cost

Returns:
route cost

getRevLastHopCost

public double getRevLastHopCost()
get the link cost for the last hop

Returns:
revLastHopCost

getLowLQlinkCount

public int getLowLQlinkCount()

SunSPOT API V5.0


Copyright � 2006-2008 Sun Microsystems, Inc. All Rights Reserved.