Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
e797aaf2
Commit
e797aaf2
authored
Dec 06, 2005
by
Leigh B. Stoller
Browse files
Fix up linktrace event parsing and documentation so that they are in sync
parent
37a8e824
Changes
2
Show whitespace changes
Inline
Side-by-side
tbsetup/ns2ir/sim.tcl.in
View file @
e797aaf2
...
...
@@ -368,6 +368,7 @@ Simulator instproc run {} {
var_import ::GLOBALS::elabinelab_eid
var_import ::GLOBALS::elabinelab_cvstag
var_import ::GLOBALS::security_level
var_import ::GLOBALS::sourcefile_list
if
{
$ran
== 1
}
{
perror
"The Simulator 'run' statement can only be run once."
...
...
@@ -617,6 +618,10 @@ Simulator instproc run {} {
$self
spitxml_data
"eventlist"
[
list
"time"
"vnode"
"vname"
"objecttype"
"eventtype"
"arguments"
"atstring"
]
[
list
[
lindex $event 0
]
[
lindex $event 1
]
[
lindex $event 2
]
$objtypes
([
lindex $event 3
])
$eventtypes
([
lindex $event 4
])
[
lindex $event 5
]
[
lindex $event 6
]
]
}
foreach sourcefile $sourcefile_list
{
$self
spitxml_data
"external_sourcefiles"
[
list
"pathname"
]
[
list $sourcefile
]
}
$self spitxml_finish
}
...
...
@@ -1223,10 +1228,14 @@ Simulator instproc make_event {outer event} {
set action
[
lindex $event 2
]
switch -- $action
{
"
pause
"
{
set etype STOP
}
"
re
start"
{
set etype START
}
"
stop
"
{
set etype STOP
}
"start"
{
set etype START
}
"kill"
{
set etype KILL
}
"snapshot"
{
set etype SNAPSHOT
}
unknown
{
punsup
"at
$time
$event
"
return
}
}
}
unknown
{
...
...
@@ -1361,10 +1370,14 @@ Simulator instproc make_event {outer event} {
set action
[
lindex $event 2
]
switch -- $action
{
"
pause
"
{
set etype STOP
}
"
re
start"
{
set etype START
}
"
stop
"
{
set etype STOP
}
"start"
{
set etype START
}
"kill"
{
set etype KILL
}
"snapshot"
{
set etype SNAPSHOT
}
unknown
{
punsup
"at
$time
$event
"
return
}
}
}
unknown
{
...
...
www/tutorial/advanced.html
View file @
e797aaf2
...
...
@@ -670,9 +670,9 @@ events. For example, to tell the packet capture processes monitoring
And of course, you may use the NS "at" syntax to schedule static
events from your NS file:
<code><pre>
$ns at 10 "$link0 stop"
$ns at 20 "$link0 start"
$ns at 30 "$link0 snapshot"
</pre></code>
$ns at 10 "$link0
trace
stop"
$ns at 20 "$link0
trace
start"
$ns at 30 "$link0
trace
snapshot"
</pre></code>
<br>
The output files that the capture process create, are stored in
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment