A Discrete-Event Network Simulator
API
TestAmpduReception Class Reference

A-MPDU reception test. More...

+ Inheritance diagram for TestAmpduReception:
+ Collaboration diagram for TestAmpduReception:

Public Member Functions

 TestAmpduReception ()
 
virtual ~TestAmpduReception ()
 
- Public Member Functions inherited from ns3::TestCase
virtual ~TestCase ()
 Destructor. More...
 
std::string GetName (void) const
 

Protected Member Functions

virtual void DoSetup (void)
 Implementation to do any local setup required for this TestCase. 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...
 

Private Member Functions

void CheckPhyState (WifiPhyState expectedState)
 Check the PHY state. More...
 
void CheckRxDroppedBitmapAmpdu1 (uint8_t expected)
 Check the RX dropped bitmap for A-MPDU 1. More...
 
void CheckRxDroppedBitmapAmpdu2 (uint8_t expected)
 Check the RX dropped bitmap for A-MPDU 2. More...
 
void CheckRxFailureBitmapAmpdu1 (uint8_t expected)
 Check the RX failure bitmap for A-MPDU 1. More...
 
void CheckRxFailureBitmapAmpdu2 (uint8_t expected)
 Check the RX failure bitmap for A-MPDU 2. More...
 
void CheckRxSuccessBitmapAmpdu1 (uint8_t expected)
 Check the RX success bitmap for A-MPDU 1. More...
 
void CheckRxSuccessBitmapAmpdu2 (uint8_t expected)
 Check the RX success bitmap for A-MPDU 2. More...
 
virtual void DoRun (void)
 Implementation to actually run this TestCase. More...
 
void IncrementFailureBitmap (uint32_t size)
 Increment reception failure bitmap. More...
 
void IncrementSuccessBitmap (uint32_t size)
 Increment reception success bitmap. More...
 
void ResetBitmaps ()
 Reset bitmaps function. More...
 
void RxDropped (Ptr< const Packet > p, WifiPhyRxfailureReason reason)
 RX dropped function. More...
 
void RxFailure (Ptr< Packet > p)
 RX failure function. More...
 
void RxSuccess (Ptr< Packet > p, double snr, WifiTxVector txVector, std::vector< bool > statusPerMpdu)
 RX success function. More...
 
void SendAmpduWithThreeMpdus (double rxPowerDbm, uint32_t referencePacketSize)
 Send A-MPDU with 3 MPDUs of different size (i-th MSDU will have 100 bytes more than (i-1)-th). More...
 

Private Attributes

Ptr< SpectrumWifiPhym_phy
 Phy. More...
 
uint8_t m_rxDroppedBitmapAmpdu1
 
uint8_t m_rxDroppedBitmapAmpdu2
 
uint8_t m_rxFailureBitmapAmpdu1
 
uint8_t m_rxFailureBitmapAmpdu2
 
uint8_t m_rxSuccessBitmapAmpdu1
 
uint8_t m_rxSuccessBitmapAmpdu2
 

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...
 

Detailed Description

A-MPDU reception test.

Definition at line 1253 of file wifi-phy-reception-test.cc.

Constructor & Destructor Documentation

◆ TestAmpduReception()

TestAmpduReception::TestAmpduReception ( )

Definition at line 1356 of file wifi-phy-reception-test.cc.

◆ ~TestAmpduReception()

TestAmpduReception::~TestAmpduReception ( )
virtual

Definition at line 1367 of file wifi-phy-reception-test.cc.

References m_phy.

Member Function Documentation

◆ CheckPhyState()

void TestAmpduReception::CheckPhyState ( WifiPhyState  expectedState)
private

Check the PHY state.

Parameters
expectedStatethe expected PHY state

Definition at line 1554 of file wifi-phy-reception-test.cc.

References ns3::PointerValue::Get(), ns3::ObjectBase::GetAttribute(), ns3::WifiPhyStateHelper::GetState(), m_phy, ns3::Now(), and NS_TEST_ASSERT_MSG_EQ.

+ Here is the call graph for this function:

◆ CheckRxDroppedBitmapAmpdu1()

