11#include "ns3/bulk-send-helper.h"
12#include "ns3/core-module.h"
13#include "ns3/internet-module.h"
14#include "ns3/lte-module.h"
15#include "ns3/mobility-module.h"
16#include "ns3/network-module.h"
17#include "ns3/packet-sink-helper.h"
18#include "ns3/packet-sink.h"
19#include "ns3/point-to-point-module.h"
20#include "ns3/udp-client-server-helper.h"
117 void DoRun()
override;
194 std::ostringstream
oss;
200 oss <<
", ideal RRC";
242 m_udpClientInterval(
Seconds(0.01)),
243 m_udpClientPktSize(100)
275 StringValue(
"ns3::FriisSpectrumPropagationLossModel"));
281 m_lteHelper->SetHandoverAlgorithmType(
"ns3::A2A4RsrqHandoverAlgorithm");
287 m_lteHelper->SetHandoverAlgorithmType(
"ns3::A3RsrpHandoverAlgorithm");
296 double distance = 1000.0;
332 Vector(
speed, 0, 0));
434 "ns3::UdpSocketFactory",
445 "ns3::UdpSocketFactory",
457 "ns3::TcpSocketFactory",
462 "ns3::TcpSocketFactory",
475 "ns3::TcpSocketFactory",
505 serverApps.Start(startTime);
506 clientApps.Start(startTime);
595 uint16_t rnti =
ueRrc->GetRnti();
627 "wrong num bearers at eNB");
633 "wrong num bearers at UE");
648 "epsBearerIdentity differs");
651 "drbIdentity differs");
656 "logicalChannelIdentity differs");
677 it->dlOldTotalRx =
it->dlSink->GetTotalRx();
681 it->ulOldTotalRx =
it->ulSink->GetTotalRx();
700 dlRx =
it->dlSink->GetTotalRx() -
it->dlOldTotalRx;
705 ulRx =
it->ulSink->GetTotalRx() -
it->ulOldTotalRx;
717 "too few RX bytes in DL, ue=" <<
ueIndex <<
", b=" << b);
723 "too few RX bytes in UL, ue=" <<
ueIndex <<
", b=" << b);
746 const std::list<CheckPointEvent>
cel1{
751 std::string
cel2name(
"ho: 0 -> 1 -> 2");
752 const std::list<CheckPointEvent>
cel2{
758 std::string
cel3name(
"ho: 0 -> 1 -> 2 -> 3");
759 const std::list<CheckPointEvent>
cel3{
766 std::string
sched =
"ns3::PfFfMacScheduler";
767 std::string
ho =
"ns3::A2A4RsrqHandoverAlgorithm";
781 TestCase::Duration::TAKES_FOREVER);
792 TestCase::Duration::QUICK);
803 TestCase::Duration::TAKES_FOREVER);
814 TestCase::Duration::TAKES_FOREVER);
825 TestCase::Duration::TAKES_FOREVER);
836 TestCase::Duration::EXTENSIVE);
847 TestCase::Duration::EXTENSIVE);
858 TestCase::Duration::TAKES_FOREVER);
869 TestCase::Duration::TAKES_FOREVER);
872 sched =
"ns3::RrFfMacScheduler";
886 TestCase::Duration::EXTENSIVE);
897 TestCase::Duration::TAKES_FOREVER);
908 TestCase::Duration::TAKES_FOREVER);
911 ho =
"ns3::A3RsrpHandoverAlgorithm";
912 sched =
"ns3::PfFfMacScheduler";
926 TestCase::Duration::EXTENSIVE);
937 TestCase::Duration::TAKES_FOREVER);
948 TestCase::Duration::TAKES_FOREVER);
951 sched =
"ns3::RrFfMacScheduler";
965 TestCase::Duration::QUICK);
976 TestCase::Duration::TAKES_FOREVER);
987 TestCase::Duration::EXTENSIVE);
Test different X2 handover measures and algorithms, e.g.
Ptr< PointToPointEpcHelper > m_epcHelper
EPC helper.
std::list< CheckPointEvent > m_checkPointEventList
check point event list
std::string m_schedulerType
scheduler type
std::string m_handoverAlgorithmType
handover algorithm type
bool m_admitHo
whether to configure to admit handover
bool m_useUdp
whether to use UDP traffic
Ptr< LteHelper > m_lteHelper
LTE helper.
const Time m_udpClientInterval
UDP client interval.
void CheckStats(uint32_t ueIndex)
Check stats function.
const Time m_statsDuration
stats duration
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.
bool m_useIdealRrc
whether to use ideal RRC
uint32_t m_nEnbs
number of eNBs in the test
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.
std::string m_checkPointEventListName
check point event list name
bool m_epc
whether to use EPC
void DoRun() override
Implementation to actually run this TestCase.
void SaveStats(uint32_t ueIndex)
Save stats function.
uint32_t m_nDedicatedBearers
number of UEs in the test
uint32_t m_nUes
number of UEs in the test
std::vector< UeData > m_ueDataVector
UE data vector.
const uint32_t m_udpClientPktSize
UDP client packet size.
const Time m_maxHoDuration
maximum HO duration
void CheckConnected(Ptr< NetDevice > ueDevice, Ptr< NetDevice > enbDevice)
Check connected function.
Lte X2 Handover Measures Test Suite.
LteX2HandoverMeasuresTestSuite()
holds a vector of ns3::Application pointers.
Ptr< Application > Get(uint32_t i) const
Get the Ptr<Application> stored in this container at a given index.
AttributeValue implementation for Boolean.
A helper to make it easier to instantiate an ns3::BulkSendApplication on a set of nodes.
Mobility model for which the current speed does not change once it has been set and until it is set a...
Class for representing data rates.
AttributeValue implementation for DataRate.
This class can be used to hold variables of floating point type such as 'double' or 'float'.
This class contains the specification of EPS Bearers.
@ NGBR_VIDEO_TCP_DEFAULT
Non-GBR TCP-based Video (Buffered Streaming, e.g., www, e-mail...)
aggregate IP/TCP/UDP functionality to existing Nodes.
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
void SetBase(Ipv4Address network, Ipv4Mask mask, Ipv4Address base="0.0.0.1")
Set the base network number, network mask and base address.
Ipv4 addresses are stored in host order in this class.
static Ipv4Address GetAny()
Access to the IPv4 forwarding table, interfaces, and configuration.
holds a vector of std::pair of Ptr<Ipv4> and interface index.
Ipv4Address GetAddress(uint32_t i, uint32_t j=0) const
a class to represent an Ipv4 address mask
Helper class that adds ns3::Ipv4StaticRouting objects.
store information on active data radio bearer instance
The eNodeB device implementation.
The LteUeNetDevice class implements the UE net device.
Helper class used to assign positions and mobility models to nodes.
void SetMobilityModel(std::string type, Ts &&... args)
Keep track of the current position and velocity of an object.
holds a vector of ns3::NetDevice pointers
keep track of a set of node pointers.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
Ptr< T > GetObject() const
Get a pointer to the requested aggregated Object.
Container for a set of ns3::Object pointers.
A helper to make it easier to instantiate an ns3::PacketSinkApplication on a set of nodes.
Receive and consume traffic generated to an IP address and port.
Build a set of PointToPointNetDevice objects.
void SetDeviceAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each NetDevice created by the helper.
Smart pointer class similar to boost::intrusive_ptr.
static EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
static void Destroy()
Execute the events scheduled with ScheduleDestroy().
static void Run()
Run the simulation.
static void Stop()
Tell the Simulator the calling event should be the last one executed.
Hold variables of type string.
void AddTestCase(TestCase *testCase, Duration duration=Duration::QUICK)
Add an individual child TestCase to this test suite.
Simulation virtual time values and global simulation resolution.
AttributeValue implementation for Time.
Create a client application which sends UDP packets carrying a 32bit sequence number and a 64 bit tim...
State
The state of the UeManager at the eNB RRC.
Hold an unsigned integer type.
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
void Reset()
Reset the initial value of every attribute as well as the value of every global to what they were bef...
void SetDefault(std::string name, const AttributeValue &value)
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
static LteX2HandoverMeasuresTestSuite g_lteX2HandoverMeasuresTestSuiteInstance
Static variable for test initialization.
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
#define NS_TEST_ASSERT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report and abort if not.
#define NS_TEST_ASSERT_MSG_NE(actual, limit, msg)
Test that an actual and expected (limit) value are not equal and report and abort if not.
#define NS_TEST_ASSERT_MSG_GT(actual, limit, msg)
Test that an actual value is greater than a limit and report and abort if not.
Time Seconds(double value)
Construct a Time in the indicated unit.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
CheckPointEvent structure.
CheckPointEvent(Time start, Time stop, Time interval, uint32_t ueIndex, uint32_t enbIndex)
Constructor.
Time checkStopTime
check stop time
uint32_t enbDeviceIndex
ENB device index.
Time checkStartTime
check start time
Time checkInterval
check interval
uint32_t ueDeviceIndex
UE device index.
uint32_t ulOldTotalRx
UL old total receive.
uint32_t dlOldTotalRx
DL old total receive.
Ptr< PacketSink > dlSink
DL sink.
Ptr< PacketSink > ulSink
UL sink.
std::list< BearerData > bearerDataList
bearer ID list
Implement the data structure representing a TrafficFlowTemplate Packet Filter.
uint16_t remotePortStart
start of the port number range of the remote host
uint16_t localPortStart
start of the port number range of the UE