NS-3.28 main-attribute-value.cc example outdated

639 views
Skip to first unread message

Aaron Burnie

unread,
Aug 4, 2018, 10:02:38 PM8/4/18
to ns-3-users
Hello,

While working through the NS-3 manual (completely new user) to understand how everything works I came across an issue with "main-attribute-value.cc" within the directory /ns-3.28/src/point-to-point/examples
Not sure on the history but I believe some queue attribute names have changed from older to newer versions which is creating runtime errors.

Error:
msg="Could not set default value for ns3::DropTailQueue<Packet>::MaxPackets", file=../src/core/model/config.cc, line=787

First lines of code creating the issue:
 Config::SetDefault ("ns3::DropTailQueue<Packet>::MaxPackets", StringValue ("80"));
 Config::SetDefault ("ns3::DropTailQueue<Packet>::MaxPackets", UintegerValue (80));

Solution:
Using the reference below, change the example file such that it uses current attributes.
Config::SetDefault ("ns3::QueueBase::MaxSize", StringValue ("80p"));

I have also attached the updated example file.

Furthermore, section "Defining Attributes" within the NS-3 manual needs updating to reflect the changes. 

main-attribute-value.cc

Tom Henderson

unread,
Aug 5, 2018, 8:16:27 PM8/5/18
to ns-3-...@googlegroups.com
Hi Aaron, thanks for bringing this to our attention.  Stefano has already updated this example program a couple of months ago in ns-3-dev, but I agree that it is outdated in the ns-3.28 release (I plan to make a small minor release to fix this and other issues).  I updated the documentation on both our ns-3-dev and ns-3.28 branches today, and the updated ns-3.28 documentation is on the website.

- Tom

Aaron Burnie

unread,
Aug 6, 2018, 8:06:35 AM8/6/18
to ns-3-users
Thanks for the speedy reply and glad I could provide a small amount of feedback.
Aaron 
Reply all
Reply to author
Forward
0 new messages