A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
WifiEhtCapabilitiesIeTest Class Reference

Test serialization and deserialization of EHT capabilities IE. More...

+ Inheritance diagram for WifiEhtCapabilitiesIeTest:
+ Collaboration diagram for WifiEhtCapabilitiesIeTest:

Public Member Functions

 WifiEhtCapabilitiesIeTest (bool is2_4Ghz, MHz_u channelWidth)
 Constructor.
 
 ~WifiEhtCapabilitiesIeTest () override=default
 
void CheckEhtMacCapabilitiesInformation (const Buffer &buffer, uint8_t expectedValueFirstByte)
 Check the content of the EHT MAC Capabilities Information subfield.
 
void CheckEhtPhyCapabilitiesInformation (const Buffer &buffer, uint8_t expectedValueSixthByte)
 Check the content of the EHT PHY Capabilities Information subfield.
 
void CheckSerializedByte (const Buffer &buffer, uint32_t position, uint8_t value)
 Check that the given buffer contains the given value at the given position.
 
void CheckSupportedEhtMcsAndNssSet (const Buffer &buffer, uint8_t maxSupportedMcs)
 Check the content of the Supported EHT-MCS And NSS Set subfield.
 
EhtCapabilities GetEhtCapabilities (uint16_t maxMpduLength, uint32_t maxAmpduSize, uint8_t maxSupportedMcs) const
 Generate the EHT capabilities IE.
 
HeCapabilities GetHeCapabilities () const
 Generate the HE capabilities IE.
 
Buffer SerializeIntoBuffer (const EhtCapabilities &ehtCapabilities)
 Serialize the EHT capabilities in a buffer.
 
- Public Member Functions inherited from ns3::HeaderSerializationTestCase
template<typename T , typename... Args>
void TestHeaderSerialization (const T &hdr, Args &&... args)
 Serialize the given header in a buffer, then create a new header by deserializing from the buffer and serialize the new header into a new buffer.
 
- Public Member Functions inherited from ns3::TestCase
 TestCase (const TestCase &)=delete
 
virtual ~TestCase ()
 Destructor.
 
std::string GetName () const
 
TestCaseoperator= (const TestCase &)=delete
 

Private Member Functions

void DoRun () override
 Implementation to actually run this TestCase.
 

Private Attributes

MHz_u m_channelWidth
 Supported channel width by the PHY.
 
bool m_is2_4Ghz
 whether the PHY is operating in 2.4 GHz
 

Additional Inherited Members

- Public Types inherited from ns3::TestCase
enum class  Duration { QUICK = 1 , EXTENSIVE = 2 , TAKES_FOREVER = 3 }
 How long the test takes to execute. More...
 
- Static Public Attributes inherited from ns3::TestCase
static constexpr auto QUICK = Duration::QUICK
 Deprecated test duration simple enums.
 
static constexpr auto EXTENSIVE = Duration::EXTENSIVE
 
static constexpr auto TAKES_FOREVER = Duration::TAKES_FOREVER
 
- Protected Member Functions inherited from ns3::HeaderSerializationTestCase
 HeaderSerializationTestCase (std::string name)
 Constructor.
 
- Protected Member Functions inherited from ns3::TestCase
 TestCase (std::string name)
 Constructor.
 
void AddTestCase (TestCase *testCase, Duration duration=Duration::QUICK)
 Add an individual child TestCase to this test suite.
 
TestCaseGetParent () const
 Get the parent of this TestCase.
 
bool IsStatusFailure () const
 Check if any tests failed.
 
bool IsStatusSuccess () const
 Check if all tests passed.
 
void SetDataDir (std::string directory)
 Set the data directory where reference trace files can be found.
 
void ReportTestFailure (std::string cond, std::string actual, std::string limit, std::string message, std::string file, int32_t line)
 Log the failure of this TestCase.
 
bool MustAssertOnFailure () const
 Check if this run should assert on failure.
 
bool MustContinueOnFailure () const
 Check if this run should continue on failure.
 
std::string CreateDataDirFilename (std::string filename)
 Construct the full path to a file in the data directory.
 
std::string CreateTempDirFilename (std::string filename)
 Construct the full path to a file in a temporary directory.
 

Detailed Description

Test serialization and deserialization of EHT capabilities IE.

Definition at line 765 of file wifi-eht-info-elems-test.cc.

Constructor & Destructor Documentation

◆ WifiEhtCapabilitiesIeTest()

WifiEhtCapabilitiesIeTest::WifiEhtCapabilitiesIeTest ( bool is2_4Ghz,
MHz_u channelWidth )

Constructor.

Parameters
is2_4Ghzwhether the PHY is operating in 2.4 GHz
channelWidththe supported channel width

Definition at line 843 of file wifi-eht-info-elems-test.cc.

◆ ~WifiEhtCapabilitiesIeTest()

WifiEhtCapabilitiesIeTest::~WifiEhtCapabilitiesIeTest ( )
overridedefault

Member Function Documentation

◆ CheckEhtMacCapabilitiesInformation()

void WifiEhtCapabilitiesIeTest::CheckEhtMacCapabilitiesInformation ( const Buffer & buffer,
uint8_t expectedValueFirstByte )

Check the content of the EHT MAC Capabilities Information subfield.

Parameters
bufferthe buffer containing the serialized EHT capabilities
expectedValueFirstBytethe expected value for the first byte

