Test serialization and deserialization of EHT capabilities IE. More...
Inheritance diagram for WifiEhtCapabilitiesIeTest:
Collaboration diagram for WifiEhtCapabilitiesIeTest:Public Member Functions | |
| WifiEhtCapabilitiesIeTest (bool is2_4Ghz, uint16_t channelWidth) | |
| Constructor. More... | |
| ~WifiEhtCapabilitiesIeTest () override=default | |
| void | CheckEhtMacCapabilitiesInformation (const Buffer &buffer, uint8_t expectedValueFirstByte) |
| Check the content of the EHT MAC Capabilities Information subfield. More... | |
| void | CheckEhtPhyCapabilitiesInformation (const Buffer &buffer, uint8_t expectedValueSixthByte) |
| Check the content of the EHT PHY Capabilities Information subfield. More... | |
| void | CheckSerializedByte (const Buffer &buffer, uint32_t position, uint8_t value) |
| Check that the given buffer contains the given value at the given position. More... | |
| void | CheckSupportedEhtMcsAndNssSet (const Buffer &buffer, uint8_t maxSupportedMcs) |
| Check the content of the Supported EHT-MCS And NSS Set subfield. More... | |
| EhtCapabilities | GetEhtCapabilities (uint16_t maxMpduLength, uint32_t maxAmpduSize, uint8_t maxSupportedMcs) const |
| Generate the EHT capabilities IE. More... | |
| HeCapabilities | GetHeCapabilities () const |
| Generate the HE capabilities IE. More... | |
| Buffer | SerializeIntoBuffer (const EhtCapabilities &ehtCapabilities) |
| Serialize the EHT capabilities in a buffer. More... | |
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. More... | |
Public Member Functions inherited from ns3::TestCase | |
| TestCase (const TestCase &)=delete | |
| virtual | ~TestCase () |
| Destructor. More... | |
| std::string | GetName () const |
| TestCase & | operator= (const TestCase &)=delete |
Private Member Functions | |
| void | DoRun () override |
| Implementation to actually run this TestCase. More... | |
Private Attributes | |
| uint16_t | m_channelWidth |
| Supported channel width by the PHY (in MHz) More... | |
| bool | m_is2_4Ghz |
| whether the PHY is operating in 2.4 GHz More... | |
Additional Inherited Members | |
Public Types inherited from ns3::TestCase | |
| enum | TestDuration { QUICK = 1 , EXTENSIVE = 2 , TAKES_FOREVER = 3 } |
| How long the test takes to execute. More... | |
Protected Member Functions inherited from ns3::HeaderSerializationTestCase | |
| HeaderSerializationTestCase (std::string name) | |
| Constructor. More... | |
Protected Member Functions inherited from ns3::TestCase | |
| TestCase (std::string name) | |
| Constructor. More... | |
| void | AddTestCase (TestCase *testCase, TestDuration duration=QUICK) |
| Add an individual child TestCase to this test suite. More... | |
| TestCase * | GetParent () const |
| Get the parent of this TestCase. More... | |
| bool | IsStatusFailure () const |
| Check if any tests failed. More... | |
| bool | IsStatusSuccess () const |
| Check if all tests passed. More... | |
| void | SetDataDir (std::string directory) |
| Set the data directory where reference trace files can be found. More... | |
| 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. More... | |
| bool | MustAssertOnFailure () const |
| Check if this run should assert on failure. More... | |
| bool | MustContinueOnFailure () const |
| Check if this run should continue on failure. More... | |
| std::string | CreateDataDirFilename (std::string filename) |
| Construct the full path to a file in the data directory. More... | |
| std::string | CreateTempDirFilename (std::string filename) |
| Construct the full path to a file in a temporary directory. More... | |
Test serialization and deserialization of EHT capabilities IE.
Definition at line 350 of file wifi-eht-info-elems-test.cc.
| WifiEhtCapabilitiesIeTest::WifiEhtCapabilitiesIeTest | ( | bool | is2_4Ghz, |
| uint16_t | channelWidth | ||
| ) |
Constructor.
| is2_4Ghz | whether the PHY is operating in 2.4 GHz |
| channelWidth | the supported channel width in MHz |
Definition at line 428 of file wifi-eht-info-elems-test.cc.
|
overridedefault |
| void WifiEhtCapabilitiesIeTest::CheckEhtMacCapabilitiesInformation | ( | const Buffer & | buffer, |
| uint8_t | expectedValueFirstByte | ||
| ) |
Check the content of the EHT MAC Capabilities Information subfield.
| buffer | the buffer containing the serialized EHT capabilities |
| expectedValueFirstByte | the expected value for the first byte |
Definition at line 556 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:| void WifiEhtCapabilitiesIeTest::CheckEhtPhyCapabilitiesInformation | ( | const Buffer & | buffer, |
| uint8_t | expectedValueSixthByte | ||
| ) |
Check the content of the EHT PHY Capabilities Information subfield.
| buffer | the buffer containing the serialized EHT capabilities |
| expectedValueSixthByte | the expected value for the sixth byte |
Definition at line 564 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:| 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.
| buffer | the given buffer |
| position | the given position (starting at 0) |
| value | the given value |
Definition at line 545 of file wifi-eht-info-elems-test.cc.
References ns3::Buffer::Begin(), ns3::Buffer::Iterator::Next(), NS_TEST_EXPECT_MSG_EQ, ns3::Buffer::Iterator::ReadU8(), and second::value.
Referenced by CheckEhtMacCapabilitiesInformation(), CheckEhtPhyCapabilitiesInformation(), and CheckSupportedEhtMcsAndNssSet().
Here is the call graph for this function:
Here is the caller graph for this function:| void WifiEhtCapabilitiesIeTest::CheckSupportedEhtMcsAndNssSet | ( | const Buffer & | buffer, |
| uint8_t | maxSupportedMcs | ||
| ) |
Check the content of the Supported EHT-MCS And NSS Set subfield.
| maxSupportedMcs | the maximum EHT MCS supported by the PHY |
| buffer | the buffer containing the serialized EHT capabilities |
Definition at line 579 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:
|
overrideprivatevirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 637 of file wifi-eht-info-elems-test.cc.
References CheckEhtMacCapabilitiesInformation(), CheckEhtPhyCapabilitiesInformation(), CheckSupportedEhtMcsAndNssSet(), GetEhtCapabilities(), GetHeCapabilities(), ns3::EhtCapabilities::GetHighestSupportedRxMcs(), ns3::EhtCapabilities::GetHighestSupportedTxMcs(), ns3::WifiInformationElement::GetSerializedSize(), m_channelWidth, m_is2_4Ghz, NS_ASSERT, NS_ASSERT_MSG, NS_TEST_EXPECT_MSG_EQ, SerializeIntoBuffer(), ns3::EhtCapabilities::SetPpeThresholds(), and ns3::HeaderSerializationTestCase::TestHeaderSerialization().
Here is the call graph for this function:| EhtCapabilities WifiEhtCapabilitiesIeTest::GetEhtCapabilities | ( | uint16_t | maxMpduLength, |
| uint32_t | maxAmpduSize, | ||
| uint8_t | maxSupportedMcs | ||
| ) | const |
Generate the EHT capabilities IE.
| maxMpduLength | the maximum MPDU length in bytes |
| maxAmpduSize | the maximum A-MPDU size in bytes |
| maxSupportedMcs | the maximum EHT MCS supported by the PHY |
Definition at line 457 of file wifi-eht-info-elems-test.cc.
References m_channelWidth, m_is2_4Ghz, ns3::EhtCapabilities::m_phyCapabilities, max, min, 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:| HeCapabilities WifiEhtCapabilitiesIeTest::GetHeCapabilities | ( | ) | const |
Generate the HE capabilities IE.
Definition at line 436 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:| Buffer WifiEhtCapabilitiesIeTest::SerializeIntoBuffer | ( | const EhtCapabilities & | ehtCapabilities | ) |
Serialize the EHT capabilities in a buffer.
| ehtCapabilities | the EHT capabilities |
Definition at line 536 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:
|
private |
Supported channel width by the PHY (in MHz)
Definition at line 425 of file wifi-eht-info-elems-test.cc.
Referenced by CheckEhtPhyCapabilitiesInformation(), CheckSupportedEhtMcsAndNssSet(), DoRun(), GetEhtCapabilities(), and GetHeCapabilities().
|
private |
whether the PHY is operating in 2.4 GHz
Definition at line 424 of file wifi-eht-info-elems-test.cc.
Referenced by DoRun(), GetEhtCapabilities(), and GetHeCapabilities().