|
GridSim 5.0 beta | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object NetworkReader
public class NetworkReader
This is an utility class, which parses a file and constructs the
network topology automatically.
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.
Constructor Summary | |
---|---|
NetworkReader()
|
Method Summary | |
---|---|
static LinkedList |
createFIFO(String filename)
Creates a network topology that uses a FIFO packet scheduler |
static LinkedList |
createFlow(String filename)
Creates a network topology that uses the flow network functionality. |
static LinkedList |
createRate(String filename,
double[] percentage)
Creates a network topology that uses a Rate controlled packet scheduler |
static LinkedList |
createSCFQ(String filename,
double[] weight)
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 |
---|
public NetworkReader()
Method Detail |
---|
public static LinkedList createFIFO(String filename)
filename
- the name of the file containing the description of
the network topology
FIFOScheduler
public static LinkedList createSCFQ(String filename, double[] weight)
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.
SCFQScheduler
public static LinkedList createRate(String filename, double[] percentage)
filename
- the name of the file containing the description of
the network topologypercentage
- a linear array of bandwidth percentage to be assigned
to different classes of traffic.
RateControlledScheduler
public static Router getRouter(String name, LinkedList routerList)
name
- a router namerouterList
- a list containing the Router objects
public static LinkedList createFlow(String filename)
filename
- the name of the file containing the description of
the network topology
FlowRouter
,
FlowLink
|
GridSim 5.0 beta | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |