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

Test to validate that Ideal rate manager properly selects TXVECTOR in scenarios where MIMO is used. More...

+ Inheritance diagram for IdealRateManagerMimoTest:
+ Collaboration diagram for IdealRateManagerMimoTest:

Public Member Functions

 IdealRateManagerMimoTest ()
 
 ~IdealRateManagerMimoTest () override
 
void DoRun () override
 Implementation to actually run this TestCase.
 
- 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 CheckLastSelectedMode (WifiMode expectedMode)
 Check if the selected WifiMode is correct.
 
void CheckLastSelectedNss (uint8_t expectedNss)
 Check if the selected Nss is correct.
 
void SendPacket (Ptr< NetDevice > sourceDevice, Address &destination)
 Triggers the transmission of a 1000 Byte-long data packet from the source device.
 
void SetApMimoSettings (uint8_t antennas, uint8_t maxStreams)
 Change the configured MIMO settings for AP node.
 
void SetStaMimoSettings (uint8_t antennas, uint8_t maxStreams)
 Change the configured MIMO settings for STA node.
 
void TxCallback (std::string context, WifiConstPsduMap psdus, WifiTxVector txVector, double txPowerW)
 Callback that indicates a PSDU is being transmitted.
 

Private Attributes

WifiTxVector m_txVector
 Store the last TXVECTOR used to transmit Data.
 

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::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 to validate that Ideal rate manager properly selects TXVECTOR in scenarios where MIMO is used.

The test consider both balanced and unbalanced MIMO settings, and verify ideal picks the correct number of spatial streams and the correct MCS, taking into account potential diversity in AWGN channels when the number of antenna at the receiver is higher than the number of spatial streams used for the transmission.

Definition at line 3152 of file wifi-test.cc.

Constructor & Destructor Documentation

◆ IdealRateManagerMimoTest()

IdealRateManagerMimoTest::IdealRateManagerMimoTest ( )

Definition at line 3205 of file wifi-test.cc.

◆ ~IdealRateManagerMimoTest()

IdealRateManagerMimoTest::~IdealRateManagerMimoTest ( )
override

Definition at line 3210 of file wifi-test.cc.

Member Function Documentation

◆ CheckLastSelectedMode()

void IdealRateManagerMimoTest::CheckLastSelectedMode ( WifiMode expectedMode)
private

Check if the selected WifiMode is correct.

Parameters
expectedModethe expected WifiMode

Definition at line 3265 of file wifi-test.cc.

References ns3::WifiTxVector::GetMode(), m_txVector, and NS_TEST_ASSERT_MSG_EQ.

Referenced by DoRun().

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

◆ CheckLastSelectedNss()

void IdealRateManagerMimoTest::CheckLastSelectedNss ( uint8_t expectedNss)
private

Check if the selected Nss is correct.

Parameters
expectedNssthe expected Nss

Definition at line 3256 of file wifi-test.cc.

References ns3::WifiTxVector::GetNss(), m_txVector, and NS_TEST_ASSERT_MSG_EQ.

Referenced by DoRun().

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

◆ DoRun()

void IdealRateManagerMimoTest::DoRun ( )
overridevirtual

◆ SendPacket()

void IdealRateManagerMimoTest::SendPacket ( Ptr< NetDevice > sourceDevice,
Address & destination )
private

Triggers the transmission of a 1000 Byte-long data packet from the source device.

Parameters
sourceDevicepointer to the source NetDevice
destinationaddress of the destination device

Definition at line 3237 of file wifi-test.cc.

References ns3::Create().

Referenced by DoRun().

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

◆ SetApMimoSettings()

void IdealRateManagerMimoTest::SetApMimoSettings ( uint8_t antennas,
uint8_t maxStreams )
private

Change the configured MIMO settings for AP node.

Parameters
antennasthe number of active antennas
maxStreamsthe maximum number of allowed spatial streams

Definition at line 3215 of file wifi-test.cc.

References ns3::Config::Set().

Referenced by DoRun().

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

◆ SetStaMimoSettings()

void IdealRateManagerMimoTest::SetStaMimoSettings ( uint8_t antennas,
uint8_t maxStreams )
private

Change the configured MIMO settings for STA node.

Parameters
antennasthe number of active antennas
maxStreamsthe maximum number of allowed spatial streams

Definition at line 3226 of file wifi-test.cc.

References ns3::Config::Set().

Referenced by DoRun().

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

◆ TxCallback()

void IdealRateManagerMimoTest::TxCallback ( std::string context,
WifiConstPsduMap psdus,
WifiTxVector txVector,
double txPowerW )
private

Callback that indicates a PSDU is being transmitted.

Parameters
contextthe context
psdusthe PSDU map to transmit
txVectorthe TX vector
txPowerWthe TX power (W)

Definition at line 3244 of file wifi-test.cc.

References m_txVector.

Referenced by DoRun().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_txVector

WifiTxVector IdealRateManagerMimoTest::m_txVector
private

Store the last TXVECTOR used to transmit Data.

Definition at line 3202 of file wifi-test.cc.

Referenced by CheckLastSelectedMode(), CheckLastSelectedNss(), and TxCallback().


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