A Discrete-Event Network Simulator
API
WifiAcMappingTest Class Reference

Test for User priority to Access Category mapping. More...

+ Inheritance diagram for WifiAcMappingTest:
+ Collaboration diagram for WifiAcMappingTest:

Public Member Functions

 WifiAcMappingTest (uint8_t tos, uint8_t expectedQueue)
 Constructor for WifiAcMappingTest. More...
 
virtual void DoRun (void)
 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 (void) const
 
TestCaseoperator= (const TestCase &)=delete
 

Static Private Member Functions

static void PacketEnqueuedInQueueDisc (uint8_t tos, uint16_t *count, Ptr< const QueueDiscItem > item)
 Function called whenever a packet is enqueued in a queue disc. More...
 
static void PacketEnqueuedInWifiMacQueue (uint8_t tos, uint16_t *count, Ptr< const WifiMpdu > item)
 Function called whenever a packet is enqueued in a Wi-Fi MAC queue. More...
 

Private Attributes

uint16_t m_expectedQueue
 expected queue disc index More...
 
uint16_t m_QueueDiscCount [4]
 packet counter per queue disc More...
 
uint8_t m_tos
 type of service More...
 
uint16_t m_WifiMacQueueCount [4]
 packet counter per Wi-Fi MAC queue 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 User priority to Access Category mapping.

Definition at line 50 of file wifi-ac-mapping-test-suite.cc.

Constructor & Destructor Documentation

◆ WifiAcMappingTest()

WifiAcMappingTest::WifiAcMappingTest ( uint8_t  tos,
uint8_t  expectedQueue 
)

Constructor for WifiAcMappingTest.

Parameters
tosthe type of service
expectedQueuethe expected queue disc index

Definition at line 87 of file wifi-ac-mapping-test-suite.cc.

References m_QueueDiscCount, and m_WifiMacQueueCount.

Member Function Documentation

◆ DoRun()

◆ PacketEnqueuedInQueueDisc()

void WifiAcMappingTest::PacketEnqueuedInQueueDisc ( uint8_t  tos,
uint16_t *  count,
Ptr< const QueueDiscItem item 
)
staticprivate

Function called whenever a packet is enqueued in a queue disc.

Parameters
tosthe type of service
countthe pointer to the packet counter
itemthe enqueued item

Definition at line 102 of file wifi-ac-mapping-test-suite.cc.

Referenced by DoRun().

+ Here is the caller graph for this function:

◆ PacketEnqueuedInWifiMacQueue()

void WifiAcMappingTest::PacketEnqueuedInWifiMacQueue ( uint8_t  tos,
uint16_t *  count,
Ptr< const WifiMpdu item 
)
staticprivate

Function called whenever a packet is enqueued in a Wi-Fi MAC queue.

Parameters
tosthe type of service
countthe pointer to the packet counter
itemthe enqueued item

Definition at line 112 of file wifi-ac-mapping-test-suite.cc.

References ns3::Ipv4Header::GetTos(), ns3::LlcSnapHeader::GetType(), ns3::Packet::PeekHeader(), and ns3::Packet::RemoveHeader().

Referenced by DoRun().

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

Member Data Documentation

◆ m_expectedQueue

uint16_t WifiAcMappingTest::m_expectedQueue
private

expected queue disc index

Definition at line 82 of file wifi-ac-mapping-test-suite.cc.

Referenced by DoRun().

◆ m_QueueDiscCount

uint16_t WifiAcMappingTest::m_QueueDiscCount[4]
private

packet counter per queue disc

Definition at line 83 of file wifi-ac-mapping-test-suite.cc.

Referenced by WifiAcMappingTest(), and DoRun().

◆ m_tos

uint8_t WifiAcMappingTest::m_tos
private

type of service

Definition at line 81 of file wifi-ac-mapping-test-suite.cc.

Referenced by DoRun().

◆ m_WifiMacQueueCount

uint16_t WifiAcMappingTest::m_WifiMacQueueCount[4]
private

packet counter per Wi-Fi MAC queue

Definition at line 84 of file wifi-ac-mapping-test-suite.cc.

Referenced by WifiAcMappingTest(), and DoRun().


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