GridSim 5.0 beta

gridsim.net.fnb
Class FnbNetworkReader

Object
  extended by FnbNetworkReader

public class FnbNetworkReader
extends Object

This is an utility class, which parses a file and constructs the network topology automatically, using the SCFQ packet scheduler for network buffers (FnbSCFQScheduler). Note that this class is based on the NetworkReader class.

The file that defines the network has the following form:

# specify the number of routers
number_of_routers

# specify the name of each router and (optional) logging facility
router_name1 [true/false]
router_name2 [true/false]
router_name3 [true/false]
... // other router names

# linking two routers. NOTE: the router name is case sensitive!
router_name1 router_name2 baud_rate(GB/s) prop_delay(ms) mtu(byte)
router_name1 router_name3 baud_rate(GB/s) prop_delay(ms) mtu(byte)
... // linking other routers

NOTE: [] means an optional parameter for logging activities inside a router. If it is not given, then by default the value is false.

Since:
GridSim Toolkit 4.2
Author:
Agustin Caminero, Universidad de Castilla-La Mancha (UCLM) (Spain).
See Also:
FnbSCFQScheduler

Constructor Summary
FnbNetworkReader()
           
 
Method Summary
static LinkedList createSCFQ(String filename, double[] weight, int max_buf_size, int drop_alg, int min_th, int max_th, double max_p, double queue_weight, boolean stats)
          Creates a network topology that uses a SCFQ packet scheduler
static Router getRouter(String name, LinkedList routerList)
          Gets a Router object from the list
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FnbNetworkReader

public FnbNetworkReader()
Method Detail

createSCFQ

public static LinkedList createSCFQ(String filename,
                                    double[] weight,
                                    int max_buf_size,
                                    int drop_alg,
                                    int min_th,
                                    int max_th,
                                    double max_p,
                                    double queue_weight,
                                    boolean stats)
Creates a network topology that uses a SCFQ packet scheduler

Parameters:
filename - the name of the file containing the description of the network topology
weight - a linear array of the weights to be assigned to different classes of traffic.
max_buf_size - maximum buffer size for routers
drop_alg - the algorithm used to drop packets at routers
min_th - minimum threshold for RED
max_th - maximum threshold for RED
max_p - maximum drop probability for RED
queue_weight - queue weight for RED
stats - whether we want to store stats or not
Returns:
the list of finiteBufferRouters of the network or null if an error occurs
See Also:
FnbSCFQScheduler

getRouter

public static Router getRouter(String name,
                               LinkedList routerList)
Gets a Router object from the list

Parameters:
name - a router name
routerList - a list containing the finiteBufferRouter objects
Returns:
a Router object or null if not found

GridSim 5.0 beta

The University of Melbourne, Australia, 2009