[Ns-developers] Documentation on Tracing needs a change
craigdo@ee.washington.edu
craigdo at ee.washington.edu
Thu Mar 4 10:56:48 PST 2010
Hi,
The first documentation you mention is correct for the current version of
ns-3-dev, but the tracing documentation was missing the declaration of
"ascii". It should have been,
AsciiTraceHelper ascii;
pointToPoint.EnableAsciiAll (ascii.CreateFileStream ("myfirst.tr"));
I just fixed the tutorial to reflect this.
I have no idea how your "correct" version below could possibly work. As far
as I know, there has never been a PointToPointHelper method with a signature
like,
pointToPoint.EnableAsciiAll (ascii);
Perhaps you are using an older version of ns-3 (than last month's ns-3-dev)
and really meant to type,
#include <iostream>
std::ofstream ascii;
ascii.open ("csma-broadcast.tr", std::ios_base::binary |
std::ios_base::out);
PointToPointHelper::EnableAsciiAll (ascii);
Note the differences in the last line. If you are using an older version of
ns-3 (for example, ns-3.7), you should really be using the version of the
tutorial that works with that version of ns-3. The tutorial for ns-3.7
(that can be found on www.nsnam.org) tells you to add these lines of code,
which should work just fine:
std::ofstream ascii;
ascii.open ("myfirst.tr");
PointToPointHelper::EnableAsciiAll (ascii);
Again, note the last line.
This change is relatively new, so I see how you could get messed up if you
downloaded your ns-3-dev before the tracing change was pushed and then began
working on the (new) tutorial afterwards. But ns-3-dev is the development
branch, so you have to expect such things. If this is the case, and you
pull the latest ns-3-dev, you will see the code and tutorial back in sync.
By the way, ns-3-reviews is probably not the best place to post this kind of
message. If you think you've found a bug, even a documentation bug, you
should either file the bug in www.nsnam.org/bugzilla or ask about it on
ns-3-users at googlegroups.com or if you are ready for more dense info, on
ns-developers at isi.edu, I think.
-- Craig
> -----Original Message-----
> From: ns-3-reviews at googlegroups.com [mailto:ns-3-
> reviews at googlegroups.com] On Behalf Of ankush
> Sent: Wednesday, March 03, 2010 11:06 PM
> To: ns-3-reviews
> Subject: Documentation on Tracing needs a change
>
> In the documentation on tracing 5.3.1 ASCII Tracing
>
> the addition of line
>
> pointToPoint.EnableAsciiAll (ascii.CreateFileStream ("myfirst.tr"));
>
> and then
>
> ./waf --run scratch/myfirst
>
>
> was generating error
>
> the correct version that worked and generated the file is
>
> #include <iostream>
> std::ofstream ascii;
> ascii.open ("csma-broadcast.tr", std::ios_base::binary |
> std::ios_base::out);
> pointToPoint.EnableAsciiAll (ascii);
>
> --
> You received this message because you are subscribed to the Google
> Groups "ns-3-reviews" group.
> To post to this group, send email to ns-3-reviews at googlegroups.com.
> To unsubscribe from this group, send email to ns-3-
> reviews+unsubscribe at googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/ns-3-reviews?hl=en.
More information about the Ns-developers
mailing list