Package ons

Class TrafficGenerator

java.lang.Object
ons.TrafficGenerator

public class TrafficGenerator
extends java.lang.Object
Generates the network's traffic based on the information passed through the command line arguments and the XML simulation file.
  • Constructor Summary

    Constructors 
    Modifier Constructor Description
    protected TrafficGenerator​(org.w3c.dom.Element xml, double forcedLoad, PhysicalTopology pt)
    Creates a new TrafficGenerator object.
  • Method Summary

    Modifier and Type Method Description
    void generateTraffic​(PhysicalTopology pt, EventScheduler events, int seed)
    Generates the network's traffic.
    int getCalls()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TrafficGenerator

      protected TrafficGenerator​(org.w3c.dom.Element xml, double forcedLoad, PhysicalTopology pt)
      Creates a new TrafficGenerator object. Extracts the traffic information from the XML file and takes the chosen load and seed from the command line arguments.
      Parameters:
      xml - file that contains all information about the simulation
      forcedLoad - range of offered loads for several simulations
      pt - the PhysicalTopology object
  • Method Details

    • getCalls

      public int getCalls()
    • generateTraffic

      public void generateTraffic​(PhysicalTopology pt, EventScheduler events, int seed)
      Generates the network's traffic.
      Parameters:
      events - EventScheduler object that will contain the simulation events
      pt - the network's Physical Topology
      seed - a number in the interval [1,25] that defines up to 25 different random simulations