|
GridSim 5.0 beta | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object FIFOScheduler
public class FIFOScheduler
FIFOScheduler implements a First in First Out Scheduler. This means that all the packets are enqued at the tail of a queue, and packets depart from the head of the queue. Packets are not reordered, and no differentiated service will be provided.
Constructor Summary | |
---|---|
FIFOScheduler()
Creates a new packet scheduler with the name "FIFOScheduler". |
|
FIFOScheduler(double baudRate)
Creates a new FIFO packet scheduler with the specified baud rate (in bits/s). |
|
FIFOScheduler(String name)
Creates a new FIFO packet scheduler with the specified name. |
|
FIFOScheduler(String name,
double baudRate)
Creates a new FIFO packet scheduler with the specified name and baud rate (in bits/s). |
Method Summary | |
---|---|
Packet |
deque()
In this scheduler, the packet returned is always from the head of the queue. |
boolean |
enque(Packet np)
In this scheduler, the packet is put into the tail of the queue. |
double |
getBaudRate()
Returns the baud rate of the egress port that is using this scheduler. |
int |
getRouterID()
Gets the router ID that hosts this scheduler. |
int |
getSchedID()
Gets the ID of this scheduler. |
String |
getSchedName()
Gets the name of this scheduler. |
boolean |
isEmpty()
Determines whether the scheduler is currently keeping any packets in its queue(s). |
boolean |
setBaudRate(double rate)
Sets the baud rate that this scheduler will be sending packets at. |
boolean |
setRouterID(int routerID)
Sets the router ID that hosts this scheduler. |
int |
size()
Determines the number of packets that are currently enqueued in this scheduler. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FIFOScheduler(String name, double baudRate) throws ParameterException
name
- Name of this schedulerbaudRate
- baud rate in bits/s of the port that is using
this scheduler.
ParameterException
- This happens when the name is null or
the baud rate <= 0public FIFOScheduler(double baudRate) throws ParameterException
baudRate
- baud rate in bits/s of the port that is using
this scheduler.
ParameterException
- This happens when the baud rate <= 0public FIFOScheduler(String name) throws ParameterException
PacketScheduler.setBaudRate(double)
before the simulation starts.
name
- Name of this scheduler
ParameterException
- This happens when the name is nullPacketScheduler.setBaudRate(double)
public FIFOScheduler() throws ParameterException
PacketScheduler.setBaudRate(double)
before the simulation starts.
ParameterException
- This happens when the name is nullPacketScheduler.setBaudRate(double)
Method Detail |
---|
public boolean enque(Packet np)
enque
in interface PacketScheduler
np
- A Packet to be enqued by this scheduler.
public Packet deque()
deque
in interface PacketScheduler
public boolean isEmpty()
isEmpty
in interface PacketScheduler
public int size()
size
in interface PacketScheduler
public int getSchedID()
getSchedID
in interface PacketScheduler
public String getSchedName()
getSchedName
in interface PacketScheduler
public boolean setBaudRate(double rate)
setBaudRate
in interface PacketScheduler
rate
- the baud rate of this scheduler (in bits/s)public double getBaudRate()
getBaudRate
in interface PacketScheduler
PacketScheduler.setBaudRate(double)
public boolean setRouterID(int routerID)
setRouterID
in interface PacketScheduler
routerID
- the router ID that hosts this scheduler
public int getRouterID()
getRouterID
in interface PacketScheduler
|
GridSim 5.0 beta | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |