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

This system test program creates different test cases with a single eNB and several UEs, all having the same Radio Bearer specification. More...

#include "lte-test-carrier-aggregation.h"

+ Inheritance diagram for CarrierAggregationTestCase:
+ Collaboration diagram for CarrierAggregationTestCase:

Public Member Functions

 CarrierAggregationTestCase (uint16_t nUser, uint16_t dist, uint32_t dlbandwidth, uint32_t ulBandwidth, uint32_t numberOfComponentCarriers)
 Constructor of test case.
 
 ~CarrierAggregationTestCase () override
 
void DlScheduling (DlSchedulingCallbackInfo dlInfo)
 DL Scheduling function that is used in this test as callback function of DL scheduling trace.
 
void UlScheduling (uint32_t frameNo, uint32_t subframeNo, uint16_t rnti, uint8_t mcs, uint16_t sizeTb, uint8_t componentCarrierId)
 UL Scheduling function that is used in this test as callback function of UL scheduling trace.
 
void WriteResultToFile () const
 Write result to file function.
 
- Public Member Functions inherited from ns3::TestCase
 TestCase (const TestCase &)=delete
 
virtual ~TestCase ()
 Destructor.
 
std::string GetName () const
 
TestCaseoperator= (const TestCase &)=delete
 

Static Public Attributes

static bool s_writeResults = false
 write results flag, determines whether to write results to outoput files
 
- 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
 

Private Member Functions

void DoRun () override
 Implementation to actually run this TestCase.
 

Static Private Member Functions

static std::string BuildNameString (uint16_t nUser, uint16_t dist, uint32_t dlBandwidth, uint32_t ulBandwidth, uint32_t numberOfComponentCarriers)
 Builds the test name string based on provided parameter values.
 

Private Attributes

std::map< uint8_t, uint32_tm_ccDownlinkTraffic
 CC DL traffic.
 
std::map< uint8_t, uint32_tm_ccUplinkTraffic
 CC UL traffic.
 
uint16_t m_dist
 the distance
 
uint16_t m_dlBandwidth
 DL bandwidth.
 
uint64_t m_dlThroughput
 DL throughput.
 
uint32_t m_numberOfComponentCarriers
 number of component carriers
 
uint16_t m_nUser
 the number of users
 
double m_statsDuration
 stats duration
 
uint16_t m_ulBandwidth
 UL bandwidth.
 
uint64_t m_ulThroughput
 UL throughput.
 

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

This system test program creates different test cases with a single eNB and several UEs, all having the same Radio Bearer specification.

In each test case, the UEs see the same SINR from the eNB; different test cases are implemented obtained by using different SINR values and different numbers of UEs. eNb and UEs are configured to use the secondary carrier and the component carrier manager is configured to split the data equally between primary and secondary carrier. The test consists of checking that the throughput obtained over different carriers are equal within a given tolerance.

Definition at line 35 of file lte-test-carrier-aggregation.h.

Constructor & Destructor Documentation

◆ CarrierAggregationTestCase()

CarrierAggregationTestCase::CarrierAggregationTestCase ( uint16_t nUser,
uint16_t dist,
uint32_t dlbandwidth,
uint32_t ulBandwidth,
uint32_t numberOfComponentCarriers )

Constructor of test case.

Parameters
nUsernumber of users
distthe distance
dlbandwidththe DL bandwidth
ulBandwidththe UL badnwidth
numberOfComponentCarriersnumber of component carriers to be used in test configuration

Definition at line 339 of file lte-test-carrier-aggregation.cc.

References m_dlThroughput, and m_statsDuration.

◆ ~CarrierAggregationTestCase()

CarrierAggregationTestCase::~CarrierAggregationTestCase ( )
override

Definition at line 355 of file lte-test-carrier-aggregation.cc.

Member Function Documentation

◆ BuildNameString()

std::string CarrierAggregationTestCase::BuildNameString ( uint16_t nUser,
uint16_t dist,
uint32_t dlBandwidth,
uint32_t ulBandwidth,
uint32_t numberOfComponentCarriers )
staticprivate

Builds the test name string based on provided parameter values.

Parameters
nUsernumber of users
distthe distance
dlBandwidththe DL bandwidth
ulBandwidththe UL badnwidth
numberOfComponentCarriersnumber of component carriers
Returns
the test name

Definition at line 326 of file lte-test-carrier-aggregation.cc.

◆ DlScheduling()

void CarrierAggregationTestCase::DlScheduling ( DlSchedulingCallbackInfo dlInfo)

DL Scheduling function that is used in this test as callback function of DL scheduling trace.

Parameters
dlInfothe DL scheduling callback info

Definition at line 548 of file lte-test-carrier-aggregation.cc.

References ns3::DlSchedulingCallbackInfo::componentCarrierId, m_ccDownlinkTraffic, m_dlThroughput, ns3::MilliSeconds(), ns3::Simulator::Now(), ns3::DlSchedulingCallbackInfo::sizeTb1, and ns3::DlSchedulingCallbackInfo::sizeTb2.

Referenced by LteTestDlSchedulingCallback().

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

◆ DoRun()

void CarrierAggregationTestCase::DoRun ( )
overrideprivatevirtual

Implementation to actually run this TestCase.

Subclasses should override this method to conduct their tests.

