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. | |
~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 |
TestCase & | operator= (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_t > | m_ccDownlinkTraffic |
CC DL traffic. | |
std::map< uint8_t, uint32_t > | m_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. | |
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. | |
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.
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 339 of file lte-test-carrier-aggregation.cc.
References m_dlThroughput, and m_statsDuration.
|
override |
Definition at line 355 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 326 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 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().
|
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().
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.
frameNo | the frame number |
subframeNo | the subframe number |
rnti | the RNTI |
mcs | the MCS |
sizeTb | |
componentCarrierId | the 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().
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().
|
private |
CC DL traffic.
Definition at line 103 of file lte-test-carrier-aggregation.h.
Referenced by DlScheduling(), and DoRun().
|
private |
CC UL traffic.
Definition at line 104 of file lte-test-carrier-aggregation.h.
Referenced by DoRun(), and UlScheduling().
|
private |
|
private |
|
private |
DL throughput.
Definition at line 105 of file lte-test-carrier-aggregation.h.
Referenced by CarrierAggregationTestCase(), DlScheduling(), and WriteResultToFile().
|
private |
number of component carriers
Definition at line 101 of file lte-test-carrier-aggregation.h.
Referenced by DoRun(), and WriteResultToFile().
|
private |
the number of users
Definition at line 97 of file lte-test-carrier-aggregation.h.
Referenced by DoRun(), and WriteResultToFile().
|
private |
stats duration
Definition at line 107 of file lte-test-carrier-aggregation.h.
Referenced by CarrierAggregationTestCase(), DoRun(), and WriteResultToFile().
|
private |
|
private |
UL throughput.
Definition at line 106 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 38 of file lte-test-carrier-aggregation.h.
Referenced by TestCarrierAggregationSuite::TestCarrierAggregationSuite(), and DoRun().