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

Test different X2 handover measures and algorithms, e.g. More...

+ Inheritance diagram for LteX2HandoverMeasuresTestCase:
+ Collaboration diagram for LteX2HandoverMeasuresTestCase:

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.
 
- Public Member Functions inherited from ns3::TestCase
 TestCase (const TestCase &)=delete
 
virtual ~TestCase ()
 Destructor.
 
std::string GetName () const
 
TestCaseoperator= (const TestCase &)=delete
 

Private Member Functions

void CheckConnected (Ptr< NetDevice > ueDevice, Ptr< NetDevice > enbDevice)
 Check connected function.
 
void CheckStats (uint32_t ueIndex)
 Check stats function.
 
void DoRun () override
 Implementation to actually run this TestCase.
 
void SaveStats (uint32_t ueIndex)
 Save stats function.
 

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.
 

Private Attributes

bool m_admitHo
 whether to configure to admit handover
 
std::list< CheckPointEventm_checkPointEventList
 check point event list
 
std::string m_checkPointEventListName
 check point event list name
 
bool m_epc
 whether to use EPC
 
Ptr< PointToPointEpcHelperm_epcHelper
 EPC helper.
 
std::string m_handoverAlgorithmType
 handover algorithm type
 
Ptr< LteHelperm_lteHelper
 LTE helper.
 
const Time m_maxHoDuration
 maximum HO duration
 
uint32_t m_nDedicatedBearers
 number of UEs in the test
 
uint32_t m_nEnbs
 number of eNBs in the test
 
uint32_t m_nUes
 number of UEs in the test
 
std::string m_schedulerType
 scheduler type
 
const Time m_statsDuration
 stats duration
 
const Time m_udpClientInterval
 UDP client interval.
 
const uint32_t m_udpClientPktSize
 UDP client packet size.
 
std::vector< UeDatam_ueDataVector
 UE data vector.
 
bool m_useIdealRrc
 whether to use ideal RRC
 
bool m_useUdp
 whether to use UDP traffic
 

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

Test different X2 handover measures and algorithms, e.g.

A2A4RsrqHandoverAlgorithm and A3RsrpHandoverAlgorithm. Test defines different handover parameters and scenario configurations.

Definition at line 64 of file test-lte-x2-handover-measures.cc.

Constructor & Destructor Documentation

◆ LteX2HandoverMeasuresTestCase()

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.

Parameters
nEnbsnumber of eNBs in the test
nUesnumber of UEs in the test
nDedicatedBearersnumber of bearers to be activated per UE
checkPointEventListlist of check point events
checkPointEventListNamename of check point event list
useUdptrue if UDP is to be used, false if TCP is to be used
schedulerTypetype of scheduler to be used (e.g. "ns3::PfFfMacScheduler")
handoverAlgorithmTypetype of handover algorithm to be used (e.g. "ns3::A3RsrpHandoverAlgorithm")
admitHotrue if Ho is admitted, false if it is not admitted
useIdealRrctrue if ideal RRC is to be used, false if real RRC is to be used

Definition at line 209 of file test-lte-x2-handover-measures.cc.

Member Function Documentation

◆ BuildNameString()

std::string LteX2HandoverMeasuresTestCase::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 )
staticprivate

Build name string.

Parameters
nEnbsnumber of eNBs in the test
nUesnumber of UEs in the test
nDedicatedBearersnumber of bearers to be activated per UE
checkPointEventListNamename of check point event list
useUdptrue if UDP is to be used, false if TCP is to be used
schedulerTypethe scheduler type
handoverAlgorithmTypetype of handover algorithm to be used (e.g. "ns3::A3RsrpHandoverAlgorithm")
admitHotrue if Ho is admitted, false if it is not admitted
useIdealRrctrue if the ideal RRC should be used
Returns
the name string

Definition at line 184 of file test-lte-x2-handover-measures.cc.

Referenced by DoRun().

+ Here is the caller graph for this function:

◆ CheckConnected()