Initialize Simulation Scenario: 1 eNB and m_nUser UEs

Check that the assignment is done in a RR fashion

Implements ns3::TestCase.

Definition at line 360 of file lte-test-carrier-aggregation.cc.

References ns3::Config::Connect(), ns3::NodeContainer::Create(), ns3::CreateObject(), ns3::TestCase::CreateTempDirFilename(), ns3::Simulator::Destroy(), ns3::EpsBearer::GBR_CONV_VOICE, ns3::NetDeviceContainer::Get(), ns3::NodeContainer::Get(), ns3::Object::GetObject(), LteTestDlSchedulingCallback(), LteTestUlSchedulingCallback(), m_ccDownlinkTraffic, m_ccUplinkTraffic, m_dist, m_dlBandwidth, m_numberOfComponentCarriers, m_nUser, m_statsDuration, m_ulBandwidth, ns3::MakeBoundCallback(), NS_LOG_FUNCTION, NS_LOG_INFO, NS_TEST_ASSERT_MSG_EQ, ns3::Simulator::Run(), s_writeResults, ns3::Seconds(), ns3::Config::SetDefault(), ns3::FfMacScheduler::SRS_UL_CQI, ns3::Simulator::Stop(), and WriteResultToFile().

+ Here is the call graph for this function:

◆ UlScheduling()

void CarrierAggregationTestCase::UlScheduling ( uint32_t frameNo,
uint32_t subframeNo,
uint16_t rnti,
uint8_t mcs,
uint16_t sizeTb,
uint8_t componentCarrierId )

UL Scheduling function that is used in this test as callback function of UL scheduling trace.

Parameters
frameNothe frame number
subframeNothe subframe number
rntithe RNTI
mcsthe MCS
sizeTb
componentCarrierIdthe component carrier ID

Definition at line 573 of file lte-test-carrier-aggregation.cc.

References m_ccUplinkTraffic, m_ulThroughput, ns3::MilliSeconds(), and ns3::Simulator::Now().

Referenced by LteTestUlSchedulingCallback().

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

◆ WriteResultToFile()

void CarrierAggregationTestCase::WriteResultToFile ( ) const

Write result to file function.

Definition at line 598 of file lte-test-carrier-aggregation.cc.

References dlResultsFileName, m_dlThroughput, m_numberOfComponentCarriers, m_nUser, m_statsDuration, m_ulThroughput, NS_LOG_ERROR, and ulResultsFileName.

Referenced by DoRun().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_ccDownlinkTraffic

std::map<uint8_t, uint32_t> CarrierAggregationTestCase::m_ccDownlinkTraffic
private

CC DL traffic.

Definition at line 103 of file lte-test-carrier-aggregation.h.

Referenced by DlScheduling(), and DoRun().

◆ m_ccUplinkTraffic

std::map<uint8_t, uint32_t> CarrierAggregationTestCase::m_ccUplinkTraffic
private

CC UL traffic.

Definition at line 104 of file lte-test-carrier-aggregation.h.

Referenced by DoRun(), and UlScheduling().

◆ m_dist

uint16_t CarrierAggregationTestCase::m_dist
private

the distance

Definition at line 98 of file lte-test-carrier-aggregation.h.

Referenced by DoRun().

◆ m_dlBandwidth

uint16_t CarrierAggregationTestCase::m_dlBandwidth
private

DL bandwidth.

Definition at line 99 of file lte-test-carrier-aggregation.h.

Referenced by DoRun().

◆ m_dlThroughput

uint64_t CarrierAggregationTestCase::m_dlThroughput
private

DL throughput.

Definition at line 105 of file lte-test-carrier-aggregation.h.

Referenced by CarrierAggregationTestCase(), DlScheduling(), and WriteResultToFile().

◆ m_numberOfComponentCarriers

uint32_t CarrierAggregationTestCase::m_numberOfComponentCarriers
private

number of component carriers

Definition at line 101 of file lte-test-carrier-aggregation.h.

Referenced by DoRun(), and WriteResultToFile().

◆ m_nUser

uint16_t CarrierAggregationTestCase::m_nUser
private

the number of users

Definition at line 97 of file lte-test-carrier-aggregation.h.

Referenced by DoRun(), and WriteResultToFile().

◆ m_statsDuration

double CarrierAggregationTestCase::m_statsDuration
private

stats duration

Definition at line 107 of file lte-test-carrier-aggregation.h.

Referenced by CarrierAggregationTestCase(), DoRun(), and WriteResultToFile().

◆ m_ulBandwidth

uint16_t CarrierAggregationTestCase::m_ulBandwidth
private

UL bandwidth.

Definition at line 100 of file lte-test-carrier-aggregation.h.

Referenced by DoRun().

◆ m_ulThroughput

uint64_t CarrierAggregationTestCase::m_ulThroughput
private

UL throughput.

Definition at line 106 of file lte-test-carrier-aggregation.h.

Referenced by UlScheduling(), and WriteResultToFile().

◆ s_writeResults

bool CarrierAggregationTestCase::s_writeResults = false
static

write results flag, determines whether to write results to outoput files

Definition at line 38 of file lte-test-carrier-aggregation.h.

Referenced by TestCarrierAggregationSuite::TestCarrierAggregationSuite(), and DoRun().


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