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 {} { ...@@ -368,6 +368,7 @@ Simulator instproc run {} {
var_import ::GLOBALS::elabinelab_eid var_import ::GLOBALS::elabinelab_eid
var_import ::GLOBALS::elabinelab_cvstag var_import ::GLOBALS::elabinelab_cvstag
var_import ::GLOBALS::security_level var_import ::GLOBALS::security_level
var_import ::GLOBALS::sourcefile_list
if {$ran == 1} { if {$ran == 1} {
perror "The Simulator 'run' statement can only be run once." perror "The Simulator 'run' statement can only be run once."
...@@ -617,6 +618,10 @@ Simulator instproc run {} { ...@@ -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] ] $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 $self spitxml_finish
} }
...@@ -1223,10 +1228,14 @@ Simulator instproc make_event {outer event} { ...@@ -1223,10 +1228,14 @@ Simulator instproc make_event {outer event} {
set action [lindex $event 2] set action [lindex $event 2]
switch -- $action { switch -- $action {
"pause" {set etype STOP} "stop" {set etype STOP}
"restart" {set etype START} "start" {set etype START}
"kill" {set etype KILL} "kill" {set etype KILL}
"snapshot" {set etype SNAPSHOT} "snapshot" {set etype SNAPSHOT}
unknown {
punsup "at $time $event"
return
}
} }
} }
unknown { unknown {
...@@ -1361,10 +1370,14 @@ Simulator instproc make_event {outer event} { ...@@ -1361,10 +1370,14 @@ Simulator instproc make_event {outer event} {
set action [lindex $event 2] set action [lindex $event 2]
switch -- $action { switch -- $action {
"pause" {set etype STOP} "stop" {set etype STOP}
"restart" {set etype START} "start" {set etype START}
"kill" {set etype KILL} "kill" {set etype KILL}
"snapshot" {set etype SNAPSHOT} "snapshot" {set etype SNAPSHOT}
unknown {
punsup "at $time $event"
return
}
} }
} }
unknown { unknown {
......
...@@ -670,9 +670,9 @@ events. For example, to tell the packet capture processes monitoring ...@@ -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 And of course, you may use the NS "at" syntax to schedule static
events from your NS file: events from your NS file:
<code><pre> <code><pre>
$ns at 10 "$link0 stop" $ns at 10 "$link0 trace stop"
$ns at 20 "$link0 start" $ns at 20 "$link0 trace start"
$ns at 30 "$link0 snapshot"</pre></code> $ns at 30 "$link0 trace snapshot"</pre></code>
<br> <br>
The output files that the capture process create, are stored in 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