void LteX2HandoverMeasuresTestCase::CheckConnected ( Ptr< NetDevice > ueDevice,
Ptr< NetDevice > enbDevice )
private

Check connected function.

Parameters
ueDevicethe UE device
enbDevicethe ENB device

Definition at line 585 of file test-lte-x2-handover-measures.cc.

References ns3::ObjectPtrContainerValue::Begin(), ns3::LteUeRrc::CONNECTED_NORMALLY, ns3::UeManager::CONNECTED_NORMALLY, ns3::ObjectPtrContainerValue::End(), ns3::ObjectPtrContainerValue::GetN(), m_nDedicatedBearers, NS_ASSERT_MSG, NS_LOG_FUNCTION, NS_TEST_ASSERT_MSG_EQ, and NS_TEST_ASSERT_MSG_NE.

Referenced by DoRun().

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

◆ CheckStats()

void LteX2HandoverMeasuresTestCase::CheckStats ( uint32_t ueIndex)
private

Check stats function.

Parameters
ueIndexthe index of the UE

Definition at line 687 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().

+ Here is the caller graph for this function:

◆ DoRun()

void LteX2HandoverMeasuresTestCase::DoRun ( )
overrideprivatevirtual

Implementation to actually run this TestCase.

Subclasses should override this method to conduct their tests.

Implements ns3::TestCase.

Definition at line 248 of file test-lte-x2-handover-measures.cc.

References ns3::Ipv4AddressHelper::Assign(), LteX2HandoverMeasuresTestCase::UeData::bearerDataList, ns3::NetDeviceContainer::Begin(), BuildNameString(), CheckConnected(), CheckStats(), ns3::Create(), ns3::NodeContainer::Create(), ns3::CreateObject(), ns3::Simulator::Destroy(), LteX2HandoverMeasuresTestCase::BearerData::dlSink, ns3::NetDeviceContainer::End(), ns3::ApplicationContainer::Get(), ns3::NetDeviceContainer::Get(), ns3::NodeContainer::Get(), ns3::Ipv4InterfaceContainer::GetAddress(), ns3::Ipv4Address::GetAny(), ns3::NetDeviceContainer::GetN(), ns3::NodeContainer::GetN(), ns3::Object::GetObject(), ns3::Ipv4StaticRoutingHelper::GetStaticRouting(), ns3::ApplicationHelper::Install(), ns3::MobilityHelper::Install(), ns3::PointToPointHelper::Install(), 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(), ns3::EpsBearer::NGBR_VIDEO_TCP_DEFAULT, NS_FATAL_ERROR, NS_LOG_FUNCTION, ns3::EpcTft::PacketFilter::remotePortEnd, ns3::EpcTft::PacketFilter::remotePortStart, ns3::Config::Reset(), ns3::Simulator::Run(), SaveStats(), ns3::Simulator::Schedule(), ns3::Seconds(), ns3::ApplicationHelper::SetAttribute(), ns3::Ipv4AddressHelper::SetBase(), ns3::PointToPointHelper::SetChannelAttribute(), ns3::Config::SetDefault(), ns3::PointToPointHelper::SetDeviceAttribute(), ns3::MobilityHelper::SetMobilityModel(), ns3::MobilityHelper::SetPositionAllocator(), ns3::Simulator::Stop(), stopTime, and LteX2HandoverMeasuresTestCase::BearerData::ulSink.

+ Here is the call graph for this function:

◆ SaveStats()

void LteX2HandoverMeasuresTestCase::SaveStats ( uint32_t ueIndex)
private

Save stats function.

Parameters
ueIndexthe index of the UE

Definition at line 668 of file test-lte-x2-handover-measures.cc.

References m_ueDataVector, and NS_LOG_FUNCTION.

Referenced by DoRun().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_admitHo

bool LteX2HandoverMeasuresTestCase::m_admitHo
private

whether to configure to admit handover

Definition at line 134 of file test-lte-x2-handover-measures.cc.

Referenced by DoRun().

◆ m_checkPointEventList

std::list<CheckPointEvent> LteX2HandoverMeasuresTestCase::m_checkPointEventList
private

