A Discrete-Event Network Simulator
API
OfdmaAckSequenceTest Class Reference

Test OFDMA acknowledgment sequences. More...

+ Inheritance diagram for OfdmaAckSequenceTest:
+ Collaboration diagram for OfdmaAckSequenceTest:

Classes

struct  FrameInfo
 Information about transmitted frames. More...
 
struct  MuEdcaParameterSet
 MU EDCA Parameter Set. More...
 

Public Member Functions

 OfdmaAckSequenceTest (uint16_t width, WifiAcknowledgment::Method dlType, uint32_t maxAmpduSize, uint16_t txopLimit, uint16_t nPktsPerSta, MuEdcaParameterSet muEdcaParameterSet)
 Constructor. More...
 
virtual ~OfdmaAckSequenceTest ()
 
void CheckResults (Time sifs, Time slotTime, uint8_t aifsn)
 Check correctness of transmitted frames. More...
 
void L7Receive (std::string context, Ptr< const Packet > p, const Address &addr)
 Function to trace packets received by the server application. More...
 
void TraceCw (uint32_t staIndex, uint32_t oldCw, uint32_t cw)
 Function to trace CW value used by the given station after the MU exchange. More...
 
void Transmit (std::string context, WifiConstPsduMap psduMap, WifiTxVector txVector, double txPowerW)
 Callback invoked when FrameExchangeManager passes PSDUs to the PHY. More...
 
- Public Member Functions inherited from ns3::TestCase
 TestCase (const TestCase &)=delete
 
virtual ~TestCase ()
 Destructor. More...
 
std::string GetName (void) const
 
TestCaseoperator= (const TestCase &)=delete
 

Private Member Functions

void DoRun (void) override
 Implementation to actually run this TestCase. More...
 

Private Attributes

Ptr< NetDevicem_apDevice
 AP's device. More...
 
uint16_t m_channelWidth
 PHY channel bandwidth in MHz. More...
 
std::vector< uint32_t > m_cwValues
 CW used by stations after MU exchange. More...
 
WifiAcknowledgment::Method m_dlMuAckType
 DL MU ack sequence type. More...
 
Time m_edcaDisabledStartTime
 time when disabling EDCA started More...
 
uint16_t m_flushed
 number of DL packets flushed after DL MU PPDU More...
 
uint32_t m_maxAmpduSize
 maximum A-MPDU size in bytes More...
 
MuEdcaParameterSet m_muEdcaParameterSet
 MU EDCA Parameter Set. More...
 
uint16_t m_nPktsPerSta
 number of packets to send to each station More...
 
uint16_t m_nStations
 number of stations More...
 
uint16_t m_received
 number of packets received by the stations More...
 
NetDeviceContainer m_staDevices
 stations' devices More...
 
uint16_t m_txopLimit
 TXOP limit in microseconds. More...
 
std::vector< FrameInfom_txPsdus
 transmitted PSDUs 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

Test OFDMA acknowledgment sequences.

Run this test with:

NS_LOG="WifiMacOfdmaTestSuite=info|prefix_time|prefix_node" ./ns3 run "test-runner --suite=wifi-mac-ofdma"

to print the list of transmitted frames only, along with the TX time and the node prefix. Replace 'info' with 'debug' if you want to print the debug messages from the test multi-user scheduler only. Replace 'info' with 'level_debug' if you want to print both the transmitted frames and the debug messages.

Definition at line 324 of file wifi-mac-ofdma-test.cc.

Constructor & Destructor Documentation

◆ OfdmaAckSequenceTest()

OfdmaAckSequenceTest::OfdmaAckSequenceTest ( uint16_t  width,
WifiAcknowledgment::Method  dlType,
uint32_t  maxAmpduSize,
uint16_t  txopLimit,
uint16_t  nPktsPerSta,
MuEdcaParameterSet  muEdcaParameterSet 
)

Constructor.

Parameters
widththe PHY channel bandwidth in MHz
dlTypethe DL MU ack sequence type
maxAmpduSizethe maximum A-MPDU size in bytes
txopLimitthe TXOP limit in microseconds
nPktsPerStanumber of packets to send to/receive from each station
muEdcaParameterSetthe MU EDCA Parameter Set

Definition at line 410 of file wifi-mac-ofdma-test.cc.

◆ ~OfdmaAckSequenceTest()

OfdmaAckSequenceTest::~OfdmaAckSequenceTest ( )
virtual

Definition at line 429 of file wifi-mac-ofdma-test.cc.

Member Function Documentation

◆ CheckResults()

◆ DoRun()

◆ L7Receive()

void OfdmaAckSequenceTest::L7Receive ( std::string  context,
Ptr< const Packet p,
const Address addr 
)

