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. | |
| std::string | GetName () const |
| TestCase & | operator= (const TestCase &)=delete |
Private Member Functions | |
| void | DoRun () override |
| Implementation to actually run this TestCase. | |
| void | RunOne (MHz_u chWidth, WifiChannelListType busyChannel) |
| Test a specific combination of operating channel width and busy channel type. | |
Private Attributes | |
| Ptr< ChannelAccessManager > | m_cam |
| channel access manager | |
| Ptr< SpectrumWifiPhy > | m_phy |
| PHY object. | |
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... | |
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. | |
| TestCase * | GetParent () 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. | |
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 1630 of file channel-access-manager-test.cc.
| LargestIdlePrimaryChannelTest::LargestIdlePrimaryChannelTest | ( | ) |
Definition at line 1651 of file channel-access-manager-test.cc.
References ns3::TestCase::TestCase().
Here is the call graph for this function:
|
overridedefault |
|
overrideprivatevirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 1780 of file channel-access-manager-test.cc.
References ns3::CreateObject(), ns3::Simulator::Destroy(), m_cam, m_phy, ns3::Simulator::Run(), RunOne(), ns3::Simulator::Schedule(), ns3::Seconds(), ns3::WIFI_PHY_BAND_6GHZ, and ns3::WIFI_STANDARD_80211be.
Referenced by ~LargestIdlePrimaryChannelTest().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Test a specific combination of operating channel width and busy channel type.
| chWidth | the operating channel width |
| busyChannel | the 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 1657 of file channel-access-manager-test.cc.
References ns3::Count20MHzSubchannels(), m_cam, ns3::MilliSeconds(), ns3::ChannelAccessManager::NotifyCcaBusyStartNow(), ns3::ChannelAccessManager::NotifyRxStartNow(), ns3::Simulator::Now(), NS_TEST_EXPECT_MSG_EQ, ns3::Simulator::Schedule(), ns3::Seconds(), and ns3::WIFI_CHANLIST_PRIMARY.
Referenced by ~LargestIdlePrimaryChannelTest(), and DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
channel access manager
Definition at line 1647 of file channel-access-manager-test.cc.
|
private |