SunSPOT API V5.0


com.sun.spot.peripheral.radio.mhrp.lqrp.linkParams
Class NodeLifeAndLinkMonitor

java.lang.Object
  extended by com.sun.spot.peripheral.radio.mhrp.lqrp.linkParams.NodeLifeAndLinkMonitor
All Implemented Interfaces:
IPacketQualityListener

public class NodeLifeAndLinkMonitor
extends Object
implements IPacketQualityListener

Author:
pradip de, modified by Ron Goldman

Method Summary
 NbrLinkInfo addLinkWithAddress(long address, double lq)
           
 double getCurrNormLQForAddress(long address)
           
static NodeLifeAndLinkMonitor getInstance()
           
 NbrLinkInfo getNbrLinkInfoWithAddress(long address)
           
 Hashtable getNeighborLinks()
           
 NodeLifetime getNodeLifetime()
           
 void initialize(long ourAddress)
           
 void notifyPacket(long srcAddress, long dest, int rssi, int corr, int lq, int packetSize)
          Update LQI Sum for each packet received.
 void removeLinkWithAddress(long address)
           
 void setCurrNormLQForAddress(long address, double normLQ)
           
 void setNbrLQ(long address, double cost)
           
 void setSender(Sender sender)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static NodeLifeAndLinkMonitor getInstance()
Returns:
lqrpManager instance of this singleton

initialize

public void initialize(long ourAddress)

setSender

public void setSender(Sender sender)

notifyPacket

public void notifyPacket(long srcAddress,
                         long dest,
                         int rssi,
                         int corr,
                         int lq,
                         int packetSize)
Update LQI Sum for each packet received. Called by RadioPacketDispatcher.

Specified by:
notifyPacket in interface IPacketQualityListener

addLinkWithAddress

public NbrLinkInfo addLinkWithAddress(long address,
                                      double lq)

getNbrLinkInfoWithAddress

public NbrLinkInfo getNbrLinkInfoWithAddress(long address)

removeLinkWithAddress

public void removeLinkWithAddress(long address)

getCurrNormLQForAddress

public double getCurrNormLQForAddress(long address)

setCurrNormLQForAddress

public void setCurrNormLQForAddress(long address,
                                    double normLQ)

setNbrLQ

public void setNbrLQ(long address,
                     double cost)

getNeighborLinks

public Hashtable getNeighborLinks()

getNodeLifetime

public NodeLifetime getNodeLifetime()

SunSPOT API V5.0


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