- Home Page of ProjectGuideline.com ›
- Forums ›
- Get Help to do your B.E., and M.E., M.Tech., & M.S., Project in Ns2 ›
- how to use $ns create-trace type file src dst op
pangpang
Participant
Hi all,
Can anyone help me in using this command?
Suppose my topology is
s0
\
r1==r2==d0
//
s1
I don’t know where I should put this command in my script.
If I want to get statistics of drops btw link s0 and d0, should I do things like:
set ns [new Simulator]
$ns create-trace Drop file s0 d0
and then the creating nodes, links, sources part?
I think I missed something… also, what should the “file” be?
Thanks for any advice!
CharlesPandian
Keymaster
The correct syntax of “$ns create-trace Drop file s0 d0” would be like the following one :
$ns create-trace Drop $outfile $s0 $d0
Where
$file is the file descriptor ( which we initiated like this : set outfile [open out.dat w]
$s0 is the source node
$d0 is the destination node