[ns] Questions about recording variables
Esteban Viso
esteban.viso at gmail.com
Mon Apr 18 00:35:18 PDT 2005
Hello Michal,
I think that a good way to recording variables is written in Marc
Greis', section VIII.2. Try it and think if it is what you are looking
for. Although, if you tried to save these data into a file, it could
be fine to write an AWK script which filter those lines containing hop
information. I think this script will be easy to write because in each
line in a trace file (nam trace file) you have information about the
source and destination node. If you need help to do this, please send
me an email and I'll help if I be able to :D
Best regards,
Esteban Viso
>
> Message: 12
> Date: Sun, 17 Apr 2005 11:28:06 +0200
> From: Michal Behrendt <michal.behrendt at xl.wp.pl>
> Subject: [ns] Questions about recording variables
> To: ns-users at ISI.EDU
> Message-ID: <200504171128.06746.michal.behrendt at xl.wp.pl>
> Content-Type: text/plain; charset="us-ascii"
>
> Hello
>
> I am searching mailing list but I can't find the solution of my problem
> I would like to count hops number received by the node (in ad-hoc) . I have
> read that in packet common header there is a variable called num_forwads. Ok
> - it;s fine
> but I can't display it in trace file - I am beginner. How can I do that. I
> have tried the method
> set $hops [open hops.tr w]
> $ns trace num_forwards $hops
> but this is wrong. I have no idea - how can I display c++ variable via TCL ??
> I have also read that I can trace ttl in trace file (and in my simulation I am
> using this method) but I am not sure this is a good method
> Second question:
> I would like to count route finding time (difference between request and reply
> message) - I know it is posiible to do this via trace file but writing awk
> script for this is too hard for me. Is there any other posiibility.Maybe
> there is a C++ variable ?
>
> Thank you
>
> ------------------------------
More information about the Ns-users
mailing list