Commit 2577ee86 authored by Leigh Stoller's avatar Leigh Stoller

Add tb-elab-in-elab-topology for Mike. If not specified, then an

ElabInElab experiment loads the current elabinelab.ns file from the
lib directory.

Otherwise:

	tb-elab-in-elab-topology withrouter

will load elabinelab-withrouter.ns from the lib directory.
parent bb42d071
......@@ -259,6 +259,7 @@ namespace eval GLOBALS {
# Is an inner elab experiment.
variable elab_in_elab 0
variable elabinelab_topo ""
variable elabinelab_eid {}
variable elabinelab_cvstag {}
......
......@@ -364,6 +364,7 @@ Simulator instproc run {} {
var_import ::GLOBALS::modelnet_cores
var_import ::GLOBALS::modelnet_edges
var_import ::GLOBALS::elab_in_elab
var_import ::GLOBALS::elabinelab_topo
var_import ::GLOBALS::elabinelab_eid
var_import ::GLOBALS::elabinelab_cvstag
var_import ::GLOBALS::security_level
......@@ -374,7 +375,12 @@ Simulator instproc run {} {
}
if {$elab_in_elab && [llength [array names node_list]] == 0} {
uplevel 1 source "@prefix@/lib/ns2ir/elabinelab.ns"
if {$elabinelab_topo == ""} {
set nsfilename "elabinelab.ns"
} else {
set nsfilename "elabinelab-${elabinelab_topo}.ns"
}
uplevel 1 source "@prefix@/lib/ns2ir/${nsfilename}"
}
if {$security_level} {
uplevel 1 source "@prefix@/lib/ns2ir/fw.ns"
......
......@@ -1448,6 +1448,14 @@ proc tb-elab-in-elab {onoff} {
set elab_in_elab 0
}
}
#
# Change the default topography.
#
proc tb-elab-in-elab-topology {topo} {
var_import ::GLOBALS::elabinelab_topo
set elabinelab_topo $topo
}
proc tb-set-inner-elab-eid {eid} {
var_import ::GLOBALS::elabinelab_eid
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment