PHY CCA thresholds test. More...
 Inheritance diagram for WifiPhyCcaThresholdsTest:
 Collaboration diagram for WifiPhyCcaThresholdsTest:Public Member Functions | |
| WifiPhyCcaThresholdsTest () | |
  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 | |
| Ptr< HePpdu > | CreateDummyHePpdu (uint16_t bandwidth) | 
| Create a HE PPDU.  More... | |
| Ptr< HtPpdu > | CreateDummyHtPpdu (uint16_t bandwidth) | 
| Create a HT PPDU.  More... | |
| Ptr< OfdmPpdu > | CreateDummyNonHtPpdu () | 
| Create a non-HT PPDU.  More... | |
| Ptr< WifiPsdu > | CreateDummyPsdu () | 
| Create a dummy PSDU whose payload is 1000 bytes.  More... | |
| Ptr< VhtPpdu > | CreateDummyVhtPpdu (uint16_t bandwidth) | 
| Create a VHT PPDU.  More... | |
| void | DoRun () override | 
| Implementation to actually run this TestCase.  More... | |
| void | DoSetup () override | 
| Implementation to do any local setup required for this TestCase.  More... | |
| void | DoTeardown () override | 
| Implementation to do any local setup required for this TestCase.  More... | |
| void | RunOne () | 
| Run tests for given CCA attributes.  More... | |
| void | VerifyCcaThreshold (const Ptr< PhyEntity > phy, const Ptr< const WifiPpdu > ppdu, WifiChannelListType channelType, double expectedCcaThresholdDbm) | 
| Function to verify the CCA threshold that is being reported by a given PHY entity upon reception of a signal or a PPDU.  More... | |
Private Attributes | |
| double | m_CcaEdThresholdDbm | 
| The current CCA-ED threshold for a 20 MHz subchannel (in dBm)  More... | |
| double | m_CcaSensitivityDbm | 
| The current CCA sensitivity threshold for signals that occupy the primary 20 MHz channel (in dBm)  More... | |
| Ptr< WifiNetDevice > | m_device | 
| The WifiNetDevice.  More... | |
| Ptr< ObssPdAlgorithm > | m_obssPdAlgorithm | 
| The OBSS-PD algorithm.  More... | |
| double | m_obssPdLevel | 
| The current OBSS-PD level (in dBm)  More... | |
| Ptr< SpectrumWifiPhy > | m_phy | 
| The spectrum PHY.  More... | |
| VhtConfiguration::SecondaryCcaSensitivityThresholds | m_secondaryCcaSensitivityThresholds | 
| The current CCA sensitivity thresholds for signals that do not occupy the primary 20 MHz channel (in dBm)  More... | |
| Ptr< VhtConfiguration > | m_vhtConfiguration | 
| The VHT configuration.  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... | |
PHY CCA thresholds test.
Definition at line 75 of file wifi-phy-cca-test.cc.
| WifiPhyCcaThresholdsTest::WifiPhyCcaThresholdsTest | ( | ) | 
Definition at line 150 of file wifi-phy-cca-test.cc.
Create a HE PPDU.
| bandwidth | the bandwidth used for the transmission the PPDU in MHz | 
Definition at line 207 of file wifi-phy-cca-test.cc.
References CreateDummyPsdu(), ns3::MicroSeconds(), P20_CENTER_FREQUENCY, ns3::WIFI_PHY_BAND_5GHZ, and ns3::WIFI_PREAMBLE_HE_SU.
Referenced by RunOne().
 Here is the call graph for this function:
 Here is the caller graph for this function:Create a HT PPDU.
| bandwidth | the bandwidth used for the transmission the PPDU in MHz | 
Definition at line 179 of file wifi-phy-cca-test.cc.
References CreateDummyPsdu(), ns3::MicroSeconds(), P20_CENTER_FREQUENCY, ns3::WIFI_PHY_BAND_5GHZ, and ns3::WIFI_PREAMBLE_HT_MF.
Referenced by RunOne().
 Here is the call graph for this function:
 Here is the caller graph for this function:Create a non-HT PPDU.
Definition at line 170 of file wifi-phy-cca-test.cc.
References CreateDummyPsdu(), P20_CENTER_FREQUENCY, ns3::WIFI_PHY_BAND_5GHZ, and ns3::WIFI_PREAMBLE_LONG.
Referenced by RunOne().
 Here is the call graph for this function:
 Here is the caller graph for this function:Create a dummy PSDU whose payload is 1000 bytes.
Definition at line 160 of file wifi-phy-cca-test.cc.
References ns3::WifiMacHeader::SetQosTid(), ns3::WifiMacHeader::SetType(), and ns3::WIFI_MAC_QOSDATA.
Referenced by CreateDummyHePpdu(), CreateDummyHtPpdu(), CreateDummyNonHtPpdu(), and CreateDummyVhtPpdu().
 Here is the call graph for this function:
 Here is the caller graph for this function:Create a VHT PPDU.
