A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::ReducedNeighborReport Class Reference

The Reduced Neighbor Report element. More...

#include "reduced-neighbor-report.h"

+ Inheritance diagram for ns3::ReducedNeighborReport:
+ Collaboration diagram for ns3::ReducedNeighborReport:

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 MldParametersGetMldParameters (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.
 
SimpleRefCountoperator= (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< NeighborApInformationm_nbrApInfoFields
 one or more Neighbor AP Information fields
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ReducedNeighborReport()

ns3::ReducedNeighborReport::ReducedNeighborReport ( )

Definition at line 22 of file reduced-neighbor-report.cc.

Member Function Documentation

◆ AddNbrApInfoField()

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().

+ Here is the caller graph for this function:

◆ AddTbttInformationField()

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.

Parameters
nbrApInfoIdidentifier 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().

+ Here is the caller graph for this function:

◆ DeserializeInformationField()

uint16_t ns3::ReducedNeighborReport::DeserializeInformationField ( Buffer::Iterator start,
uint16_t length )
overridevirtual

Deserialize information (i.e., the body of the IE, not including the Element ID and length octets)

Parameters
startan iterator which points to where the information should be written.
lengththe expected number of bytes to read
Returns
the number of bytes 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().

+ Here is the call graph for this function:

◆ ElementId()

WifiInformationElementId ns3::ReducedNeighborReport::ElementId ( ) const
overridevirtual

Get the wifi information element ID.

Returns
the wifi information element ID

Implements ns3::WifiInformationElement.

Definition at line 27 of file reduced-neighbor-report.cc.

References IE_REDUCED_NEIGHBOR_REPORT.

◆ GetBssid()

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.

Parameters
nbrApInfoIdidentifier of the given Neighbor AP Information field
indexthe index of the given TBTT Information field
Returns
the BSSID field

Definition at line 426 of file reduced-neighbor-report.cc.

References NS_ASSERT.

◆ GetBssParameters()

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.

Parameters
nbrApInfoIdidentifier of the given Neighbor AP Information field
indexthe index of the given TBTT Information field
Returns
the BSS Parameters field

Definition at line 484 of file reduced-neighbor-report.cc.

References NS_ASSERT.

◆ GetInformationFieldSize()

uint16_t ns3::ReducedNeighborReport::GetInformationFieldSize ( ) const
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)

Returns
the length of serialized information

Implements ns3::WifiInformationElement.

Definition at line 571 of file reduced-neighbor-report.cc.

◆ GetMldParameters()

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.

Parameters
nbrApInfoIdidentifier of the given Neighbor AP Information field
indexthe index of the given TBTT Information field
Returns
the MLD parameters

Definition at line 543 of file reduced-neighbor-report.cc.

References NS_ASSERT.

Referenced by ns3::WifiAssocManager::GetNextAffiliatedAp().

+ Here is the caller graph for this function:

◆ GetNNbrApInfoFields()

std::size_t ns3::ReducedNeighborReport::GetNNbrApInfoFields ( ) const

Get the number of Neighbor AP Information fields.

Returns
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().

+ Here is the caller graph for this function:

◆ GetNTbttInformationFields()

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.

Parameters
nbrApInfoIdidentifier of the given Neighbor AP Information field
Returns
the number of TBTT Information fields

Definition at line 336 of file reduced-neighbor-report.cc.

References NS_ASSERT.

Referenced by GetRnrLinkInfoTest::DoRun(), and ns3::WifiAssocManager::GetNextAffiliatedAp().

+ Here is the caller graph for this function:

◆ GetOperatingChannel()

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.

Parameters
nbrApInfoIdidentifier of the given Neighbor AP Information field
Returns
the PHY operating channel

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.

◆ GetPsd20MHz()

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.

Parameters
nbrApInfoIdidentifier of the given Neighbor AP Information field
indexthe index of the given TBTT Information field
Returns
the 20 MHz PSD field

Definition at line 512 of file reduced-neighbor-report.cc.

References NS_ASSERT.

◆ GetShortSsid()

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.

Parameters
nbrApInfoIdidentifier of the given Neighbor AP Information field
indexthe index of the given TBTT Information field
Returns
the Short SSID field

Definition at line 454 of file reduced-neighbor-report.cc.

References NS_ASSERT.

◆ HasBssid()

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.

Parameters
nbrApInfoIdidentifier of the given Neighbor AP Information field
Returns
true if the BSSID field is present

Definition at line 418 of file reduced-neighbor-report.cc.

References NS_ASSERT.

◆ HasBssParameters()

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.

Parameters
nbrApInfoIdidentifier of the given Neighbor AP Information field
Returns
true if the BSS Parameters field is present

Definition at line 476 of file reduced-neighbor-report.cc.

References NS_ASSERT.

◆ HasMldParameters()

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.

Parameters
nbrApInfoIdidentifier of the given Neighbor AP Information field
Returns
true if the MLD Parameters subfield is present

Definition at line 535 of file reduced-neighbor-report.cc.

References NS_ASSERT.

Referenced by ns3::WifiAssocManager::GetNextAffiliatedAp().

+ Here is the caller graph for this function:

◆ HasPsd20MHz()

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.

Parameters
nbrApInfoIdidentifier of the given Neighbor AP Information field
Returns
true if the 20 MHz PSD field is present

Definition at line 504 of file reduced-neighbor-report.cc.

References NS_ASSERT.

◆ HasShortSsid()

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.

Parameters
nbrApInfoIdidentifier of the given Neighbor AP Information field
Returns
true if the Short SSID field is present

Definition at line 446 of file reduced-neighbor-report.cc.

References NS_ASSERT.

◆ ReadTbttInformationCount()

uint8_t ns3::ReducedNeighborReport::ReadTbttInformationCount ( std::size_t nbrApInfoId) const
private

Get the TBTT Information Count field of the given Neighbor AP Information field.

Parameters
nbrApInfoIdidentifier of the given Neighbor AP Information field
Returns
the TBTT Information Count

Definition at line 563 of file reduced-neighbor-report.cc.

References NS_ASSERT.

◆ ReadTbttInformationLength()

void ns3::ReducedNeighborReport::ReadTbttInformationLength ( std::size_t nbrApInfoId)
private

Use the TBTT Information Length field of the given Neighbor AP Information field to set the xxxPresent flags of the NeighborApInformation struct.

Parameters
nbrApInfoIdidentifier of the given Neighbor AP Information field

Definition at line 378 of file reduced-neighbor-report.cc.

References NS_ABORT_MSG, and NS_ASSERT.

◆ SerializeInformationField()

void ns3::ReducedNeighborReport::SerializeInformationField ( Buffer::Iterator start) const
overridevirtual

Serialize information (i.e., the body of the IE, not including the Element ID and length octets)

Parameters
startan 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().

+ Here is the call graph for this function:

◆ SetBssid()

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.

Parameters
nbrApInfoIdidentifier of the given Neighbor AP Information field
indexthe index of the given TBTT Information field
bssidthe BSSID value

Definition at line 407 of file reduced-neighbor-report.cc.

References NS_ASSERT.

Referenced by ns3::ApWifiMac::GetReducedNeighborReport(), and ReducedNeighborReportTest::GetReducedNeighborReport().

+ Here is the caller graph for this function:

◆ SetBssParameters()

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.

Parameters
nbrApInfoIdidentifier of the given Neighbor AP Information field
indexthe index of the given TBTT Information field
bssParametersthe BSS Parameters value

Definition at line 463 of file reduced-neighbor-report.cc.

References NS_ASSERT.

Referenced by ns3::ApWifiMac::GetReducedNeighborReport(), and ReducedNeighborReportTest::GetReducedNeighborReport().

+ Here is the caller graph for this function:

◆ SetMldParameters()

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.

Parameters
nbrApInfoIdidentifier of the given Neighbor AP Information field
indexthe index of the given TBTT Information field
mldParamsthe 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().

+ Here is the caller graph for this function:

◆ SetOperatingChannel()

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.

Parameters
nbrApInfoIdidentifier of the given Neighbor AP Information field
channelthe 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().

+ Here is the caller graph for this function:

◆ SetPsd20MHz()

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.

Parameters
nbrApInfoIdidentifier of the given Neighbor AP Information field
indexthe index of the given TBTT Information field
psd20MHzthe 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().

+ Here is the caller graph for this function:

◆ SetShortSsid()

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.

Parameters
nbrApInfoIdidentifier of the given Neighbor AP Information field
indexthe index of the given TBTT Information field
shortSsidthe short SSID value

Definition at line 435 of file reduced-neighbor-report.cc.

References NS_ASSERT.

Referenced by ns3::ApWifiMac::GetReducedNeighborReport(), and ReducedNeighborReportTest::GetReducedNeighborReport().

+ Here is the caller graph for this function:

◆ WriteTbttInformationCount()

void ns3::ReducedNeighborReport::WriteTbttInformationCount ( std::size_t nbrApInfoId) const
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.

Parameters
nbrApInfoIdidentifier of the given Neighbor AP Information field

Definition at line 552 of file reduced-neighbor-report.cc.

References NS_ASSERT.

◆ WriteTbttInformationLength()

void ns3::ReducedNeighborReport::WriteTbttInformationLength ( std::size_t nbrApInfoId) const
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.

Parameters
nbrApInfoIdidentifier of the given Neighbor AP Information field

Definition at line 350 of file reduced-neighbor-report.cc.

References NS_ABORT_MSG, and NS_ASSERT.

Member Data Documentation

◆ m_nbrApInfoFields

std::vector<NeighborApInformation> ns3::ReducedNeighborReport::m_nbrApInfoFields
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().


The documentation for this class was generated from the following files: