A Discrete-Event Network Simulator
API
LargestIdlePrimaryChannelTest Class Reference

Test the calculation of the largest idle primary channel performed by ChannelAccessManager::GetLargestIdlePrimaryChannel(). More...

+ Inheritance diagram for LargestIdlePrimaryChannelTest:
+ Collaboration diagram for LargestIdlePrimaryChannelTest:

Public Member Functions

 LargestIdlePrimaryChannelTest ()
 
 ~LargestIdlePrimaryChannelTest () override=default
 
- 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...
 
void RunOne (uint16_t chWidth, WifiChannelListType busyChannel)
 Test a specific combination of operating channel width and busy channel type. More...
 

Private Attributes

Ptr< ChannelAccessManagerm_cam
 channel access manager More...
 
Ptr< SpectrumWifiPhym_phy
 PHY object. 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...
 
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 the calculation of the largest idle primary channel performed by ChannelAccessManager::GetLargestIdlePrimaryChannel().

In every test, the ChannelAccessManager is notified of a CCA_BUSY period and subsequently of the start of RX. The value returned by GetLargestIdlePrimaryChannel() is checked at different times and for different intervals. All the possible combinations of operating channel width and busy channel type are tested.

Definition at line 1334 of file channel-access-manager-test.cc.

Constructor & Destructor Documentation

◆ LargestIdlePrimaryChannelTest()

LargestIdlePrimaryChannelTest::LargestIdlePrimaryChannelTest ( )

Definition at line 1355 of file channel-access-manager-test.cc.

◆ ~LargestIdlePrimaryChannelTest()

LargestIdlePrimaryChannelTest::~LargestIdlePrimaryChannelTest ( )
overridedefault

Member Function Documentation

◆ DoRun()

void LargestIdlePrimaryChannelTest::DoRun ( )
overrideprivatevirtual

◆ RunOne()

void LargestIdlePrimaryChannelTest::RunOne ( uint16_t  chWidth,
WifiChannelListType  busyChannel 
)
private

Test a specific combination of operating channel width and busy channel type.

Parameters
chWidththe operating channel width
busyChannelthe busy channel type
            <  Interval1  >< Interval2 >
                           <     Interval3   >
                                  < Interval4>       < Interval5 >
                                                  <  Interval6   >

-----—|----—^-----------—^---------—^--—^---—^---------—^— P20 | | | | | RX | | -----—|----—|--—IDLE--—|-—IDLE-—|--—|---—|---------—|— S20 | | | | | | IDLE | -----—|----—v-----------—v---------—v--—|---—|---------—|— S40 | | CCA_BUSY | IDLE | | | -----—|--------------------------—|--------—|---—|---------—|— S80 | | | | | -----—|-------------------—|---—v--—|--—v---—|---------—|— start Check times: t1 t2 t3 t5 t4 t6

Definition at line 1361 of file channel-access-manager-test.cc.

References ns3::ChannelAccessManager::GetLargestIdlePrimaryChannel(), m_cam, ns3::MilliSeconds(), ns3::Now(), NS_TEST_EXPECT_MSG_EQ, ns3::Seconds(), two-ray-to-three-gpp-ch-calibration::start, and ns3::WIFI_CHANLIST_PRIMARY.

Referenced by DoRun().

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

Member Data Documentation

◆ m_cam

Ptr<ChannelAccessManager> LargestIdlePrimaryChannelTest::m_cam
private

channel access manager

Definition at line 1351 of file channel-access-manager-test.cc.

Referenced by DoRun(), and RunOne().

◆ m_phy

Ptr<SpectrumWifiPhy> LargestIdlePrimaryChannelTest::m_phy
private

PHY object.

Definition at line 1352 of file channel-access-manager-test.cc.

Referenced by DoRun().


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