Test OFDMA acknowledgment sequences. More...
Classes | |
struct | FrameInfo |
Information about transmitted frames. More... | |
Public Member Functions | |
OfdmaAckSequenceTest (uint16_t width, WifiAcknowledgment::Method dlType, uint32_t maxAmpduSize, uint16_t txopLimit, uint16_t nPktsPerSta) | |
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 | Transmit (std::string context, WifiConstPsduMap psduMap, WifiTxVector txVector, double txPowerW) |
Callback invoked when FrameExchangeManager passes PSDUs to the PHY. More... | |
![]() | |
virtual | ~TestCase () |
Destructor. More... | |
std::string | GetName (void) const |
Private Member Functions | |
void | DoRun (void) override |
Implementation to actually run this TestCase. More... | |
Private Attributes | |
uint16_t | m_channelWidth |
PHY channel bandwidth in MHz. More... | |
WifiAcknowledgment::Method | m_dlMuAckType |
DL MU ack sequence type. More... | |
uint32_t | m_maxAmpduSize |
maximum A-MPDU size in bytes 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< FrameInfo > | m_txPsdus |
transmitted PSDUs More... | |
Additional Inherited Members | |
![]() | |
enum | TestDuration { QUICK = 1 , EXTENSIVE = 2 , TAKES_FOREVER = 3 } |
How long the test takes to execute. More... | |
![]() | |
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 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... | |
Test OFDMA acknowledgment sequences.
Run this test with:
NS_LOG="WifiMacOfdmaTestSuite=info|prefix_time|prefix_node" ./waf –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 325 of file wifi-mac-ofdma-test.cc.
OfdmaAckSequenceTest::OfdmaAckSequenceTest | ( | uint16_t | width, |
WifiAcknowledgment::Method | dlType, | ||
uint32_t | maxAmpduSize, | ||
uint16_t | txopLimit, | ||
uint16_t | nPktsPerSta | ||
) |
Constructor.
width | the PHY channel bandwidth in MHz |
dlType | the DL MU ack sequence type |
maxAmpduSize | the maximum A-MPDU size in bytes |
txopLimit | the TXOP limit in microseconds |
nPktsPerSta | number of packets to send to/receive from each station |
Definition at line 386 of file wifi-mac-ofdma-test.cc.
|
virtual |
Definition at line 400 of file wifi-mac-ofdma-test.cc.
Check correctness of transmitted frames.
sifs | the SIFS duration |
slotTime | a slot duration |
aifsn | the AIFSN |
Definition at line 455 of file wifi-mac-ofdma-test.cc.
References ns3::CtrlBAckResponseHeader::GetAckType(), ns3::CtrlBAckResponseHeader::GetNPerAidTidInfoSubfields(), ns3::CtrlTriggerHeader::GetNUserInfoFields(), ns3::GetPpduMaxTime(), ns3::WifiMacHeader::GetQosQueueSize(), ns3::WifiMacHeader::GetQosTid(), ns3::CtrlBAckResponseHeader::GetTidInfo(), ns3::WifiMacHeader::GetType(), ns3::CtrlTriggerHeader::IsBasic(), ns3::CtrlTriggerHeader::IsBsrp(), ns3::CtrlBAckResponseHeader::IsMultiSta(), m_dlMuAckType, m_maxAmpduSize, m_nPktsPerSta, m_nStations, m_received, m_txopLimit, m_txPsdus, ns3::NanoSeconds(), NS_TEST_EXPECT_MSG_EQ, NS_TEST_EXPECT_MSG_GT, NS_TEST_EXPECT_MSG_GT_OR_EQ, NS_TEST_EXPECT_MSG_LT, NS_TEST_EXPECT_MSG_LT_OR_EQ, SU_STA_ID, ns3::WIFI_MAC_QOSDATA_NULL, ns3::WIFI_PREAMBLE_HE_MU, and ns3::WIFI_PREAMBLE_HE_TB.
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 965 of file wifi-mac-ofdma-test.cc.
References third::apDevices, CheckResults(), ns3::Config::Connect(), ns3::NetDeviceContainer::Get(), ns3::PointerValue::Get(), ns3::Txop::GetAifsn(), ns3::WifiNetDevice::GetMac(), ns3::NetDeviceContainer::GetN(), ns3::PacketSocketHelper::Install(), L7Receive(), m_channelWidth, m_dlMuAckType, m_maxAmpduSize, m_nPktsPerSta, m_nStations, m_staDevices, m_txopLimit, third::mac, ns3::MakeCallback(), ns3::MicroSeconds(), ns3::MilliSeconds(), third::mobility, NS_ABORT_MSG, third::phy, ns3::Seconds(), ns3::PacketSocketAddress::SetPhysicalAddress(), ns3::PacketSocketAddress::SetProtocol(), ns3::PacketSocketAddress::SetSingleDevice(), ns3::Txop::SetTxopLimit(), third::ssid, Transmit(), third::wifi, ns3::WIFI_STANDARD_80211ax_5GHZ, third::wifiApNode, and third::wifiStaNodes.
void OfdmaAckSequenceTest::L7Receive | ( | std::string | context, |
Ptr< const Packet > | p, | ||
const Address & | addr | ||
) |
Function to trace packets received by the server application.
context | the context |
p | the packet |
addr | the address |
Definition at line 405 of file wifi-mac-ofdma-test.cc.
References ns3::Packet::GetSize(), m_received, ns3::Now(), and ns3::Seconds().
Referenced by DoRun().
void OfdmaAckSequenceTest::Transmit | ( | std::string | context, |
WifiConstPsduMap | psduMap, | ||
WifiTxVector | txVector, | ||
double | txPowerW | ||
) |
Callback invoked when FrameExchangeManager passes PSDUs to the PHY.
context | the context |
psduMap | the PSDU map |
txVector | the TX vector |
txPowerW | the tx power in Watts |
Definition at line 414 of file wifi-mac-ofdma-test.cc.
References ns3::AC_BE, ns3::NetDeviceContainer::Get(), ns3::NetDeviceContainer::GetN(), ns3::WifiTxVector::GetPreambleType(), m_staDevices, m_txPsdus, ns3::Now(), NS_LOG_INFO, ns3::Seconds(), ns3::WIFI_PHY_BAND_5GHZ, and ns3::WIFI_PREAMBLE_HE_TB.
Referenced by DoRun().
|
private |
PHY channel bandwidth in MHz.
Definition at line 377 of file wifi-mac-ofdma-test.cc.
Referenced by DoRun().
|
private |
DL MU ack sequence type.
Definition at line 379 of file wifi-mac-ofdma-test.cc.
Referenced by CheckResults(), and DoRun().
|
private |
maximum A-MPDU size in bytes
Definition at line 380 of file wifi-mac-ofdma-test.cc.
Referenced by CheckResults(), and DoRun().
|
private |
number of packets to send to each station
Definition at line 382 of file wifi-mac-ofdma-test.cc.
Referenced by CheckResults(), and DoRun().
|
private |
number of stations
Definition at line 375 of file wifi-mac-ofdma-test.cc.
Referenced by CheckResults(), and DoRun().
|
private |
number of packets received by the stations
Definition at line 383 of file wifi-mac-ofdma-test.cc.
Referenced by CheckResults(), and L7Receive().
|
private |
stations' devices
Definition at line 376 of file wifi-mac-ofdma-test.cc.
Referenced by DoRun(), and Transmit().
|
private |
TXOP limit in microseconds.
Definition at line 381 of file wifi-mac-ofdma-test.cc.
Referenced by CheckResults(), and DoRun().
|
private |
transmitted PSDUs
Definition at line 378 of file wifi-mac-ofdma-test.cc.
Referenced by CheckResults(), and Transmit().