Definition at line 971 of file wifi-eht-info-elems-test.cc.

References CheckSerializedByte().

Referenced by DoRun().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CheckEhtPhyCapabilitiesInformation()

void WifiEhtCapabilitiesIeTest::CheckEhtPhyCapabilitiesInformation ( const Buffer & buffer,
uint8_t expectedValueSixthByte )

Check the content of the EHT PHY Capabilities Information subfield.

Parameters
bufferthe buffer containing the serialized EHT capabilities
expectedValueSixthBytethe expected value for the sixth byte

Definition at line 979 of file wifi-eht-info-elems-test.cc.

References CheckSerializedByte(), and m_channelWidth.

Referenced by DoRun().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CheckSerializedByte()

void WifiEhtCapabilitiesIeTest::CheckSerializedByte ( const Buffer & buffer,
uint32_t position,
uint8_t value )

Check that the given buffer contains the given value at the given position.

Parameters
bufferthe given buffer
positionthe given position (starting at 0)
valuethe given value

Definition at line 960 of file wifi-eht-info-elems-test.cc.

References ns3::Buffer::Begin(), ns3::Buffer::Iterator::Next(), NS_TEST_EXPECT_MSG_EQ, and ns3::Buffer::Iterator::ReadU8().

Referenced by CheckEhtMacCapabilitiesInformation(), CheckEhtPhyCapabilitiesInformation(), and CheckSupportedEhtMcsAndNssSet().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CheckSupportedEhtMcsAndNssSet()

void WifiEhtCapabilitiesIeTest::CheckSupportedEhtMcsAndNssSet ( const Buffer & buffer,
uint8_t maxSupportedMcs )

Check the content of the Supported EHT-MCS And NSS Set subfield.

Parameters
maxSupportedMcsthe maximum EHT MCS supported by the PHY
bufferthe buffer containing the serialized EHT capabilities

Definition at line 994 of file wifi-eht-info-elems-test.cc.

References CheckSerializedByte(), and m_channelWidth.

Referenced by DoRun().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoRun()

◆ GetEhtCapabilities()

EhtCapabilities WifiEhtCapabilitiesIeTest::GetEhtCapabilities ( uint16_t maxMpduLength,
uint32_t maxAmpduSize,
uint8_t maxSupportedMcs ) const

Generate the EHT capabilities IE.

Parameters
maxMpduLengththe maximum MPDU length in bytes
maxAmpduSizethe maximum A-MPDU size in bytes
maxSupportedMcsthe maximum EHT MCS supported by the PHY
Returns
the generated EHT capabilities IE

Definition at line 872 of file wifi-eht-info-elems-test.cc.

References ns3::EhtMcsAndNssSet::EHT_MCS_MAP_TYPE_160_MHZ, ns3::EhtMcsAndNssSet::EHT_MCS_MAP_TYPE_20_MHZ_ONLY, ns3::EhtMcsAndNssSet::EHT_MCS_MAP_TYPE_320_MHZ, ns3::EhtMcsAndNssSet::EHT_MCS_MAP_TYPE_NOT_LARGER_THAN_80_MHZ, m_channelWidth, m_is2_4Ghz, ns3::EhtCapabilities::m_phyCapabilities, ns3::EhtCapabilities::SetMaxAmpduLength(), ns3::EhtCapabilities::SetMaxMpduLength(), ns3::EhtCapabilities::SetSupportedRxEhtMcsAndNss(), ns3::EhtCapabilities::SetSupportedTxEhtMcsAndNss(), ns3::EhtPhyCapabilities::support320MhzIn6Ghz, ns3::EhtPhyCapabilities::supportRx1024And4096QamForRuSmallerThan242Tones, and ns3::EhtPhyCapabilities::supportTx1024And4096QamForRuSmallerThan242Tones.

Referenced by DoRun().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetHeCapabilities()

HeCapabilities WifiEhtCapabilitiesIeTest::GetHeCapabilities ( ) const

Generate the HE capabilities IE.

Returns
the generated HE capabilities IE

Definition at line 851 of file wifi-eht-info-elems-test.cc.

References m_channelWidth, m_is2_4Ghz, and ns3::HeCapabilities::SetChannelWidthSet().

Referenced by DoRun().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SerializeIntoBuffer()

Buffer WifiEhtCapabilitiesIeTest::SerializeIntoBuffer ( const EhtCapabilities & ehtCapabilities)

Serialize the EHT capabilities in a buffer.

Parameters
ehtCapabilitiesthe EHT capabilities
Returns
the buffer in which the EHT capabilities has been serialized

Definition at line 951 of file wifi-eht-info-elems-test.cc.

References ns3::Buffer::AddAtStart(), ns3::Buffer::Begin(), ns3::WifiInformationElement::GetSerializedSize(), and ns3::WifiInformationElement::Serialize().

Referenced by DoRun().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_channelWidth

MHz_u WifiEhtCapabilitiesIeTest::m_channelWidth
private

◆ m_is2_4Ghz

bool WifiEhtCapabilitiesIeTest::m_is2_4Ghz
private

whether the PHY is operating in 2.4 GHz

Definition at line 839 of file wifi-eht-info-elems-test.cc.

Referenced by DoRun(), GetEhtCapabilities(), and GetHeCapabilities().


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