[Ns-developers] DelayBox - ns-3
Mathieu Lacage
mathieu.lacage at sophia.inria.fr
Thu Apr 17 12:21:48 PDT 2008
On Thu, 2008-04-17 at 14:43 -0400, Matt Crinklaw wrote:
> > Application writers are not responsible for doing the connection. They
> > just have to record their trace source in their TypeId in
> > MyApplication::GetTypeId: the code in src/core/config.cc will take care
> > of doing the connection for them.
> >
>
> So I defined my application, created a trace source, and added the
> static GetTypeId function along with an accessor for the trace source.
> But when I use Config to connect a callback to the trace source and
> then run the program, my callback is never invoked.
>
> There is nothing in the doxygen docs or tutorial about the Config
> class yet. Anyhow, based on your previous email and the outdated docs
> on tracing (http://www.nsnam.org/doxygen/group__tracing.html) I tried
> connecting to my source with:
> Config::Connect ("/NodeList/*/ApplicationList/*/TxPacket",
> MakeBoundCallback (&TaggingSink, flowid));
>
> where my source is indeed defined as TxPacket:
> ...
> static TypeId tid = TypeId ("ns3::DelayBoxApplication")
> .SetParent<Application> ()
> .AddConstructor<DelayBoxApplication> ()
> .AddTraceSource ("TxPacket", "generate and send a packet down to socket",
> MakeTraceSourceAccessor (&DelayBoxApplication::m_txPacket))
> ;
> ...
Yep. These are outdated docs. The documentation generated in the
ns-3-doc branch does generate a full list of all trace paths but, it has
not been merged yet. So, In the meantime, the following should work:
/NodeList/nodeid/ApplicationList/appid/TxPacket
Hopefully, the next release due in a couple of weeks will document that
and the trace connection process will also have some means of reporting
what it is doing. I am sorry that this is painful for now :/
regards,
Mathieu
More information about the Ns-developers
mailing list