|
GridSim 5.0 beta | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectThread
Sim_entity
FnbInput
public class FnbInput
Thiss class defines a port through which a simulation entity
receives data from the simulated network. Note that this class is based on
Input class.
It maintains an event queue
to serialize the data-in-flow and delivers to its parent entity.
It accepts messages that comes from GridSim entities
FnbOutput entity
and passes the same to the GridSim entity.
It simulates Network communication delay depending on Baud rate
and data length. Simultaneous inputs can be modeled using multiple
instances of this class.
Input| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class Thread |
|---|
Thread.State, Thread.UncaughtExceptionHandler |
| Field Summary |
|---|
| Fields inherited from class Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
FnbInput(String name,
double baudRate)
Allocates a new Input object |
|
| Method Summary | |
|---|---|
void |
addLink(Link link)
Sets the Input entities link. |
void |
body()
A method that gets one process event at one time until the end of a simulation, then delivers an event to the entity (its parent) |
double |
getBaudRate()
Gets the baud rate |
source_pktNum |
lookForSrcPktNum(int src,
int glID)
Look for a especific source_pktNum object in the source_PktNum_array |
double |
realIO(double value)
Gets the I/O real number based on a given value |
void |
removeFromSrcPktNum(int src)
Look for a especific source_pktNum object in the source_PktNum_array |
boolean |
setBackgroundTraffic(TrafficGenerator gen)
This is an empty method and only applicable to Output class. |
boolean |
setBackgroundTraffic(TrafficGenerator gen,
Collection userName)
This is an empty method and only applicable to Output class. |
| Methods inherited from class Thread |
|---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FnbInput(String name,
double baudRate)
throws NullPointerException
name - the name of this objectbaudRate - the communication speed
NullPointerException - This happens when creating this entity
before initializing GridSim package or this entity name
is null or empty| Method Detail |
|---|
public void addLink(Link link)
addLink in interface NetIOlink - the link to which this Input entity should send datapublic double getBaudRate()
getBaudRate in interface NetIOpublic double realIO(double value)
value - the specified value
public boolean setBackgroundTraffic(TrafficGenerator gen,
Collection userName)
Output class.
setBackgroundTraffic in interface NetIOgen - a background traffic generatoruserName - a collection of user entity name (in String object).
Outputpublic boolean setBackgroundTraffic(TrafficGenerator gen)
Output class.
setBackgroundTraffic in interface NetIOgen - a background traffic generator
Outputpublic void body()
body in class Sim_entity
public source_pktNum lookForSrcPktNum(int src,
int glID)
src - the source of the packetglID - the id of the girdlet this packet belongs to.
public void removeFromSrcPktNum(int src)
src - the source of the packet
|
GridSim 5.0 beta | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||