The Reduced Neighbor Report element. More...
#include "reduced-neighbor-report.h"
Classes | |
struct | MldParameters |
MLD Parameters subfield. More... | |
struct | NeighborApInformation |
Neighbor AP information field. More... | |
struct | TbttInformation |
TBTT Information field. More... | |
struct | TbttInformationHeader |
TBTT Information Header subfield. More... | |
Public Member Functions | |
ReducedNeighborReport () | |
void | AddNbrApInfoField () |
Add a Neighbor AP Information field. | |
void | AddTbttInformationField (std::size_t nbrApInfoId) |
Add a TBTT Information fields to the TBTT Information Set field of the given Neighbor AP Information field. | |
uint16_t | DeserializeInformationField (Buffer::Iterator start, uint16_t length) override |
Deserialize information (i.e., the body of the IE, not including the Element ID and length octets) | |
WifiInformationElementId | ElementId () const override |
Get the wifi information element ID. | |
Mac48Address | GetBssid (std::size_t nbrApInfoId, std::size_t index) const |
Get the BSSID field (must be present) in the i-th TBTT Information field of the given Neighbor AP Information field. | |
uint8_t | GetBssParameters (std::size_t nbrApInfoId, std::size_t index) const |
Get the BSS Parameters field (must be present) in the i-th TBTT Information field of the given Neighbor AP Information field. | |
uint16_t | GetInformationFieldSize () const override |
Length of serialized information (i.e., the length of the body of the IE, not including the Element ID and length octets. | |
const MldParameters & | GetMldParameters (std::size_t nbrApInfoId, std::size_t index) const |
Get the MLD Parameters subfield (must be present) in the i-th TBTT Information field of the given Neighbor AP Information field. | |
std::size_t | GetNNbrApInfoFields () const |
Get the number of Neighbor AP Information fields. | |
std::size_t | GetNTbttInformationFields (std::size_t nbrApInfoId) const |
Get the number of TBTT Information fields included in the TBTT Information Set field of the given Neighbor AP Information field. | |
WifiPhyOperatingChannel | GetOperatingChannel (std::size_t nbrApInfoId) const |
Get the operating channel coded into the Operating Class and the Channel Number fields of the given Neighbor AP Information field. | |
uint8_t | GetPsd20MHz (std::size_t nbrApInfoId, std::size_t index) const |
Get the 20 MHz PSD field (must be present) in the i-th TBTT Information field of the given Neighbor AP Information field. | |
uint32_t | GetShortSsid (std::size_t nbrApInfoId, std::size_t index) const |
Get the Short SSID field (must be present) in the i-th TBTT Information field of the given Neighbor AP Information field. | |
bool | HasBssid (std::size_t nbrApInfoId) const |
Return true if the BSSID field is present in all the TBTT Information fields of the given Neighbor AP Information field. | |
bool | HasBssParameters (std::size_t nbrApInfoId) const |
Return true if the BSS Parameters field is present in all the TBTT Information fields of the given Neighbor AP Information field. | |
bool | HasMldParameters (std::size_t nbrApInfoId) const |
Return true if the MLD Parameters subfield is present in all the TBTT Information fields of the given Neighbor AP Information field. | |
bool | HasPsd20MHz (std::size_t nbrApInfoId) const |
Return true if the 20 MHz PSD field is present in all the TBTT Information fields of the given Neighbor AP Information field. | |
bool | HasShortSsid (std::size_t nbrApInfoId) const |
Return true if the Short SSID field is present in all the TBTT Information fields of the given Neighbor AP Information field. | |
void | SerializeInformationField (Buffer::Iterator start) const override |
Serialize information (i.e., the body of the IE, not including the Element ID and length octets) | |
void | SetBssid (std::size_t nbrApInfoId, std::size_t index, Mac48Address bssid) |
Set the BSSID field of the i-th TBTT Information field of the given Neighbor AP Information field. | |
void | SetBssParameters (std::size_t nbrApInfoId, std::size_t index, uint8_t bssParameters) |
Set the BSS Parameters field of the i-th TBTT Information field of the given Neighbor AP Information field. | |
void | SetMldParameters (std::size_t nbrApInfoId, std::size_t index, const MldParameters &mldParams) |
Set the MLD Parameters subfield of the i-th TBTT Information field of the given Neighbor AP Information field. | |
void | SetOperatingChannel (std::size_t nbrApInfoId, const WifiPhyOperatingChannel &channel) |
Set the Operating Class and the Channel Number fields of the given Neighbor AP Information field based on the given operating channel. | |
void | SetPsd20MHz (std::size_t nbrApInfoId, std::size_t index, uint8_t psd20MHz) |
Set the 20 MHz PSD field of the i-th TBTT Information field of the given Neighbor AP Information field. | |
void | SetShortSsid (std::size_t nbrApInfoId, std::size_t index, uint32_t shortSsid) |
Set the Short SSID field of the i-th TBTT Information field of the given Neighbor AP Information field. | |
Public Member Functions inherited from ns3::WifiInformationElement | |
virtual | ~WifiInformationElement () |
Buffer::Iterator | Deserialize (Buffer::Iterator i) |
Deserialize entire IE (which may possibly be fragmented into multiple elements), which must be present. | |
Buffer::Iterator | DeserializeIfPresent (Buffer::Iterator i) |
Deserialize entire IE (which may possibly be fragmented into multiple elements) if it is present. | |
virtual WifiInformationElementId | ElementIdExt () const |
Get the wifi information element ID extension. | |
uint16_t | GetSerializedSize () const |
Get the size of the serialized IE including Element ID and length fields (for every element this IE is possibly fragmented into). | |
virtual bool | operator== (const WifiInformationElement &a) const |
Compare two IEs for equality by ID & Length, and then through memcmp of serialised version. | |
virtual void | Print (std::ostream &os) const |
Generate human-readable form of IE. | |
Buffer::Iterator | Serialize (Buffer::Iterator i) const |
Serialize entire IE including Element ID and length fields. | |
Public Member Functions inherited from ns3::SimpleRefCount< WifiInformationElement > | |
SimpleRefCount () | |
Default constructor. | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. | |
uint32_t | GetReferenceCount () const |
Get the reference count of the object. | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
Assignment operator. | |
void | Ref () const |
Increment the reference count. | |
void | Unref () const |
Decrement the reference count. | |
Private Member Functions | |
uint8_t | ReadTbttInformationCount (std::size_t nbrApInfoId) const |
Get the TBTT Information Count field of the given Neighbor AP Information field. | |
void | ReadTbttInformationLength (std::size_t nbrApInfoId) |
Use the TBTT Information Length field of the given Neighbor AP Information field to set the xxxPresent flags of the NeighborApInformation struct. | |
void | WriteTbttInformationCount (std::size_t nbrApInfoId) const |
Set the TBTT Information Count field of the given Neighbor AP Information field based on the size of the tbttInformationSet field. | |
void | WriteTbttInformationLength (std::size_t nbrApInfoId) const |
Set the TBTT Information Length field of the given Neighbor AP Information field based on the xxxPresent flags of the NeighborApInformation struct. | |
Private Attributes | |
std::vector< NeighborApInformation > | m_nbrApInfoFields |
one or more Neighbor AP Information fields | |
The Reduced Neighbor Report element.
This class knows how to serialise and deserialise the Reduced Neighbor Report element.
Definition at line 29 of file reduced-neighbor-report.h.
ns3::ReducedNeighborReport::ReducedNeighborReport | ( | ) |
Definition at line 22 of file reduced-neighbor-report.cc.
void ns3::ReducedNeighborReport::AddNbrApInfoField | ( | ) |
Add a Neighbor AP Information field.
Definition at line 39 of file reduced-neighbor-report.cc.
References m_nbrApInfoFields.
Referenced by GetRnrLinkInfoTest::DoRun(), ns3::ApWifiMac::GetReducedNeighborReport(), and ReducedNeighborReportTest::GetReducedNeighborReport().
void ns3::ReducedNeighborReport::AddTbttInformationField | ( | std::size_t | nbrApInfoId | ) |
Add a TBTT Information fields to the TBTT Information Set field of the given Neighbor AP Information field.
nbrApInfoId | identifier of the given Neighbor AP Information field |
Definition at line 343 of file reduced-neighbor-report.cc.
References NS_ASSERT.
Referenced by GetRnrLinkInfoTest::DoRun(), ns3::ApWifiMac::GetReducedNeighborReport(), and ReducedNeighborReportTest::GetReducedNeighborReport().
|
overridevirtual |
Deserialize information (i.e., the body of the IE, not including the Element ID and length octets)
start | an iterator which points to where the information should be written. |
length | the expected number of bytes to read |
Implements ns3::WifiInformationElement.
Definition at line 663 of file reduced-neighbor-report.cc.
References ns3::ReadFrom(), ns3::Buffer::Iterator::ReadLsbtohU16(), ns3::Buffer::Iterator::ReadLsbtohU32(), and ns3::Buffer::Iterator::ReadU8().
|
overridevirtual |
Get the wifi information element ID.
Implements ns3::WifiInformationElement.
Definition at line 27 of file reduced-neighbor-report.cc.
References IE_REDUCED_NEIGHBOR_REPORT.
Mac48Address ns3::ReducedNeighborReport::GetBssid | ( | std::size_t | nbrApInfoId, |
std::size_t | index ) const |
Get the BSSID field (must be present) in the i-th TBTT Information field of the given Neighbor AP Information field.
nbrApInfoId | identifier of the given Neighbor AP Information field |
index | the index of the given TBTT Information field |
Definition at line 426 of file reduced-neighbor-report.cc.
References NS_ASSERT.
uint8_t ns3::ReducedNeighborReport::GetBssParameters | ( | std::size_t | nbrApInfoId, |
std::size_t | index ) const |
Get the BSS Parameters field (must be present) in the i-th TBTT Information field of the given Neighbor AP Information field.
nbrApInfoId | identifier of the given Neighbor AP Information field |
index | the index of the given TBTT Information field |
Definition at line 484 of file reduced-neighbor-report.cc.
References NS_ASSERT.
|
overridevirtual |
Length of serialized information (i.e., the length of the body of the IE, not including the Element ID and length octets.
This is the value that will appear in the second octet of the entire IE - the length field - if the IE is not fragmented)
Implements ns3::WifiInformationElement.
Definition at line 571 of file reduced-neighbor-report.cc.
const ReducedNeighborReport::MldParameters & ns3::ReducedNeighborReport::GetMldParameters | ( | std::size_t | nbrApInfoId, |
std::size_t | index ) const |
Get the MLD Parameters subfield (must be present) in the i-th TBTT Information field of the given Neighbor AP Information field.
nbrApInfoId | identifier of the given Neighbor AP Information field |
index | the index of the given TBTT Information field |
Definition at line 543 of file reduced-neighbor-report.cc.
References NS_ASSERT.
Referenced by ns3::WifiAssocManager::GetNextAffiliatedAp().
std::size_t ns3::ReducedNeighborReport::GetNNbrApInfoFields | ( | ) | const |
Get the number of Neighbor AP Information fields.
Definition at line 33 of file reduced-neighbor-report.cc.
References m_nbrApInfoFields.
Referenced by GetRnrLinkInfoTest::DoRun(), ns3::WifiAssocManager::GetNextAffiliatedAp(), ns3::ApWifiMac::GetReducedNeighborReport(), and ReducedNeighborReportTest::GetReducedNeighborReport().
std::size_t ns3::ReducedNeighborReport::GetNTbttInformationFields | ( | std::size_t | nbrApInfoId | ) | const |
Get the number of TBTT Information fields included in the TBTT Information Set field of the given Neighbor AP Information field.
nbrApInfoId | identifier of the given Neighbor AP Information field |
Definition at line 336 of file reduced-neighbor-report.cc.
References NS_ASSERT.
Referenced by GetRnrLinkInfoTest::DoRun(), and ns3::WifiAssocManager::GetNextAffiliatedAp().
WifiPhyOperatingChannel ns3::ReducedNeighborReport::GetOperatingChannel | ( | std::size_t | nbrApInfoId | ) | const |
Get the operating channel coded into the Operating Class and the Channel Number fields of the given Neighbor AP Information field.
nbrApInfoId | identifier of the given Neighbor AP Information field |
Definition at line 188 of file reduced-neighbor-report.cc.
References ns3::WifiPhyOperatingChannel::m_frequencyChannels, m_nbrApInfoFields, NS_ABORT_IF, NS_ABORT_MSG, NS_ASSERT, ns3::OFDM, ns3::WIFI_PHY_BAND_2_4GHZ, ns3::WIFI_PHY_BAND_5GHZ, ns3::WIFI_PHY_BAND_6GHZ, and ns3::WIFI_PHY_BAND_UNSPECIFIED.
uint8_t ns3::ReducedNeighborReport::GetPsd20MHz | ( | std::size_t | nbrApInfoId, |
std::size_t | index ) const |
Get the 20 MHz PSD field (must be present) in the i-th TBTT Information field of the given Neighbor AP Information field.
nbrApInfoId | identifier of the given Neighbor AP Information field |
index | the index of the given TBTT Information field |
Definition at line 512 of file reduced-neighbor-report.cc.
References NS_ASSERT.
uint32_t ns3::ReducedNeighborReport::GetShortSsid | ( | std::size_t | nbrApInfoId, |
std::size_t | index ) const |
Get the Short SSID field (must be present) in the i-th TBTT Information field of the given Neighbor AP Information field.
nbrApInfoId | identifier of the given Neighbor AP Information field |
index | the index of the given TBTT Information field |
Definition at line 454 of file reduced-neighbor-report.cc.
References NS_ASSERT.
bool ns3::ReducedNeighborReport::HasBssid | ( | std::size_t | nbrApInfoId | ) | const |
Return true if the BSSID field is present in all the TBTT Information fields of the given Neighbor AP Information field.
nbrApInfoId | identifier of the given Neighbor AP Information field |
Definition at line 418 of file reduced-neighbor-report.cc.
References NS_ASSERT.
bool ns3::ReducedNeighborReport::HasBssParameters | ( | std::size_t | nbrApInfoId | ) | const |
Return true if the BSS Parameters field is present in all the TBTT Information fields of the given Neighbor AP Information field.
nbrApInfoId | identifier of the given Neighbor AP Information field |
Definition at line 476 of file reduced-neighbor-report.cc.
References NS_ASSERT.
bool ns3::ReducedNeighborReport::HasMldParameters | ( | std::size_t | nbrApInfoId | ) | const |
Return true if the MLD Parameters subfield is present in all the TBTT Information fields of the given Neighbor AP Information field.
nbrApInfoId | identifier of the given Neighbor AP Information field |
Definition at line 535 of file reduced-neighbor-report.cc.
References NS_ASSERT.
Referenced by ns3::WifiAssocManager::GetNextAffiliatedAp().
bool ns3::ReducedNeighborReport::HasPsd20MHz | ( | std::size_t | nbrApInfoId | ) | const |
Return true if the 20 MHz PSD field is present in all the TBTT Information fields of the given Neighbor AP Information field.
nbrApInfoId | identifier of the given Neighbor AP Information field |
Definition at line 504 of file reduced-neighbor-report.cc.
References NS_ASSERT.
bool ns3::ReducedNeighborReport::HasShortSsid | ( | std::size_t | nbrApInfoId | ) | const |
Return true if the Short SSID field is present in all the TBTT Information fields of the given Neighbor AP Information field.
nbrApInfoId | identifier of the given Neighbor AP Information field |
Definition at line 446 of file reduced-neighbor-report.cc.
References NS_ASSERT.
|
private |
Get the TBTT Information Count field of the given Neighbor AP Information field.
nbrApInfoId | identifier of the given Neighbor AP Information field |
Definition at line 563 of file reduced-neighbor-report.cc.
References NS_ASSERT.
|
private |
Use the TBTT Information Length field of the given Neighbor AP Information field to set the xxxPresent flags of the NeighborApInformation struct.
nbrApInfoId | identifier of the given Neighbor AP Information field |
Definition at line 378 of file reduced-neighbor-report.cc.
References NS_ABORT_MSG, and NS_ASSERT.
|
overridevirtual |
Serialize information (i.e., the body of the IE, not including the Element ID and length octets)
start | an iterator which points to where the information should be written. |
Implements ns3::WifiInformationElement.
Definition at line 607 of file reduced-neighbor-report.cc.
References ns3::WriteTo().
void ns3::ReducedNeighborReport::SetBssid | ( | std::size_t | nbrApInfoId, |
std::size_t | index, | ||
Mac48Address | bssid ) |
Set the BSSID field of the i-th TBTT Information field of the given Neighbor AP Information field.
nbrApInfoId | identifier of the given Neighbor AP Information field |
index | the index of the given TBTT Information field |
bssid | the BSSID value |
Definition at line 407 of file reduced-neighbor-report.cc.
References NS_ASSERT.
Referenced by ns3::ApWifiMac::GetReducedNeighborReport(), and ReducedNeighborReportTest::GetReducedNeighborReport().
void ns3::ReducedNeighborReport::SetBssParameters | ( | std::size_t | nbrApInfoId, |
std::size_t | index, | ||
uint8_t | bssParameters ) |
Set the BSS Parameters field of the i-th TBTT Information field of the given Neighbor AP Information field.
nbrApInfoId | identifier of the given Neighbor AP Information field |
index | the index of the given TBTT Information field |
bssParameters | the BSS Parameters value |
Definition at line 463 of file reduced-neighbor-report.cc.
References NS_ASSERT.
Referenced by ns3::ApWifiMac::GetReducedNeighborReport(), and ReducedNeighborReportTest::GetReducedNeighborReport().
void ns3::ReducedNeighborReport::SetMldParameters | ( | std::size_t | nbrApInfoId, |
std::size_t | index, | ||
const MldParameters & | mldParams ) |
Set the MLD Parameters subfield of the i-th TBTT Information field of the given Neighbor AP Information field.
nbrApInfoId | identifier of the given Neighbor AP Information field |
index | the index of the given TBTT Information field |
mldParams | the MLD parameters |
Definition at line 521 of file reduced-neighbor-report.cc.
References NS_ASSERT.
Referenced by GetRnrLinkInfoTest::DoRun(), ns3::ApWifiMac::GetReducedNeighborReport(), and ReducedNeighborReportTest::GetReducedNeighborReport().
void ns3::ReducedNeighborReport::SetOperatingChannel | ( | std::size_t | nbrApInfoId, |
const WifiPhyOperatingChannel & | channel ) |
Set the Operating Class and the Channel Number fields of the given Neighbor AP Information field based on the given operating channel.
nbrApInfoId | identifier of the given Neighbor AP Information field |
channel | the PHY operating channel |
Definition at line 45 of file reduced-neighbor-report.cc.
References m_nbrApInfoFields, NS_ABORT_MSG, NS_ABORT_MSG_IF, NS_ASSERT, ns3::WIFI_PHY_BAND_2_4GHZ, ns3::WIFI_PHY_BAND_5GHZ, ns3::WIFI_PHY_BAND_6GHZ, and ns3::WIFI_PHY_BAND_UNSPECIFIED.
Referenced by ns3::ApWifiMac::GetReducedNeighborReport(), and ReducedNeighborReportTest::GetReducedNeighborReport().
void ns3::ReducedNeighborReport::SetPsd20MHz | ( | std::size_t | nbrApInfoId, |
std::size_t | index, | ||
uint8_t | psd20MHz ) |
Set the 20 MHz PSD field of the i-th TBTT Information field of the given Neighbor AP Information field.
nbrApInfoId | identifier of the given Neighbor AP Information field |
index | the index of the given TBTT Information field |
psd20MHz | the 20 MHz PSD value |
Definition at line 493 of file reduced-neighbor-report.cc.
References NS_ASSERT.
Referenced by ns3::ApWifiMac::GetReducedNeighborReport(), and ReducedNeighborReportTest::GetReducedNeighborReport().
void ns3::ReducedNeighborReport::SetShortSsid | ( | std::size_t | nbrApInfoId, |
std::size_t | index, | ||
uint32_t | shortSsid ) |
Set the Short SSID field of the i-th TBTT Information field of the given Neighbor AP Information field.
nbrApInfoId | identifier of the given Neighbor AP Information field |
index | the index of the given TBTT Information field |
shortSsid | the short SSID value |
Definition at line 435 of file reduced-neighbor-report.cc.
References NS_ASSERT.
Referenced by ns3::ApWifiMac::GetReducedNeighborReport(), and ReducedNeighborReportTest::GetReducedNeighborReport().
|
private |
Set the TBTT Information Count field of the given Neighbor AP Information field based on the size of the tbttInformationSet field.
This method is marked as const because it needs to be called within the SerializeInformationField method. In fact, only when serializing this object we can set the TBTT Information Count field based on the number of TBTT Information fields included in the given Neighbor AP Information field.
nbrApInfoId | identifier of the given Neighbor AP Information field |
Definition at line 552 of file reduced-neighbor-report.cc.
References NS_ASSERT.
|
private |
Set the TBTT Information Length field of the given Neighbor AP Information field based on the xxxPresent flags of the NeighborApInformation struct.
This method is marked as const because it needs to be called within the SerializeInformationField method. In fact, only when serializing this object we can set the TBTT Information Length field based on the TBTT Information field contents.
nbrApInfoId | identifier of the given Neighbor AP Information field |
Definition at line 350 of file reduced-neighbor-report.cc.
References NS_ABORT_MSG, and NS_ASSERT.
|
private |
one or more Neighbor AP Information fields
Definition at line 319 of file reduced-neighbor-report.h.
Referenced by AddNbrApInfoField(), GetNNbrApInfoFields(), GetOperatingChannel(), and SetOperatingChannel().