A Discrete-Event Network Simulator
API
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 ()
 
virtual ~BlockAckAggregationDisabledTest ()
 
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 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)
 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...
 
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...
 
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 for Block Ack Policy with aggregation disabled.

This test aims to check the Block Ack policy with "legacy" 802.11, i.e., prior to aggregation (802.11n). 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. Consequently, the first packet is sent with Normal Ack policy (because a BA agreement has not been established yet), while all other packets are sent with Block Ack policy and followed by a Block Ack Request and then a Block Ack.

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

Constructor & Destructor Documentation

◆ BlockAckAggregationDisabledTest()

BlockAckAggregationDisabledTest::BlockAckAggregationDisabledTest ( )

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

◆ ~BlockAckAggregationDisabledTest()

BlockAckAggregationDisabledTest::~BlockAckAggregationDisabledTest ( )
virtual

Definition at line 691 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 696 of file block-ack-test-suite.cc.

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

Referenced by DoRun().

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

◆ Receive()

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

Callback invoked when PHY receives a packet.

Parameters
contextthe context
pthe packet

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

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

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 705 of file block-ack-test-suite.cc.

References ns3::WifiMacHeader::IsBlockAckReq(), ns3::WifiMacHeader::IsQosBlockAck(), ns3::WifiMacHeader::IsQosData(), m_nBar, m_txTotal, NS_TEST_EXPECT_MSG_EQ, and ns3::Packet::PeekHeader().

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 649 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 648 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 646 of file block-ack-test-suite.cc.

Referenced by DoRun(), and L7Receive().

◆ m_txTotal

uint16_t BlockAckAggregationDisabledTest::m_txTotal
private

transmitted data packets

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

Referenced by DoRun(), and Transmit().


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