A Discrete-Event Network Simulator
API
lena-x2-handover-measures.cc
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2013 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Manuel Requena <manuel.requena@cttc.es>
19  */
20 
21 #include "ns3/core-module.h"
22 #include "ns3/network-module.h"
23 #include "ns3/internet-module.h"
24 #include "ns3/mobility-module.h"
25 #include "ns3/lte-module.h"
26 #include "ns3/applications-module.h"
27 #include "ns3/point-to-point-module.h"
28 #include "ns3/config-store-module.h"
29 
30 using namespace ns3;
31 
32 NS_LOG_COMPONENT_DEFINE ("LenaX2HandoverMeasures");
33 
34 void
35 NotifyConnectionEstablishedUe (std::string context,
36  uint64_t imsi,
37  uint16_t cellid,
38  uint16_t rnti)
39 {
40  std::cout << context
41  << " UE IMSI " << imsi
42  << ": connected to CellId " << cellid
43  << " with RNTI " << rnti
44  << std::endl;
45 }
46 
47 void
48 NotifyHandoverStartUe (std::string context,
49  uint64_t imsi,
50  uint16_t cellid,
51  uint16_t rnti,
52  uint16_t targetCellId)
53 {
54  std::cout << context
55  << " UE IMSI " << imsi
56  << ": previously connected to CellId " << cellid
57  << " with RNTI " << rnti
58  << ", doing handover to CellId " << targetCellId
59  << std::endl;
60 }
61 
62 void
63 NotifyHandoverEndOkUe (std::string context,
64  uint64_t imsi,
65  uint16_t cellid,
66  uint16_t rnti)
67 {
68  std::cout << context
69  << " UE IMSI " << imsi
70  << ": successful handover to CellId " << cellid
71  << " with RNTI " << rnti
72  << std::endl;
73 }
74 
75 void
76 NotifyConnectionEstablishedEnb (std::string context,
77  uint64_t imsi,
78  uint16_t cellid,
79  uint16_t rnti)
80 {
81  std::cout << context
82  << " eNB CellId " << cellid
83  << ": successful connection of UE with IMSI " << imsi
84  << " RNTI " << rnti
85  << std::endl;
86 }
87 
88 void
89 NotifyHandoverStartEnb (std::string context,
90  uint64_t imsi,
91  uint16_t cellid,
92  uint16_t rnti,
93  uint16_t targetCellId)
94 {
95  std::cout << context
96  << " eNB CellId " << cellid
97  << ": start handover of UE with IMSI " << imsi
98  << " RNTI " << rnti
99  << " to CellId " << targetCellId
100  << std::endl;
101 }
102 
103 void
104 NotifyHandoverEndOkEnb (std::string context,
105  uint64_t imsi,
106  uint16_t cellid,
107  uint16_t rnti)
108 {
109  std::cout << context
110  << " eNB CellId " << cellid
111  << ": completed handover of UE with IMSI " << imsi
112  << " RNTI " << rnti
113  << std::endl;
114 }
115 
116 
124 int
125 main (int argc, char *argv[])
126 {
127  // LogLevel logLevel = (LogLevel)(LOG_PREFIX_ALL | LOG_LEVEL_ALL);
128 
129  // LogComponentEnable ("LteHelper", logLevel);
130  // LogComponentEnable ("EpcHelper", logLevel);
131  // LogComponentEnable ("EpcEnbApplication", logLevel);
132  // LogComponentEnable ("EpcMmeApplication", logLevel);
133  // LogComponentEnable ("EpcPgwApplication", logLevel);
134  // LogComponentEnable ("EpcSgwApplication", logLevel);
135  // LogComponentEnable ("EpcX2", logLevel);
136 
137  // LogComponentEnable ("LteEnbRrc", logLevel);
138  // LogComponentEnable ("LteEnbNetDevice", logLevel);
139  // LogComponentEnable ("LteUeRrc", logLevel);
140  // LogComponentEnable ("LteUeNetDevice", logLevel);
141  // LogComponentEnable ("A2A4RsrqHandoverAlgorithm", logLevel);
142  // LogComponentEnable ("A3RsrpHandoverAlgorithm", logLevel);
143 
144  uint16_t numberOfUes = 1;
145  uint16_t numberOfEnbs = 2;
146  uint16_t numBearersPerUe = 0;
147  double distance = 500.0; // m
148  double yForUe = 500.0; // m
149  double speed = 20; // m/s
150  double simTime = (double)(numberOfEnbs + 1) * distance / speed; // 1500 m / 20 m/s = 75 secs
151  double enbTxPowerDbm = 46.0;
152 
153  // change some default attributes so that they are reasonable for
154  // this scenario, but do this before processing command line
155  // arguments, so that the user is allowed to override these settings
156  Config::SetDefault ("ns3::UdpClient::Interval", TimeValue (MilliSeconds (10)));
157  Config::SetDefault ("ns3::UdpClient::MaxPackets", UintegerValue (1000000));
158  Config::SetDefault ("ns3::LteHelper::UseIdealRrc", BooleanValue (true));
159 
160  // Command line arguments
161  CommandLine cmd (__FILE__);
162  cmd.AddValue ("simTime", "Total duration of the simulation (in seconds)", simTime);
163  cmd.AddValue ("speed", "Speed of the UE (default = 20 m/s)", speed);
164  cmd.AddValue ("enbTxPowerDbm", "TX power [dBm] used by HeNBs (default = 46.0)", enbTxPowerDbm);
165 
166  cmd.Parse (argc, argv);
167 
168 
169  Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
170  Ptr<PointToPointEpcHelper> epcHelper = CreateObject<PointToPointEpcHelper> ();
171  lteHelper->SetEpcHelper (epcHelper);
172  lteHelper->SetSchedulerType ("ns3::RrFfMacScheduler");
173 
174  lteHelper->SetHandoverAlgorithmType ("ns3::A2A4RsrqHandoverAlgorithm");
175  lteHelper->SetHandoverAlgorithmAttribute ("ServingCellThreshold",
176  UintegerValue (30));
177  lteHelper->SetHandoverAlgorithmAttribute ("NeighbourCellOffset",
178  UintegerValue (1));
179 
180  // lteHelper->SetHandoverAlgorithmType ("ns3::A3RsrpHandoverAlgorithm");
181  // lteHelper->SetHandoverAlgorithmAttribute ("Hysteresis",
182  // DoubleValue (3.0));
183  // lteHelper->SetHandoverAlgorithmAttribute ("TimeToTrigger",
184  // TimeValue (MilliSeconds (256)));
185 
186  Ptr<Node> pgw = epcHelper->GetPgwNode ();
187 
188  // Create a single RemoteHost
189  NodeContainer remoteHostContainer;
190  remoteHostContainer.Create (1);
191  Ptr<Node> remoteHost = remoteHostContainer.Get (0);
192  InternetStackHelper internet;
193  internet.Install (remoteHostContainer);
194 
195  // Create the Internet
196  PointToPointHelper p2ph;
197  p2ph.SetDeviceAttribute ("DataRate", DataRateValue (DataRate ("100Gb/s")));
198  p2ph.SetDeviceAttribute ("Mtu", UintegerValue (1500));
199  p2ph.SetChannelAttribute ("Delay", TimeValue (Seconds (0.010)));
200  NetDeviceContainer internetDevices = p2ph.Install (pgw, remoteHost);
201  Ipv4AddressHelper ipv4h;
202  ipv4h.SetBase ("1.0.0.0", "255.0.0.0");
203  Ipv4InterfaceContainer internetIpIfaces = ipv4h.Assign (internetDevices);
204  Ipv4Address remoteHostAddr = internetIpIfaces.GetAddress (1);
205 
206 
207  // Routing of the Internet Host (towards the LTE network)
208  Ipv4StaticRoutingHelper ipv4RoutingHelper;
209  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
210  // interface 0 is localhost, 1 is the p2p device
211  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1);
212 
213  /*
214  * Network topology:
215  *
216  * | + --------------------------------------------------------->
217  * | UE
218  * |
219  * | d d d
220  * y | |-------------------x-------------------x-------------------
221  * | | eNodeB eNodeB
222  * | d |
223  * | |
224  * | | d = distance
225  * o (0, 0, 0) y = yForUe
226  */
227 
228  NodeContainer ueNodes;
229  NodeContainer enbNodes;
230  enbNodes.Create (numberOfEnbs);
231  ueNodes.Create (numberOfUes);
232 
233  // Install Mobility Model in eNB
234  Ptr<ListPositionAllocator> enbPositionAlloc = CreateObject<ListPositionAllocator> ();
235  for (uint16_t i = 0; i < numberOfEnbs; i++)
236  {
237  Vector enbPosition (distance * (i + 1), distance, 0);
238  enbPositionAlloc->Add (enbPosition);
239  }
240  MobilityHelper enbMobility;
241  enbMobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
242  enbMobility.SetPositionAllocator (enbPositionAlloc);
243  enbMobility.Install (enbNodes);
244 
245  // Install Mobility Model in UE
246  MobilityHelper ueMobility;
247  ueMobility.SetMobilityModel ("ns3::ConstantVelocityMobilityModel");
248  ueMobility.Install (ueNodes);
249  ueNodes.Get (0)->GetObject<MobilityModel> ()->SetPosition (Vector (0, yForUe, 0));
250  ueNodes.Get (0)->GetObject<ConstantVelocityMobilityModel> ()->SetVelocity (Vector (speed, 0, 0));
251 
252  // Install LTE Devices in eNB and UEs
253  Config::SetDefault ("ns3::LteEnbPhy::TxPower", DoubleValue (enbTxPowerDbm));
254  NetDeviceContainer enbLteDevs = lteHelper->InstallEnbDevice (enbNodes);
255  NetDeviceContainer ueLteDevs = lteHelper->InstallUeDevice (ueNodes);
256 
257  // Install the IP stack on the UEs
258  internet.Install (ueNodes);
259  Ipv4InterfaceContainer ueIpIfaces;
260  ueIpIfaces = epcHelper->AssignUeIpv4Address (NetDeviceContainer (ueLteDevs));
261 
262  // Attach all UEs to the first eNodeB
263  for (uint16_t i = 0; i < numberOfUes; i++)
264  {
265  lteHelper->Attach (ueLteDevs.Get (i), enbLteDevs.Get (0));
266  }
267 
268 
269  NS_LOG_LOGIC ("setting up applications");
270 
271  // Install and start applications on UEs and remote host
272  uint16_t dlPort = 10000;
273  uint16_t ulPort = 20000;
274 
275  // randomize a bit start times to avoid simulation artifacts
276  // (e.g., buffer overflows due to packet transmissions happening
277  // exactly at the same time)
278  Ptr<UniformRandomVariable> startTimeSeconds = CreateObject<UniformRandomVariable> ();
279  startTimeSeconds->SetAttribute ("Min", DoubleValue (0));
280  startTimeSeconds->SetAttribute ("Max", DoubleValue (0.010));
281 
282  for (uint32_t u = 0; u < numberOfUes; ++u)
283  {
284  Ptr<Node> ue = ueNodes.Get (u);
285  // Set the default gateway for the UE
286  Ptr<Ipv4StaticRouting> ueStaticRouting = ipv4RoutingHelper.GetStaticRouting (ue->GetObject<Ipv4> ());
287  ueStaticRouting->SetDefaultRoute (epcHelper->GetUeDefaultGatewayAddress (), 1);
288 
289  for (uint32_t b = 0; b < numBearersPerUe; ++b)
290  {
291  ++dlPort;
292  ++ulPort;
293 
296 
297  NS_LOG_LOGIC ("installing UDP DL app for UE " << u);
298  UdpClientHelper dlClientHelper (ueIpIfaces.GetAddress (u), dlPort);
299  clientApps.Add (dlClientHelper.Install (remoteHost));
300  PacketSinkHelper dlPacketSinkHelper ("ns3::UdpSocketFactory",
302  serverApps.Add (dlPacketSinkHelper.Install (ue));
303 
304  NS_LOG_LOGIC ("installing UDP UL app for UE " << u);
305  UdpClientHelper ulClientHelper (remoteHostAddr, ulPort);
306  clientApps.Add (ulClientHelper.Install (ue));
307  PacketSinkHelper ulPacketSinkHelper ("ns3::UdpSocketFactory",
309  serverApps.Add (ulPacketSinkHelper.Install (remoteHost));
310 
311  Ptr<EpcTft> tft = Create<EpcTft> ();
313  dlpf.localPortStart = dlPort;
314  dlpf.localPortEnd = dlPort;
315  tft->Add (dlpf);
317  ulpf.remotePortStart = ulPort;
318  ulpf.remotePortEnd = ulPort;
319  tft->Add (ulpf);
321  lteHelper->ActivateDedicatedEpsBearer (ueLteDevs.Get (u), bearer, tft);
322 
323  Time startTime = Seconds (startTimeSeconds->GetValue ());
324  serverApps.Start (startTime);
325  clientApps.Start (startTime);
326 
327  } // end for b
328  }
329 
330 
331  // Add X2 interface
332  lteHelper->AddX2Interface (enbNodes);
333 
334  // X2-based Handover
335  //lteHelper->HandoverRequest (Seconds (0.100), ueLteDevs.Get (0), enbLteDevs.Get (0), enbLteDevs.Get (1));
336 
337  // Uncomment to enable PCAP tracing
338  // p2ph.EnablePcapAll("lena-x2-handover-measures");
339 
340  lteHelper->EnablePhyTraces ();
341  lteHelper->EnableMacTraces ();
342  lteHelper->EnableRlcTraces ();
343  lteHelper->EnablePdcpTraces ();
344  Ptr<RadioBearerStatsCalculator> rlcStats = lteHelper->GetRlcStats ();
345  rlcStats->SetAttribute ("EpochDuration", TimeValue (Seconds (1.0)));
346  Ptr<RadioBearerStatsCalculator> pdcpStats = lteHelper->GetPdcpStats ();
347  pdcpStats->SetAttribute ("EpochDuration", TimeValue (Seconds (1.0)));
348 
349  // connect custom trace sinks for RRC connection establishment and handover notification
350  Config::Connect ("/NodeList/*/DeviceList/*/LteEnbRrc/ConnectionEstablished",
352  Config::Connect ("/NodeList/*/DeviceList/*/LteUeRrc/ConnectionEstablished",
354  Config::Connect ("/NodeList/*/DeviceList/*/LteEnbRrc/HandoverStart",
356  Config::Connect ("/NodeList/*/DeviceList/*/LteUeRrc/HandoverStart",
358  Config::Connect ("/NodeList/*/DeviceList/*/LteEnbRrc/HandoverEndOk",
360  Config::Connect ("/NodeList/*/DeviceList/*/LteUeRrc/HandoverEndOk",
362 
363 
364  Simulator::Stop (Seconds (simTime));
365  Simulator::Run ();
366 
367  // GtkConfigStore config;
368  // config.ConfigureAttributes ();
369 
371  return 0;
372 
373 }
ns3::NetDeviceContainer
holds a vector of ns3::NetDevice pointers
Definition: net-device-container.h:42
NS_LOG_COMPONENT_DEFINE
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:205
ns3::InetSocketAddress
an Inet address class
Definition: inet-socket-address.h:41
ns3::DataRateValue
AttributeValue implementation for DataRate.
Definition: data-rate.h:298
ns3::UdpClientHelper
Create a client application which sends UDP packets carrying a 32bit sequence number and a 64 bit tim...
Definition: udp-client-server-helper.h:94
ns3::EpcTft::PacketFilter::remotePortStart
uint16_t remotePortStart
start of the port number range of the remote host
Definition: epc-tft.h:137
ns3::CommandLine
Parse command-line arguments.
Definition: command-line.h:228
ns3::LteHelper::GetRlcStats
Ptr< RadioBearerStatsCalculator > GetRlcStats(void)
Definition: lte-helper.cc:1573
ns3::ListPositionAllocator::Add
void Add(Vector v)
Add a position to the list of positions.
Definition: position-allocator.cc:70
ns3::BooleanValue
AttributeValue implementation for Boolean.
Definition: boolean.h:37
ns3::NoBackhaulEpcHelper::GetPgwNode
virtual Ptr< Node > GetPgwNode() const
Get the PGW node.
Definition: no-backhaul-epc-helper.cc:498
SetPosition
static void SetPosition(Ptr< Node > node, Vector position)
Definition: wifi-ap.cc:89
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::Ipv4AddressHelper
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
Definition: ipv4-address-helper.h:48
ns3::MobilityHelper::SetMobilityModel
void SetMobilityModel(std::string type, std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue(), std::string n8="", const AttributeValue &v8=EmptyAttributeValue(), std::string n9="", const AttributeValue &v9=EmptyAttributeValue())
Definition: mobility-helper.cc:79
ns3::MobilityHelper::Install
void Install(Ptr< Node > node) const
"Layout" a single node according to the current position allocator type.
Definition: mobility-helper.cc:130
ns3::EpcTft::PacketFilter
Implement the data structure representing a TrafficFlowTemplate Packet Filter.
Definition: epc-tft.h:75
ns3::PointToPointHelper::SetDeviceAttribute
void SetDeviceAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each NetDevice created by the helper.
Definition: point-to-point-helper.cc:69
ns3::LteHelper::InstallEnbDevice
NetDeviceContainer InstallEnbDevice(NodeContainer c)
Create a set of eNodeB devices.
Definition: lte-helper.cc:474
ns3::PointToPointHelper::SetChannelAttribute
void SetChannelAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each Channel created by the helper.
Definition: point-to-point-helper.cc:75
ns3::Object::GetObject
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
Definition: object.h:470
ns3::LteHelper::InstallUeDevice
NetDeviceContainer InstallUeDevice(NodeContainer c)
Create a set of UE devices.
Definition: lte-helper.cc:489
ns3::EpcTft::PacketFilter::remotePortEnd
uint16_t remotePortEnd
end of the port number range of the remote host
Definition: epc-tft.h:138
ns3::EpcTft::Add
uint8_t Add(PacketFilter f)
add a PacketFilter to the Traffic Flow Template
Definition: epc-tft.cc:240
ns3::PointToPointHelper::Install
NetDeviceContainer Install(NodeContainer c)
Definition: point-to-point-helper.cc:222
ns3::Ipv4Address
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:41
ns3::Ipv4StaticRouting::SetDefaultRoute
void SetDefaultRoute(Ipv4Address nextHop, uint32_t interface, uint32_t metric=0)
Add a default route to the static routing table.
Definition: ipv4-static-routing.cc:122
ns3::ObjectBase::SetAttribute
void SetAttribute(std::string name, const AttributeValue &value)
Set a single attribute, raising fatal errors if unsuccessful.
Definition: object-base.cc:185
NotifyHandoverEndOkEnb
void NotifyHandoverEndOkEnb(std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti)
Definition: lena-x2-handover-measures.cc:104
ns3::DoubleValue
This class can be used to hold variables of floating point type such as 'double' or 'float'.
Definition: double.h:41
ns3::NodeContainer::Create
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
Definition: node-container.cc:98
ns3::NoBackhaulEpcHelper::GetUeDefaultGatewayAddress
virtual Ipv4Address GetUeDefaultGatewayAddress()
Definition: no-backhaul-epc-helper.cc:523
startTime
double startTime
Definition: tcp-nsc-comparison.cc:45
ns3::LteHelper::AddX2Interface
void AddX2Interface(NodeContainer enbNodes)
Create an X2 interface between all the eNBs in a given set.
Definition: lte-helper.cc:1221
ns3::Ipv4AddressHelper::SetBase
void SetBase(Ipv4Address network, Ipv4Mask mask, Ipv4Address base="0.0.0.1")
Set the base network number, network mask and base address.
Definition: ipv4-address-helper.cc:64
ns3::Ipv4
Access to the IPv4 forwarding table, interfaces, and configuration.
Definition: ipv4.h:77
ns3::Ipv4StaticRoutingHelper
Helper class that adds ns3::Ipv4StaticRouting objects.
Definition: ipv4-static-routing-helper.h:43
ns3::Ptr< LteHelper >
ns3::DataRate
Class for representing data rates.
Definition: data-rate.h:89
ns3::Ipv4StaticRoutingHelper::GetStaticRouting
Ptr< Ipv4StaticRouting > GetStaticRouting(Ptr< Ipv4 > ipv4) const
Try and find the static routing protocol as either the main routing protocol or in the list of routin...
Definition: ipv4-static-routing-helper.cc:58
ns3::Simulator::Stop
static void Stop(void)
Tell the Simulator the calling event should be the last one executed.
Definition: simulator.cc:180
ns3::MobilityHelper::SetPositionAllocator
void SetPositionAllocator(Ptr< PositionAllocator > allocator)
Set the position allocator which will be used to allocate the initial position of every node initiali...
Definition: mobility-helper.cc:47
ns3::LteHelper::GetPdcpStats
Ptr< RadioBearerStatsCalculator > GetPdcpStats(void)
Definition: lte-helper.cc:1587
ns3::LteHelper::SetEpcHelper
void SetEpcHelper(Ptr< EpcHelper > h)
Set the EpcHelper to be used to setup the EPC network in conjunction with the setup of the LTE radio ...
Definition: lte-helper.cc:272
ns3::InternetStackHelper::Install
void Install(std::string nodeName) const
Aggregate implementations of the ns3::Ipv4, ns3::Ipv6, ns3::Udp, and ns3::Tcp classes onto the provid...
Definition: internet-stack-helper.cc:366
ns3::NoBackhaulEpcHelper::AssignUeIpv4Address
virtual Ipv4InterfaceContainer AssignUeIpv4Address(NetDeviceContainer ueDevices)
Assign IPv4 addresses to UE devices.
Definition: no-backhaul-epc-helper.cc:504
ns3::MilliSeconds
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1297
NotifyHandoverEndOkUe
void NotifyHandoverEndOkUe(std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti)
Definition: lena-x2-handover-measures.cc:63
NotifyHandoverStartEnb
void NotifyHandoverStartEnb(std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti, uint16_t targetCellId)
Definition: lena-x2-handover-measures.cc:89
ns3::Ipv4InterfaceContainer
holds a vector of std::pair of Ptr<Ipv4> and interface index.
Definition: ipv4-interface-container.h:55
ns3::NodeContainer::Get
Ptr< Node > Get(uint32_t i) const
Get the Ptr<Node> stored in this container at a given index.
Definition: node-container.cc:93
ns3::LteHelper::SetHandoverAlgorithmAttribute
void SetHandoverAlgorithmAttribute(std::string n, const AttributeValue &v)
Set an attribute for the handover algorithm to be created.
Definition: lte-helper.cc:335
ns3::LteHelper::EnableMacTraces
void EnableMacTraces(void)
Enable trace sinks for MAC layer.
Definition: lte-helper.cc:1530
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:104
second.cmd
cmd
Definition: second.py:35
ns3::LteHelper::ActivateDedicatedEpsBearer
uint8_t ActivateDedicatedEpsBearer(NetDeviceContainer ueDevices, EpsBearer bearer, Ptr< EpcTft > tft)
Activate a dedicated EPS bearer on a given set of UE devices.
Definition: lte-helper.cc:1069
ns3::LteHelper::EnableRlcTraces
void EnableRlcTraces(void)
Enable trace sinks for RLC layer.
Definition: lte-helper.cc:1436
ns3::MakeCallback
Callback< R, Ts... > MakeCallback(R(T::*memPtr)(Ts...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
Definition: callback.h:1642
NS_LOG_LOGIC
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
Definition: log.h:289
ns3::Simulator::Run
static void Run(void)
Run the simulation.
Definition: simulator.cc:172
ns3::PacketSinkHelper
A helper to make it easier to instantiate an ns3::PacketSinkApplication on a set of nodes.
Definition: packet-sink-helper.h:36
first.clientApps
clientApps
Definition: first.py:61
ns3::Config::Connect
void Connect(std::string path, const CallbackBase &cb)
Definition: config.cc:920
ns3::EpsBearer
This class contains the specification of EPS Bearers.
Definition: eps-bearer.h:92
ns3::Ipv4Address::GetAny
static Ipv4Address GetAny(void)
Definition: ipv4-address.cc:395
NotifyHandoverStartUe
void NotifyHandoverStartUe(std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti, uint16_t targetCellId)
Definition: lena-x2-handover-measures.cc:48
ns3::ConstantVelocityMobilityModel
Mobility model for which the current speed does not change once it has been set and until it is set a...
Definition: constant-velocity-mobility-model.h:36
ns3::LteHelper::SetHandoverAlgorithmType
void SetHandoverAlgorithmType(std::string type)
Set the type of handover algorithm to be used by eNodeB devices.
Definition: lte-helper.cc:327
ns3::Seconds
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1289
ns3::LteHelper::EnablePdcpTraces
void EnablePdcpTraces(void)
Enable trace sinks for PDCP layer.
Definition: lte-helper.cc:1579
ns3::Ipv4AddressHelper::Assign
Ipv4InterfaceContainer Assign(const NetDeviceContainer &c)
Assign IP addresses to the net devices specified in the container based on the current network prefix...
Definition: ipv4-address-helper.cc:135
ns3::Simulator::Destroy
static void Destroy(void)
Execute the events scheduled with ScheduleDestroy().
Definition: simulator.cc:136
ns3::ApplicationContainer
holds a vector of ns3::Application pointers.
Definition: application-container.h:43
first.serverApps
serverApps
Definition: first.py:52
NotifyConnectionEstablishedEnb
void NotifyConnectionEstablishedEnb(std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti)
Definition: lena-x2-handover-measures.cc:76
ns3::TimeValue
AttributeValue implementation for Time.
Definition: nstime.h:1353
ns3::PointToPointHelper
Build a set of PointToPointNetDevice objects.
Definition: point-to-point-helper.h:45
ns3::MobilityModel
Keep track of the current position and velocity of an object.
Definition: mobility-model.h:40
ns3::NodeContainer
keep track of a set of node pointers.
Definition: node-container.h:39
ns3::Ipv4Mask
a class to represent an Ipv4 address mask
Definition: ipv4-address.h:256
ns3::Ipv4StaticRouting::AddNetworkRouteTo
void AddNetworkRouteTo(Ipv4Address network, Ipv4Mask networkMask, Ipv4Address nextHop, uint32_t interface, uint32_t metric=0)
Add a network route to the static routing table.
Definition: ipv4-static-routing.cc:63
ns3::LteHelper::Attach
void Attach(NetDeviceContainer ueDevices)
Enables automatic attachment of a set of UE devices to a suitable cell using Idle mode initial cell s...
Definition: lte-helper.cc:961
ns3::Ipv4InterfaceContainer::GetAddress
Ipv4Address GetAddress(uint32_t i, uint32_t j=0) const
Definition: ipv4-interface-container.cc:59
ns3::EpcTft::PacketFilter::localPortStart
uint16_t localPortStart
start of the port number range of the UE
Definition: epc-tft.h:139
ns3::UintegerValue
Hold an unsigned integer type.
Definition: uinteger.h:44
ns3::EpsBearer::NGBR_VIDEO_TCP_DEFAULT
@ NGBR_VIDEO_TCP_DEFAULT
Non-GBR TCP-based Video (Buffered Streaming, e.g., www, e-mail...)
Definition: eps-bearer.h:120
ns3::Config::SetDefault
void SetDefault(std::string name, const AttributeValue &value)
Definition: config.cc:849
NotifyConnectionEstablishedUe
void NotifyConnectionEstablishedUe(std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti)
Definition: lena-x2-handover-measures.cc:35
ns3::LteHelper::SetSchedulerType
void SetSchedulerType(std::string type)
Set the type of scheduler to be used by eNodeB devices.
Definition: lte-helper.cc:279
ns3::InternetStackHelper
aggregate IP/TCP/UDP functionality to existing Nodes.
Definition: internet-stack-helper.h:88
ns3::NetDeviceContainer::Get
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr<NetDevice> stored in this container at a given index.
Definition: net-device-container.cc:62
ns3::LteHelper::EnablePhyTraces
void EnablePhyTraces(void)
Enable trace sinks for PHY layer.
Definition: lte-helper.cc:1490
ns3::UniformRandomVariable::GetValue
double GetValue(double min, double max)
Get the next random value, as a double in the specified range .
Definition: random-variable-stream.cc:182
ns3::MobilityHelper
Helper class used to assign positions and mobility models to nodes.
Definition: mobility-helper.h:43
ns3::EpcTft::PacketFilter::localPortEnd
uint16_t localPortEnd
end of the port number range of the UE
Definition: epc-tft.h:140