A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
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.
 
 ~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.
 
- 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

MgtAssocRequestHeader m_outerAssoc
 the frame containing the MLE
 

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 Multi-Link Element (Basic variant) serialization and deserialization.

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

Constructor & Destructor Documentation

◆ BasicMultiLinkElementTest()

BasicMultiLinkElementTest::BasicMultiLinkElementTest ( )

Constructor.

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

◆ ~BasicMultiLinkElementTest()

BasicMultiLinkElementTest::~BasicMultiLinkElementTest ( )
override

Definition at line 68 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 116 of file wifi-eht-info-elems-test.cc.

References ns3::Buffer::AddAtStart(), ns3::AllSupportedRates::AddSupportedRate(), ns3::MultiLinkElement::BASIC_VARIANT, ns3::Buffer::Begin(), ns3::MgtAssocRequestHeader::Capabilities(), ns3::CapabilityInformation::Deserialize(), ns3::CommonInfoBasicMle::Deserialize(), ns3::WifiInformationElement::DeserializeIfPresent(), ns3::EhtMcsAndNssSet::EHT_MCS_MAP_TYPE_20_MHZ_ONLY, ns3::CommonInfoBasicMle::EmlCapabilities::emlsrSupport, ns3::AllSupportedRates::extendedRates, 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::MultiLinkElement::PER_STA_PROFILE_SUBELEMENT_ID, 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(), and ns3::HeaderSerializationTestCase::TestHeaderSerialization().

+ Here is the call graph for this function:

◆ GetMultiLinkElement()

MultiLinkElement BasicMultiLinkElementTest::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.

Parameters
commonInfothe given Common Info field
subelementsthe given set of Per-STA Profile Subelements
Returns
a Multi-Link Element

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

References ns3::MultiLinkElement::AddPerStaProfileSubelement(), ns3::MultiLinkElement::BASIC_VARIANT, ns3::MultiLinkElement::GetCommonInfoBasic(), ns3::MultiLinkElement::GetPerStaProfile(), ns3::CommonInfoBasicMle::m_bssParamsChangeCount, ns3::CommonInfoBasicMle::m_emlCapabilities, ns3::CommonInfoBasicMle::m_linkIdInfo, ns3::CommonInfoBasicMle::m_mediumSyncDelayInfo, ns3::CommonInfoBasicMle::m_mldMacAddress, ns3::MicroSeconds(), ns3::MultiLinkElement::SetBssParamsChangeCount(), ns3::MultiLinkElement::SetEmlsrPaddingDelay(), ns3::MultiLinkElement::SetEmlsrTransitionDelay(), ns3::MultiLinkElement::SetLinkIdInfo(), ns3::CommonInfoBasicMle::SetMediumSyncDelayTimer(), ns3::CommonInfoBasicMle::SetMediumSyncMaxNTxops(), ns3::CommonInfoBasicMle::SetMediumSyncOfdmEdThreshold(), ns3::MultiLinkElement::SetMldMacAddress(), and ns3::MultiLinkElement::SetTransitionTimeout().

Referenced by DoRun().

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

Member Data Documentation

◆ m_outerAssoc

MgtAssocRequestHeader BasicMultiLinkElementTest::m_outerAssoc
private

the frame containing the MLE

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

Referenced by DoRun().


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