Test for User priority to Access Category mapping. More...
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 |
TestCase & | operator= (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. | |
TestCase * | GetParent () 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. | |
Test for User priority to Access Category mapping.
Definition at line 38 of file wifi-ac-mapping-test-suite.cc.
WifiAcMappingTest::WifiAcMappingTest | ( | uint8_t | tos, |
uint8_t | expectedQueue ) |
Constructor for WifiAcMappingTest.
tos | the type of service |
expectedQueue | the expected queue disc index |
Definition at line 79 of file wifi-ac-mapping-test-suite.cc.
References m_QueueDiscCount, and m_WifiMacQueueCount.
|
overridevirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 126 of file wifi-ac-mapping-test-suite.cc.
References ns3::TrafficControlHelper::AddChildQueueDiscs(), ns3::TrafficControlHelper::AddQueueDiscClasses(), ns3::NodeContainer::Create(), ns3::YansWifiChannelHelper::Create(), ns3::YansWifiChannelHelper::Default(), ns3::Simulator::Destroy(), ns3::DynamicCast(), ns3::ApplicationContainer::Get(), ns3::NetDeviceContainer::Get(), ns3::NodeContainer::Get(), ns3::PointerValue::Get(), ns3::Ipv4InterfaceContainer::GetAddress(), ns3::Ipv4Address::GetAny(), ns3::Object::GetObject(), ns3::ApplicationHelper::Install(), ns3::TrafficControlHelper::Install(), m_expectedQueue, m_QueueDiscCount, m_tos, m_WifiMacQueueCount, ns3::MakeBoundCallback(), NS_TEST_ASSERT_MSG_EQ, NS_TEST_ASSERT_MSG_GT_OR_EQ, PacketEnqueuedInQueueDisc(), PacketEnqueuedInWifiMacQueue(), ns3::Simulator::Run(), ns3::Seconds(), ns3::YansWifiPhyHelper::SetChannel(), ns3::TrafficControlHelper::SetRootQueueDisc(), ns3::WifiMacHelper::SetType(), ns3::ApplicationContainer::Start(), ns3::ApplicationContainer::Stop(), ns3::Simulator::Stop(), and ns3::ObjectBase::TraceConnectWithoutContext().
|
staticprivate |
Function called whenever a packet is enqueued in a queue disc.
tos | the type of service |
count | the pointer to the packet counter |
item | the enqueued item |
Definition at line 94 of file wifi-ac-mapping-test-suite.cc.
References ns3::QueueItem::IP_DSFIELD.
Referenced by DoRun().
|
staticprivate |
Function called whenever a packet is enqueued in a Wi-Fi MAC queue.
tos | the type of service |
count | the pointer to the packet counter |
item | the 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().
|
private |
expected queue disc index
Definition at line 74 of file wifi-ac-mapping-test-suite.cc.
Referenced by DoRun().
|
private |
packet counter per queue disc
Definition at line 75 of file wifi-ac-mapping-test-suite.cc.
Referenced by WifiAcMappingTest(), and DoRun().
|
private |
|
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().