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"
Public Member Functions | |
CarrierAggregationTestCase (uint16_t nUser, uint16_t dist, uint32_t dlbandwidth, uint32_t ulBandwidth, uint32_t numberOfComponentCarriers) | |
Constructor of test case. More... | |
~CarrierAggregationTestCase () override | |
void | DlScheduling (DlSchedulingCallbackInfo dlInfo) |
DL Scheduling function that is used in this test as callback function of DL scheduling trace. More... | |
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 sceduling trace. More... | |
void | WriteResultToFile () const |
Write result to file function. More... | |
Public Member Functions inherited from ns3::TestCase | |
TestCase (const TestCase &)=delete | |
virtual | ~TestCase () |
Destructor. More... | |
std::string | GetName () const |
TestCase & | operator= (const TestCase &)=delete |
Static Public Attributes | |
static bool | s_writeResults = false |
write results flag, determines whether to write results to outoput files More... | |
Private Member Functions | |
void | DoRun () override |
Implementation to actually run this TestCase. More... | |
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. More... | |
Private Attributes | |
std::map< uint8_t, uint32_t > | m_ccDownlinkTraffic |
CC DL traffic. More... | |
std::map< uint8_t, uint32_t > | m_ccUplinkTraffic |
CC UL traffic. More... | |
uint16_t | m_dist |
the distance More... | |
uint16_t | m_dlBandwidth |
DL bandwidth. More... | |
uint64_t | m_dlThroughput |
DL throughput. More... | |
uint32_t | m_numberOfComponentCarriers |
number of component carriers More... | |
uint16_t | m_nUser |
the number of users More... | |
double | m_statsDuration |
stats duration More... | |
uint16_t | m_ulBandwidth |
UL bandwidth. More... | |
uint64_t | m_ulThroughput |
UL throughput. 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... | |
TestCase * | GetParent () const |
Get the parent of this TestCase. More... | |
bool | IsStatusFailure () const |
Check if any tests failed. More... | |
bool | IsStatusSuccess () 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 () const |
Check if this run should assert on failure. More... | |
bool | MustContinueOnFailure () 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... | |
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 46 of file lte-test-carrier-aggregation.h.
CarrierAggregationTestCase::CarrierAggregationTestCase | ( | uint16_t | nUser, |
uint16_t | dist, | ||
uint32_t | dlbandwidth, | ||
uint32_t | ulBandwidth, | ||
uint32_t | numberOfComponentCarriers | ||
) |
Constructor of test case.
nUser | number of users |
dist | the distance |
dlbandwidth | the DL bandwidth |
ulBandwidth | the UL badnwidth |
numberOfComponentCarriers | number of component carriers to be used in test configuration |
Definition at line 278 of file lte-test-carrier-aggregation.cc.
References m_dlThroughput, and m_statsDuration.
|
override |
Definition at line 294 of file lte-test-carrier-aggregation.cc.
|
staticprivate |
Builds the test name string based on provided parameter values.
nUser | number of users |
dist | the distance |
dlBandwidth | the DL bandwidth |
ulBandwidth | the UL badnwidth |
numberOfComponentCarriers | number of component carriers |
Definition at line 265 of file lte-test-carrier-aggregation.cc.
void CarrierAggregationTestCase::DlScheduling | ( | DlSchedulingCallbackInfo | dlInfo | ) |
DL Scheduling function that is used in this test as callback function of DL scheduling trace.
dlInfo | the DL scheduling callback info |
Definition at line 487 of file lte-test-carrier-aggregation.cc.
References ns3::DlSchedulingCallbackInfo::componentCarrierId, m_ccDownlinkTraffic, m_dlThroughput, ns3::MilliSeconds(), ns3::Now(), ns3::DlSchedulingCallbackInfo::sizeTb1, and ns3::DlSchedulingCallbackInfo::sizeTb2.
Referenced by LteTestDlSchedulingCallback().
|
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 299 of file lte-test-carrier-aggregation.cc.
References ns3::LteHelper::ActivateDataRadioBearer(), ns3::LteHelper::Attach(), ns3::Config::Connect(), ns3::NodeContainer::Create(), ns3::TestCase::CreateTempDirFilename(), ns3::LteHelper::EnableTraces(), ns3::NetDeviceContainer::Get(), ns3::NodeContainer::Get(), ns3::Object::GetObject(), ns3::LteEnbNetDevice::GetPhy(), ns3::LteHelper::InstallEnbDevice(), ns3::LteHelper::InstallUeDevice(), LteTestDlSchedulingCallback(), LteTestUlSchedulingCallback(), m_ccDownlinkTraffic, m_ccUplinkTraffic, m_dist, m_dlBandwidth, m_numberOfComponentCarriers, m_nUser, m_statsDuration, m_ulBandwidth, ns3::MakeBoundCallback(), third::mobility, NS_LOG_FUNCTION, NS_LOG_INFO, NS_TEST_ASSERT_MSG_EQ, s_writeResults, ns3::Seconds(), ns3::ObjectBase::SetAttribute(), ns3::Config::SetDefault(), ns3::LteHelper::SetSchedulerAttribute(), ns3::LteHelper::SetSchedulerType(), and WriteResultToFile().
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 sceduling trace.
frameNo | the frame number |
subframeNo | the subframe number |
rnti | the RNTI |
mcs | the MCS |
sizeTb | |
componentCarrierId | the component carrier ID |
Definition at line 512 of file lte-test-carrier-aggregation.cc.
References m_ccUplinkTraffic, m_ulThroughput, ns3::MilliSeconds(), and ns3::Now().
Referenced by LteTestUlSchedulingCallback().
void CarrierAggregationTestCase::WriteResultToFile | ( | ) | const |
Write result to file function.
Definition at line 537 of file lte-test-carrier-aggregation.cc.
References openflow-switch::app, dlResultsFileName, m_dlThroughput, m_numberOfComponentCarriers, m_nUser, m_statsDuration, m_ulThroughput, NS_LOG_ERROR, and ulResultsFileName.
Referenced by DoRun().
|
private |
CC DL traffic.
Definition at line 114 of file lte-test-carrier-aggregation.h.
Referenced by DlScheduling(), and DoRun().
|
private |
CC UL traffic.
Definition at line 115 of file lte-test-carrier-aggregation.h.
Referenced by DoRun(), and UlScheduling().
|
private |
|
private |
|
private |
DL throughput.
Definition at line 116 of file lte-test-carrier-aggregation.h.
Referenced by CarrierAggregationTestCase(), DlScheduling(), and WriteResultToFile().
|
private |
number of component carriers
Definition at line 112 of file lte-test-carrier-aggregation.h.
Referenced by DoRun(), and WriteResultToFile().
|
private |
the number of users
Definition at line 108 of file lte-test-carrier-aggregation.h.
Referenced by DoRun(), and WriteResultToFile().
|
private |
stats duration
Definition at line 118 of file lte-test-carrier-aggregation.h.
Referenced by CarrierAggregationTestCase(), DoRun(), and WriteResultToFile().
|
private |
|
private |
UL throughput.
Definition at line 117 of file lte-test-carrier-aggregation.h.
Referenced by UlScheduling(), and WriteResultToFile().
|
static |
write results flag, determines whether to write results to outoput files
Definition at line 49 of file lte-test-carrier-aggregation.h.
Referenced by TestCarrierAggregationSuite::TestCarrierAggregationSuite(), and DoRun().