Sim
Class TrafficGenerator

java.lang.Object
  extended by Sim.TrafficGenerator
All Implemented Interfaces:
SimulationEvent

public class TrafficGenerator
extends java.lang.Object
implements SimulationEvent


Constructor Summary
TrafficGenerator(Simulation sim, edu.rit.numeric.prob.DoublePrng periodRand, int packetSize, double startTime, PacketListener pl)
           
TrafficGenerator(Simulation sim, Node source, Node destination, int packetSize, double startTime, edu.rit.numeric.prob.DoublePrng periodRand, PacketListener pl)
          Creates a new instance of TrafficGenerator.
 
Method Summary
 void perform(Simulation sim, double time)
          Will perform a traffic generating event for the simulation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TrafficGenerator

public TrafficGenerator(Simulation sim,
                        Node source,
                        Node destination,
                        int packetSize,
                        double startTime,
                        edu.rit.numeric.prob.DoublePrng periodRand,
                        PacketListener pl)
Creates a new instance of TrafficGenerator. This instance will be good for sending packets from one source one destination at a specified interval


TrafficGenerator

public TrafficGenerator(Simulation sim,
                        edu.rit.numeric.prob.DoublePrng periodRand,
                        int packetSize,
                        double startTime,
                        PacketListener pl)
Method Detail

perform

public void perform(Simulation sim,
                    double time)
Will perform a traffic generating event for the simulation.

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