Test to validate that Ideal rate manager properly selects TXVECTOR in scenarios where MIMO is used. More...
Public Member Functions | |
IdealRateManagerMimoTest () | |
~IdealRateManagerMimoTest () override | |
void | DoRun () override |
Implementation to actually run this TestCase. 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 | CheckLastSelectedMode (WifiMode expectedMode) |
Check if the selected WifiMode is correct. More... | |
void | CheckLastSelectedNss (uint8_t expectedNss) |
Check if the selected Nss is correct. More... | |
void | SendPacket (Ptr< NetDevice > sourceDevice, Address &destination) |
Triggers the transmission of a 1000 Byte-long data packet from the source device. More... | |
void | SetApMimoSettings (uint8_t antennas, uint8_t maxStreams) |
Change the configured MIMO settings for AP node. More... | |
void | SetStaMimoSettings (uint8_t antennas, uint8_t maxStreams) |
Change the configured MIMO settings for STA node. More... | |
void | TxCallback (std::string context, WifiConstPsduMap psdus, WifiTxVector txVector, double txPowerW) |
Callback that indicates a PSDU is being transmitted. More... | |
Private Attributes | |
WifiTxVector | m_txVector |
Store the last TXVECTOR used to transmit Data. 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::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 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 3133 of file wifi-test.cc.
IdealRateManagerMimoTest::IdealRateManagerMimoTest | ( | ) |
Definition at line 3186 of file wifi-test.cc.
|
override |
Definition at line 3191 of file wifi-test.cc.
|
private |
Check if the selected WifiMode is correct.
expectedMode | the expected WifiMode |
Definition at line 3246 of file wifi-test.cc.
References ns3::WifiTxVector::GetMode(), m_txVector, and NS_TEST_ASSERT_MSG_EQ.
Referenced by DoRun().
|
private |
Check if the selected Nss is correct.
expectedNss | the expected Nss |
Definition at line 3237 of file wifi-test.cc.
References ns3::WifiTxVector::GetNss(), m_txVector, and NS_TEST_ASSERT_MSG_EQ.
Referenced by DoRun().
|
overridevirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 3256 of file wifi-test.cc.
References third::channel, CheckLastSelectedMode(), CheckLastSelectedNss(), ns3::Config::Connect(), ns3::NodeContainer::Create(), ns3::NetDeviceContainer::Get(), third::mac, ns3::MakeCallback(), third::mobility, third::phy, ns3::Seconds(), SendPacket(), SetApMimoSettings(), SetStaMimoSettings(), TxCallback(), third::wifi, ns3::WIFI_STANDARD_80211ac, and third::wifiApNode.
|
private |
Triggers the transmission of a 1000 Byte-long data packet from the source device.
sourceDevice | pointer to the source NetDevice |
destination | address of the destination device |
Definition at line 3218 of file wifi-test.cc.
Referenced by DoRun().
|
private |
Change the configured MIMO settings for AP node.
antennas | the number of active antennas |
maxStreams | the maximum number of allowed spatial streams |
Definition at line 3196 of file wifi-test.cc.
References ns3::Config::Set().
Referenced by DoRun().
|
private |
Change the configured MIMO settings for STA node.
antennas | the number of active antennas |
maxStreams | the maximum number of allowed spatial streams |
Definition at line 3207 of file wifi-test.cc.
References ns3::Config::Set().
Referenced by DoRun().
|
private |
Callback that indicates a PSDU is being transmitted.
context | the context |
psdus | the PSDU map to transmit |
txVector | the TX vector |
txPowerW | the TX power (W) |
Definition at line 3225 of file wifi-test.cc.
References m_txVector.
Referenced by DoRun().
|
private |
Store the last TXVECTOR used to transmit Data.
Definition at line 3183 of file wifi-test.cc.
Referenced by CheckLastSelectedMode(), CheckLastSelectedNss(), and TxCallback().