Commit e797aaf2 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Fix up linktrace event parsing and documentation so that they are in sync

parent 37a8e824
......@@ -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}
"restart" {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}
"restart" {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 {
......
......@@ -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
......
Supports Markdown
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