gridsim.net.fnb
Class FnbNetworkReader
Object
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
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 |
FnbNetworkReader
public FnbNetworkReader()
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 topologyweight
- a linear array of the weights to be assigned to
different classes of traffic.max_buf_size
- maximum buffer size for routersdrop_alg
- the algorithm used to drop packets at routersmin_th
- minimum threshold for REDmax_th
- maximum threshold for REDmax_p
- maximum drop probability for REDqueue_weight
- queue weight for REDstats
- 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 namerouterList
- a list containing the finiteBufferRouter objects
- Returns:
- a
Router
object or
null if not found
The University of Melbourne, Australia, 2009