Bugzilla – Bug 487
[contribution] Association and de-association hooks for Wifi
Last modified: 2009-02-24 03:18:24 EST
Created attachment 370 [details] The patch mentioned above. Adds the Assoc and DeAssoc trace sources to NqstaWifiMac The attached patch adds two trace sources, Assoc and DeAssoc (feel free to change the names ;)) to NqstaWifiMac. They are invoked when the station reaches and leaves the ASSOCIATED state. I feel this may be of general utility.
Comment on attachment 370 [details] The patch mentioned above. Adds the Assoc and DeAssoc trace sources to NqstaWifiMac >+void >+NqstaWifiMac::setState(MacState value){ >+ if(value==ASSOCIATED && m_state!=ASSOCIATED) m_assocLogger(GetBssid()); >+ else if(value!=ASSOCIATED && m_state==ASSOCIATED) m_deAssocLogger(GetBssid()); >+ m_state=value; >+} Coding style: setState -> SetState if(x) do to: if (x) { //do } and: void Foo(x){ to: void Foo (x) { //do } All of the above is hopefully documented on http://www.nsnam.org/codingstyle.html Other than that, looks good to me.
Marking assignee. Mathieu, feel free to not comment further if this concludes your input on the matter.
Created attachment 374 [details] Patch, second version This patch should be (more) compliant with the ns-3 coding style.
It would be really helpful if you could try to follow the coding style. Anyway, changeset: a21c19c4cd81