Function to trace packets received by the server application.

Parameters
contextthe context
pthe packet
addrthe address

Definition at line 434 of file wifi-mac-ofdma-test.cc.

References ns3::Packet::GetSize(), m_received, ns3::Now(), and ns3::Seconds().

Referenced by DoRun().

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

◆ TraceCw()

void OfdmaAckSequenceTest::TraceCw ( uint32_t  staIndex,
uint32_t  oldCw,
uint32_t  cw 
)

Function to trace CW value used by the given station after the MU exchange.

Parameters
staIndexthe index of the given station
oldCwthe previous Contention Window value
cwthe current Contention Window value

Definition at line 443 of file wifi-mac-ofdma-test.cc.

References m_cwValues.

Referenced by Transmit().

+ Here is the caller graph for this function:

◆ Transmit()

void OfdmaAckSequenceTest::Transmit ( std::string  context,
WifiConstPsduMap  psduMap,
WifiTxVector  txVector,
double  txPowerW 
)

Member Data Documentation

◆ m_apDevice

Ptr<NetDevice> OfdmaAckSequenceTest::m_apDevice
private

AP's device.

Definition at line 396 of file wifi-mac-ofdma-test.cc.

Referenced by CheckResults(), DoRun(), and Transmit().

◆ m_channelWidth

uint16_t OfdmaAckSequenceTest::m_channelWidth
private

PHY channel bandwidth in MHz.

Definition at line 397 of file wifi-mac-ofdma-test.cc.

Referenced by DoRun().

◆ m_cwValues

std::vector<uint32_t> OfdmaAckSequenceTest::m_cwValues
private

CW used by stations after MU exchange.

Definition at line 407 of file wifi-mac-ofdma-test.cc.

Referenced by CheckResults(), and TraceCw().

◆ m_dlMuAckType

WifiAcknowledgment::Method OfdmaAckSequenceTest::m_dlMuAckType
private

DL MU ack sequence type.

Definition at line 399 of file wifi-mac-ofdma-test.cc.

Referenced by CheckResults(), and DoRun().

◆ m_edcaDisabledStartTime

Time OfdmaAckSequenceTest::m_edcaDisabledStartTime
private

time when disabling EDCA started

Definition at line 406 of file wifi-mac-ofdma-test.cc.

Referenced by CheckResults(), and Transmit().

◆ m_flushed

uint16_t OfdmaAckSequenceTest::m_flushed
private

number of DL packets flushed after DL MU PPDU

Definition at line 405 of file wifi-mac-ofdma-test.cc.

Referenced by CheckResults(), and Transmit().

◆ m_maxAmpduSize

uint32_t OfdmaAckSequenceTest::m_maxAmpduSize
private

maximum A-MPDU size in bytes

Definition at line 400 of file wifi-mac-ofdma-test.cc.

Referenced by CheckResults(), and DoRun().

◆ m_muEdcaParameterSet

MuEdcaParameterSet OfdmaAckSequenceTest::m_muEdcaParameterSet
private

MU EDCA Parameter Set.

Definition at line 403 of file wifi-mac-ofdma-test.cc.

Referenced by CheckResults(), DoRun(), and Transmit().

◆ m_nPktsPerSta

uint16_t OfdmaAckSequenceTest::m_nPktsPerSta
private

number of packets to send to each station

Definition at line 402 of file wifi-mac-ofdma-test.cc.

Referenced by CheckResults(), and DoRun().

◆ m_nStations

uint16_t OfdmaAckSequenceTest::m_nStations
private

number of stations

Definition at line 394 of file wifi-mac-ofdma-test.cc.

Referenced by CheckResults(), and DoRun().

◆ m_received

uint16_t OfdmaAckSequenceTest::m_received
private

number of packets received by the stations

Definition at line 404 of file wifi-mac-ofdma-test.cc.

Referenced by CheckResults(), and L7Receive().

◆ m_staDevices

NetDeviceContainer OfdmaAckSequenceTest::m_staDevices
private

stations' devices

Definition at line 395 of file wifi-mac-ofdma-test.cc.

Referenced by DoRun(), and Transmit().

◆ m_txopLimit

uint16_t OfdmaAckSequenceTest::m_txopLimit
private

TXOP limit in microseconds.

Definition at line 401 of file wifi-mac-ofdma-test.cc.

Referenced by CheckResults(), and DoRun().

◆ m_txPsdus

std::vector<FrameInfo> OfdmaAckSequenceTest::m_txPsdus
private

transmitted PSDUs

Definition at line 398 of file wifi-mac-ofdma-test.cc.

Referenced by CheckResults(), and Transmit().


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