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

Power Rate Adaptation Test. More...

+ Inheritance diagram for PowerRateAdaptationTest:
+ Collaboration diagram for PowerRateAdaptationTest:

Public Member Functions

 PowerRateAdaptationTest ()
 
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

Ptr< NodeConfigureNode ()
 Configure nde function.
 
void TestAparf ()
 Test aparf function.
 
void TestParf ()
 Test parf function.
 
void TestRrpaa ()
 Test rrpaa function.
 

Private Attributes

ObjectFactory m_manager
 manager
 

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.
 
void AddTestCase (TestCase *testCase, TestDuration 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

Power Rate Adaptation Test.

Definition at line 42 of file power-rate-adaptation-test.cc.

Constructor & Destructor Documentation

◆ PowerRateAdaptationTest()

PowerRateAdaptationTest::PowerRateAdaptationTest ( )

Definition at line 65 of file power-rate-adaptation-test.cc.

Member Function Documentation

◆ ConfigureNode()

Ptr< Node > PowerRateAdaptationTest::ConfigureNode ( )
private

Configure nde function.

Returns
the node

Definition at line 71 of file power-rate-adaptation-test.cc.

References ns3::Mac48Address::Allocate(), ns3::ObjectFactory::Create(), m_manager, and ns3::WIFI_STANDARD_80211a.

Referenced by TestAparf(), TestParf(), and TestRrpaa().

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

◆ DoRun()

void PowerRateAdaptationTest::DoRun ( )
overridevirtual

Implementation to actually run this TestCase.

Subclasses should override this method to conduct their tests.

Implements ns3::TestCase.

Definition at line 1151 of file power-rate-adaptation-test.cc.

References TestAparf(), TestParf(), and TestRrpaa().

+ Here is the call graph for this function:

◆ TestAparf()

◆ TestParf()

◆ TestRrpaa()

void PowerRateAdaptationTest::TestRrpaa ( )
private

Test rrpaa function.

This will be the thresholds table. The parameters of the table are:

  • Estimation Window Size (EWND)
  • Maximum Tolerable Loss Probability Threshold (MTL)
  • Opportunistic Rate Increase (and Power Decrease) Probability Threshold (ORI)

We also calculate the needed success and failures to generate a rate or power change: Rate Increase or Power Decrease limits (RI-PD) Rate Decrease or Power Increase limits (RD-PI) Power Decrease limits (PD)

Mode EWND MTL ORI RI-PD RD-PI PD succ fails succ fails OfdmRate6Mbps 8 1 0.19861 7 8 2 OfdmRate9Mbps 11 0.397219 0.14556 10 5 7 2 OfdmRate12Mbps 15 0.291121 0.189753 13 5 11 3 OfdmRate18Mbps 21 0.379507 0.13624 19 8 14 3 OfdmRate24Mbps 27 0.27248 0.174216 23 8 20 5 OfdmRate36Mbps 37 0.348432 0.120773 33 13 25 5 OfdmRate48Mbps 45 0.241546 0.0523952 43 11 35 3 OfdmRate54Mbps 50 0.10479 0 50 6 45 5

Test that 6 is not enough.

Test that 7 is enough.

Increase rate until maximal rate.

Now we need more successful transmissions to make power decrease. As we are at maximal rate, the power is decreased when it is sure that the failures will not generate a rate decrease.

As rate hasn't change the same amount of success are needed. After 16*45 successful transmissions power is decreased to zero.

After 6 failures the power should be increased.

Definition at line 643 of file power-rate-adaptation-test.cc.

References ns3::Mac48Address::Allocate(), ConfigureNode(), ns3::Simulator::Destroy(), ns3::WifiTxVector::GetChannelWidth(), ns3::WifiMode::GetDataRate(), ns3::WifiTxVector::GetGuardInterval(), ns3::WifiTxVector::GetMode(), ns3::WifiTxVector::GetTxPowerLevel(), m_manager, NS_TEST_ASSERT_MSG_EQ, ns3::Simulator::Run(), ns3::Seconds(), ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetQosTid(), ns3::WifiMacHeader::SetType(), ns3::ObjectFactory::SetTypeId(), ns3::Simulator::Stop(), and ns3::WIFI_MAC_DATA.

Referenced by DoRun().

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

Member Data Documentation

◆ m_manager

ObjectFactory PowerRateAdaptationTest::m_manager
private

manager

Definition at line 62 of file power-rate-adaptation-test.cc.

Referenced by ConfigureNode(), TestAparf(), TestParf(), and TestRrpaa().


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