LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to put the command in nam window, while executing ns2 code (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-put-the-command-in-nam-window-while-executing-ns2-code-4175525743/)

pon 11-18-2014 03:25 AM

how to put the command in nam window, while executing ns2 code
 
Hi dudes,

i am using ns-2.35 writing code in tcl, in nam window, apart from nodes , i need to display some commands on executing it in nam

i want syntax in tcl how to put commands to be displayed in nam window.
Thanks

Pon

knudfl 11-18-2014 06:41 AM

The "nam animator" displays a "nam trace file"
. http://www.isi.edu/nsnam/nam/
. https://www.google.com/webhp?hl=all&...q=nam+animator

Tcl example :
Code:

.
.
set f [open out.tr w]
$ns trace-all $f
set nf [open out.nam w]
$ns namtrace-all $nf
.
.
.
$ns at 30 "finish"
proc finish {} {
global ns f nf
$ns flush-trace
close $f
close $nf
exec nam out.nam &
exit 0
}

$ns run


pon 11-18-2014 07:05 AM

1 Attachment(s)
in this attached nam window screen shot , below time scale i need some commands to be displayed. i ve seen somewhere but i forget.

knudfl 11-18-2014 08:46 AM

← #1, #3.

I don't know about "adding a command".
You can add a text to nam.

Example http://mohittahiliani.blogspot.in/20...k-in-ns-2.html
. http://www.mediafire.com/view/0f40bf.../blackhole.tcl


-


All times are GMT -5. The time now is 11:33 AM.