A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
Bug2843TestCase Class Reference

Make sure that the correct channel width and center frequency have been set for OFDM basic rate transmissions and BSS channel widths larger than 20 MHz. More...

+ Inheritance diagram for Bug2843TestCase:
+ Collaboration diagram for Bug2843TestCase:

Public Member Functions

 Bug2843TestCase ()
 
 ~Bug2843TestCase () override
 
void DoRun () override
 Implementation to actually run this TestCase.
 
- Public Member Functions inherited from ns3::TestCase
 TestCase (const TestCase &)=delete
 
virtual ~TestCase ()
 Destructor.
 
std::string GetName () const
 
TestCaseoperator= (const TestCase &)=delete
 

Private Types

typedef std::tuple< Hz_u, MHz_u, uint32_t, WifiModulationClassFreqWidthSubbandModulationTuple
 A tuple of {starting frequency, channelWidth, Number of subbands in SpectrumModel, modulation type}.
 

Private Member Functions

void SendPacketBurst (uint8_t numPackets, Ptr< NetDevice > sourceDevice, Address &destination) const
 Triggers the arrival of a burst of 1000 Byte-long packets in the source device.
 
void StoreDistinctTuple (std::string context, Ptr< SpectrumSignalParameters > txParams)
 Stores the distinct {starting frequency, channelWidth, Number of subbands in SpectrumModel, modulation type} tuples that have been used during the testcase run.
 

Private Attributes

MHz_u m_channelWidth
 channel width
 
std::vector< FreqWidthSubbandModulationTuplem_distinctTuples
 vector of distinct {starting frequency, channelWidth, Number of subbands in SpectrumModel, modulation type} tuples
 

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...
 
- Static Public Attributes inherited from ns3::TestCase
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
 
- 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.
 
TestCaseGetParent () 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.
 

Detailed Description

Make sure that the correct channel width and center frequency have been set for OFDM basic rate transmissions and BSS channel widths larger than 20 MHz.

The scenario considers a UDP transmission between a 40 MHz 802.11ac station and a 40 MHz 802.11ac access point. All transmission parameters are checked so as to ensure that only 2 {starting frequency, channelWidth, Number of subbands in SpectrumModel, modulation type} tuples are used.

See Bug 2843

Definition at line 1515 of file wifi-test.cc.

Member Typedef Documentation

◆ FreqWidthSubbandModulationTuple

A tuple of {starting frequency, channelWidth, Number of subbands in SpectrumModel, modulation type}.

Definition at line 1527 of file wifi-test.cc.

Constructor & Destructor Documentation

◆ Bug2843TestCase()

Bug2843TestCase::Bug2843TestCase ( )

Definition at line 1552 of file wifi-test.cc.

◆ ~Bug2843TestCase()

Bug2843TestCase::~Bug2843TestCase ( )
override

Definition at line 1558 of file wifi-test.cc.

Member Function Documentation

◆ DoRun()

void Bug2843TestCase::DoRun ( )
overridevirtual

Implementation to actually run this TestCase.

Subclasses should override this method to conduct their tests.

Implements ns3::TestCase.

Definition at line 1609 of file wifi-test.cc.

References ns3::Config::Connect(), ns3::NodeContainer::Create(), ns3::CreateObject(), ns3::Simulator::Destroy(), ns3::NetDeviceContainer::Get(), m_distinctTuples, ns3::MakeCallback(), NS_TEST_ASSERT_MSG_EQ, ns3::Simulator::Run(), ns3::Simulator::Schedule(), ns3::Seconds(), SendPacketBurst(), ns3::WifiPhyHelper::Set(), ns3::SpectrumWifiPhyHelper::SetChannel(), ns3::WifiPhyHelper::SetErrorRateModel(), ns3::Simulator::Stop(), StoreDistinctTuple(), and ns3::WIFI_STANDARD_80211ac.

+ Here is the call graph for this function:

◆ SendPacketBurst()

void Bug2843TestCase::SendPacketBurst ( uint8_t numPackets,
Ptr< NetDevice > sourceDevice,
Address & destination ) const
private

Triggers the arrival of a burst of 1000 Byte-long packets in the source device.

Parameters
numPacketsnumber of packets in burst
sourceDevicepointer to the source NetDevice
destinationaddress of the destination device

Definition at line 1597 of file wifi-test.cc.

References ns3::Create().

Referenced by DoRun().

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

◆ StoreDistinctTuple()

void Bug2843TestCase::StoreDistinctTuple ( std::string context,
Ptr< SpectrumSignalParameters > txParams )
private

Stores the distinct {starting frequency, channelWidth, Number of subbands in SpectrumModel, modulation type} tuples that have been used during the testcase run.

Parameters
contextthe context
txParamsspectrum signal parameters set by transmitter

Definition at line 1563 of file wifi-test.cc.

References ns3::DynamicCast(), ns3::WifiTxVector::GetChannelWidth(), ns3::WifiTxVector::GetMode(), ns3::WifiMode::GetModulationClass(), m_channelWidth, and m_distinctTuples.

Referenced by DoRun().

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

Member Data Documentation

◆ m_channelWidth

MHz_u Bug2843TestCase::m_channelWidth
private

channel width

Definition at line 1549 of file wifi-test.cc.

Referenced by StoreDistinctTuple().

◆ m_distinctTuples

std::vector<FreqWidthSubbandModulationTuple> Bug2843TestCase::m_distinctTuples
private

vector of distinct {starting frequency, channelWidth, Number of subbands in SpectrumModel, modulation type} tuples

Definition at line 1529 of file wifi-test.cc.

Referenced by DoRun(), and StoreDistinctTuple().


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