Test the calculation of the largest idle primary channel performed by ChannelAccessManager::GetLargestIdlePrimaryChannel(). More...
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 |
TestCase & | operator= (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< ChannelAccessManager > | m_cam |
channel access manager More... | |
Ptr< SpectrumWifiPhy > | m_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... | |
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 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.
LargestIdlePrimaryChannelTest::LargestIdlePrimaryChannelTest | ( | ) |
Definition at line 1355 of file channel-access-manager-test.cc.
|
overridedefault |
|
overrideprivatevirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 1483 of file channel-access-manager-test.cc.
References ns3::SpectrumWifiPhy::AddChannel(), third::channel, ns3::WifiPhy::ConfigureStandard(), ns3::Object::Dispose(), m_cam, m_phy, ns3::ChannelAccessManager::RemovePhyListener(), RunOne(), ns3::Seconds(), ns3::WifiPhy::SetInterferenceHelper(), ns3::WifiPhy::SetOperatingChannel(), ns3::ChannelAccessManager::SetupPhyListener(), ns3::WIFI_PHY_BAND_5GHZ, and ns3::WIFI_STANDARD_80211ax.
|
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 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().
|
private |
channel access manager
Definition at line 1351 of file channel-access-manager-test.cc.
|
private |