A Discrete-Event Network Simulator
API
test-lte-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  * Authors: Nicola Baldo <nbaldo@cttc.es>
19  * Manuel Requena <manuel.requena@cttc.es>
20  */
21 
22 #include <ns3/core-module.h>
23 #include <ns3/network-module.h>
24 #include <ns3/mobility-module.h>
25 #include <ns3/lte-module.h>
26 #include <ns3/internet-module.h>
27 #include <ns3/applications-module.h>
28 #include <ns3/point-to-point-module.h>
29 
30 using namespace ns3;
31 
32 NS_LOG_COMPONENT_DEFINE ("LteX2HandoverMeasuresTest");
33 
41 {
45  uint32_t ueDeviceIndex;
46  uint32_t enbDeviceIndex;
47 
57  CheckPointEvent (Time start, Time stop, Time interval, uint32_t ueIndex, uint32_t enbIndex)
58  : checkStartTime (start),
59  checkStopTime (stop),
60  checkInterval (interval),
61  ueDeviceIndex (ueIndex),
62  enbDeviceIndex (enbIndex)
63  {}
64 };
65 
66 
75 {
76 public:
93  LteX2HandoverMeasuresTestCase (uint32_t nEnbs, uint32_t nUes, uint32_t nDedicatedBearers,
94  std::list<CheckPointEvent> checkPointEventList,
95  std::string checkPointEventListName,
96  bool useUdp, std::string schedulerType,
97  std::string handoverAlgorithmType, bool admitHo,
98  bool useIdealRrc);
99 
100 private:
114  static std::string BuildNameString (uint32_t nEnbs, uint32_t nUes, uint32_t nDedicatedBearers,
115  std::string checkPointEventListName,
116  bool useUdp, std::string schedulerType,
117  std::string handoverAlgorithmType, bool admitHo,
118  bool useIdealRrc);
119  virtual void DoRun (void);
125  void CheckConnected (Ptr<NetDevice> ueDevice, Ptr<NetDevice> enbDevice);
126 
127  uint32_t m_nEnbs;
128  uint32_t m_nUes;
130  std::list<CheckPointEvent> m_checkPointEventList;
132  bool m_epc;
133  bool m_useUdp;
134  std::string m_schedulerType;
136  bool m_admitHo;
140 
147  struct BearerData
148  {
149  uint32_t bid;
152  uint32_t dlOldTotalRx;
153  uint32_t ulOldTotalRx;
154  };
155 
162  struct UeData
163  {
164  uint32_t id;
165  std::list<BearerData> bearerDataList;
166  };
167 
172  void SaveStats (uint32_t ueIndex);
177  void CheckStats (uint32_t ueIndex);
178 
179  std::vector<UeData> m_ueDataVector;
180 
184  const uint32_t m_udpClientPktSize;
185 };
186 
187 
188 std::string
189 LteX2HandoverMeasuresTestCase::BuildNameString (uint32_t nEnbs, uint32_t nUes, uint32_t nDedicatedBearers,
190  std::string checkPointEventListName,
191  bool useUdp, std::string schedulerType,
192  std::string handoverAlgorithmType, bool admitHo,
193  bool useIdealRrc)
194 {
195  std::ostringstream oss;
196  oss << "nEnbs=" << nEnbs
197  << " nUes=" << nUes
198  << " nDedicatedBearers=" << nDedicatedBearers
199  << " udp=" << useUdp
200  << " " << schedulerType
201  << " " << handoverAlgorithmType
202  << " admitHo=" << admitHo
203  << " hoList: " << checkPointEventListName;
204  if (useIdealRrc)
205  {
206  oss << ", ideal RRC";
207  }
208  else
209  {
210  oss << ", real RRC";
211  }
212  return oss.str ();
213 }
214 
215 LteX2HandoverMeasuresTestCase::LteX2HandoverMeasuresTestCase (uint32_t nEnbs, uint32_t nUes, uint32_t nDedicatedBearers,
216  std::list<CheckPointEvent> checkPointEventList,
217  std::string checkPointEventListName,
218  bool useUdp, std::string schedulerType,
219  std::string handoverAlgorithmType, bool admitHo,
220  bool useIdealRrc)
221  : TestCase (BuildNameString (nEnbs, nUes, nDedicatedBearers,
222  checkPointEventListName, useUdp, schedulerType,
223  handoverAlgorithmType, admitHo, useIdealRrc)),
224  m_nEnbs (nEnbs),
225  m_nUes (nUes),
226  m_nDedicatedBearers (nDedicatedBearers),
227  m_checkPointEventList (checkPointEventList),
228  m_checkPointEventListName (checkPointEventListName),
229  m_epc (true),
230  m_useUdp (useUdp),
231  m_schedulerType (schedulerType),
232  m_handoverAlgorithmType (handoverAlgorithmType),
233  m_admitHo (admitHo),
234  m_useIdealRrc (useIdealRrc),
235  m_maxHoDuration (Seconds (0.1)),
236  m_statsDuration (Seconds (0.5)),
237  m_udpClientInterval (Seconds (0.01)),
238  m_udpClientPktSize (100)
239 {}
240 
241 void
243 {
248  m_useIdealRrc));
249 
250  Config::Reset ();
251  Config::SetDefault ("ns3::UdpClient::Interval", TimeValue (m_udpClientInterval));
252  Config::SetDefault ("ns3::UdpClient::MaxPackets", UintegerValue (1000000));
253  Config::SetDefault ("ns3::UdpClient::PacketSize", UintegerValue (m_udpClientPktSize));
254  Config::SetDefault ("ns3::LteEnbRrc::HandoverJoiningTimeoutDuration", TimeValue (MilliSeconds (200)));
255  Config::SetDefault ("ns3::LteEnbPhy::TxPower", DoubleValue (20));
256 
257  //Disable Uplink Power Control
258  Config::SetDefault ("ns3::LteUePhy::EnableUplinkPowerControl", BooleanValue (false));
259 
260  int64_t stream = 1;
261 
262  m_lteHelper = CreateObject<LteHelper> ();
263  m_lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumPropagationLossModel"));
266 
267  if (m_handoverAlgorithmType == "ns3::A2A4RsrqHandoverAlgorithm")
268  {
269  m_lteHelper->SetHandoverAlgorithmType ("ns3::A2A4RsrqHandoverAlgorithm");
270  m_lteHelper->SetHandoverAlgorithmAttribute ("ServingCellThreshold",
271  UintegerValue (30));
272  m_lteHelper->SetHandoverAlgorithmAttribute ("NeighbourCellOffset",
273  UintegerValue (1));
274  }
275  else if (m_handoverAlgorithmType == "ns3::A3RsrpHandoverAlgorithm")
276  {
277  m_lteHelper->SetHandoverAlgorithmType ("ns3::A3RsrpHandoverAlgorithm");
279  DoubleValue (1.5));
280  m_lteHelper->SetHandoverAlgorithmAttribute ("TimeToTrigger",
281  TimeValue (MilliSeconds (128)));
282  }
283  else
284  {
285  NS_FATAL_ERROR ("Unknown handover algorithm " << m_handoverAlgorithmType);
286  }
287 
288  double distance = 1000.0; // m
289  double speed = 150; // m/s
290 
291  NodeContainer enbNodes;
292  enbNodes.Create (m_nEnbs);
293  NodeContainer ueNodes;
294  ueNodes.Create (m_nUes);
295 
296  if (m_epc)
297  {
298  m_epcHelper = CreateObject<PointToPointEpcHelper> ();
300  }
301 
302  // Install Mobility Model in eNBs
303  // eNBs are located along a line in the X axis
304  Ptr<ListPositionAllocator> enbPositionAlloc = CreateObject<ListPositionAllocator> ();
305  for (uint16_t i = 0; i < m_nEnbs; i++)
306  {
307  Vector enbPosition (distance * (i + 1), 0, 0);
308  enbPositionAlloc->Add (enbPosition);
309  }
310  MobilityHelper enbMobility;
311  enbMobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
312  enbMobility.SetPositionAllocator (enbPositionAlloc);
313  enbMobility.Install (enbNodes);
314 
315  // Install Mobility Model in UE
316  // UE moves with a constant speed along the X axis
317  MobilityHelper ueMobility;
318  ueMobility.SetMobilityModel ("ns3::ConstantVelocityMobilityModel");
319  ueMobility.Install (ueNodes);
320  for (uint16_t i = 0; i < m_nUes; i++)
321  {
322  ueNodes.Get (i)->GetObject<MobilityModel> ()->SetPosition (Vector (0, 0, 0));
323  ueNodes.Get (i)->GetObject<ConstantVelocityMobilityModel> ()->SetVelocity (Vector (speed, 0, 0));
324  }
325 
326  NetDeviceContainer enbDevices;
327  enbDevices = m_lteHelper->InstallEnbDevice (enbNodes);
328  stream += m_lteHelper->AssignStreams (enbDevices, stream);
329  for (NetDeviceContainer::Iterator it = enbDevices.Begin ();
330  it != enbDevices.End ();
331  ++it)
332  {
333  Ptr<LteEnbRrc> enbRrc = (*it)->GetObject<LteEnbNetDevice> ()->GetRrc ();
334  enbRrc->SetAttribute ("AdmitHandoverRequest", BooleanValue (m_admitHo));
335  }
336 
337  NetDeviceContainer ueDevices;
338  ueDevices = m_lteHelper->InstallUeDevice (ueNodes);
339  stream += m_lteHelper->AssignStreams (ueDevices, stream);
340 
341  Ipv4Address remoteHostAddr;
342  Ipv4StaticRoutingHelper ipv4RoutingHelper;
343  Ipv4InterfaceContainer ueIpIfaces;
344  Ptr<Node> remoteHost;
345  if (m_epc)
346  {
347  // Create a single RemoteHost
348  NodeContainer remoteHostContainer;
349  remoteHostContainer.Create (1);
350  remoteHost = remoteHostContainer.Get (0);
351  InternetStackHelper internet;
352  internet.Install (remoteHostContainer);
353 
354  // Create the Internet
355  PointToPointHelper p2ph;
356  p2ph.SetDeviceAttribute ("DataRate", DataRateValue (DataRate ("100Gb/s")));
357  p2ph.SetDeviceAttribute ("Mtu", UintegerValue (1500));
358  p2ph.SetChannelAttribute ("Delay", TimeValue (Seconds (0.010)));
359  Ptr<Node> pgw = m_epcHelper->GetPgwNode ();
360  NetDeviceContainer internetDevices = p2ph.Install (pgw, remoteHost);
361  Ipv4AddressHelper ipv4h;
362  ipv4h.SetBase ("1.0.0.0", "255.0.0.0");
363  Ipv4InterfaceContainer internetIpIfaces = ipv4h.Assign (internetDevices);
364  // in this container, interface 0 is the pgw, 1 is the remoteHost
365  remoteHostAddr = internetIpIfaces.GetAddress (1);
366 
367  Ipv4StaticRoutingHelper ipv4RoutingHelper;
368  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
369  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1);
370 
371  // Install the IP stack on the UEs
372  internet.Install (ueNodes);
373  ueIpIfaces = m_epcHelper->AssignUeIpv4Address (NetDeviceContainer (ueDevices));
374  }
375 
376  // attachment (needs to be done after IP stack configuration)
377  // all UEs attached to eNB 0 at the beginning
378  m_lteHelper->Attach (ueDevices, enbDevices.Get (0));
379 
380  if (m_epc)
381  {
382  bool epcDl = true;
383  bool epcUl = false;
384  // the rest of this block is copied from lena-dual-stripe
385 
386 
387  // Install and start applications on UEs and remote host
388  uint16_t dlPort = 10000;
389  uint16_t ulPort = 20000;
390 
391  // randomize a bit start times to avoid simulation artifacts
392  // (e.g., buffer overflows due to packet transmissions happening
393  // exactly at the same time)
394  Ptr<UniformRandomVariable> startTimeSeconds = CreateObject<UniformRandomVariable> ();
395  startTimeSeconds->SetAttribute ("Min", DoubleValue (0));
396  startTimeSeconds->SetAttribute ("Max", DoubleValue (0.010));
397  startTimeSeconds->SetStream (stream++);
398 
399  for (uint32_t u = 0; u < ueNodes.GetN (); ++u)
400  {
401  Ptr<Node> ue = ueNodes.Get (u);
402  // Set the default gateway for the UE
403  Ptr<Ipv4StaticRouting> ueStaticRouting = ipv4RoutingHelper.GetStaticRouting (ue->GetObject<Ipv4> ());
404  ueStaticRouting->SetDefaultRoute (m_epcHelper->GetUeDefaultGatewayAddress (), 1);
405 
406  UeData ueData;
407 
408  for (uint32_t b = 0; b < m_nDedicatedBearers; ++b)
409  {
410  ++dlPort;
411  ++ulPort;
412 
415  BearerData bearerData;
416 
417  if (m_useUdp)
418  {
419  if (epcDl)
420  {
421  UdpClientHelper dlClientHelper (ueIpIfaces.GetAddress (u), dlPort);
422  clientApps.Add (dlClientHelper.Install (remoteHost));
423  PacketSinkHelper dlPacketSinkHelper ("ns3::UdpSocketFactory",
424  InetSocketAddress (Ipv4Address::GetAny (), dlPort));
425  ApplicationContainer sinkContainer = dlPacketSinkHelper.Install (ue);
426  bearerData.dlSink = sinkContainer.Get (0)->GetObject<PacketSink> ();
427  serverApps.Add (sinkContainer);
428 
429  }
430  if (epcUl)
431  {
432  UdpClientHelper ulClientHelper (remoteHostAddr, ulPort);
433  clientApps.Add (ulClientHelper.Install (ue));
434  PacketSinkHelper ulPacketSinkHelper ("ns3::UdpSocketFactory",
435  InetSocketAddress (Ipv4Address::GetAny (), ulPort));
436  ApplicationContainer sinkContainer = ulPacketSinkHelper.Install (remoteHost);
437  bearerData.ulSink = sinkContainer.Get (0)->GetObject<PacketSink> ();
438  serverApps.Add (sinkContainer);
439  }
440  }
441  else // use TCP
442  {
443  if (epcDl)
444  {
445  BulkSendHelper dlClientHelper ("ns3::TcpSocketFactory",
446  InetSocketAddress (ueIpIfaces.GetAddress (u), dlPort));
447  dlClientHelper.SetAttribute ("MaxBytes", UintegerValue (0));
448  clientApps.Add (dlClientHelper.Install (remoteHost));
449  PacketSinkHelper dlPacketSinkHelper ("ns3::TcpSocketFactory",
450  InetSocketAddress (Ipv4Address::GetAny (), dlPort));
451  ApplicationContainer sinkContainer = dlPacketSinkHelper.Install (ue);
452  bearerData.dlSink = sinkContainer.Get (0)->GetObject<PacketSink> ();
453  serverApps.Add (sinkContainer);
454  }
455  if (epcUl)
456  {
457  BulkSendHelper ulClientHelper ("ns3::TcpSocketFactory",
458  InetSocketAddress (remoteHostAddr, ulPort));
459  ulClientHelper.SetAttribute ("MaxBytes", UintegerValue (0));
460  clientApps.Add (ulClientHelper.Install (ue));
461  PacketSinkHelper ulPacketSinkHelper ("ns3::TcpSocketFactory",
462  InetSocketAddress (Ipv4Address::GetAny (), ulPort));
463  ApplicationContainer sinkContainer = ulPacketSinkHelper.Install (remoteHost);
464  bearerData.ulSink = sinkContainer.Get (0)->GetObject<PacketSink> ();
465  serverApps.Add (sinkContainer);
466  }
467  } // end if (useUdp)
468 
469  Ptr<EpcTft> tft = Create<EpcTft> ();
470  if (epcDl)
471  {
473  dlpf.localPortStart = dlPort;
474  dlpf.localPortEnd = dlPort;
475  tft->Add (dlpf);
476  }
477  if (epcUl)
478  {
480  ulpf.remotePortStart = ulPort;
481  ulpf.remotePortEnd = ulPort;
482  tft->Add (ulpf);
483  }
484 
485  if (epcDl || epcUl)
486  {
487  EpsBearer bearer (EpsBearer::NGBR_VIDEO_TCP_DEFAULT);
488  m_lteHelper->ActivateDedicatedEpsBearer (ueDevices.Get (u), bearer, tft);
489  }
490  Time startTime = Seconds (startTimeSeconds->GetValue ());
491  serverApps.Start (startTime);
492  clientApps.Start (startTime);
493 
494  ueData.bearerDataList.push_back (bearerData);
495 
496  } // end for b
497 
498  m_ueDataVector.push_back (ueData);
499  }
500 
501  }
502  else // (epc == false)
503  {
504  // for radio bearer activation purposes, consider together home UEs and macro UEs
505  for (uint32_t u = 0; u < ueDevices.GetN (); ++u)
506  {
507  Ptr<NetDevice> ueDev = ueDevices.Get (u);
508  for (uint32_t b = 0; b < m_nDedicatedBearers; ++b)
509  {
510  enum EpsBearer::Qci q = EpsBearer::NGBR_VIDEO_TCP_DEFAULT;
511  EpsBearer bearer (q);
512  m_lteHelper->ActivateDataRadioBearer (ueDev, bearer);
513  }
514  }
515  }
516 
517 
518  m_lteHelper->AddX2Interface (enbNodes);
519 
520  // check initial RRC connection
521  const Time maxRrcConnectionEstablishmentDuration = Seconds (0.080);
522  for (NetDeviceContainer::Iterator it = ueDevices.Begin (); it != ueDevices.End (); ++it)
523  {
524  NS_LOG_FUNCTION (maxRrcConnectionEstablishmentDuration);
525  Simulator::Schedule (maxRrcConnectionEstablishmentDuration,
527  this, *it, enbDevices.Get (0));
528  }
529 
530  // schedule the checkpoint events
531 
532  Time stopTime = Seconds (0);
533  for (std::list<CheckPointEvent>::iterator checkPointEventIt = m_checkPointEventList.begin ();
534  checkPointEventIt != m_checkPointEventList.end ();
535  ++checkPointEventIt)
536  {
537  for (Time checkPointTime = checkPointEventIt->checkStartTime;
538  checkPointTime < checkPointEventIt->checkStopTime;
539  checkPointTime += checkPointEventIt->checkInterval)
540  {
541  Simulator::Schedule (checkPointTime, &LteX2HandoverMeasuresTestCase::CheckConnected,
542  this, ueDevices.Get (checkPointEventIt->ueDeviceIndex),
543  enbDevices.Get (checkPointEventIt->enbDeviceIndex));
544 
545  Time saveStatsTime = checkPointTime;
546  Simulator::Schedule (saveStatsTime, &LteX2HandoverMeasuresTestCase::SaveStats,
547  this, checkPointEventIt->ueDeviceIndex);
548 
549  Time checkStats = saveStatsTime + m_statsDuration;
550  Simulator::Schedule (checkStats, &LteX2HandoverMeasuresTestCase::CheckStats,
551  this, checkPointEventIt->ueDeviceIndex);
552 
553  if (stopTime <= checkStats)
554  {
555  stopTime = checkStats + Seconds (1);
556  }
557  }
558  }
559 
560  Simulator::Stop (stopTime);
561  Simulator::Run ();
562  Simulator::Destroy ();
563 }
564 
565 void
567 {
568  NS_LOG_FUNCTION (ueDevice << enbDevice);
569 
570  Ptr<LteUeNetDevice> ueLteDevice = ueDevice->GetObject<LteUeNetDevice> ();
571  Ptr<LteUeRrc> ueRrc = ueLteDevice->GetRrc ();
572  NS_TEST_ASSERT_MSG_EQ (ueRrc->GetState (), LteUeRrc::CONNECTED_NORMALLY, "Wrong LteUeRrc state!");
573 
574 
575  Ptr<LteEnbNetDevice> enbLteDevice = enbDevice->GetObject<LteEnbNetDevice> ();
576  Ptr<LteEnbRrc> enbRrc = enbLteDevice->GetRrc ();
577  uint16_t rnti = ueRrc->GetRnti ();
578  Ptr<UeManager> ueManager = enbRrc->GetUeManager (rnti);
579  NS_TEST_ASSERT_MSG_NE (ueManager, 0, "RNTI " << rnti << " not found in eNB");
580 
581  UeManager::State ueManagerState = ueManager->GetState ();
582  NS_TEST_ASSERT_MSG_EQ (ueManagerState, UeManager::CONNECTED_NORMALLY, "Wrong UeManager state!");
583  NS_ASSERT_MSG (ueManagerState == UeManager::CONNECTED_NORMALLY, "Wrong UeManager state!");
584 
585  uint16_t ueCellId = ueRrc->GetCellId ();
586  uint16_t enbCellId = enbLteDevice->GetCellId ();
587  uint8_t ueDlBandwidth = ueRrc->GetDlBandwidth ();
588  uint8_t enbDlBandwidth = enbLteDevice->GetDlBandwidth ();
589  uint8_t ueUlBandwidth = ueRrc->GetUlBandwidth ();
590  uint8_t enbUlBandwidth = enbLteDevice->GetUlBandwidth ();
591  uint8_t ueDlEarfcn = ueRrc->GetDlEarfcn ();
592  uint8_t enbDlEarfcn = enbLteDevice->GetDlEarfcn ();
593  uint8_t ueUlEarfcn = ueRrc->GetUlEarfcn ();
594  uint8_t enbUlEarfcn = enbLteDevice->GetUlEarfcn ();
595  uint64_t ueImsi = ueLteDevice->GetImsi ();
596  uint64_t enbImsi = ueManager->GetImsi ();
597 
598  NS_TEST_ASSERT_MSG_EQ (ueImsi, enbImsi, "inconsistent IMSI");
599  NS_TEST_ASSERT_MSG_EQ (ueCellId, enbCellId, "inconsistent CellId");
600  NS_TEST_ASSERT_MSG_EQ (ueDlBandwidth, enbDlBandwidth, "inconsistent DlBandwidth");
601  NS_TEST_ASSERT_MSG_EQ (ueUlBandwidth, enbUlBandwidth, "inconsistent UlBandwidth");
602  NS_TEST_ASSERT_MSG_EQ (ueDlEarfcn, enbDlEarfcn, "inconsistent DlEarfcn");
603  NS_TEST_ASSERT_MSG_EQ (ueUlEarfcn, enbUlEarfcn, "inconsistent UlEarfcn");
604 
605  ObjectMapValue enbDataRadioBearerMapValue;
606  ueManager->GetAttribute ("DataRadioBearerMap", enbDataRadioBearerMapValue);
607  NS_TEST_ASSERT_MSG_EQ (enbDataRadioBearerMapValue.GetN (), m_nDedicatedBearers + 1, "wrong num bearers at eNB");
608 
609  ObjectMapValue ueDataRadioBearerMapValue;
610  ueRrc->GetAttribute ("DataRadioBearerMap", ueDataRadioBearerMapValue);
611  NS_TEST_ASSERT_MSG_EQ (ueDataRadioBearerMapValue.GetN (), m_nDedicatedBearers + 1, "wrong num bearers at UE");
612 
613  ObjectMapValue::Iterator enbBearerIt = enbDataRadioBearerMapValue.Begin ();
614  ObjectMapValue::Iterator ueBearerIt = ueDataRadioBearerMapValue.Begin ();
615  while (enbBearerIt != enbDataRadioBearerMapValue.End ()
616  && ueBearerIt != ueDataRadioBearerMapValue.End ())
617  {
618  Ptr<LteDataRadioBearerInfo> enbDrbInfo = enbBearerIt->second->GetObject<LteDataRadioBearerInfo> ();
619  Ptr<LteDataRadioBearerInfo> ueDrbInfo = ueBearerIt->second->GetObject<LteDataRadioBearerInfo> ();
620  //NS_TEST_ASSERT_MSG_EQ (enbDrbInfo->m_epsBearer, ueDrbInfo->m_epsBearer, "epsBearer differs");
621  NS_TEST_ASSERT_MSG_EQ ((uint32_t) enbDrbInfo->m_epsBearerIdentity, (uint32_t) ueDrbInfo->m_epsBearerIdentity, "epsBearerIdentity differs");
622  NS_TEST_ASSERT_MSG_EQ ((uint32_t) enbDrbInfo->m_drbIdentity, (uint32_t) ueDrbInfo->m_drbIdentity, "drbIdentity differs");
623  //NS_TEST_ASSERT_MSG_EQ (enbDrbInfo->m_rlcConfig, ueDrbInfo->m_rlcConfig, "rlcConfig differs");
624  NS_TEST_ASSERT_MSG_EQ ((uint32_t) enbDrbInfo->m_logicalChannelIdentity, (uint32_t) ueDrbInfo->m_logicalChannelIdentity, "logicalChannelIdentity differs");
625  //NS_TEST_ASSERT_MSG_EQ (enbDrbInfo->m_logicalChannelConfig, ueDrbInfo->m_logicalChannelConfig, "logicalChannelConfig differs");
626 
627  ++enbBearerIt;
628  ++ueBearerIt;
629  }
630  NS_ASSERT_MSG (enbBearerIt == enbDataRadioBearerMapValue.End (), "too many bearers at eNB");
631  NS_ASSERT_MSG (ueBearerIt == ueDataRadioBearerMapValue.End (), "too many bearers at UE");
632 }
633 
634 void
636 {
637  NS_LOG_FUNCTION (ueIndex);
638  for (std::list<BearerData>::iterator it = m_ueDataVector.at (ueIndex).bearerDataList.begin ();
639  it != m_ueDataVector.at (ueIndex).bearerDataList.end ();
640  ++it)
641  {
642  if (it->dlSink)
643  {
644  it->dlOldTotalRx = it->dlSink->GetTotalRx ();
645  }
646  if (it->ulSink)
647  {
648  it->ulOldTotalRx = it->ulSink->GetTotalRx ();
649  }
650  }
651 }
652 
653 void
655 {
656  NS_LOG_FUNCTION (ueIndex);
657  uint32_t b = 1;
658  for (std::list<BearerData>::iterator it = m_ueDataVector.at (ueIndex).bearerDataList.begin ();
659  it != m_ueDataVector.at (ueIndex).bearerDataList.end ();
660  ++it)
661  {
662  uint32_t dlRx = 0;
663  uint32_t ulRx = 0;
664 
665  if (it->dlSink)
666  {
667  dlRx = it->dlSink->GetTotalRx () - it->dlOldTotalRx;
668  }
669 
670  if (it->ulSink)
671  {
672  ulRx = it->ulSink->GetTotalRx () - it->ulOldTotalRx;
673  }
674  double expectedBytes = m_udpClientPktSize * (m_statsDuration / m_udpClientInterval).GetDouble ();
675 
676  NS_LOG_LOGIC ("expBytes " << expectedBytes << " dlRx " << dlRx << " ulRx " << ulRx);
677 
678  // tolerance
679  if (it->dlSink)
680  {
681  NS_TEST_ASSERT_MSG_GT (dlRx, 0.500 * expectedBytes, "too few RX bytes in DL, ue=" << ueIndex << ", b=" << b);
682  }
683  if (it->ulSink)
684  {
685  NS_TEST_ASSERT_MSG_GT (ulRx, 0.500 * expectedBytes, "too few RX bytes in UL, ue=" << ueIndex << ", b=" << b);
686  }
687  ++b;
688  }
689 }
690 
691 
699 {
700 public:
702 };
703 
704 
706  : TestSuite ("lte-x2-handover-measures", SYSTEM)
707 {
708  Time checkInterval = Seconds (1);
709 
710  std::string cel1name ("ho: 0 -> 1");
711  std::list<CheckPointEvent> cel1;
712  cel1.push_back (CheckPointEvent (Seconds (1), Seconds (10.1), checkInterval, 0, 0));
713  cel1.push_back (CheckPointEvent (Seconds (11), Seconds (17), checkInterval, 0, 1));
714 
715  std::string cel2name ("ho: 0 -> 1 -> 2");
716  std::list<CheckPointEvent> cel2;
717  cel2.push_back (CheckPointEvent (Seconds (1), Seconds (10.1), checkInterval, 0, 0));
718  cel2.push_back (CheckPointEvent (Seconds (11), Seconds (17.1), checkInterval, 0, 1));
719  cel2.push_back (CheckPointEvent (Seconds (18), Seconds (24), checkInterval, 0, 2));
720 
721  std::string cel3name ("ho: 0 -> 1 -> 2 -> 3");
722  std::list<CheckPointEvent> cel3;
723  cel3.push_back (CheckPointEvent (Seconds (1), Seconds (10.1), checkInterval, 0, 0));
724  cel3.push_back (CheckPointEvent (Seconds (11), Seconds (17.1), checkInterval, 0, 1));
725  cel3.push_back (CheckPointEvent (Seconds (18), Seconds (24.1), checkInterval, 0, 2));
726  cel3.push_back (CheckPointEvent (Seconds (25), Seconds (37), checkInterval, 0, 3));
727 
728 
729  int32_t useIdealRrc;
730  std::string sched = "ns3::PfFfMacScheduler";
731  std::string ho = "ns3::A2A4RsrqHandoverAlgorithm";
732  for (useIdealRrc = 1; useIdealRrc >= 0; --useIdealRrc)
733  {
734  // nEnbs, nUes, nDBearers, celist, name, useUdp, sched, ho, admitHo, idealRrc
735  AddTestCase (new LteX2HandoverMeasuresTestCase (2, 1, 0, cel1, cel1name, true, sched, ho, true, useIdealRrc), TestCase::TAKES_FOREVER);
736  AddTestCase (new LteX2HandoverMeasuresTestCase (2, 1, 1, cel1, cel1name, true, sched, ho, true, useIdealRrc), TestCase::QUICK);
737  AddTestCase (new LteX2HandoverMeasuresTestCase (2, 1, 2, cel1, cel1name, true, sched, ho, true, useIdealRrc), TestCase::TAKES_FOREVER);
738  AddTestCase (new LteX2HandoverMeasuresTestCase (3, 1, 0, cel2, cel2name, true, sched, ho, true, useIdealRrc), TestCase::TAKES_FOREVER);
739  AddTestCase (new LteX2HandoverMeasuresTestCase (3, 1, 1, cel2, cel2name, true, sched, ho, true, useIdealRrc), TestCase::TAKES_FOREVER);
740  AddTestCase (new LteX2HandoverMeasuresTestCase (3, 1, 2, cel2, cel2name, true, sched, ho, true, useIdealRrc), TestCase::EXTENSIVE);
741  AddTestCase (new LteX2HandoverMeasuresTestCase (4, 1, 0, cel3, cel3name, true, sched, ho, true, useIdealRrc), TestCase::EXTENSIVE);
742  AddTestCase (new LteX2HandoverMeasuresTestCase (4, 1, 1, cel3, cel3name, true, sched, ho, true, useIdealRrc), TestCase::TAKES_FOREVER);
743  AddTestCase (new LteX2HandoverMeasuresTestCase (4, 1, 2, cel3, cel3name, true, sched, ho, true, useIdealRrc), TestCase::TAKES_FOREVER);
744  }
745 
746  sched = "ns3::RrFfMacScheduler";
747  for (useIdealRrc = 1; useIdealRrc >= 0; --useIdealRrc)
748  {
749  // nEnbs, nUes, nDBearers, celist, name, useUdp, sched, admitHo, idealRrc
750  AddTestCase (new LteX2HandoverMeasuresTestCase (2, 1, 0, cel1, cel1name, true, sched, ho, true, useIdealRrc), TestCase::EXTENSIVE);
751  AddTestCase (new LteX2HandoverMeasuresTestCase (3, 1, 0, cel2, cel2name, true, sched, ho, true, useIdealRrc), TestCase::TAKES_FOREVER);
752  AddTestCase (new LteX2HandoverMeasuresTestCase (4, 1, 0, cel3, cel3name, true, sched, ho, true, useIdealRrc), TestCase::TAKES_FOREVER);
753  }
754 
755  ho = "ns3::A3RsrpHandoverAlgorithm";
756  sched = "ns3::PfFfMacScheduler";
757  for (useIdealRrc = 1; useIdealRrc >= 0; --useIdealRrc)
758  {
759  // nEnbs, nUes, nDBearers, celist, name, useUdp, sched, admitHo, idealRrc
760  AddTestCase (new LteX2HandoverMeasuresTestCase (2, 1, 0, cel1, cel1name, true, sched, ho, true, useIdealRrc), TestCase::EXTENSIVE);
761  AddTestCase (new LteX2HandoverMeasuresTestCase (3, 1, 0, cel2, cel2name, true, sched, ho, true, useIdealRrc), TestCase::TAKES_FOREVER);
762  AddTestCase (new LteX2HandoverMeasuresTestCase (4, 1, 0, cel3, cel3name, true, sched, ho, true, useIdealRrc), TestCase::TAKES_FOREVER);
763  }
764 
765  sched = "ns3::RrFfMacScheduler";
766  for (useIdealRrc = 1; useIdealRrc >= 0; --useIdealRrc)
767  {
768  // nEnbs, nUes, nDBearers, celist, name, useUdp, sched, admitHo, idealRrc
769  AddTestCase (new LteX2HandoverMeasuresTestCase (2, 1, 0, cel1, cel1name, true, sched, ho, true, useIdealRrc), TestCase::QUICK);
770  AddTestCase (new LteX2HandoverMeasuresTestCase (3, 1, 0, cel2, cel2name, true, sched, ho, true, useIdealRrc), TestCase::TAKES_FOREVER);
771  AddTestCase (new LteX2HandoverMeasuresTestCase (4, 1, 0, cel3, cel3name, true, sched, ho, true, useIdealRrc), TestCase::EXTENSIVE);
772  }
773 
774 } // end of LteX2HandoverMeasuresTestSuite ()
775 
ns3::NetDeviceContainer
holds a vector of ns3::NetDevice pointers
Definition: net-device-container.h:42
ns3::UeManager::GetState
State GetState() const
Definition: lte-enb-rrc.cc:1287
NS_LOG_COMPONENT_DEFINE
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:205
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)
Definition: test-lte-x2-handover-measures.cc:215
ns3::InetSocketAddress
an Inet address class
Definition: inet-socket-address.h:41
ns3::DataRateValue
AttributeValue implementation for DataRate.
Definition: data-rate.h:298
ns3::ApplicationContainer::Get
Ptr< Application > Get(uint32_t i) const
Get the Ptr<Application> stored in this container at a given index.
Definition: application-container.cc:62
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::TestCase::AddTestCase
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
Definition: test.cc:299
LteX2HandoverMeasuresTestCase::m_maxHoDuration
const Time m_maxHoDuration
maximum HO duration
Definition: test-lte-x2-handover-measures.cc:181
CheckPointEvent::CheckPointEvent
CheckPointEvent(Time start, Time stop, Time interval, uint32_t ueIndex, uint32_t enbIndex)
Constructor.
Definition: test-lte-x2-handover-measures.cc:57
ns3::ListPositionAllocator::Add
void Add(Vector v)
Add a position to the list of positions.
Definition: position-allocator.cc:70
stopTime
Time stopTime
Definition: tcp-linux-reno.cc:52
ns3::BooleanValue
AttributeValue implementation for Boolean.
Definition: boolean.h:37
LteX2HandoverMeasuresTestCase::BearerData::dlOldTotalRx
uint32_t dlOldTotalRx
DL old total receive.
Definition: test-lte-x2-handover-measures.cc:152
LteX2HandoverMeasuresTestCase
Test different X2 handover measures and algorithms, e.g.
Definition: test-lte-x2-handover-measures.cc:75
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::LteEnbNetDevice::GetCellId
uint16_t GetCellId() const
Definition: lte-enb-net-device.cc:224
ns3::ObjectPtrContainerValue::End
Iterator End(void) const
Get an iterator to the past-the-end Object.
Definition: object-ptr-container.cc:45
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::UeManager::GetImsi
uint64_t GetImsi(void) const
Definition: lte-enb-rrc.cc:1247
LteX2HandoverMeasuresTestCase::m_nEnbs
uint32_t m_nEnbs
number of eNBs in the test
Definition: test-lte-x2-handover-measures.cc:127
CheckPointEvent::ueDeviceIndex
uint32_t ueDeviceIndex
UE device index.
Definition: test-lte-x2-handover-measures.cc:45
ns3::UeManager::State
State
The state of the UeManager at the eNB RRC.
Definition: lte-enb-rrc.h:87
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
LteX2HandoverMeasuresTestCase::CheckStats
void CheckStats(uint32_t ueIndex)
Check stats function.
Definition: test-lte-x2-handover-measures.cc:654
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
CheckPointEvent::checkStartTime
Time checkStartTime
check start time
Definition: test-lte-x2-handover-measures.cc:42
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::ObjectPtrContainerValue::GetN
std::size_t GetN(void) const
Get the number of Objects.
Definition: object-ptr-container.cc:51
LteX2HandoverMeasuresTestCase::UeData
UeData structure.
Definition: test-lte-x2-handover-measures.cc:163
ns3::EpcTft::PacketFilter::remotePortEnd
uint16_t remotePortEnd
end of the port number range of the remote host
Definition: epc-tft.h:138
ns3::BulkSendHelper::SetAttribute
void SetAttribute(std::string name, const AttributeValue &value)
Helper function used to set the underlying application attributes, not the socket attributes.
Definition: bulk-send-helper.cc:39
LteX2HandoverMeasuresTestCase::UeData::id
uint32_t id
ID.
Definition: test-lte-x2-handover-measures.cc:164
CheckPointEvent::enbDeviceIndex
uint32_t enbDeviceIndex
ENB device index.
Definition: test-lte-x2-handover-measures.cc:46
CheckPointEvent
CheckPointEvent structure.
Definition: test-lte-x2-handover-measures.cc:41
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::Config::Reset
void Reset(void)
Reset the initial value of every attribute as well as the value of every global to what they were bef...
Definition: config.cc:820
ns3::BulkSendHelper
A helper to make it easier to instantiate an ns3::BulkSendApplication on a set of nodes.
Definition: bulk-send-helper.h:43
ns3::LteDataRadioBearerInfo::m_drbIdentity
uint8_t m_drbIdentity
DRB identity.
Definition: lte-radio-bearer-info.h:91
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::NodeContainer::GetN
uint32_t GetN(void) const
Get the number of Ptr<Node> stored in this container.
Definition: node-container.cc:88
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
LteX2HandoverMeasuresTestCase::m_nDedicatedBearers
uint32_t m_nDedicatedBearers
number of UEs in the test
Definition: test-lte-x2-handover-measures.cc:129
ns3::ObjectPtrContainerValue
Container for a set of ns3::Object pointers.
Definition: object-ptr-container.h:46
ns3::EpsBearer::Qci
Qci
QoS Class Indicator.
Definition: eps-bearer.h:107
ns3::LteUeNetDevice::GetImsi
uint64_t GetImsi() const
Get the IMSI.
Definition: lte-ue-net-device.cc:208
NS_TEST_ASSERT_MSG_NE
#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.
Definition: test.h:622
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
CheckPointEvent::checkInterval
Time checkInterval
check interval
Definition: test-lte-x2-handover-measures.cc:44
ns3::NoBackhaulEpcHelper::GetUeDefaultGatewayAddress
virtual Ipv4Address GetUeDefaultGatewayAddress()
Definition: no-backhaul-epc-helper.cc:523
ns3::LteEnbNetDevice::GetRrc
Ptr< LteEnbRrc > GetRrc() const
Definition: lte-enb-net-device.cc:212
LteX2HandoverMeasuresTestCase::DoRun
virtual void DoRun(void)
Implementation to actually run this TestCase.
Definition: test-lte-x2-handover-measures.cc:242
ns3::TestCase
encapsulates test code
Definition: test.h:1154
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
LteX2HandoverMeasuresTestCase::m_epc
bool m_epc
whether to use EPC
Definition: test-lte-x2-handover-measures.cc:132
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
LteX2HandoverMeasuresTestCase::m_udpClientPktSize
const uint32_t m_udpClientPktSize
UDP client packet size.
Definition: test-lte-x2-handover-measures.cc:184
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:74
NS_FATAL_ERROR
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Definition: fatal-error.h:165
ns3::DataRate
Class for representing data rates.
Definition: data-rate.h:89
visualizer.core.start
def start()
Definition: core.py:1855
LteX2HandoverMeasuresTestCase::m_nUes
uint32_t m_nUes
number of UEs in the test
Definition: test-lte-x2-handover-measures.cc:128
ns3::LteEnbNetDevice::GetUlEarfcn
uint32_t GetUlEarfcn() const
Definition: lte-enb-net-device.cc:310
ns3::NetDeviceContainer::Begin
Iterator Begin(void) const
Get an iterator which refers to the first NetDevice in the container.
Definition: net-device-container.cc:46
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
LteX2HandoverMeasuresTestCase::UeData::bearerDataList
std::list< BearerData > bearerDataList
bearer ID list
Definition: test-lte-x2-handover-measures.cc:165
LteX2HandoverMeasuresTestCase::m_checkPointEventListName
std::string m_checkPointEventListName
check point event list name
Definition: test-lte-x2-handover-measures.cc:131
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
LteX2HandoverMeasuresTestCase::BuildNameString
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.
Definition: test-lte-x2-handover-measures.cc:189
LteX2HandoverMeasuresTestCase::m_lteHelper
Ptr< LteHelper > m_lteHelper
LTE helper.
Definition: test-lte-x2-handover-measures.cc:138
LteX2HandoverMeasuresTestCase::m_admitHo
bool m_admitHo
whether to configure to admit handover
Definition: test-lte-x2-handover-measures.cc:136
ns3::ObjectBase::GetAttribute
void GetAttribute(std::string name, AttributeValue &value) const
Get the value of an attribute, raising fatal errors if unsuccessful.
Definition: object-base.cc:223
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
ns3::LteUeNetDevice
The LteUeNetDevice class implements the UE net device.
Definition: lte-ue-net-device.h:57
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
LteX2HandoverMeasuresTestCase::BearerData::ulSink
Ptr< PacketSink > ulSink
UL sink.
Definition: test-lte-x2-handover-measures.cc:151
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:104
ns3::LteEnbNetDevice::GetDlEarfcn
uint32_t GetDlEarfcn() const
Definition: lte-enb-net-device.cc:297
NS_ASSERT_MSG
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
Definition: assert.h:88
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::NetDeviceContainer::End
Iterator End(void) const
Get an iterator which indicates past-the-last NetDevice in the container.
Definition: net-device-container.cc:51
LteX2HandoverMeasuresTestCase::m_useIdealRrc
bool m_useIdealRrc
whether to use ideal RRC
Definition: test-lte-x2-handover-measures.cc:137
ns3::LteDataRadioBearerInfo
store information on active data radio bearer instance
Definition: lte-radio-bearer-info.h:80
CheckPointEvent::checkStopTime
Time checkStopTime
check stop time
Definition: test-lte-x2-handover-measures.cc:43
ns3::LteHelper::AssignStreams
int64_t AssignStreams(NetDeviceContainer c, int64_t stream)
Assign a fixed random variable stream number to the random variables used.
Definition: lte-helper.cc:1444
NS_LOG_LOGIC
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
Definition: log.h:289
ns3::StringValue
Hold variables of type string.
Definition: string.h:41
ns3::PacketSinkHelper
A helper to make it easier to instantiate an ns3::PacketSinkApplication on a set of nodes.
Definition: packet-sink-helper.h:36
ns3::NetDeviceContainer::Iterator
std::vector< Ptr< NetDevice > >::const_iterator Iterator
NetDevice container iterator.
Definition: net-device-container.h:45
ns3::BulkSendHelper::Install
ApplicationContainer Install(NodeContainer c) const
Install an ns3::BulkSendApplication on each node of the input container configured with all the attri...
Definition: bulk-send-helper.cc:58
ns3::TestSuite
A suite of tests to run.
Definition: test.h:1344
LteX2HandoverMeasuresTestCase::BearerData::ulOldTotalRx
uint32_t ulOldTotalRx
UL old total receive.
Definition: test-lte-x2-handover-measures.cc:153
first.clientApps
clientApps
Definition: first.py:61
NS_TEST_ASSERT_MSG_EQ
#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.
Definition: test.h:166
LteX2HandoverMeasuresTestCase::BearerData::bid
uint32_t bid
BID.
Definition: test-lte-x2-handover-measures.cc:149
ns3::EpsBearer
This class contains the specification of EPS Bearers.
Definition: eps-bearer.h:92
LteX2HandoverMeasuresTestCase::m_udpClientInterval
const Time m_udpClientInterval
UDP client interval.
Definition: test-lte-x2-handover-measures.cc:183
LteX2HandoverMeasuresTestCase::m_epcHelper
Ptr< PointToPointEpcHelper > m_epcHelper
EPC helper.
Definition: test-lte-x2-handover-measures.cc:139
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::LteUeNetDevice::GetRrc
Ptr< LteUeRrc > GetRrc() const
Get the RRC.
Definition: lte-ue-net-device.cc:179
g_lteX2HandoverMeasuresTestSuiteInstance
static LteX2HandoverMeasuresTestSuite g_lteX2HandoverMeasuresTestSuiteInstance
Definition: test-lte-x2-handover-measures.cc:776
ns3::Seconds
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1289
LteX2HandoverMeasuresTestCase::m_checkPointEventList
std::list< CheckPointEvent > m_checkPointEventList
check point event list
Definition: test-lte-x2-handover-measures.cc:130
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
NS_TEST_ASSERT_MSG_GT
#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.
Definition: test.h:995
ns3::LteDataRadioBearerInfo::m_epsBearerIdentity
uint8_t m_epsBearerIdentity
EPS bearer identity.
Definition: lte-radio-bearer-info.h:90
ns3::ApplicationContainer
holds a vector of ns3::Application pointers.
Definition: application-container.h:43
first.serverApps
serverApps
Definition: first.py:52
ns3::UdpClientHelper::Install
ApplicationContainer Install(NodeContainer c)
Definition: udp-client-server-helper.cc:93
ns3::ObjectPtrContainerValue::Begin
Iterator Begin(void) const
Get an iterator to the first Object.
Definition: object-ptr-container.cc:39
ns3::TimeValue
AttributeValue implementation for Time.
Definition: nstime.h:1353
NS_LOG_FUNCTION
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
Definition: log-macros-enabled.h:244
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
LteX2HandoverMeasuresTestCase::m_useUdp
bool m_useUdp
whether to use UDP traffic
Definition: test-lte-x2-handover-measures.cc:133
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::PacketSink
Receive and consume traffic generated to an IP address and port.
Definition: packet-sink.h:72
ns3::Ipv4InterfaceContainer::GetAddress
Ipv4Address GetAddress(uint32_t i, uint32_t j=0) const
Definition: ipv4-interface-container.cc:59
ns3::RandomVariableStream::SetStream
void SetStream(int64_t stream)
Specifies the stream number for the RngStream.
Definition: random-variable-stream.cc:100
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::ObjectPtrContainerValue::Iterator
std::map< std::size_t, Ptr< Object > >::const_iterator Iterator
Iterator type for traversing this container.
Definition: object-ptr-container.h:49
ns3::Config::SetDefault
void SetDefault(std::string name, const AttributeValue &value)
Definition: config.cc:849
LteX2HandoverMeasuresTestCase::m_statsDuration
const Time m_statsDuration
stats duration
Definition: test-lte-x2-handover-measures.cc:182
ns3::NetDeviceContainer::GetN
uint32_t GetN(void) const
Get the number of Ptr<NetDevice> stored in this container.
Definition: net-device-container.cc:57
LteX2HandoverMeasuresTestCase::m_schedulerType
std::string m_schedulerType
scheduler type
Definition: test-lte-x2-handover-measures.cc:134
ns3::LteHelper::SetSchedulerType
void SetSchedulerType(std::string type)
Set the type of scheduler to be used by eNodeB devices.
Definition: lte-helper.cc:279
LteX2HandoverMeasuresTestSuite::LteX2HandoverMeasuresTestSuite
LteX2HandoverMeasuresTestSuite()
Definition: test-lte-x2-handover-measures.cc:705
LteX2HandoverMeasuresTestSuite
Lte X2 Handover Measures Test Suite.
Definition: test-lte-x2-handover-measures.cc:699
LteX2HandoverMeasuresTestCase::m_handoverAlgorithmType
std::string m_handoverAlgorithmType
handover algorithm type
Definition: test-lte-x2-handover-measures.cc:135
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::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
LteX2HandoverMeasuresTestCase::m_ueDataVector
std::vector< UeData > m_ueDataVector
UE data vector.
Definition: test-lte-x2-handover-measures.cc:179
ns3::LteEnbNetDevice::GetUlBandwidth
uint16_t GetUlBandwidth() const
Definition: lte-enb-net-device.cc:243
ns3::LteEnbNetDevice
The eNodeB device implementation.
Definition: lte-enb-net-device.h:57
ns3::MobilityHelper
Helper class used to assign positions and mobility models to nodes.
Definition: mobility-helper.h:43
LteX2HandoverMeasuresTestCase::SaveStats
void SaveStats(uint32_t ueIndex)
Save stats function.
Definition: test-lte-x2-handover-measures.cc:635
LteX2HandoverMeasuresTestCase::CheckConnected
void CheckConnected(Ptr< NetDevice > ueDevice, Ptr< NetDevice > enbDevice)
Check connected function.
Definition: test-lte-x2-handover-measures.cc:566
ns3::PacketSinkHelper::Install
ApplicationContainer Install(NodeContainer c) const
Install an ns3::PacketSinkApplication on each node of the input container configured with all the att...
Definition: packet-sink-helper.cc:55
ns3::EpcTft::PacketFilter::localPortEnd
uint16_t localPortEnd
end of the port number range of the UE
Definition: epc-tft.h:140
ns3::LteEnbNetDevice::GetDlBandwidth
uint16_t GetDlBandwidth() const
Definition: lte-enb-net-device.cc:270
LteX2HandoverMeasuresTestCase::BearerData::dlSink
Ptr< PacketSink > dlSink
DL sink.
Definition: test-lte-x2-handover-measures.cc:150
ns3::LteDataRadioBearerInfo::m_logicalChannelIdentity
uint8_t m_logicalChannelIdentity
logical channel identity
Definition: lte-radio-bearer-info.h:93
ns3::LteHelper::ActivateDataRadioBearer
void ActivateDataRadioBearer(NetDeviceContainer ueDevices, EpsBearer bearer)
Activate a Data Radio Bearer on a given UE devices (for LTE-only simulation).
Definition: lte-helper.cc:1314
LteX2HandoverMeasuresTestCase::BearerData
BearerData structure.
Definition: test-lte-x2-handover-measures.cc:148