|
GridSim v4.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectThread
eduni.simjava.Sim_entity
gridsim.net.Link
gridsim.net.SimpleLink
This class realizes a link in its simplest form. It implements a simplex link that just takes a packet in from one end, delays it by a user specified time (i.e. propagation delay) and trasmits it to the other end.
Field Summary |
Fields inherited from class gridsim.net.Link |
baudRate_, DEFAULT_BAUD_RATE, DEFAULT_MTU, DEFAULT_PROP_DELAY, delay_, MILLI_SEC, MTU_ |
Fields inherited from class eduni.simjava.Sim_entity |
|
Fields inherited from class Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
SimpleLink(String name)
Constructs a link with some default parameters. |
|
SimpleLink(String name,
double baudRate,
double propDelay,
int MTU)
Constructs a Link which simulates a physical link between two entities. |
Method Summary | |
void |
attach(Sim_entity end1,
Sim_entity end2)
Connects one entity to another via this link |
void |
attach(String end1,
String end2)
Connects one entity to another via this link |
void |
body()
Handles external events that are coming to this link. |
Methods inherited from class gridsim.net.Link |
getBaudRate, getDelay, getMTU |
Methods inherited from class eduni.simjava.Sim_entity |
add_generator, add_param, add_port, clone, get_id, get_name, get_port, get_port, get_stat, run, send_on, set_invisible, set_stat, sim_cancel, sim_completed, sim_current, sim_get_next, sim_get_next, sim_hold_for, sim_hold, sim_pause_for, sim_pause_for, sim_pause_until, sim_pause_until, sim_pause, sim_process_for, sim_process_for, sim_process_until, sim_process_until, sim_process, sim_putback, sim_schedule, sim_schedule, sim_schedule, sim_schedule, sim_schedule, sim_schedule, sim_select, sim_trace, sim_wait_for, sim_wait_for, sim_wait_for, sim_wait, sim_waiting, sim_waiting |
Methods inherited from class Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, 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 SimpleLink(String name, double baudRate, double propDelay, int MTU) throws ParameterException, NullPointerException
name
- Name of this LinkbaudRate
- baud rate of this link (bits/s)propDelay
- Propogation delay of the Link in milli secondsMTU
- Maximum Transmission Unit of the Link in bytes.
Packets which are larger than the MTU should be split
up into MTU size units. NullPointerException
- This happens when name is empty or null
ParameterException
- This happens for the following conditions:
public SimpleLink(String name) throws ParameterException, NullPointerException
name
- Name of this Link
NullPointerException
- This happens when name is empty or null
ParameterException
- This happens when the given name is emptyLink.DEFAULT_BAUD_RATE
,
Link.DEFAULT_PROP_DELAY
,
Link.DEFAULT_MTU
Method Detail |
public void attach(Sim_entity end1, Sim_entity end2)
attach
in class Link
end1
- an entityend2
- an entitypublic void attach(String end1, String end2)
attach
in class Link
end1
- an Entity nameend2
- an Entity namepublic void body()
body
in class Sim_entity
|
GridSim v4.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |