A Discrete-Event Network Simulator
API
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
Bug2483TestCase 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 Bug2483TestCase:

Public Member Functions

 Bug2483TestCase ()
 
virtual ~Bug2483TestCase ()
 
virtual void DoRun (void)
 Implementation to actually run this TestCase. More...
 
- Public Member Functions inherited from ns3::TestCase
virtual ~TestCase ()
 Destructor. More...
 
std::string GetName (void) const
 

Private Types

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

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. More...
 
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. More...
 

Private Attributes

std::vector< FreqWidthSubbandModulationTuplem_distinctTuples
 vector of distinct {starting frequency, channelWidth, Number of subbands in SpectrumModel, modulation type} tuples 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...
 
TestCaseGetParent () const
 Get the parent of this TestCsse. More...
 
bool IsStatusFailure (void) const
 Check if any tests failed. More...
 
bool IsStatusSuccess (void) 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 (void) const
 Check if this run should assert on failure. More...
 
bool MustContinueOnFailure (void) 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...
 

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 2483

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

Member Typedef Documentation

◆ FreqWidthSubbandModulationTuple

typedef std::tuple<double, uint16_t, uint32_t, WifiModulationClass> Bug2483TestCase::FreqWidthSubbandModulationTuple
private

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

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

Constructor & Destructor Documentation

◆ Bug2483TestCase()

Bug2483TestCase::Bug2483TestCase ( )

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

◆ ~Bug2483TestCase()

Bug2483TestCase::~Bug2483TestCase ( )
virtual

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

Member Function Documentation

◆ DoRun()

void Bug2483TestCase::DoRun ( void  )
virtual

◆ SendPacketBurst()

void Bug2483TestCase::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 (maximum: 255)
sourceDevicepointer to the source NetDevice
destinationaddress of the destination device

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

References ns3::NetDevice::Send().

Referenced by DoRun().

◆ StoreDistinctTuple()

void Bug2483TestCase::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 1216 of file wifi-test.cc.

References ns3::SpectrumModel::Begin(), ns3::Packet::Copy(), ns3::WifiTxVector::GetChannelWidth(), ns3::WifiTxVector::GetMode(), ns3::WifiMode::GetModulationClass(), ns3::SpectrumModel::GetNumBands(), ns3::SpectrumValue::GetSpectrumModel(), ns3::WifiPhyTag::GetWifiTxVector(), m_distinctTuples, NS_FATAL_ERROR, ns3::WifiSpectrumSignalParameters::packet, and ns3::SpectrumSignalParameters::psd.

Referenced by DoRun().

Member Data Documentation

◆ m_distinctTuples

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

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

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

Referenced by DoRun(), and StoreDistinctTuple().


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