Bug 487 - [contribution] Association and de-association hooks for Wifi
: [contribution] Association and de-association hooks for Wifi
Status: RESOLVED FIXED
: ns-3
wifi
: pre-release
: All All
: P5 normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2009-02-05 03:50 EDT by
Modified: 2009-02-24 03:18 EDT (History)


Attachments
The patch mentioned above. Adds the Assoc and DeAssoc trace sources to NqstaWifiMac (4.67 KB, patch)
2009-02-05 03:50 EDT, Francesco Malandrino
Details | Diff
Patch, second version (3.90 KB, patch)
2009-02-10 13:56 EDT, Francesco Malandrino
Details | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2009-02-05 03:50:21 EDT
Created an attachment (id=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 #1 From 2009-02-05 04:10:35 EDT -------
(From update of attachment 370 [details])
>+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.
------- Comment #2 From 2009-02-10 11:50:40 EDT -------
Marking assignee.  Mathieu, feel free to not comment further if this concludes
your input on the matter.
------- Comment #3 From 2009-02-10 13:56:18 EDT -------
Created an attachment (id=374) [details]
Patch, second version

This patch should be (more) compliant with the ns-3 coding style.
------- Comment #4 From 2009-02-24 03:18:24 EDT -------
It would be really helpful if you could try to follow the coding style.

Anyway, changeset: a21c19c4cd81