Introduce WifiInformationElement methods SerializeIE(),
DeserializeIE(), and DeserializeOptionalIE() (the latter for use when
the IE of interest might not be present), which know how to deal with
the IE as a whole.
Make use of these in mesh subsystem where WifiInformationElement-derived
objects are used.
Also add empty implementation of Print() method of
WifiInformationElement so that IEs that don't care about being
displayed don't need to implement this.
This patch aims to bring the core of the current WifiInformationElement and
WifiInformationElementVector classes into the wifi module, where they can then
enjoy greater use (currently they are in the mesh module and contain
mesh-specific aspects).
The change to consider mandatory rates for control responses if a
suitable basic rate could not be found broke the tests involving the
wireless/wifi-simple-adhoc-grid example, and the
routing-olsr-regression testsuite.
In these cases it is actually the tests that need updating; in the
wifi-simple-adhoc-grid test and the bug780-test part of the
routing-olsr-regression testsuite, 802.11b rates were being used with
the Wi-Fi PHY standard left at the default of 802.11a. The fix here is
to set the standard to 802.11b in the test.
In the tx-regression-test part of routing-olsr-regression, the problem
was that the reference traces needed to be updated given the control
response rate fix. In this case I have also modified the test to set
the standard to 802.11a for clarity.
This changeset modifies the GetControlAnswerMode() method of class
WifiRemoteStationManager to correctly identify rates within the same
modulation class as the received frame, and then adds a search for a
suitable mandatory rate in the case where no suitable (per IEEE Std.
802.11-2007, Section 9.6) basic rate has been found.
I've also taken the opportunity to "tidy" the code up a bit -
primarily through renaming of variables to something more in line with
the nomenclature used in the standard.
Note that this change exposes issues in some of the test and example
code that uses the Wi-Fi models. These issues are addressed in a
following changelist.