SunSPOT API V5.0


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

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

public class RREQ
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
RREQ(byte[] newMessage)
          constructs a new route request message
RREQ(long origSourceAddress, long destinationMACaddress)
          constructs a new route request message
 
Method Summary
 boolean getDestinationOnlyFlag()
          get the state of the destination only flag
 boolean getGratuitousRREPFlag()
          get the state of the gratuitous route reply flag
 short getHopCount()
          get the hop count of this message
 int getLowLQlinkCount()
           
 int getRequestID()
          get the ID of this request
 double getRouteCost()
           
 short incrementHopCount()
          increment the hop count of this message
 void setDestinationOnlyFlag(boolean flag)
          set the destination only flag
 void setDestinationSequenceNumber(int destinationSequenceNumber)
          set the destination sequence number of this route request
 void setGratuitousRREPFlag(boolean flag)
          set the gratuitous route reply flag
 void setRequestID(int requestID)
          set ID of this request
 double updateRouteCost(long lastHop)
          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

RREQ

public RREQ(long origSourceAddress,
            long destinationMACaddress)
constructs a new route request message

Parameters:
destinationMACaddress - node to which a route shall be discovered

RREQ

public RREQ(byte[] newMessage)
constructs a new route request 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

getDestinationOnlyFlag

public boolean getDestinationOnlyFlag()
get the state of the destination only flag

Returns:
destinationOnlyFlag

setDestinationOnlyFlag

public void setDestinationOnlyFlag(boolean flag)
set the destination only flag

Parameters:
flag -

getGratuitousRREPFlag

public boolean getGratuitousRREPFlag()
get the state of the gratuitous route reply flag

Returns:
gratuitousRREPFlag

setGratuitousRREPFlag

public void setGratuitousRREPFlag(boolean flag)
set the gratuitous route reply flag

Parameters:
flag -

getRequestID

public int getRequestID()
get the ID of this request

Returns:
requestID

setRequestID

public void setRequestID(int requestID)
set ID of this request

Parameters:
requestID -

getHopCount

public short getHopCount()
get the hop count of this message

Returns:
hop count

incrementHopCount

public short incrementHopCount()
increment the hop count of this message

Returns:
hop count

getLowLQlinkCount

public int getLowLQlinkCount()
Returns:
the number of links in this route below the quality threshold

updateRouteCost

public double updateRouteCost(long lastHop)
update the route cost metric of this message

Returns:
route cost

getRouteCost

public double getRouteCost()

setDestinationSequenceNumber

public void setDestinationSequenceNumber(int destinationSequenceNumber)
set the destination sequence number of this route request

Parameters:
destinationSequenceNumber -

SunSPOT API V5.0


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