flowsim.core
Class TrafficGenerator

java.lang.Object
  |
  +--flowsim.core.TrafficGenerator

public class TrafficGenerator
extends java.lang.Object
implements FlowMonitor


Constructor Summary
TrafficGenerator(Simulator s, Topology t, Distribution arrival, Distribution duration, NodeChooser from_chooser, NodeChooser to_chooser, UnicastFlowFactory ff, int minimal_current_flows)
           
 
Method Summary
 void flow_blocked(Flow f)
           
 void flow_changed_available_bw(Flow f, int was_bw)
           
 void flow_changed_bw(Flow f, int was_bw)
           
 void flow_changed_desired_bw(Flow f, int was_bw)
           
 void flow_started(Flow f)
           
 void flow_stopped(Flow f)
           
 double get_block_rate()
           
 int get_current_flows()
           
 void init_stats()
           
 void print_statistics()
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TrafficGenerator

public TrafficGenerator(Simulator s,
                        Topology t,
                        Distribution arrival,
                        Distribution duration,
                        NodeChooser from_chooser,
                        NodeChooser to_chooser,
                        UnicastFlowFactory ff,
                        int minimal_current_flows)
Method Detail

start

public void start()

stop

public void stop()

flow_started

public void flow_started(Flow f)
Specified by:
flow_started in interface FlowMonitor

flow_stopped

public void flow_stopped(Flow f)
Specified by:
flow_stopped in interface FlowMonitor

flow_changed_bw

public void flow_changed_bw(Flow f,
                            int was_bw)
Specified by:
flow_changed_bw in interface FlowMonitor

flow_changed_desired_bw

public void flow_changed_desired_bw(Flow f,
                                    int was_bw)
Specified by:
flow_changed_desired_bw in interface FlowMonitor

flow_changed_available_bw

public void flow_changed_available_bw(Flow f,
                                      int was_bw)
Specified by:
flow_changed_available_bw in interface FlowMonitor

flow_blocked

public void flow_blocked(Flow f)
Specified by:
flow_blocked in interface FlowMonitor

print_statistics

public void print_statistics()

init_stats

public void init_stats()

get_current_flows

public int get_current_flows()

get_block_rate

public double get_block_rate()