Sim.Routing.GPSR
Class BroadcastEvent

java.lang.Object
  extended by Sim.Routing.GPSR.BroadcastEvent
All Implemented Interfaces:
SimulationEvent

public class BroadcastEvent
extends java.lang.Object
implements SimulationEvent

This is the broadcast event class that is used for GPSR nodes that will tell the other neighboring nodes where this node is located.


Constructor Summary
BroadcastEvent(Node myNode)
          Construct a new broadcast event for a given node.
 
Method Summary
 void perform(Simulation sim, double time)
          Method for the event controller to execute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BroadcastEvent

public BroadcastEvent(Node myNode)
Construct a new broadcast event for a given node.

Parameters:
myNode - node to broadcast
Method Detail

perform

public void perform(Simulation sim,
                    double time)
Method for the event controller to execute. Sends out a beacon to all nearby nodes to tell them myNodes location.

Specified by:
perform in interface SimulationEvent
Parameters:
sim - simulation that is running
current - time during the simulation