PacketSink trace doesn't work

278 views
Skip to first unread message

Changsik Lee

unread,
Apr 8, 2014, 11:31:19 AM4/8/14
to ns-3-...@googlegroups.com
Hi, all

I'm quite new to NS-3 and testing packet sink trace.

In my source code, I want to callback 'Rx', which is provided by packet-sink.cc,

whenever packet is received.

However, I can't find any output result regarding the packet sink trace.

I really don't have any idea how to solve this problem..

help me plz.

I'm attaching my code here.

any comment will be welcomed.

thank you!


chang2.cc

Konstantinos

unread,
Apr 8, 2014, 12:07:44 PM4/8/14
to ns-3-...@googlegroups.com
The trace path you use is not correct.

Change this 
Config::ConnectWithoutContext("/NodeList/*/$ns3::PacketSink/Rx", MakeCallback(&Rx));

to

Config::ConnectWithoutContext("/NodeList/*/ApplicationList/*/$ns3::PacketSink/Rx", MakeCallback(&Rx));

You can find the correct path for each class from the API.
http://www.nsnam.org/doxygen/classns3_1_1_packet_sink.html

Config Paths

ns3::PacketSink is accessible through the following paths with Config::Set and Config::Connect:

  • /NodeList/[i]/ApplicationList/[i]/$ns3::PacketSink

이창식

unread,
Apr 8, 2014, 12:25:41 PM4/8/14
to ns-3-...@googlegroups.com

Thank you for replying
I tried your advice,
but there's no output result, yet.
Is there another problem?

2014. 4. 9. 오전 1:07에 "Konstantinos" <dinos.k...@gmail.com>님이 작성:
--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages