Bug 1959

Summary: Config::Paths are not parsed correctly
Product: ns-3 Reporter: Matthias <donutcop>
Component: coreAssignee: Tom Henderson <tomh>
Status: RESOLVED DUPLICATE    
Severity: normal CC: alexander.afanasyev, ns-bugs, tomh
Priority: P5    
Version: ns-3.20   
Hardware: All   
OS: All   
See Also: https://www.nsnam.org/bugzilla/show_bug.cgi?id=1673
Attachments: patch for parsing config path correctly

Description Matthias 2014-08-01 10:10:38 EDT
Created attachment 1860 [details]
patch for parsing config path correctly

I was wondering, why there is no way to connect to the "DcaTxop" - Queue of the RegularWifiMac instance using the attribute API. To find this right instance according to a config-path the Resolver-Function looks up the TypeId for the current Object and compares its AttributeNames with the one searched one.

There is a __crucial__ design flaw, that the attributes from its parent class are not considered!

The solution is simple to go upwards the parent tree, if the searched attribute is not found for the current TypeId. This solves the bug 1090 as well.

I attached a patch for config.cc to solve this problem.
Comment 1 Tom Henderson 2014-08-01 10:18:39 EDT
This is a duplicate of bug 1673 (also a patch pending there).

Mathieu, can you please review and commit one of these, or ask me to do it?
Comment 2 Mathieu Lacage 2014-08-01 13:09:57 EDT
I have reviewed both patches: both are equivalent and look similar. Feel free to commit.

Sorry for the horrendously late review.
Comment 3 Tom Henderson 2014-08-04 01:54:53 EDT
Neither patch has a test case.  If someone (Alex or Matthias) wants to write a test case for this to add to config-test-suite.cc, feel free to extend the patch with the test and I'll apply the first such modified patch.

Else I'll pick one of the two next week and write the test case.
Comment 4 Tom Henderson 2014-09-12 20:46:14 EDT
thanks for reporting this; sorry it wasn't patched sooner.

*** This bug has been marked as a duplicate of bug 1673 ***