|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--com.renesys.raceway.SSF.Entity
|
+--SSF.Net.Net
Top-level modeling class for a network simulation. One Net serves as the initializer for the entire simulation; it contains hosts, routers (which are hosts), and links. Net also serves as the central resource for clock granularity information and translation among NHI, CIDR, and IP addressing schemes.
Net may be run from the command line; use the -help flag to learn the syntax.
| Field Summary | |
cidrBlock |
cidrMap
Three-way translation table for NHI addresses, CIDR block addresses, and IP addresses. |
static long |
frequency
Static clock frequency that all simulation components should use for reference, for consistency. |
protected static java.lang.String |
generatorName
|
static com.renesys.raceway.OutOfCore.Heap |
heap
|
java.util.Hashtable |
hosts
Table mapping NHI addresses (Strings) to Router/Host instances. |
static boolean |
ooc
|
protected static int |
sharingLevel
|
static int |
STREAM_PER_DISTRIBUTION
|
static int |
STREAM_PER_HOST
|
static int |
STREAM_PER_PROTOCOL
|
static int |
STREAM_PER_TIMELINE
|
protected static java.lang.String |
streamName
|
| Constructor Summary | |
Net()
|
|
| Method Summary | |
static RandomDistribution |
accessRandomDistribution(ProtocolSession forProtocol,
com.renesys.raceway.DML.Configuration distcfg,
java.lang.String requestName)
Returns a reference to a random distributrution that will be shared by consumers depending the value of .Net.randomstream.reproducibility_level Specification of the RandomDistribution is via a Configuration. |
static RandomDistribution |
accessRandomDistribution(ProtocolSession forProtocol,
java.lang.String distName,
java.lang.String requestName)
Returns a reference to a random distributrution that will be shared by consumers depending the value of .Net.randomstream.reproducibility_level Specification of the RandomDistribution is by a name recognized by class method RandomStream.getDistribution(); the returned handle is for default values of the distribution's parameters. |
static RandomStream |
accessRandomStream(ProtocolSession forProtocol,
java.lang.String requestName)
Returns a reference to a raw random number generator output specified by the global attribute .Net.randomstream; that will be shared by consumers depending the value of .Net.randomstream.reproducibility_level. |
void |
config(com.renesys.raceway.DML.Configuration cfg)
Configure a network model. |
void |
configRandomStreams(com.renesys.raceway.DML.Configuration cfg)
|
static void |
configTimeline(com.renesys.raceway.SSF.Entity forEntity,
com.renesys.raceway.DML.Configuration cfg)
Helper function to let Hosts, Routers, Links set their alignments consistently from their respective config files, which share a common optional "alignment" attribute. |
java.lang.String |
ip_to_nhi(java.lang.String ipaddr)
Return the global NHI address corresponding to the given IP address |
static void |
main(java.lang.String[] argv)
Command line driver for the Net class. |
java.lang.String |
nhi_to_cidr(java.lang.String naddr)
Return the CIDR block address corresponding to the given global NHI address. |
java.lang.String |
nhi_to_ip(java.lang.String naddr)
Return the IP address corresponding to the given global NHI address |
static long |
seconds(double s)
Static convenience function for computing number of clock ticks in a given number of seconds; simply returns s*frequency. |
static void |
syntax()
Dump a summary of command-line syntax to standard error. |
static void |
tmain(java.lang.String[] argv)
|
void |
wrapup(java.lang.Runnable finalizer)
|
| Methods inherited from class com.renesys.raceway.SSF.Entity |
alignment, alignTo, coalignedEntities, inChannels, init, joinAll, makeIndependent, now, outChannels, pauseAll, playRole, processes, resetSimulation, resumeAll, startAll, startAll, startClient, startClient, startServer, Vx, Yx |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static long frequency
public cidrBlock cidrMap
public static boolean ooc
public static com.renesys.raceway.OutOfCore.Heap heap
public java.util.Hashtable hosts
public static final int STREAM_PER_TIMELINE
public static final int STREAM_PER_HOST
public static final int STREAM_PER_PROTOCOL
public static final int STREAM_PER_DISTRIBUTION
protected static int sharingLevel
protected static java.lang.String streamName
protected static java.lang.String generatorName
| Constructor Detail |
public Net()
| Method Detail |
public static long seconds(double s)
public java.lang.String nhi_to_ip(java.lang.String naddr)
public java.lang.String ip_to_nhi(java.lang.String ipaddr)
public java.lang.String nhi_to_cidr(java.lang.String naddr)
public static void syntax()
public static void main(java.lang.String[] argv)
Syntax: Net [-check]
[-dump]
[-relax]
[-ooc]
[-ip a.b.c.d/m]
maxtime dmlfile1 [ dmlfile2 [...dmlfileN]]
-check: schema-check the input DML file(s) first
-dump: dump NHI/CIDR/IP address tables, but don't actually run the model
-relax: fail to enforce strict rules about CIDR/IP attributes
-ip addr: allocate IP addresses from the given block (default: 0.0.0.0/0)
public static void tmain(java.lang.String[] argv)
public void wrapup(java.lang.Runnable finalizer)
public void config(com.renesys.raceway.DML.Configuration cfg)
throws com.renesys.raceway.DML.configException
REQUIRED ATTRIBUTES: none
OBSOLETE ATTRIBUTES:
config in interface com.renesys.raceway.DML.Configurablecom.renesys.raceway.DML.configException
public void configRandomStreams(com.renesys.raceway.DML.Configuration cfg)
throws com.renesys.raceway.DML.configException
com.renesys.raceway.DML.configException
public static RandomDistribution accessRandomDistribution(ProtocolSession forProtocol,
com.renesys.raceway.DML.Configuration distcfg,
java.lang.String requestName)
public static RandomDistribution accessRandomDistribution(ProtocolSession forProtocol,
java.lang.String distName,
java.lang.String requestName)
import cern.jet.random.*; RandomDistribution rnd = Net.accessRandomDistribution(this, "Uniform", "foo"); ((Uniform)rnd.getImplementation()).setState(0.,1.); // go under the covers for (int x=0; x<12000; x++) next_sample = rnd.nextDouble(); // etc.
public static RandomStream accessRandomStream(ProtocolSession forProtocol,
java.lang.String requestName)
generatorName = "MersenneTwister" stream = "DefaultStream" // root for the initial seed values, via MD5 reproducibility_level = "timeline" usage: RandomStream rng = Net.accessRandomStream(this, "foo"); for (int x=0; x<1000; x++) next_sample = rng.nextDouble();
public static void configTimeline(com.renesys.raceway.SSF.Entity forEntity,
com.renesys.raceway.DML.Configuration cfg)
The default is to omit all "alignment" attributes, resulting in serial (single timeline) execution.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||