void TestAmpduReception::CheckRxDroppedBitmapAmpdu1 ( uint8_t  expected)
private

Check the RX dropped bitmap for A-MPDU 1.

Parameters
expectedthe expected bitmap

Definition at line 1542 of file wifi-phy-reception-test.cc.

References m_rxDroppedBitmapAmpdu1, and NS_TEST_ASSERT_MSG_EQ.

Referenced by DoRun().

+ Here is the caller graph for this function:

◆ CheckRxDroppedBitmapAmpdu2()

void TestAmpduReception::CheckRxDroppedBitmapAmpdu2 ( uint8_t  expected)
private

Check the RX dropped bitmap for A-MPDU 2.

Parameters
expectedthe expected bitmap

Definition at line 1548 of file wifi-phy-reception-test.cc.

References m_rxDroppedBitmapAmpdu2, and NS_TEST_ASSERT_MSG_EQ.

Referenced by DoRun().

+ Here is the caller graph for this function:

◆ CheckRxFailureBitmapAmpdu1()

void TestAmpduReception::CheckRxFailureBitmapAmpdu1 ( uint8_t  expected)
private

Check the RX failure bitmap for A-MPDU 1.

Parameters
expectedthe expected bitmap

Definition at line 1530 of file wifi-phy-reception-test.cc.

References m_rxFailureBitmapAmpdu1, and NS_TEST_ASSERT_MSG_EQ.

Referenced by DoRun().

+ Here is the caller graph for this function:

◆ CheckRxFailureBitmapAmpdu2()

void TestAmpduReception::CheckRxFailureBitmapAmpdu2 ( uint8_t  expected)
private

Check the RX failure bitmap for A-MPDU 2.

Parameters
expectedthe expected bitmap

Definition at line 1536 of file wifi-phy-reception-test.cc.

References m_rxFailureBitmapAmpdu2, and NS_TEST_ASSERT_MSG_EQ.

Referenced by DoRun().

+ Here is the caller graph for this function:

◆ CheckRxSuccessBitmapAmpdu1()

void TestAmpduReception::CheckRxSuccessBitmapAmpdu1 ( uint8_t  expected)
private

Check the RX success bitmap for A-MPDU 1.

Parameters
expectedthe expected bitmap

Definition at line 1518 of file wifi-phy-reception-test.cc.

References m_rxSuccessBitmapAmpdu1, and NS_TEST_ASSERT_MSG_EQ.

Referenced by DoRun().

+ Here is the caller graph for this function:

◆ CheckRxSuccessBitmapAmpdu2()

void TestAmpduReception::CheckRxSuccessBitmapAmpdu2 ( uint8_t  expected)
private

Check the RX success bitmap for A-MPDU 2.

Parameters
expectedthe expected bitmap

Definition at line 1524 of file wifi-phy-reception-test.cc.

References m_rxSuccessBitmapAmpdu2, and NS_TEST_ASSERT_MSG_EQ.

Referenced by DoRun().

+ Here is the caller graph for this function:

◆ DoRun()

void TestAmpduReception::DoRun ( void  )
privatevirtual

Implementation to actually run this TestCase.

Subclasses should override this method to conduct their tests.

Implements ns3::TestCase.

Definition at line 1635 of file wifi-phy-reception-test.cc.

References ns3::WifiPhy::AssignStreams(), CheckRxDroppedBitmapAmpdu1(), CheckRxDroppedBitmapAmpdu2(), CheckRxFailureBitmapAmpdu1(), CheckRxFailureBitmapAmpdu2(), CheckRxSuccessBitmapAmpdu1(), CheckRxSuccessBitmapAmpdu2(), m_phy, ns3::MicroSeconds(), ns3::NanoSeconds(), ResetBitmaps(), ns3::Seconds(), and SendAmpduWithThreeMpdus().

+ Here is the call graph for this function:

◆ DoSetup()

void TestAmpduReception::DoSetup ( void  )
protectedvirtual

◆ IncrementFailureBitmap()

void TestAmpduReception::IncrementFailureBitmap ( uint32_t  size)
private

