Test for Block Ack Policy with aggregation disabled. More...
Classes | |
struct | TxopDurationTracer |
Keeps the maximum duration among all TXOPs. More... | |
Public Member Functions | |
BlockAckAggregationDisabledTest (bool txop) | |
Constructor. More... | |
~BlockAckAggregationDisabledTest () override | |
void | DoRun () override |
Implementation to actually run this TestCase. More... | |
Public Member Functions inherited from ns3::TestCase | |
TestCase (const TestCase &)=delete | |
virtual | ~TestCase () |
Destructor. More... | |
std::string | GetName () const |
TestCase & | operator= (const TestCase &)=delete |
Private Member Functions | |
void | L7Receive (std::string context, Ptr< const Packet > p, const Address &adr) |
Function to trace packets received by the server application. More... | |
void | Receive (std::string context, Ptr< const Packet > p, RxPowerWattPerChannelBand rxPowersW) |
Callback invoked when PHY receives a packet. More... | |
void | Transmit (std::string context, Ptr< const Packet > p, double power) |
Callback invoked when PHY transmits a packet. More... | |
Private Attributes | |
uint16_t | m_nBa |
received BlockAck frames More... | |
uint16_t | m_nBar |
transmitted BlockAckReq frames More... | |
uint32_t | m_received |
received packets More... | |
bool | m_txop |
true for non-null TXOP limit More... | |
uint16_t | m_txSinceBar |
packets transmitted since the agreement was established or the last block ack was received More... | |
uint16_t | m_txTotal |
transmitted data packets 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... | |
TestCase * | GetParent () const |
Get the parent of this TestCase. More... | |
bool | IsStatusFailure () const |
Check if any tests failed. More... | |
bool | IsStatusSuccess () 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 () const |
Check if this run should assert on failure. More... | |
bool | MustContinueOnFailure () 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 for Block Ack Policy with aggregation disabled.
This test aims to check the Block Ack policy when A-MPDU aggregation is disabled. In this case, a QoS station can transmit multiple QoS data frames before requesting a Block Ack through a Block Ack Request frame. If the AC is granted a non-null TXOP limit, MPDUs can be separated by a SIFS.
In this test, an HT STA sends 14 packets to an HT AP. The ack policy selector is configured so that a Block Ack is requested once 8 (= 0.125 * 64) MPDUs are sent in addition to the MPDU having the starting sequence number. The block ack threshold is set to 2, hence a block ack agreement is established when there are at least two packets in the EDCA queue.
When the TXOP limit is null:
When the TXOP is not null (and long enough to include the transmission of all packets):
Definition at line 1707 of file block-ack-test-suite.cc.
BlockAckAggregationDisabledTest::BlockAckAggregationDisabledTest | ( | bool | txop | ) |
Constructor.
txop | true for non-null TXOP limit |
Definition at line 1777 of file block-ack-test-suite.cc.
|
override |
Definition at line 1788 of file block-ack-test-suite.cc.
|
overridevirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 1861 of file block-ack-test-suite.cc.
References ns3::Node::AddApplication(), third::apDevices, third::channel, ns3::Config::Connect(), ns3::NodeContainer::Create(), ns3::PointerValue::Get(), ns3::NodeContainer::Get(), ns3::WifiNetDevice::GetAddress(), ns3::ObjectBase::GetAttribute(), ns3::WifiNetDevice::GetIfIndex(), ns3::WifiNetDevice::GetMac(), ns3::PacketSocketHelper::Install(), L7Receive(), BlockAckAggregationDisabledTest::TxopDurationTracer::m_max, m_nBa, m_nBar, m_received, m_txop, m_txTotal, third::mac, ns3::MakeCallback(), ns3::MicroSeconds(), third::mobility, NS_TEST_EXPECT_MSG_EQ, NS_TEST_EXPECT_MSG_GT, NS_TEST_EXPECT_MSG_LT, third::phy, Receive(), ns3::Seconds(), brite-generic-example::server, ns3::ObjectBase::SetAttribute(), ns3::Config::SetDefault(), ns3::PacketSocketAddress::SetPhysicalAddress(), ns3::PacketSocketAddress::SetProtocol(), ns3::PacketSocketAddress::SetSingleDevice(), third::ssid, third::staDevices, BlockAckAggregationDisabledTest::TxopDurationTracer::Trace(), Transmit(), third::wifi, ns3::WIFI_STANDARD_80211n, and third::wifiApNode.
|
private |
Function to trace packets received by the server application.
context | the context |
p | the packet |
adr | the address |
Definition at line 1793 of file block-ack-test-suite.cc.
References ns3::Packet::GetSize(), and m_received.
Referenced by DoRun().
|
private |
Callback invoked when PHY receives a packet.
context | the context |
p | the packet |
rxPowersW | the received power per channel band in watts |
Definition at line 1847 of file block-ack-test-suite.cc.
References ns3::WifiMacHeader::IsBlockAck(), m_nBa, and ns3::Packet::PeekHeader().
Referenced by DoRun().
|
private |
Callback invoked when PHY transmits a packet.
context | the context |
p | the packet |
power | the tx power |
Definition at line 1804 of file block-ack-test-suite.cc.
References ns3::WifiMacHeader::IsBlockAckReq(), ns3::WifiMacHeader::IsQosBlockAck(), ns3::WifiMacHeader::IsQosData(), m_nBar, m_txop, m_txSinceBar, m_txTotal, NS_TEST_ASSERT_MSG_EQ, NS_TEST_EXPECT_MSG_EQ, and ns3::Packet::PeekHeader().
Referenced by DoRun().
|
private |
received BlockAck frames
Definition at line 1741 of file block-ack-test-suite.cc.
|
private |
transmitted BlockAckReq frames
Definition at line 1740 of file block-ack-test-suite.cc.
Referenced by DoRun(), and Transmit().
|
private |
received packets
Definition at line 1736 of file block-ack-test-suite.cc.
Referenced by DoRun(), and L7Receive().
|
private |
true for non-null TXOP limit
Definition at line 1735 of file block-ack-test-suite.cc.
Referenced by DoRun(), and Transmit().
|
private |
packets transmitted since the agreement was established or the last block ack was received
Definition at line 1738 of file block-ack-test-suite.cc.
Referenced by Transmit().
|
private |
transmitted data packets
Definition at line 1737 of file block-ack-test-suite.cc.
Referenced by DoRun(), and Transmit().