A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
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.
 
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
 

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

Private Attributes

uint16_t m_expectedQueue
 expected queue disc index
 
uint16_t m_QueueDiscCount [4]
 packet counter per queue disc
 
uint8_t m_tos
 type of service
 
uint16_t m_WifiMacQueueCount [4]
 packet counter per Wi-Fi MAC queue
 

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...
 
- Static Public Attributes inherited from ns3::TestCase
static constexpr auto QUICK = Duration::QUICK
 Deprecated test duration simple enums.
 
static constexpr auto EXTENSIVE = Duration::EXTENSIVE
 
static constexpr auto TAKES_FOREVER = Duration::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 User priority to Access Category mapping.

Definition at line 38 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 79 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 94 of file wifi-ac-mapping-test-suite.cc.

References ns3::QueueItem::IP_DSFIELD.

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 106 of file wifi-ac-mapping-test-suite.cc.

References ns3::Ipv4Header::GetTos(), ns3::LlcSnapHeader::GetType(), and ns3::Ipv4L3Protocol::PROT_NUMBER.

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 74 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 75 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 73 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 76 of file wifi-ac-mapping-test-suite.cc.

Referenced by WifiAcMappingTest(), and DoRun().


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