Sim.Routing.Champ
Class AckWaiter
java.lang.Object
Sim.Routing.Champ.AckWaiter
- All Implemented Interfaces:
- SimulationEvent
public class AckWaiter
- extends java.lang.Object
- implements SimulationEvent
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 |
AckWaiter
public AckWaiter(int sequenceNumber,
int nextHop,
NormalPacketHeader normalHeader,
Packet dataPacket,
RouteCache routeCache,
ChampAlgorithm champ,
Node myNode)
- Creates a new instance of AckWaiter
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 Simulationtime
- simulation time, exactly equal to the result of Simulation.getTime()
isAcknowledged
public boolean isAcknowledged(int nextHop,
int sequenceNumber)