need help with debugging congestion window tracing issue

79 views
Skip to first unread message

Siddharth

unread,
Jun 8, 2015, 12:41:15 AM6/8/15
to ns-3-...@googlegroups.com
Hello,

I am working on a test script that evaluates TCP protocols in ns-3. I am having difficulties with trying to trace the congestion window where currently I am only able to get a blank file without the required values in the file. I went through some earlier posts and made sure I scheduled the TraceCwnd function after the TCP socket was created. I seem to specifically run problems in the below line where it does not seem to call the CwndTracer function for some reason. 

Line 97: Config::ConnectWithoutContext ("/NodeList/0/$ns3::TcpL4Protocol/SocketList/0/CongestionWindow",MakeBoundCallback (&CwndTracer, stream));
 
Could you please help me with debugging this issue? The code can be found at http://pastebin.com/kwWwvZTf

Thanks,
Siddharth

Tommaso Pecorella

unread,
Jun 8, 2015, 1:55:09 AM6/8/15
to ns-3-...@googlegroups.com
Hi,

I hate to repeat myself.
Sockets are created when the application starts. You're trying to connect to a socket that still doesn't exist.
I don't care if you think that you're "calling" the functions in the right order, what does matter is the simulation time, not the execution order. Please triple check to have understood how time and events work in ns-3.

Have fun,

T.

Siddharth

unread,
Jun 8, 2015, 10:54:13 AM6/8/15
to ns-3-...@googlegroups.com
Hello,

Thanks for the tip. 

Changing the Simulator::Schedule function to call TraceCwnd after the application has started did the trick.

Cheers,
Siddharth
Reply all
Reply to author
Forward
0 new messages