A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
TgaxVirtualDesktopTestCase Class Reference

TGax VDI traffic test. More...

Inheritance diagram for TgaxVirtualDesktopTestCase:
Collaboration diagram for TgaxVirtualDesktopTestCase:

Classes

struct  TxInfo
 Information about a transmitted VDI packet. More...
struct  VdiParams
 Information about VDI parameters. More...

Public Member Functions

 TgaxVirtualDesktopTestCase (const std::string &name, const VdiParams &params)
 Constructor.
Public Member Functions inherited from ns3::TestCase
 TestCase (const TestCase &)=delete
 Caller graph was not generated because of its size.
virtual ~TestCase ()
 Destructor.
std::string GetName () const
TestCaseoperator= (const TestCase &)=delete

Private Member Functions

void DoRun () override
 Implementation to actually run this TestCase.
void DoSetup () override
 Implementation to do any local setup required for this TestCase.
void PacketSent (Ptr< const Packet > packet)
 Record a transmitted VDI packet.
void ReceiveRx (std::string context, Ptr< const Packet > p, const Address &addr)
 Record a VDI packet successfully received.

Private Attributes

VdiParams m_params
 VDI parameters.
uint64_t m_received {0}
 number of bytes received
std::vector< TxInfom_sent
 transmitted VDI packets
Time m_startAppTime
 Time at which the application is started.

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

TGax VDI traffic test.

The test consider traffic values for the model presented in IEEE 802.11-14/0571r12 - 11ax Evaluation Methodology (Appendix 2 – Traffic model descriptions: Virtual Desktop Infrastructure Traffic Model) for both downlink and uplink.

The test generates traffic between two nodes and keeps track of generated TX packets (size, and timestamp). The test verifies average sizes and inter arrivals of generated packets.

Definition at line 52 of file tgax-virtual-desktop-test-suite.cc.

Constructor & Destructor Documentation

◆ TgaxVirtualDesktopTestCase()

TgaxVirtualDesktopTestCase::TgaxVirtualDesktopTestCase ( const std::string & name,
const VdiParams & params )

Constructor.

Parameters
namethe name of the test to run
paramsthe VDI parameters to use for the test

Definition at line 104 of file tgax-virtual-desktop-test-suite.cc.

References ns3::TestCase::TestCase(), m_params, m_startAppTime, and ns3::Seconds().

Here is the call graph for this function:

Member Function Documentation

◆ DoRun()

void TgaxVirtualDesktopTestCase::DoRun ( )
overrideprivatevirtual

Implementation to actually run this TestCase.

Subclasses should override this method to conduct their tests.

Implements ns3::TestCase.

Definition at line 188 of file tgax-virtual-desktop-test-suite.cc.

References ns3::Simulator::Destroy(), m_params, m_received, m_sent, m_startAppTime, ns3::MilliSeconds(), NS_TEST_ASSERT_MSG_EQ, NS_TEST_ASSERT_MSG_LT_OR_EQ, NS_TEST_EXPECT_MSG_EQ_TOL, and ns3::Simulator::Run().

Here is the call graph for this function:

◆ DoSetup()

void TgaxVirtualDesktopTestCase::DoSetup ( )
overrideprivatevirtual

Implementation to do any local setup required for this TestCase.

Subclasses should override this method to perform any costly per-test setup before DoRun is invoked.

Reimplemented from ns3::TestCase.

Definition at line 127 of file tgax-virtual-desktop-test-suite.cc.

References ns3::Ipv4AddressHelper::Assign(), ns3::ApplicationHelper::AssignStreams(), ns3::Config::Connect(), ns3::Config::ConnectWithoutContext(), ns3::CreateObject(), ns3::CreateObjectWithAttributes(), ns3::Ipv4Address::GetAny(), ns3::TgaxVirtualDesktop::GetTypeId(), ns3::ApplicationHelper::Install(), ns3::SimpleNetDeviceHelper::Install(), m_params, m_startAppTime, ns3::MakeCallback(), nodes, NS_LOG_FUNCTION, PacketSent(), port, ReceiveRx(), ns3::Seconds(), ns3::ApplicationHelper::SetAttribute(), ns3::Ipv4AddressHelper::SetBase(), ns3::RngSeedManager::SetRun(), ns3::RngSeedManager::SetSeed(), and ns3::ApplicationContainer::Start().

Here is the call graph for this function:

◆ PacketSent()

void TgaxVirtualDesktopTestCase::PacketSent ( Ptr< const Packet > packet)
private

Record a transmitted VDI packet.

Parameters
packetthe transmitted packet

Definition at line 113 of file tgax-virtual-desktop-test-suite.cc.

References m_sent, ns3::Simulator::Now(), and NS_LOG_FUNCTION.

Referenced by DoSetup().

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

◆ ReceiveRx()

void TgaxVirtualDesktopTestCase::ReceiveRx ( std::string context,
Ptr< const Packet > p,
const Address & addr )
private

Record a VDI packet successfully received.

Parameters
contextthe context
pthe packet
addrthe sender's address

Definition at line 120 of file tgax-virtual-desktop-test-suite.cc.

References m_received, and NS_LOG_FUNCTION.

Referenced by DoSetup().

Here is the caller graph for this function:

Member Data Documentation

◆ m_params

VdiParams TgaxVirtualDesktopTestCase::m_params
private

VDI parameters.

Definition at line 100 of file tgax-virtual-desktop-test-suite.cc.

Referenced by TgaxVirtualDesktopTestCase(), DoRun(), and DoSetup().

◆ m_received

uint64_t TgaxVirtualDesktopTestCase::m_received {0}
private

number of bytes received

Definition at line 98 of file tgax-virtual-desktop-test-suite.cc.

Referenced by DoRun(), and ReceiveRx().

◆ m_sent

std::vector<TxInfo> TgaxVirtualDesktopTestCase::m_sent
private

transmitted VDI packets

Definition at line 97 of file tgax-virtual-desktop-test-suite.cc.

Referenced by DoRun(), and PacketSent().

◆ m_startAppTime

Time TgaxVirtualDesktopTestCase::m_startAppTime
private

Time at which the application is started.

Definition at line 101 of file tgax-virtual-desktop-test-suite.cc.

Referenced by TgaxVirtualDesktopTestCase(), DoRun(), and DoSetup().


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