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

Test X2 Handover. More...

+ Inheritance diagram for LteX2HandoverTestCase:
+ Collaboration diagram for LteX2HandoverTestCase:

Classes

struct  BearerData
 BearerData structure. More...
 
struct  UeData
 UeData structure. More...
 

Public Member Functions

 LteX2HandoverTestCase (uint32_t nUes, uint32_t nDedicatedBearers, std::list< HandoverEvent > handoverEventList, std::string handoverEventListName, std::string schedulerType, bool admitHo, bool useIdealRrc)
 
- 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 CheckStatsAWhileAfterHandover (uint32_t ueIndex)
 Check stats a while after handover function.
 
void DoRun () override
 Implementation to actually run this TestCase.
 
void SaveStatsAfterHandover (uint32_t ueIndex)
 Save stats after handover function.
 
void TeleportUeNearTargetEnb (Ptr< Node > ueNode, Ptr< Node > enbNode)
 Teleport UE near the target eNB of the handover.
 
void TeleportUeToMiddle (Ptr< Node > ueNode)
 Teleport UE between both eNBs of the test.
 

Static Private Member Functions

static std::string BuildNameString (uint32_t nUes, uint32_t nDedicatedBearers, std::string handoverEventListName, std::string schedulerType, bool admitHo, bool useIdealRrc)
 Build name string.
 

Private Attributes

bool m_admitHo
 whether to admit the handover request
 
bool m_epc
 whether to use EPC
 
Ptr< PointToPointEpcHelperm_epcHelper
 EPC helper.
 
std::list< HandoverEventm_handoverEventList
 handover event list
 
std::string m_handoverEventListName
 handover event list name
 
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_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 the ideal RRC
 

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...
 
using instead = Duration
 
- Static Public Attributes inherited from ns3::TestCase
static constexpr auto EXTENSIVE = Duration::EXTENSIVE
 
static constexpr auto QUICK = Duration::QUICK
 
static constexpr auto 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 X2 Handover.

In this test is used NoOpHandoverAlgorithm and the request for handover is generated manually, and it is not based on measurements.

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

Constructor & Destructor Documentation

◆ LteX2HandoverTestCase()

LteX2HandoverTestCase::LteX2HandoverTestCase ( uint32_t  nUes,
uint32_t  nDedicatedBearers,
std::list< HandoverEvent handoverEventList,
std::string  handoverEventListName,
std::string  schedulerType,
bool  admitHo,
bool  useIdealRrc 
)
Parameters
nUesnumber of UEs in the test
nDedicatedBearersnumber of bearers to be activated per UE
handoverEventList
handoverEventListName
schedulerTypethe scheduler type
admitHo
useIdealRrctrue if the ideal RRC should be used

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

Member Function Documentation

◆ BuildNameString()

std::string LteX2HandoverTestCase::BuildNameString ( uint32_t  nUes,
uint32_t  nDedicatedBearers,
std::string  handoverEventListName,
std::string  schedulerType,
bool  admitHo,
bool  useIdealRrc 
)
staticprivate

Build name string.

Parameters
nUesnumber of UEs in the test
nDedicatedBearersnumber of bearers to be activated per UE
handoverEventListName
schedulerTypethe scheduler type
admitHo
useIdealRrctrue if the ideal RRC should be used
Returns
the name string

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

Referenced by DoRun().

+ Here is the caller graph for this function:

◆ CheckConnected()

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

Check connected function.

Parameters
ueDevicethe UE device
enbDevicethe ENB device

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

References ns3::ObjectPtrContainerValue::Begin(), ns3::UeManager::CONNECTED_NORMALLY, ns3::LteUeRrc::CONNECTED_NORMALLY, ns3::ObjectPtrContainerValue::End(), ns3::ObjectPtrContainerValue::GetN(), m_nDedicatedBearers, NS_ASSERT_MSG, 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:

◆ CheckStatsAWhileAfterHandover()

void LteX2HandoverTestCase::CheckStatsAWhileAfterHandover ( uint32_t  ueIndex)
private

Check stats a while after handover function.

Parameters
ueIndexthe index of the UE

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

References m_statsDuration, m_udpClientInterval, m_udpClientPktSize, m_ueDataVector, and NS_TEST_ASSERT_MSG_EQ.

Referenced by DoRun().

+ Here is the caller graph for this function:

◆ DoRun()

void LteX2HandoverTestCase::DoRun ( )
overrideprivatevirtual

Implementation to actually run this TestCase.

Subclasses should override this method to conduct their tests.

Implements ns3::TestCase.

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