Increment reception failure bitmap.

Parameters
sizethe size of the received packet

Definition at line 1459 of file wifi-phy-reception-test.cc.

References m_rxFailureBitmapAmpdu1, and m_rxFailureBitmapAmpdu2.

Referenced by RxFailure(), and RxSuccess().

+ Here is the caller graph for this function:

◆ IncrementSuccessBitmap()

void TestAmpduReception::IncrementSuccessBitmap ( uint32_t  size)
private

Increment reception success bitmap.

Parameters
sizethe size of the received packet

Definition at line 1412 of file wifi-phy-reception-test.cc.

References m_rxSuccessBitmapAmpdu1, and m_rxSuccessBitmapAmpdu2.

Referenced by RxSuccess().

+ Here is the caller graph for this function:

◆ ResetBitmaps()

void TestAmpduReception::ResetBitmaps ( )
private

Reset bitmaps function.

Definition at line 1373 of file wifi-phy-reception-test.cc.

References m_rxDroppedBitmapAmpdu1, m_rxDroppedBitmapAmpdu2, m_rxFailureBitmapAmpdu1, m_rxFailureBitmapAmpdu2, m_rxSuccessBitmapAmpdu1, and m_rxSuccessBitmapAmpdu2.

Referenced by DoRun().

+ Here is the caller graph for this function:

◆ RxDropped()

void TestAmpduReception::RxDropped ( Ptr< const Packet p,
WifiPhyRxfailureReason  reason 
)
private

RX dropped function.

Parameters
pthe packet
reasonthe reason

Definition at line 1488 of file wifi-phy-reception-test.cc.

References ns3::Packet::GetSize(), m_rxDroppedBitmapAmpdu1, m_rxDroppedBitmapAmpdu2, and NS_LOG_FUNCTION.

Referenced by DoSetup().

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

◆ RxFailure()

void TestAmpduReception::RxFailure ( Ptr< Packet p)
private

RX failure function.

Parameters
pthe packet

Definition at line 1441 of file wifi-phy-reception-test.cc.

References ns3::Packet::GetSize(), IncrementFailureBitmap(), ns3::IsAmpdu(), and NS_LOG_FUNCTION.

Referenced by DoSetup().

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

◆ RxSuccess()

void TestAmpduReception::RxSuccess ( Ptr< Packet p,
double  snr,
WifiTxVector  txVector,
std::vector< bool >  statusPerMpdu 
)
private

RX success function.

Parameters
pthe packet
snrthe SNR
txVectorthe transmit vector
statusPerMpdureception status per MPDU

Definition at line 1384 of file wifi-phy-reception-test.cc.

References ns3::Packet::GetSize(), IncrementFailureBitmap(), IncrementSuccessBitmap(), ns3::IsAmpdu(), NS_ABORT_MSG_IF, and NS_LOG_FUNCTION.

Referenced by DoSetup().

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

◆ SendAmpduWithThreeMpdus()

void TestAmpduReception::SendAmpduWithThreeMpdus ( double  rxPowerDbm,
uint32_t  referencePacketSize 
)
private

Member Data Documentation

◆ m_phy

Ptr<SpectrumWifiPhy> TestAmpduReception::m_phy
private

◆ m_rxDroppedBitmapAmpdu1

uint8_t TestAmpduReception::m_rxDroppedBitmapAmpdu1
private

◆ m_rxDroppedBitmapAmpdu2

uint8_t TestAmpduReception::m_rxDroppedBitmapAmpdu2
private

◆ m_rxFailureBitmapAmpdu1

uint8_t TestAmpduReception::m_rxFailureBitmapAmpdu1
private

◆ m_rxFailureBitmapAmpdu2

uint8_t TestAmpduReception::m_rxFailureBitmapAmpdu2
private

◆ m_rxSuccessBitmapAmpdu1

uint8_t TestAmpduReception::m_rxSuccessBitmapAmpdu1
private

◆ m_rxSuccessBitmapAmpdu2

uint8_t TestAmpduReception::m_rxSuccessBitmapAmpdu2
private

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