Bugzilla – Full Text Bug Listing |
Summary: | [contribution] Association and de-association hooks for Wifi | ||
---|---|---|---|
Product: | ns-3 | Reporter: | Francesco Malandrino <francesco.malandrino> |
Component: | wifi | Assignee: | Mathieu Lacage <mathieu.lacage> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | francesco.malandrino |
Priority: | P5 | ||
Version: | pre-release | ||
Hardware: | All | ||
OS: | All | ||
Attachments: |
The patch mentioned above. Adds the Assoc and DeAssoc trace sources to NqstaWifiMac
Patch, second version |
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 |
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.