This test verifies the correct function of the WifiBandwidthFilter. More...
Public Member Functions | |
TestSpectrumChannelWithBandwidthFilter (uint8_t channel, uint16_t expectedValue) | |
Constructor. | |
![]() | |
TestCase (const TestCase &)=delete | |
virtual | ~TestCase () |
Destructor. | |
std::string | GetName () const |
TestCase & | operator= (const TestCase &)=delete |
Protected Member Functions | |
void | DoSetup () override |
Implementation to do any local setup required for this TestCase. | |
void | DoTeardown () override |
Implementation to do any local setup required for this 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. | |
Private Member Functions | |
void | CheckRxPacketCount (uint16_t expectedValue) |
Event scheduled at end of simulation for validation. | |
void | DoRun () override |
Implementation to actually run this TestCase. | |
void | RxBegin (Ptr< const SpectrumSignalParameters > signal, uint32_t senderNodeId, double rxPower, Time duration) |
Callback invoked when the PHY model starts to process a signal. | |
void | Send () const |
Send function (sends a single packet) | |
Private Attributes | |
uint8_t | m_channel {36} |
channel for packet transmission | |
uint32_t | m_countRxBegin {0} |
count of receive events | |
uint16_t | m_expectedValue {0} |
expected count of receive events | |
Ptr< SpectrumWifiPhy > | m_rx {nullptr} |
receive function | |
Ptr< SpectrumWifiPhy > | m_tx {nullptr} |
transmit function | |
Additional Inherited Members | |
![]() | |
enum class | Duration { QUICK = 1 , EXTENSIVE = 2 , TAKES_FOREVER = 3 } |
How long the test takes to execute. More... | |
![]() | |
static constexpr auto | QUICK = Duration::QUICK |
Deprecated test duration simple enums. | |
static constexpr auto | EXTENSIVE = Duration::EXTENSIVE |
static constexpr auto | TAKES_FOREVER = Duration::TAKES_FOREVER |
This test verifies the correct function of the WifiBandwidthFilter.
2 SpectrumWifiPhy are setup and connected on the same spectrum channel. The test will send a packet over the channel and if the signal plus guardband overlaps the channel the filter will not discard the signal but if there is no overlap the filter will filter it out.
Definition at line 4676 of file wifi-phy-reception-test.cc.
TestSpectrumChannelWithBandwidthFilter::TestSpectrumChannelWithBandwidthFilter | ( | uint8_t | channel, |
uint16_t | expectedValue ) |
Constructor.
channel | channel to be used by transmitter |
expectedValue | expected number of received packets |
Definition at line 4726 of file wifi-phy-reception-test.cc.
|
private |
Event scheduled at end of simulation for validation.
expectedValue | expected number of receive events |
Definition at line 4759 of file wifi-phy-reception-test.cc.
References m_countRxBegin, and NS_TEST_ASSERT_MSG_EQ.
Referenced by DoRun().
|
overrideprivatevirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 4832 of file wifi-phy-reception-test.cc.
References CheckRxPacketCount(), ns3::Simulator::Destroy(), m_channel, m_expectedValue, m_rx, m_tx, ns3::MilliSeconds(), NS_LOG_FUNCTION, ns3::Simulator::Run(), ns3::Simulator::Schedule(), Send(), and ns3::WIFI_PHY_BAND_5GHZ.
|
overrideprotectedvirtual |
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 4778 of file wifi-phy-reception-test.cc.
References ns3::CreateObject(), m_rx, m_tx, ns3::MakeCallback(), NS_LOG_FUNCTION, RxBegin(), and ns3::WIFI_STANDARD_80211ax.
|
overrideprotectedvirtual |
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 4825 of file wifi-phy-reception-test.cc.
|
private |
Callback invoked when the PHY model starts to process a signal.
signal | the arriving signal |
senderNodeId | node Id of the sender of the signal |
rxPower | received signal power |
duration | signal duration |
Definition at line 4767 of file wifi-phy-reception-test.cc.
References m_countRxBegin, and NS_LOG_FUNCTION.
Referenced by DoSetup().
|
private |
Send function (sends a single packet)
Definition at line 4736 of file wifi-phy-reception-test.cc.
References ns3::Create(), ns3::HePhy::GetHeMcs7(), m_tx, ns3::NanoSeconds(), ns3::WifiMacHeader::SetQosTid(), ns3::WifiMacHeader::SetType(), ns3::WIFI_MAC_QOSDATA, and ns3::WIFI_PREAMBLE_HE_SU.
Referenced by DoRun().
|
private |
channel for packet transmission
Definition at line 4722 of file wifi-phy-reception-test.cc.
Referenced by DoRun().
|
private |
count of receive events
Definition at line 4721 of file wifi-phy-reception-test.cc.
Referenced by CheckRxPacketCount(), and RxBegin().
|
private |
expected count of receive events
Definition at line 4723 of file wifi-phy-reception-test.cc.
Referenced by DoRun().
|
private |
receive function
Definition at line 4720 of file wifi-phy-reception-test.cc.
Referenced by DoRun(), DoSetup(), and DoTeardown().
|
private |
transmit function
Definition at line 4719 of file wifi-phy-reception-test.cc.
Referenced by DoRun(), DoSetup(), DoTeardown(), and Send().