| bandwidth | the bandwidth used for the transmission the PPDU in MHz | 
Definition at line 193 of file wifi-phy-cca-test.cc.
References CreateDummyPsdu(), ns3::MicroSeconds(), P20_CENTER_FREQUENCY, ns3::WIFI_PHY_BAND_5GHZ, and ns3::WIFI_PREAMBLE_VHT_SU.
Referenced by RunOne().
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  overrideprivatevirtual | 
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 540 of file wifi-phy-cca-test.cc.
References m_CcaEdThresholdDbm, m_CcaSensitivityDbm, m_obssPdLevel, m_secondaryCcaSensitivityThresholds, and RunOne().
 Here is the call graph for this function:
      
  | 
  overrideprivatevirtual | 
Implementation to do any local setup required for this TestCase.
Subclasses should override this method to perform any costly per-test setup before DoRun is invoked.
Reimplemented from ns3::TestCase.
Definition at line 241 of file wifi-phy-cca-test.cc.
References ns3::Object::AggregateObject(), ns3::WifiPhy::ConfigureStandard(), ns3::ObssPdAlgorithm::ConnectWifiNetDevice(), m_device, m_obssPdAlgorithm, m_phy, m_vhtConfiguration, P20_CENTER_FREQUENCY, ns3::WifiPhy::SetDevice(), ns3::WifiPhy::SetOperatingChannel(), ns3::WifiNetDevice::SetPhy(), ns3::WifiNetDevice::SetStandard(), ns3::WifiNetDevice::SetVhtConfiguration(), ns3::WIFI_PHY_BAND_5GHZ, and ns3::WIFI_STANDARD_80211ax.
 Here is the call graph for this function:
      
  | 
  overrideprivatevirtual | 
Implementation to do any local setup required for this TestCase.
Subclasses should override this method to perform any costly per-test teardown
Reimplemented from ns3::TestCase.
Definition at line 270 of file wifi-phy-cca-test.cc.
References ns3::Object::Dispose(), and m_device.
 Here is the call graph for this function:
      
  | 
  private | 
Run tests for given CCA attributes.
Definition at line 277 of file wifi-phy-cca-test.cc.
References CreateDummyHePpdu(), CreateDummyHtPpdu(), CreateDummyNonHtPpdu(), CreateDummyVhtPpdu(), ns3::WifiPhy::GetPhyEntity(), m_CcaEdThresholdDbm, m_CcaSensitivityDbm, m_obssPdAlgorithm, m_obssPdLevel, m_phy, m_secondaryCcaSensitivityThresholds, m_vhtConfiguration, max, ns3::WifiPhy::SetCcaEdThreshold(), ns3::WifiPhy::SetCcaSensitivityThreshold(), ns3::ObssPdAlgorithm::SetObssPdLevel(), ns3::VhtConfiguration::SetSecondaryCcaSensitivityThresholds(), VerifyCcaThreshold(), ns3::WIFI_CHANLIST_PRIMARY, ns3::WIFI_CHANLIST_SECONDARY, ns3::WIFI_CHANLIST_SECONDARY40, ns3::WIFI_CHANLIST_SECONDARY80, ns3::WIFI_MOD_CLASS_HE, ns3::WIFI_MOD_CLASS_HT, ns3::WIFI_MOD_CLASS_OFDM, and ns3::WIFI_MOD_CLASS_VHT.
Referenced by DoRun().
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  private | 
Function to verify the CCA threshold that is being reported by a given PHY entity upon reception of a signal or a PPDU.
| phy | the PHY entity to verify | 
| ppdu | the incoming PPDU or signal (if nullptr) | 
| channelType | the channel list type that indicates which channel the PPDU or the signal occupies | 
| expectedCcaThresholdDbm | the CCA threshold in dBm that is expected to be reported | 
Definition at line 221 of file wifi-phy-cca-test.cc.
References NS_LOG_FUNCTION, NS_LOG_INFO, NS_TEST_EXPECT_MSG_EQ_TOL, and third::phy.
Referenced by RunOne().
 Here is the caller graph for this function:
      
  | 
  private | 
The current CCA-ED threshold for a 20 MHz subchannel (in dBm)
Definition at line 138 of file wifi-phy-cca-test.cc.
      
  | 
  private | 
The current CCA sensitivity threshold for signals that occupy the primary 20 MHz channel (in dBm)
Definition at line 139 of file wifi-phy-cca-test.cc.
      
  | 
  private | 
The WifiNetDevice.
Definition at line 133 of file wifi-phy-cca-test.cc.
Referenced by DoSetup(), and DoTeardown().
      
  | 
  private | 
The OBSS-PD algorithm.
Definition at line 135 of file wifi-phy-cca-test.cc.
      
  | 
  private | 
The current OBSS-PD level (in dBm)
Definition at line 147 of file wifi-phy-cca-test.cc.
      
  | 
  private | 
The spectrum PHY.
Definition at line 134 of file wifi-phy-cca-test.cc.
      
  | 
  private | 
The current CCA sensitivity thresholds for signals that do not occupy the primary 20 MHz channel (in dBm)
Definition at line 143 of file wifi-phy-cca-test.cc.
      
  | 
  private | 
The VHT configuration.
Definition at line 136 of file wifi-phy-cca-test.cc.