SunSPOT API V3.0


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

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

public class RREQ
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
RREQ(byte[] newMessage)
          constructs a new route request message
RREQ(long origAddress, 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 getRequestID()
          get the ID of this request
 short 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
 short setRouteCost()
           
 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

RREQ

public RREQ(long origAddress,
            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 AODVMessage
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

getRouteCost

public short getRouteCost()

setRouteCost

public short setRouteCost()

setDestinationSequenceNumber

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

Parameters:
destinationSequenceNumber -

SunSPOT API V3.0


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