Bug 941

Summary: Wifi Dcf attributes not reachable through configuration namespace
Product: ns-3 Reporter: Tom Henderson <tomh>
Component: wifiAssignee: Nicola Baldo <nicola>
Status: RESOLVED FIXED    
Severity: normal CC: c.facchini, ns-bugs
Priority: P3    
Version: pre-release   
Hardware: All   
OS: All   
Bug Depends on: 962    
Bug Blocks:    
Attachments: test case
configuration output via ConfigStore
test case with proposed path

Description Tom Henderson 2010-06-13 09:36:33 EDT
Created attachment 917 [details]
test case

Reported here:
http://groups.google.com/group/ns-3-users/browse_thread/thread/ce1c3b8db5cd2d44

I confirmed this on a Fedora 12 machine, with the attached test program and config output.
Comment 1 Tom Henderson 2010-06-13 09:37:11 EDT
Created attachment 918 [details]
configuration output via ConfigStore
Comment 2 Nicola Baldo 2010-06-22 21:31:14 EDT
One problem is that the default values set using the attribute system are overridden in WifiMac::ConfigureDcf(). This is needed since different ACs have different default values for Dcf parameters. I don't have a clear idea of how this could be fixed... any suggestion?

Another problem is that there is not always a single Dcf for a single WifiMac (e.g., QstaWifiMac has 4 Dcf instances, one per AC). That's why currently we have no path to reach a Dcf instance.
Comment 3 Christian 2010-07-02 12:18:07 EDT
It is true that the initial configuration is overridden by WifiMac::ConfigureDcf (); however, CWmin (and attributes alike) _can_ be set to other values.

The problem was the path. Compare the non correct one:
/NodeList/0/DeviceList/0/Mac/Dcf/MinCw
with the right one:
/NodeList/0/DeviceList/0/Mac/DcaTxop/CwMin

(The leaf node differs because of the different Setter).

In summary, I'd propose to mark this bug as resolved.

Reference:
http://groups.google.com/group/ns-3-users/browse_thread/thread/ce1c3b8db5cd2d44/#9c17a156815dcd83
Comment 4 Nicola Baldo 2010-08-03 05:17:35 EDT
Created attachment 964 [details]
test case with proposed path

I am not sure it works. Even with the proposed path I cannot reach the MinCw attribute (see updated test case). I get the impression that in your case it works because you added a custom "CWmin" attribute. I think we should make the existing MinCw attribute reachable.
Comment 5 Christian 2010-08-03 08:56:36 EDT
(In reply to comment #4)
> I am not sure it works. Even with the proposed path I cannot reach the MinCw
> attribute (see updated test case). I get the impression that in your case it
> works because you added a custom "CWmin" attribute. I think we should make the
> existing MinCw attribute reachable.
I think you are right.

On the other hand, what about moving all three Attributes that are currently listed in the Dcf class to the DcaTxop class?
My question is based on the observation that there are setters and getters for all the variables in DcaTxop.
Comment 6 Nicola Baldo 2010-08-03 12:01:38 EDT
I found the problem, it is that the DcaTxop Object was not inheriting from the Dcf Object, and so the attributes of Dcf were not reachable from DcaTxop.

Note that using SetParent<Dcf> () doesn't work, because of a name clash with DcaTxop::Dcf (which is different than the Dcf defined in dcf.h).
Comment 7 Nicola Baldo 2010-08-03 12:03:07 EDT
changeset:   6477:55e4c70ff299