A Discrete-Event Network Simulator
API
BasicMultiLinkElementTest Class Reference

Test Multi-Link Element (Basic variant) serialization and deserialization. More...

+ Inheritance diagram for BasicMultiLinkElementTest:
+ Collaboration diagram for BasicMultiLinkElementTest:

Public Member Functions

 BasicMultiLinkElementTest ()
 Constructor. More...
 
 ~BasicMultiLinkElementTest () override
 
MultiLinkElement GetMultiLinkElement (const CommonInfoBasicMle &commonInfo, std::vector< MultiLinkElement::PerStaProfileSubelement > subelements)
 Get a Multi-Link Element including the given Common Info field and the given Per-STA Profile Subelements. 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
 
TestCaseoperator= (const TestCase &)=delete
 

Private Member Functions

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

Private Attributes

MgtAssocRequestHeader m_outerAssoc
 the frame containing the MLE 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...
 
TestCaseGetParent () 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...
 

Detailed Description

Test Multi-Link Element (Basic variant) serialization and deserialization.

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

Constructor & Destructor Documentation

◆ BasicMultiLinkElementTest()

BasicMultiLinkElementTest::BasicMultiLinkElementTest ( )

Constructor.

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

◆ ~BasicMultiLinkElementTest()

BasicMultiLinkElementTest::~BasicMultiLinkElementTest ( )
override

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

Member Function Documentation

◆ DoRun()

void BasicMultiLinkElementTest::DoRun ( )
overrideprivatevirtual

Implementation to actually run this TestCase.

Subclasses should override this method to conduct their tests.

To test the serialization/deserialization of Per-STA Profile subelements, we include the Multi-Link Element in an Association Request frame

Yet another test: use the Deserialize method of the management frame and check that inherited Information Elements have been copied

Implements ns3::TestCase.

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

References ns3::Buffer::AddAtStart(), first::address, ns3::AllSupportedRates::AddSupportedRate(), ns3::Buffer::Begin(), ns3::MgtAssocRequestHeader::Capabilities(), ns3::CapabilityInformation::Deserialize(), ns3::CommonInfoBasicMle::Deserialize(), ns3::WifiInformationElement::DeserializeIfPresent(), ns3::CommonInfoBasicMle::EmlCapabilities::emlsrSupport, ns3::AllSupportedRates::extendedRates, nlohmann::detail::get(), GetMultiLinkElement(), ns3::Buffer::GetSize(), IE_EXT_EHT_CAPABILITIES, IE_EXT_MULTI_LINK_ELEMENT, IE_EXTENSION, ns3::NonInheritance::IsPresent(), ns3::CommonInfoBasicMle::m_bssParamsChangeCount, ns3::NonInheritance::m_elemIdExtList, ns3::NonInheritance::m_elemIdList, ns3::CommonInfoBasicMle::m_emlCapabilities, ns3::CommonInfoBasicMle::m_linkIdInfo, ns3::CommonInfoBasicMle::m_mediumSyncDelayInfo, ns3::CommonInfoBasicMle::m_mldMacAddress, m_outerAssoc, ns3::CommonInfoBasicMle::MediumSyncDelayInfo::mediumSyncDuration, NS_TEST_EXPECT_MSG_EQ, NS_TEST_EXPECT_MSG_GT, ns3::AllSupportedRates::rates, ns3::ReadFrom(), ns3::Buffer::Iterator::ReadLsbtohU16(), ns3::MultiLinkElement::PerStaProfileSubelement::SetAssocRequest(), ns3::MultiLinkElement::PerStaProfileSubelement::SetCompleteProfile(), ns3::CapabilityInformation::SetEss(), ns3::MultiLinkElement::PerStaProfileSubelement::SetLinkId(), ns3::MgtAssocRequestHeader::SetListenInterval(), ns3::CapabilityInformation::SetShortPreamble(), ns3::CapabilityInformation::SetShortSlotTime(), ns3::MultiLinkElement::PerStaProfileSubelement::SetStaMacAddress(), ns3::EhtCapabilities::SetSupportedRxEhtMcsAndNss(), ns3::EhtCapabilities::SetSupportedTxEhtMcsAndNss(), ns3::HeaderSerializationTestCase::TestHeaderSerialization(), and second::value.

+ Here is the call graph for this function:

◆ GetMultiLinkElement()

Member Data Documentation

◆ m_outerAssoc

MgtAssocRequestHeader BasicMultiLinkElementTest::m_outerAssoc
private

the frame containing the MLE

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

Referenced by DoRun().


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