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. | |
uint8_t | GetLinkId (std::size_t nbrApInfoId, std::size_t index) const |
Get the Link ID value in the MLD Parameters subfield (must be present) in the i-th TBTT Information field of the given Neighbor AP Information field. | |
uint8_t | GetMldId (std::size_t nbrApInfoId, std::size_t index) const |
Get the MLD ID value in 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, uint8_t mldId, uint8_t linkId, uint8_t changeSequence) |
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 21 of file reduced-neighbor-report.cc.
void ns3::ReducedNeighborReport::AddNbrApInfoField | ( | ) |
Add a Neighbor AP Information field.
Definition at line 38 of file reduced-neighbor-report.cc.
References m_nbrApInfoFields.
Referenced by DeserializeInformationField(), 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 342 of file reduced-neighbor-report.cc.
References m_nbrApInfoFields, and NS_ASSERT.
Referenced by DeserializeInformationField(), 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 674 of file reduced-neighbor-report.cc.
References AddNbrApInfoField(), AddTbttInformationField(), m_nbrApInfoFields, ns3::ReadFrom(), ns3::Buffer::Iterator::ReadLsbtohU16(), ns3::Buffer::Iterator::ReadLsbtohU32(), ReadTbttInformationCount(), ReadTbttInformationLength(), and ns3::Buffer::Iterator::ReadU8().
|
overridevirtual |
Get the wifi information element ID.
Implements ns3::WifiInformationElement.
Definition at line 26 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 425 of file reduced-neighbor-report.cc.
References HasBssid(), m_nbrApInfoFields, and 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 483 of file reduced-neighbor-report.cc.
References HasBssParameters(), m_nbrApInfoFields, and 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 584 of file reduced-neighbor-report.cc.
References m_nbrApInfoFields.
uint8_t ns3::ReducedNeighborReport::GetLinkId | ( | std::size_t | nbrApInfoId, |
std::size_t | index ) const |
Get the Link ID value in 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 555 of file reduced-neighbor-report.cc.
References HasMldParameters(), m_nbrApInfoFields, and NS_ASSERT.
uint8_t ns3::ReducedNeighborReport::GetMldId | ( | std::size_t | nbrApInfoId, |
std::size_t | index ) const |
Get the MLD ID value in 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 546 of file reduced-neighbor-report.cc.
References HasMldParameters(), m_nbrApInfoFields, and 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 32 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 335 of file reduced-neighbor-report.cc.
References m_nbrApInfoFields, and 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 187 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, ns3::WIFI_PHY_BAND_UNSPECIFIED, and ns3::WIFI_STANDARD_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 511 of file reduced-neighbor-report.cc.
References HasPsd20MHz(), m_nbrApInfoFields, and 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 453 of file reduced-neighbor-report.cc.
References HasShortSsid(), m_nbrApInfoFields, and 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 417 of file reduced-neighbor-report.cc.
References m_nbrApInfoFields, and NS_ASSERT.
Referenced by GetBssid().
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 475 of file reduced-neighbor-report.cc.
References m_nbrApInfoFields, and NS_ASSERT.
Referenced by GetBssParameters().
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 538 of file reduced-neighbor-report.cc.
References m_nbrApInfoFields, and NS_ASSERT.
Referenced by GetLinkId(), GetMldId(), and 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 503 of file reduced-neighbor-report.cc.
References m_nbrApInfoFields, and NS_ASSERT.
Referenced by GetPsd20MHz().
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 445 of file reduced-neighbor-report.cc.
References m_nbrApInfoFields, and NS_ASSERT.
Referenced by GetShortSsid().
|
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 576 of file reduced-neighbor-report.cc.
References m_nbrApInfoFields, and NS_ASSERT.
Referenced by DeserializeInformationField().
|
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 377 of file reduced-neighbor-report.cc.
References m_nbrApInfoFields, NS_ABORT_MSG, and NS_ASSERT.
Referenced by DeserializeInformationField().
|
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 620 of file reduced-neighbor-report.cc.
References m_nbrApInfoFields, WriteTbttInformationCount(), WriteTbttInformationLength(), and 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 406 of file reduced-neighbor-report.cc.
References m_nbrApInfoFields, and 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 462 of file reduced-neighbor-report.cc.
References m_nbrApInfoFields, and NS_ASSERT.
Referenced by ns3::ApWifiMac::GetReducedNeighborReport(), and ReducedNeighborReportTest::GetReducedNeighborReport().
void ns3::ReducedNeighborReport::SetMldParameters | ( | std::size_t | nbrApInfoId, |
std::size_t | index, | ||
uint8_t | mldId, | ||
uint8_t | linkId, | ||
uint8_t | changeSequence ) |
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 |
mldId | the MLD ID value |
linkId | the Link ID value |
changeSequence | the Change Sequence value |
Definition at line 520 of file reduced-neighbor-report.cc.
References m_nbrApInfoFields, and 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 44 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 492 of file reduced-neighbor-report.cc.
References m_nbrApInfoFields, and 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 434 of file reduced-neighbor-report.cc.
References m_nbrApInfoFields, and 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 565 of file reduced-neighbor-report.cc.
References m_nbrApInfoFields, and NS_ASSERT.
Referenced by SerializeInformationField().
|
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 349 of file reduced-neighbor-report.cc.
References m_nbrApInfoFields, NS_ABORT_MSG, and NS_ASSERT.
Referenced by SerializeInformationField().
|
private |
one or more Neighbor AP Information fields
Definition at line 330 of file reduced-neighbor-report.h.
Referenced by AddNbrApInfoField(), AddTbttInformationField(), DeserializeInformationField(), GetBssid(), GetBssParameters(), GetInformationFieldSize(), GetLinkId(), GetMldId(), GetNNbrApInfoFields(), GetNTbttInformationFields(), GetOperatingChannel(), GetPsd20MHz(), GetShortSsid(), HasBssid(), HasBssParameters(), HasMldParameters(), HasPsd20MHz(), HasShortSsid(), ReadTbttInformationCount(), ReadTbttInformationLength(), SerializeInformationField(), SetBssid(), SetBssParameters(), SetMldParameters(), SetOperatingChannel(), SetPsd20MHz(), SetShortSsid(), WriteTbttInformationCount(), and WriteTbttInformationLength().