|
||||||||||
| 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. |
private java.util.Vector |
finalizers
|
static long |
frequency
Static clock frequency that all simulation components should use for reference, for consistency. |
protected static java.lang.String |
generatorName
|
private long |
hct
|
java.util.Hashtable |
hosts
Table mapping NHI addresses (Strings) to Router/Host instances. |
private long |
lhct
|
double |
RunTime
|
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
|
private static java.util.Hashtable |
timelineMap
|
| Fields inherited from class com.renesys.raceway.SSF.Entity |
|
| Constructor Summary | |
Net()
|
|
| Method Summary | |
static SSF.Util.Random.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 SSF.Util.Random.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 SSF.Util.Random.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. |
private void |
config_new_link(link L,
com.renesys.raceway.DML.Configuration lcfg,
java.lang.String default_timeline)
|
private void |
config_new_router_or_host(Host H,
com.renesys.raceway.DML.Configuration hcfg,
java.lang.String default_timeline)
|
void |
config(com.renesys.raceway.DML.Configuration cfg)
Configure a network model. |
private void |
configHostsRouters(com.renesys.raceway.DML.Configuration cfg)
Configure the hosts and routers within the network. |
private void |
configHostsRouters(com.renesys.raceway.DML.Configuration cfg,
java.lang.String in_nhi,
java.lang.String default_timeline)
|
private void |
configLinks(com.renesys.raceway.DML.Configuration cfg)
|
private void |
configLinks(com.renesys.raceway.DML.Configuration cfg,
java.lang.String in_nhi,
java.lang.String default_timeline)
|
void |
configRandomStreams(com.renesys.raceway.DML.Configuration cfg)
|
private void |
configStaticRoutes()
|
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. |
private static void |
configTimeline(com.renesys.raceway.SSF.Entity forEntity,
java.lang.String alignspec)
|
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. |
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, resumeAll, startAll, startAll, startClient, startClient, startServer, W, Z |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public double RunTime
public static long frequency
public cidrBlock cidrMap
private java.util.Vector finalizers
public java.util.Hashtable hosts
private long hct
private long lhct
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
private static java.util.Hashtable timelineMap
| 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]
[-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 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 SSF.Util.Random.RandomDistribution accessRandomDistribution(ProtocolSession forProtocol,
com.renesys.raceway.DML.Configuration distcfg,
java.lang.String requestName)
public static SSF.Util.Random.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 SSF.Util.Random.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();
private void configHostsRouters(com.renesys.raceway.DML.Configuration cfg)
throws com.renesys.raceway.DML.configException
com.renesys.raceway.DML.configException
private void configHostsRouters(com.renesys.raceway.DML.Configuration cfg,
java.lang.String in_nhi,
java.lang.String default_timeline)
throws com.renesys.raceway.DML.configException
com.renesys.raceway.DML.configException
private void config_new_router_or_host(Host H,
com.renesys.raceway.DML.Configuration hcfg,
java.lang.String default_timeline)
throws com.renesys.raceway.DML.configException
com.renesys.raceway.DML.configException
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.
private static void configTimeline(com.renesys.raceway.SSF.Entity forEntity,
java.lang.String alignspec)
private void configLinks(com.renesys.raceway.DML.Configuration cfg)
throws com.renesys.raceway.DML.configException
com.renesys.raceway.DML.configException
private void configLinks(com.renesys.raceway.DML.Configuration cfg,
java.lang.String in_nhi,
java.lang.String default_timeline)
throws com.renesys.raceway.DML.configException
com.renesys.raceway.DML.configException
private void config_new_link(link L,
com.renesys.raceway.DML.Configuration lcfg,
java.lang.String default_timeline)
throws com.renesys.raceway.DML.configException
com.renesys.raceway.DML.configException
private void configStaticRoutes()
throws com.renesys.raceway.DML.configException
com.renesys.raceway.DML.configException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||