SunSPOT API V5.0


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

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

public class LQREQ
extends LQRPMessage

Author:
Ron Goldman

Field Summary
 
Fields inherited from class com.sun.spot.peripheral.radio.mhrp.lqrp.messages.LQRPMessage
destAddress, destSeqNum, origAddress, origSeqNum, type
 
Constructor Summary
LQREQ(byte[] newMessage, int lqi)
          constructs a new route request message
LQREQ(long origSourceAddress, long destinationMACaddress, double cost)
          constructs a new link quality request message
 
Method Summary
 double getReceivedCost()
           
 double getRouteCost()
           
 void updateRequestorAddress(long newAddr)
           
 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

LQREQ

public LQREQ(long origSourceAddress,
             long destinationMACaddress,
             double cost)
constructs a new link quality request message

Parameters:
origSourceAddress -
destinationMACaddress - how well can this node hear our packets
cost -

LQREQ

public LQREQ(byte[] newMessage,
             int lqi)
constructs a new route request message

Parameters:
newMessage -
lqi -
Method Detail

writeMessage

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

Specified by:
writeMessage in class LQRPMessage
Returns:
message

updateRequestorAddress

public void updateRequestorAddress(long newAddr)

getRouteCost

public double getRouteCost()

getReceivedCost

public double getReceivedCost()

SunSPOT API V5.0


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