Sim.Routing.Champ
Class AckWaiter

java.lang.Object
  extended by Sim.Routing.Champ.AckWaiter
All Implemented Interfaces:
SimulationEvent

public class AckWaiter
extends java.lang.Object
implements SimulationEvent


Constructor Summary
AckWaiter(int sequenceNumber, int nextHop, NormalPacketHeader normalHeader, Packet dataPacket, RouteCache routeCache, ChampAlgorithm champ, Node myNode)
          Creates a new instance of AckWaiter
 
Method Summary
 boolean isAcknowledged(int nextHop, int sequenceNumber)
           
 void perform(Simulation sim, double time)
          This event will check to see if an Ack has come in from next hop node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AckWaiter

public AckWaiter(int sequenceNumber,
                 int nextHop,
                 NormalPacketHeader normalHeader,
                 Packet dataPacket,
                 RouteCache routeCache,
                 ChampAlgorithm champ,
                 Node myNode)
Creates a new instance of AckWaiter

Method Detail

perform

public void perform(Simulation sim,
                    double time)
This event will check to see if an Ack has come in from next hop node. If it has not then it will perform Champ route maintenance operations.

Specified by:
perform in interface SimulationEvent
Parameters:
sim - non-null Simulation
time - simulation time, exactly equal to the result of Simulation.getTime()

isAcknowledged

public boolean isAcknowledged(int nextHop,
                              int sequenceNumber)