check point event list

Definition at line 128 of file test-lte-x2-handover-measures.cc.

Referenced by DoRun().

◆ m_checkPointEventListName

std::string LteX2HandoverMeasuresTestCase::m_checkPointEventListName
private

check point event list name

Definition at line 129 of file test-lte-x2-handover-measures.cc.

Referenced by DoRun().

◆ m_epc

bool LteX2HandoverMeasuresTestCase::m_epc
private

whether to use EPC

Definition at line 130 of file test-lte-x2-handover-measures.cc.

Referenced by DoRun().

◆ m_epcHelper

Ptr<PointToPointEpcHelper> LteX2HandoverMeasuresTestCase::m_epcHelper
private

EPC helper.

Definition at line 137 of file test-lte-x2-handover-measures.cc.

Referenced by DoRun().

◆ m_handoverAlgorithmType

std::string LteX2HandoverMeasuresTestCase::m_handoverAlgorithmType
private

handover algorithm type

Definition at line 133 of file test-lte-x2-handover-measures.cc.

Referenced by DoRun().

◆ m_lteHelper

Ptr<LteHelper> LteX2HandoverMeasuresTestCase::m_lteHelper
private

LTE helper.

Definition at line 136 of file test-lte-x2-handover-measures.cc.

Referenced by DoRun().

◆ m_maxHoDuration

const Time LteX2HandoverMeasuresTestCase::m_maxHoDuration
private

maximum HO duration

Definition at line 177 of file test-lte-x2-handover-measures.cc.

◆ m_nDedicatedBearers

uint32_t LteX2HandoverMeasuresTestCase::m_nDedicatedBearers
private

number of UEs in the test

Definition at line 127 of file test-lte-x2-handover-measures.cc.

Referenced by CheckConnected(), and DoRun().

◆ m_nEnbs

uint32_t LteX2HandoverMeasuresTestCase::m_nEnbs
private

number of eNBs in the test

Definition at line 125 of file test-lte-x2-handover-measures.cc.

Referenced by DoRun().

◆ m_nUes

uint32_t LteX2HandoverMeasuresTestCase::m_nUes
private

number of UEs in the test

Definition at line 126 of file test-lte-x2-handover-measures.cc.

Referenced by DoRun().

◆ m_schedulerType

std::string LteX2HandoverMeasuresTestCase::m_schedulerType
private

scheduler type

Definition at line 132 of file test-lte-x2-handover-measures.cc.

Referenced by DoRun().

◆ m_statsDuration

const Time LteX2HandoverMeasuresTestCase::m_statsDuration
private

stats duration

Definition at line 178 of file test-lte-x2-handover-measures.cc.

Referenced by CheckStats(), and DoRun().

◆ m_udpClientInterval

const Time LteX2HandoverMeasuresTestCase::m_udpClientInterval
private

UDP client interval.

Definition at line 179 of file test-lte-x2-handover-measures.cc.

Referenced by CheckStats(), and DoRun().

◆ m_udpClientPktSize

const uint32_t LteX2HandoverMeasuresTestCase::m_udpClientPktSize
private

UDP client packet size.

Definition at line 180 of file test-lte-x2-handover-measures.cc.

Referenced by CheckStats(), and DoRun().

◆ m_ueDataVector

std::vector<UeData> LteX2HandoverMeasuresTestCase::m_ueDataVector
private

UE data vector.

Definition at line 175 of file test-lte-x2-handover-measures.cc.

Referenced by CheckStats(), DoRun(), and SaveStats().

◆ m_useIdealRrc

bool LteX2HandoverMeasuresTestCase::m_useIdealRrc
private

whether to use ideal RRC

Definition at line 135 of file test-lte-x2-handover-measures.cc.

Referenced by DoRun().

◆ m_useUdp

bool LteX2HandoverMeasuresTestCase::m_useUdp
private

whether to use UDP traffic

Definition at line 131 of file test-lte-x2-handover-measures.cc.

Referenced by DoRun().


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