|
J-Sim v1.2.1-p7 API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectdrcl.DrclObj
drcl.comp.Component
drcl.comp.lib.RNG
A random number generation component.
| Nested Class Summary |
| Nested classes inherited from class drcl.comp.Component |
Component.Locks |
| Field Summary |
| Constructor Summary | |
RNG()
|
|
RNG(java.lang.String id_)
|
|
| Method Summary | |
void |
_resume()
This method is invoked in a new thread context when Component.resume() is called. |
protected void |
_start()
This method is invoked in a new thread context when Component.run() is called. |
void |
duplicate(java.lang.Object source_)
Duplicates the content of source_, including ID, name, child components and connections among them, to this component. |
RandomNumberGenerator |
getRNG()
|
long |
getSeed()
|
int |
getTTL()
|
java.lang.String |
info()
Returns information regarding this component. |
protected void |
process(java.lang.Object data_,
Port inPort_)
The main callback method of a component. |
void |
reset()
Resets the component for being used anew. |
void |
setRNG(RandomNumberGenerator rng_)
|
void |
setSeed(long seed_)
|
void |
setTTL(int ttl_)
Sets the time-to-live value; -1 to generate numbers forever. |
| Methods inherited from class drcl.DrclObj |
clone |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public RNG()
public RNG(java.lang.String id_)
| Method Detail |
public void reset()
Component
reset in class Componentpublic void duplicate(java.lang.Object source_)
Component
duplicate in interface ObjectDuplicableduplicate in class Componentpublic java.lang.String info()
Component
info in class Componentprotected void _start()
ComponentComponent.run() is called.
An ActiveComponent subclass must override this method to start this component.
_start in class Componentpublic void _resume()
ComponentComponent.resume() is called.
An ActiveComponent subclass must override this method to resume this component.
_resume in class Component
protected void process(java.lang.Object data_,
Port inPort_)
Component
process in class Componentdata_ - the arrival data.inPort_ - the port where the data arrives.public long getSeed()
public void setSeed(long seed_)
public int getTTL()
public void setTTL(int ttl_)
public RandomNumberGenerator getRNG()
public void setRNG(RandomNumberGenerator rng_)
|
J-Sim v1.2.1-p7 API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||