Test different X2 handover measures and algorithms, e.g. More...
Classes | |
struct | BearerData |
BearerData structure. More... | |
struct | UeData |
UeData structure. More... | |
Public Member Functions | |
LteX2HandoverMeasuresTestCase (uint32_t nEnbs, uint32_t nUes, uint32_t nDedicatedBearers, std::list< CheckPointEvent > checkPointEventList, std::string checkPointEventListName, bool useUdp, std::string schedulerType, std::string handoverAlgorithmType, bool admitHo, bool useIdealRrc) | |
Constructor. 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 |
Private Member Functions | |
void | CheckConnected (Ptr< NetDevice > ueDevice, Ptr< NetDevice > enbDevice) |
Check connected function. More... | |
void | CheckStats (uint32_t ueIndex) |
Check stats function. More... | |
void | DoRun () override |
Implementation to actually run this TestCase. More... | |
void | SaveStats (uint32_t ueIndex) |
Save stats function. More... | |
Static Private Member Functions | |
static std::string | BuildNameString (uint32_t nEnbs, uint32_t nUes, uint32_t nDedicatedBearers, std::string checkPointEventListName, bool useUdp, std::string schedulerType, std::string handoverAlgorithmType, bool admitHo, bool useIdealRrc) |
Build name string. More... | |
Private Attributes | |
bool | m_admitHo |
whether to configure to admit handover More... | |
std::list< CheckPointEvent > | m_checkPointEventList |
check point event list More... | |
std::string | m_checkPointEventListName |
check point event list name More... | |
bool | m_epc |
whether to use EPC More... | |
Ptr< PointToPointEpcHelper > | m_epcHelper |
EPC helper. More... | |
std::string | m_handoverAlgorithmType |
handover algorithm type More... | |
Ptr< LteHelper > | m_lteHelper |
LTE helper. More... | |
const Time | m_maxHoDuration |
maximum HO duration More... | |
uint32_t | m_nDedicatedBearers |
number of UEs in the test More... | |
uint32_t | m_nEnbs |
number of eNBs in the test More... | |
uint32_t | m_nUes |
number of UEs in the test More... | |
std::string | m_schedulerType |
scheduler type More... | |
const Time | m_statsDuration |
stats duration More... | |
const Time | m_udpClientInterval |
UDP client interval. More... | |
const uint32_t | m_udpClientPktSize |
UDP client packet size. More... | |
std::vector< UeData > | m_ueDataVector |
UE data vector. More... | |
bool | m_useIdealRrc |
whether to use ideal RRC More... | |
bool | m_useUdp |
whether to use UDP traffic 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... | |
Test different X2 handover measures and algorithms, e.g.
A2A4RsrqHandoverAlgorithm and A3RsrpHandoverAlgorithm. Test defines different handover parameters and scenario configurations.
Definition at line 75 of file test-lte-x2-handover-measures.cc.
LteX2HandoverMeasuresTestCase::LteX2HandoverMeasuresTestCase | ( | uint32_t | nEnbs, |
uint32_t | nUes, | ||
uint32_t | nDedicatedBearers, | ||
std::list< CheckPointEvent > | checkPointEventList, | ||
std::string | checkPointEventListName, | ||
bool | useUdp, | ||
std::string | schedulerType, | ||
std::string | handoverAlgorithmType, | ||
bool | admitHo, | ||
bool | useIdealRrc | ||
) |
Constructor.
nEnbs | number of eNBs in the test |
nUes | number of UEs in the test |
nDedicatedBearers | number of bearers to be activated per UE |
checkPointEventList | list of check point events |
checkPointEventListName | name of check point event list |
useUdp | true if UDP is to be used, false if TCP is to be used |
schedulerType | type of scheduler to be used (e.g. "ns3::PfFfMacScheduler") |
handoverAlgorithmType | type of handover algorithm to be used (e.g. "ns3::A3RsrpHandoverAlgorithm") |
admitHo | true if Ho is admitted, false if it is not admitted |
useIdealRrc | true if ideal RRC is to be used, false if real RRC is to be used |
Definition at line 220 of file test-lte-x2-handover-measures.cc.
|
staticprivate |
Build name string.
nEnbs | number of eNBs in the test |
nUes | number of UEs in the test |
nDedicatedBearers | number of bearers to be activated per UE |
checkPointEventListName | name of check point event list |
useUdp | true if UDP is to be used, false if TCP is to be used |
schedulerType | the scheduler type |
handoverAlgorithmType | type of handover algorithm to be used (e.g. "ns3::A3RsrpHandoverAlgorithm") |
admitHo | true if Ho is admitted, false if it is not admitted |
useIdealRrc | true if the ideal RRC should be used |
Definition at line 195 of file test-lte-x2-handover-measures.cc.
Referenced by DoRun().
|
private |
Check connected function.
ueDevice | the UE device |
enbDevice | the ENB device |
Definition at line 596 of file test-lte-x2-handover-measures.cc.
References ns3::ObjectPtrContainerValue::Begin(), ns3::ObjectPtrContainerValue::End(), ns3::LteEnbNetDevice::GetCellId(), ns3::LteEnbNetDevice::GetDlBandwidth(), ns3::LteEnbNetDevice::GetDlEarfcn(), ns3::ObjectPtrContainerValue::GetN(), ns3::LteEnbNetDevice::GetRrc(), ns3::LteEnbNetDevice::GetUlBandwidth(), ns3::LteEnbNetDevice::GetUlEarfcn(), m_nDedicatedBearers, NS_ASSERT_MSG, NS_LOG_FUNCTION, NS_TEST_ASSERT_MSG_EQ, and NS_TEST_ASSERT_MSG_NE.
Referenced by DoRun().
|
private |
Check stats function.
ueIndex | the index of the UE |
Definition at line 698 of file test-lte-x2-handover-measures.cc.
References m_statsDuration, m_udpClientInterval, m_udpClientPktSize, m_ueDataVector, NS_LOG_FUNCTION, NS_LOG_LOGIC, and NS_TEST_ASSERT_MSG_GT.
Referenced by DoRun().
|
overrideprivatevirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 259 of file test-lte-x2-handover-measures.cc.
References ns3::LteHelper::ActivateDataRadioBearer(), ns3::LteHelper::ActivateDedicatedEpsBearer(), ns3::LteHelper::AddX2Interface(), ns3::Ipv4AddressHelper::Assign(), ns3::LteHelper::AssignStreams(), ns3::NoBackhaulEpcHelper::AssignUeIpv4Address(), ns3::LteHelper::Attach(), LteX2HandoverMeasuresTestCase::UeData::bearerDataList, ns3::NetDeviceContainer::Begin(), BuildNameString(), CheckConnected(), CheckStats(), first::clientApps, ns3::NodeContainer::Create(), LteX2HandoverMeasuresTestCase::BearerData::dlSink, ns3::NetDeviceContainer::End(), ns3::ApplicationContainer::Get(), ns3::NetDeviceContainer::Get(), ns3::NodeContainer::Get(), ns3::Ipv4InterfaceContainer::GetAddress(), ns3::NetDeviceContainer::GetN(), ns3::NodeContainer::GetN(), ns3::Object::GetObject(), ns3::NoBackhaulEpcHelper::GetPgwNode(), ns3::Ipv4StaticRoutingHelper::GetStaticRouting(), ns3::NoBackhaulEpcHelper::GetUeDefaultGatewayAddress(), ns3::UniformRandomVariable::GetValue(), ns3::UdpClientHelper::Install(), ns3::PointToPointHelper::Install(), ns3::BulkSendHelper::Install(), ns3::PacketSinkHelper::Install(), ns3::MobilityHelper::Install(), ns3::LteHelper::InstallEnbDevice(), ns3::LteHelper::InstallUeDevice(), nsclick-simple-lan::internet, ns3::EpcTft::PacketFilter::localPortEnd, ns3::EpcTft::PacketFilter::localPortStart, m_admitHo, m_checkPointEventList, m_checkPointEventListName, m_epc, m_epcHelper, m_handoverAlgorithmType, m_lteHelper, m_nDedicatedBearers, m_nEnbs, m_nUes, m_schedulerType, m_statsDuration, m_udpClientInterval, m_udpClientPktSize, m_ueDataVector, m_useIdealRrc, m_useUdp, ns3::MilliSeconds(), NS_FATAL_ERROR, NS_LOG_FUNCTION, ns3::EpcTft::PacketFilter::remotePortEnd, ns3::EpcTft::PacketFilter::remotePortStart, ns3::Config::Reset(), SaveStats(), ns3::Seconds(), first::serverApps, ns3::BulkSendHelper::SetAttribute(), ns3::ObjectBase::SetAttribute(), ns3::Ipv4AddressHelper::SetBase(), ns3::PointToPointHelper::SetChannelAttribute(), ns3::Config::SetDefault(), ns3::PointToPointHelper::SetDeviceAttribute(), ns3::LteHelper::SetEpcHelper(), ns3::LteHelper::SetHandoverAlgorithmAttribute(), ns3::LteHelper::SetHandoverAlgorithmType(), ns3::MobilityHelper::SetMobilityModel(), ns3::MobilityHelper::SetPositionAllocator(), ns3::LteHelper::SetSchedulerType(), ns3::RandomVariableStream::SetStream(), stopTime, and LteX2HandoverMeasuresTestCase::BearerData::ulSink.
|
private |
Save stats function.
ueIndex | the index of the UE |
Definition at line 679 of file test-lte-x2-handover-measures.cc.
References m_ueDataVector, and NS_LOG_FUNCTION.
Referenced by DoRun().
|
private |
whether to configure to admit handover
Definition at line 145 of file test-lte-x2-handover-measures.cc.
Referenced by DoRun().
|
private |
check point event list
Definition at line 139 of file test-lte-x2-handover-measures.cc.
Referenced by DoRun().
|
private |
check point event list name
Definition at line 140 of file test-lte-x2-handover-measures.cc.
Referenced by DoRun().
|
private |
whether to use EPC
Definition at line 141 of file test-lte-x2-handover-measures.cc.
Referenced by DoRun().
|
private |
|
private |
handover algorithm type
Definition at line 144 of file test-lte-x2-handover-measures.cc.
Referenced by DoRun().
|
private |
maximum HO duration
Definition at line 188 of file test-lte-x2-handover-measures.cc.
|
private |
number of UEs in the test
Definition at line 138 of file test-lte-x2-handover-measures.cc.
Referenced by CheckConnected(), and DoRun().
|
private |
number of eNBs in the test
Definition at line 136 of file test-lte-x2-handover-measures.cc.
Referenced by DoRun().
|
private |
number of UEs in the test
Definition at line 137 of file test-lte-x2-handover-measures.cc.
Referenced by DoRun().
|
private |
scheduler type
Definition at line 143 of file test-lte-x2-handover-measures.cc.
Referenced by DoRun().
|
private |
stats duration
Definition at line 189 of file test-lte-x2-handover-measures.cc.
Referenced by CheckStats(), and DoRun().
|
private |
UDP client interval.
Definition at line 190 of file test-lte-x2-handover-measures.cc.
Referenced by CheckStats(), and DoRun().
|
private |
UDP client packet size.
Definition at line 191 of file test-lte-x2-handover-measures.cc.
Referenced by CheckStats(), and DoRun().
|
private |
UE data vector.
Definition at line 186 of file test-lte-x2-handover-measures.cc.
Referenced by CheckStats(), DoRun(), and SaveStats().
|
private |
whether to use ideal RRC
Definition at line 146 of file test-lte-x2-handover-measures.cc.
Referenced by DoRun().
|
private |
whether to use UDP traffic
Definition at line 142 of file test-lte-x2-handover-measures.cc.
Referenced by DoRun().