References ns3::LteHelper::ActivateDataRadioBearer(), ns3::LteHelper::ActivateDedicatedEpsBearer(), ns3::LteHelper::AddX2Interface(), ns3::Ipv4AddressHelper::Assign(), ns3::LteHelper::AssignStreams(), ns3::NoBackhaulEpcHelper::AssignUeIpv4Address(), ns3::LteHelper::Attach(), LteX2HandoverTestCase::UeData::bearerDataList, ns3::NetDeviceContainer::Begin(), BuildNameString(), CheckConnected(), CheckStatsAWhileAfterHandover(), ns3::NodeContainer::Create(), ns3::Simulator::Destroy(), LteX2HandoverTestCase::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::NoBackhaulEpcHelper::GetPgwNode(), ns3::RngSeedManager::GetRun(), ns3::RngSeedManager::GetSeed(), ns3::Ipv4StaticRoutingHelper::GetStaticRouting(), ns3::NoBackhaulEpcHelper::GetUeDefaultGatewayAddress(), ns3::LteHelper::HandoverRequest(), ns3::ApplicationHelper::Install(), ns3::PointToPointHelper::Install(), ns3::LteHelper::InstallEnbDevice(), ns3::LteHelper::InstallUeDevice(), ns3::EpcTft::PacketFilter::localPortEnd, ns3::EpcTft::PacketFilter::localPortStart, m_admitHo, m_epc, m_epcHelper, m_handoverEventList, m_handoverEventListName, m_lteHelper, m_maxHoDuration, m_nDedicatedBearers, m_nUes, m_schedulerType, m_statsDuration, m_udpClientInterval, m_udpClientPktSize, m_ueDataVector, m_useIdealRrc, ns3::MilliSeconds(), ns3::EpsBearer::NGBR_VIDEO_TCP_DEFAULT, NS_LOG_FUNCTION, ns3::EpcTft::PacketFilter::remotePortEnd, ns3::EpcTft::PacketFilter::remotePortStart, ns3::Config::Reset(), ns3::Simulator::Run(), SaveStatsAfterHandover(), ns3::Simulator::Schedule(), ns3::Seconds(), ns3::ObjectBase::SetAttribute(), ns3::Ipv4AddressHelper::SetBase(), ns3::PointToPointHelper::SetChannelAttribute(), ns3::Config::SetDefault(), ns3::PointToPointHelper::SetDeviceAttribute(), ns3::LteHelper::SetEpcHelper(), ns3::LteHelper::SetHandoverAlgorithmType(), ns3::RngSeedManager::SetRun(), ns3::LteHelper::SetSchedulerType(), ns3::RngSeedManager::SetSeed(), ns3::Simulator::Stop(), stopTime, TeleportUeNearTargetEnb(), TeleportUeToMiddle(), and LteX2HandoverTestCase::BearerData::ulSink.

+ Here is the call graph for this function:

◆ SaveStatsAfterHandover()

void LteX2HandoverTestCase::SaveStatsAfterHandover ( uint32_t  ueIndex)
private

Save stats after handover function.

Parameters
ueIndexthe index of the UE

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

References m_ueDataVector.

Referenced by DoRun().

+ Here is the caller graph for this function:

◆ TeleportUeNearTargetEnb()

void LteX2HandoverTestCase::TeleportUeNearTargetEnb ( Ptr< Node ueNode,
Ptr< Node enbNode 
)
private

Teleport UE near the target eNB of the handover.

Parameters
ueNodethe UE node
enbNodethe target eNB node

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

Referenced by DoRun().

+ Here is the caller graph for this function:

◆ TeleportUeToMiddle()

void LteX2HandoverTestCase::TeleportUeToMiddle ( Ptr< Node ueNode)
private

Teleport UE between both eNBs of the test.

Parameters
ueNodethe UE node

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

Referenced by DoRun().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_admitHo

bool LteX2HandoverTestCase::m_admitHo
private

whether to admit the handover request

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

Referenced by DoRun().

◆ m_epc

bool LteX2HandoverTestCase::m_epc
private

whether to use EPC

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

Referenced by DoRun().

◆ m_epcHelper

Ptr<PointToPointEpcHelper> LteX2HandoverTestCase::m_epcHelper
private

EPC helper.

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

Referenced by DoRun().

◆ m_handoverEventList

std::list<HandoverEvent> LteX2HandoverTestCase::m_handoverEventList
private

handover event list

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

Referenced by DoRun().

◆ m_handoverEventListName

std::string LteX2HandoverTestCase::m_handoverEventListName
private

handover event list name

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

Referenced by DoRun().

◆ m_lteHelper

Ptr<LteHelper> LteX2HandoverTestCase::m_lteHelper
private

LTE helper.

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

Referenced by DoRun().

◆ m_maxHoDuration

const Time LteX2HandoverTestCase::m_maxHoDuration
private

maximum HO duration

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

Referenced by DoRun().

◆ m_nDedicatedBearers

uint32_t LteX2HandoverTestCase::m_nDedicatedBearers
private

number of UEs in the test

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

Referenced by CheckConnected(), and DoRun().

◆ m_nUes

uint32_t LteX2HandoverTestCase::m_nUes
private

number of UEs in the test

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

Referenced by DoRun().

◆ m_schedulerType

std::string LteX2HandoverTestCase::m_schedulerType
private

scheduler type

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

Referenced by DoRun().

◆ m_statsDuration

const Time LteX2HandoverTestCase::m_statsDuration
private

stats duration

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

Referenced by CheckStatsAWhileAfterHandover(), and DoRun().

◆ m_udpClientInterval

const Time LteX2HandoverTestCase::m_udpClientInterval
private

UDP client interval.

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

Referenced by CheckStatsAWhileAfterHandover(), and DoRun().

◆ m_udpClientPktSize

const uint32_t LteX2HandoverTestCase::m_udpClientPktSize
private

UDP client packet size.

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

Referenced by CheckStatsAWhileAfterHandover(), and DoRun().

◆ m_ueDataVector

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

UE data vector.

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

Referenced by CheckStatsAWhileAfterHandover(), DoRun(), and SaveStatsAfterHandover().

◆ m_useIdealRrc

bool LteX2HandoverTestCase::m_useIdealRrc
private

whether to use the ideal RRC

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

Referenced by DoRun().


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