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

Test for Block Ack Policy with aggregation disabled. More...

+ Inheritance diagram for BlockAckAggregationDisabledTest:
+ Collaboration diagram for BlockAckAggregationDisabledTest:

Classes

struct  TxopDurationTracer
 Keeps the maximum duration among all TXOPs. More...
 

Public Member Functions

 BlockAckAggregationDisabledTest (bool txop)
 Constructor.
 
 ~BlockAckAggregationDisabledTest () 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 Member Functions

void L7Receive (std::string context, Ptr< const Packet > p, const Address &adr)
 Function to trace packets received by the server application.
 
void Receive (std::string context, Ptr< const Packet > p, RxPowerWattPerChannelBand rxPowersW)
 Callback invoked when PHY receives a packet.
 
void Transmit (std::string context, Ptr< const Packet > p, double power)
 Callback invoked when PHY transmits a packet.
 

Private Attributes

uint16_t m_nBa
 received BlockAck frames
 
uint16_t m_nBar
 transmitted BlockAckReq frames
 
uint32_t m_received
 received packets
 
bool m_txop
 true for non-null TXOP limit
 
uint16_t m_txSinceBar
 packets transmitted since the agreement was established or the last block ack was received
 
uint16_t m_txTotal
 transmitted data packets
 

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...
 
using instead = Duration
 
- Static Public Attributes inherited from ns3::TestCase
static constexpr auto EXTENSIVE = Duration::EXTENSIVE
 
static constexpr auto QUICK = Duration::QUICK
 
static constexpr auto 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

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:

  • the first packet is sent with Normal Ack policy because the BA agreement has not been established yet (there are no queued packets when the first one arrives);
  • packets from the 2nd to the 10th are sent with Block Ack policy (and hence are not immediately acknowledged);
  • after the 10th packet, a Block Ack Request is sent, followed by a Block Ack;
  • the remaining 4 packets are sent with Block Ack policy (and hence are not immediately acknowledged);
  • the last packet is followed by a Block Ack Request because there are no more packets in the EDCA queue and hence a response is needed independently of the number of outstanding MPDUs.

When the TXOP is not null (and long enough to include the transmission of all packets):

  • the first packet is sent with Normal Ack policy because the BA agreement has not been established yet (there are no queued packets when the first one arrives);
  • the second packet is sent with Normal Ack Policy because the first packet sent in a TXOP shall request an immediate response and no previous MPDUs have to be acknowledged;
  • packets from the 3rd to the 11th are sent with Block Ack policy (and hence are not immediately acknowledged);
  • after the 11th packet, a Block Ack Request is sent, followed by a Block Ack;
  • the remaining 3 packets are sent with Block Ack policy (and hence are not immediately acknowledged);
  • the last packet is followed by a Block Ack Request because there are no more packets in the EDCA queue and hence a response is needed independently of the number of outstanding MPDUs.

Definition at line 1707 of file block-ack-test-suite.cc.

Constructor & Destructor Documentation

◆ BlockAckAggregationDisabledTest()

BlockAckAggregationDisabledTest::BlockAckAggregationDisabledTest ( bool  txop)

Constructor.

Parameters
txoptrue for non-null TXOP limit

Definition at line 1777 of file block-ack-test-suite.cc.

◆ ~BlockAckAggregationDisabledTest()

BlockAckAggregationDisabledTest::~BlockAckAggregationDisabledTest ( )
override

Definition at line 1788 of file block-ack-test-suite.cc.

Member Function Documentation

◆ DoRun()

◆ L7Receive()

void BlockAckAggregationDisabledTest::L7Receive ( std::string  context,
Ptr< const Packet p,
const Address adr 
)
private

Function to trace packets received by the server application.

Parameters
contextthe context
pthe packet
adrthe address

Definition at line 1793 of file block-ack-test-suite.cc.

References m_received.

Referenced by DoRun().

+ Here is the caller graph for this function:

◆ Receive()

void BlockAckAggregationDisabledTest::Receive ( std::string  context,
Ptr< const Packet p,
RxPowerWattPerChannelBand  rxPowersW 
)
private

Callback invoked when PHY receives a packet.

Parameters
contextthe context
pthe packet
rxPowersWthe received power per channel band in watts

Definition at line 1847 of file block-ack-test-suite.cc.

References ns3::WifiMacHeader::IsBlockAck(), and m_nBa.

Referenced by DoRun().

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

◆ Transmit()

void BlockAckAggregationDisabledTest::Transmit ( std::string  context,
Ptr< const Packet p,
double  power 
)
private

Callback invoked when PHY transmits a packet.

Parameters
contextthe context
pthe packet
powerthe 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, and NS_TEST_EXPECT_MSG_EQ.

Referenced by DoRun().

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

Member Data Documentation

◆ m_nBa

uint16_t BlockAckAggregationDisabledTest::m_nBa
private

received BlockAck frames

Definition at line 1741 of file block-ack-test-suite.cc.

Referenced by DoRun(), and Receive().

◆ m_nBar

uint16_t BlockAckAggregationDisabledTest::m_nBar
private

transmitted BlockAckReq frames

Definition at line 1740 of file block-ack-test-suite.cc.

Referenced by DoRun(), and Transmit().

◆ m_received

uint32_t BlockAckAggregationDisabledTest::m_received
private

received packets

Definition at line 1736 of file block-ack-test-suite.cc.

Referenced by DoRun(), and L7Receive().

◆ m_txop

bool BlockAckAggregationDisabledTest::m_txop
private

true for non-null TXOP limit

Definition at line 1735 of file block-ack-test-suite.cc.

Referenced by DoRun(), and Transmit().

◆ m_txSinceBar

uint16_t BlockAckAggregationDisabledTest::m_txSinceBar
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().

◆ m_txTotal

uint16_t BlockAckAggregationDisabledTest::m_txTotal
private

transmitted data packets

Definition at line 1737 of file block-ack-test-suite.cc.

Referenced by DoRun(), and Transmit().


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