Test X2 Handover. More...
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, bool useUdp, std::string schedulerType, bool admitHo, bool useIdealRrc) | |
![]() | |
virtual | ~TestCase () |
Destructor. More... | |
std::string | GetName (void) const |
Private Member Functions | |
void | CheckConnected (Ptr< NetDevice > ueDevice, Ptr< NetDevice > enbDevice) |
Check connected function. More... | |
void | CheckStatsAWhileAfterHandover (uint32_t ueIndex) |
Check stats a while after handover function. More... | |
virtual void | DoRun (void) |
Implementation to actually run this TestCase. More... | |
void | SaveStatsAfterHandover (uint32_t ueIndex) |
Save stats after handover function. More... | |
Static Private Member Functions | |
static std::string | BuildNameString (uint32_t nUes, uint32_t nDedicatedBearers, std::string handoverEventListName, bool useUdp, std::string schedulerType, bool admitHo, bool useIdealRrc) |
Build name string. More... | |
Private Attributes | |
bool | m_admitHo |
whether to admit the handover request More... | |
bool | m_epc |
whether to use EPC More... | |
Ptr< PointToPointEpcHelper > | m_epcHelper |
EPC helper. More... | |
std::list< HandoverEvent > | m_handoverEventList |
handover event list More... | |
std::string | m_handoverEventListName |
handover event list name 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_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 the ideal RRC More... | |
bool | m_useUdp |
whether to use UDP traffic More... | |
Additional Inherited Members | |
![]() | |
enum | TestDuration { QUICK = 1, EXTENSIVE = 2, TAKES_FOREVER = 3 } |
How long the test takes to execute. More... | |
![]() | |
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 TestCsse. More... | |
bool | IsStatusFailure (void) const |
Check if any tests failed. More... | |
bool | IsStatusSuccess (void) 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 (void) const |
Check if this run should assert on failure. More... | |
bool | MustContinueOnFailure (void) 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 X2 Handover.
In this test is used NoOpHandoverAlgorithm and the request for handover is generated mannually, and it is not based on measurements.
Definition at line 56 of file test-lte-x2-handover.cc.
LteX2HandoverTestCase::LteX2HandoverTestCase | ( | uint32_t | nUes, |
uint32_t | nDedicatedBearers, | ||
std::list< HandoverEvent > | handoverEventList, | ||
std::string | handoverEventListName, | ||
bool | useUdp, | ||
std::string | schedulerType, | ||
bool | admitHo, | ||
bool | useIdealRrc | ||
) |
nUes | number of UEs in the test |
nDedicatedBearers | number of bearers to be activated per UE |
handoverEventList | |
handoverEventListName | |
useUdp | true if UDP is to be used, false if TCP is to be used |
schedulerType | the scheduler type |
admitHo | |
useIdealRrc | true if the ideal RRC should be used |
Definition at line 175 of file test-lte-x2-handover.cc.
|
staticprivate |
Build name string.
nUes | number of UEs in the test |
nDedicatedBearers | number of bearers to be activated per UE |
handoverEventListName | |
useUdp | true if UDP is to be used, false if TCP is to be used |
schedulerType | the scheduler type |
admitHo | |
useIdealRrc | true if the ideal RRC should be used |
Definition at line 155 of file test-lte-x2-handover.cc.
Referenced by DoRun().
|
private |
Check connected function.
ueDevice | the UE device |
enbDevice | the ENB device |
Definition at line 490 of file test-lte-x2-handover.cc.
References ns3::ObjectPtrContainerValue::Begin(), ns3::ObjectPtrContainerValue::End(), ns3::ObjectBase::GetAttribute(), ns3::LteUeNetDevice::GetImsi(), ns3::UeManager::GetImsi(), ns3::ObjectPtrContainerValue::GetN(), ns3::Object::GetObject(), ns3::LteUeNetDevice::GetRrc(), ns3::UeManager::GetState(), ns3::LteDataRadioBearerInfo::m_drbIdentity, ns3::LteDataRadioBearerInfo::m_epsBearerIdentity, ns3::LteDataRadioBearerInfo::m_logicalChannelIdentity, m_nDedicatedBearers, NS_ASSERT_MSG, NS_TEST_ASSERT_MSG_EQ, and NS_TEST_ASSERT_MSG_NE.
Referenced by DoRun().
|
private |
Check stats a while after handover function.
ueIndex | the index of the UE |
Definition at line 569 of file test-lte-x2-handover.cc.
References ns3::Time::GetSeconds(), m_statsDuration, m_udpClientInterval, m_udpClientPktSize, m_ueDataVector, and NS_TEST_ASSERT_MSG_GT.
Referenced by DoRun().
|
privatevirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 195 of file test-lte-x2-handover.cc.
References ns3::LteHelper::ActivateDataRadioBearer(), ns3::LteHelper::ActivateDedicatedEpsBearer(), ns3::ListPositionAllocator::Add(), ns3::EpcTft::Add(), ns3::ApplicationContainer::Add(), ns3::Ipv4StaticRouting::AddNetworkRouteTo(), ns3::LteHelper::AddX2Interface(), ns3::Ipv4AddressHelper::Assign(), ns3::LteHelper::AssignStreams(), ns3::PointToPointEpcHelper::AssignUeIpv4Address(), ns3::LteHelper::Attach(), LteX2HandoverTestCase::UeData::bearerDataList, ns3::NetDeviceContainer::Begin(), BuildNameString(), CheckConnected(), CheckStatsAWhileAfterHandover(), first::clientApps, ns3::NodeContainer::Create(), LteX2HandoverTestCase::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::PointToPointEpcHelper::GetPgwNode(), ns3::Ipv4StaticRoutingHelper::GetStaticRouting(), ns3::PointToPointEpcHelper::GetUeDefaultGatewayAddress(), ns3::UniformRandomVariable::GetValue(), ns3::LteHelper::HandoverRequest(), ns3::PacketSinkHelper::Install(), ns3::BulkSendHelper::Install(), ns3::PointToPointHelper::Install(), ns3::UdpClientHelper::Install(), ns3::InternetStackHelper::Install(), ns3::MobilityHelper::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, m_useUdp, ns3::MilliSeconds(), third::mobility, NS_LOG_FUNCTION, ns3::EpcTft::PacketFilter::remotePortEnd, ns3::EpcTft::PacketFilter::remotePortStart, ns3::Config::Reset(), SaveStatsAfterHandover(), ns3::Seconds(), first::serverApps, ns3::BulkSendHelper::SetAttribute(), ns3::ObjectBase::SetAttribute(), ns3::Ipv4AddressHelper::SetBase(), ns3::PointToPointHelper::SetChannelAttribute(), ns3::Config::SetDefault(), ns3::Ipv4StaticRouting::SetDefaultRoute(), ns3::PointToPointHelper::SetDeviceAttribute(), ns3::LteHelper::SetEpcHelper(), ns3::LteHelper::SetHandoverAlgorithmType(), ns3::MobilityHelper::SetMobilityModel(), ns3::MobilityHelper::SetPositionAllocator(), ns3::LteHelper::SetSchedulerType(), ns3::RandomVariableStream::SetStream(), ns3::ApplicationContainer::Start(), startTime, stopTime, and LteX2HandoverTestCase::BearerData::ulSink.
|
private |
Save stats after handover function.
ueIndex | the index of the UE |
Definition at line 557 of file test-lte-x2-handover.cc.
References m_ueDataVector.
Referenced by DoRun().
|
private |
whether to admit the handover request
Definition at line 102 of file test-lte-x2-handover.cc.
Referenced by DoRun().
|
private |
|
private |
|
private |
|
private |
handover event list name
Definition at line 98 of file test-lte-x2-handover.cc.
Referenced by DoRun().
|
private |
|
private |
number of UEs in the test
Definition at line 96 of file test-lte-x2-handover.cc.
Referenced by CheckConnected(), and DoRun().
|
private |
number of UEs in the test
Definition at line 95 of file test-lte-x2-handover.cc.
Referenced by DoRun().
|
private |
|
private |
stats duration
Definition at line 148 of file test-lte-x2-handover.cc.
Referenced by CheckStatsAWhileAfterHandover(), and DoRun().
|
private |
UDP client interval.
Definition at line 149 of file test-lte-x2-handover.cc.
Referenced by CheckStatsAWhileAfterHandover(), and DoRun().
|
private |
UDP client packet size.
Definition at line 150 of file test-lte-x2-handover.cc.
Referenced by CheckStatsAWhileAfterHandover(), and DoRun().
|
private |
UE data vector.
Definition at line 145 of file test-lte-x2-handover.cc.
Referenced by CheckStatsAWhileAfterHandover(), DoRun(), and SaveStatsAfterHandover().
|
private |
whether to use the ideal RRC
Definition at line 103 of file test-lte-x2-handover.cc.
Referenced by DoRun().
|
private |
whether to use UDP traffic
Definition at line 100 of file test-lte-x2-handover.cc.
Referenced by DoRun().