A Discrete-Event Network Simulator
API
lte-test-cell-selection.cc
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2013 Budiarto Herman
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: Budiarto Herman <budiarto.herman@magister.fi>
19  *
20  */
21 
23 
24 #include <ns3/simulator.h>
25 #include <ns3/log.h>
26 #include <ns3/boolean.h>
27 #include <ns3/double.h>
28 #include <ns3/integer.h>
29 
30 #include <ns3/mobility-helper.h>
31 #include <ns3/lte-helper.h>
32 #include <ns3/point-to-point-epc-helper.h>
33 #include <ns3/internet-stack-helper.h>
34 #include <ns3/point-to-point-helper.h>
35 #include <ns3/ipv4-address-helper.h>
36 #include <ns3/ipv4-static-routing-helper.h>
37 
38 #include <ns3/node-container.h>
39 #include <ns3/net-device-container.h>
40 #include <ns3/ipv4-interface-container.h>
41 
42 #include <ns3/lte-ue-net-device.h>
43 #include <ns3/lte-ue-rrc.h>
44 #include <ns3/lte-enb-net-device.h>
45 
46 using namespace ns3;
47 
48 NS_LOG_COMPONENT_DEFINE ("LteCellSelectionTest");
49 
50 /*
51  * Test Suite
52  */
53 
54 
56  : TestSuite ("lte-cell-selection", SYSTEM)
57 {
58  std::vector<LteCellSelectionTestCase::UeSetup_t> w;
59 
60  // REAL RRC PROTOCOL
61 
62  w.clear ();
63  // x y csgMember
64  // checkPoint cell1, cell2
65  w.push_back (LteCellSelectionTestCase::UeSetup_t (0.0, 0.55, false,
66  MilliSeconds (283), 1, 0));
67  w.push_back (LteCellSelectionTestCase::UeSetup_t (0.0, 0.45, false,
68  MilliSeconds (283), 1, 0));
69  w.push_back (LteCellSelectionTestCase::UeSetup_t (0.5, 0.45, false,
70  MilliSeconds (363), 1, 3));
71  w.push_back (LteCellSelectionTestCase::UeSetup_t (0.5, 0.0, true,
72  MilliSeconds (283), 2, 4));
73  w.push_back (LteCellSelectionTestCase::UeSetup_t (1.0, 0.55, true,
74  MilliSeconds (283), 3, 0));
75  w.push_back (LteCellSelectionTestCase::UeSetup_t (1.0, 0.45, true,
76  MilliSeconds (283), 4, 0));
77 
78  AddTestCase (new LteCellSelectionTestCase ("EPC, real RRC, RngNum=1",
79  true, false, 60.0, w, 1),
80  // isd rngrun
81  TestCase::QUICK);
82 
83  // IDEAL RRC PROTOCOL
84 
85  w.clear ();
86  // x y csgMember
87  // checkPoint cell1, cell2
88  w.push_back (LteCellSelectionTestCase::UeSetup_t (0.0, 0.55, false,
89  MilliSeconds (266), 1, 0));
90  w.push_back (LteCellSelectionTestCase::UeSetup_t (0.0, 0.45, false,
91  MilliSeconds (266), 1, 0));
92  w.push_back (LteCellSelectionTestCase::UeSetup_t (0.5, 0.45, false,
93  MilliSeconds (346), 1, 3));
94  w.push_back (LteCellSelectionTestCase::UeSetup_t (0.5, 0.0, true,
95  MilliSeconds (266), 2, 4));
96  w.push_back (LteCellSelectionTestCase::UeSetup_t (1.0, 0.55, true,
97  MilliSeconds (266), 3, 0));
98  w.push_back (LteCellSelectionTestCase::UeSetup_t (1.0, 0.45, true,
99  MilliSeconds (266), 4, 0));
100 
101  AddTestCase (new LteCellSelectionTestCase ("EPC, ideal RRC, RngNum=1",
102  true, true, 60.0, w, 1),
103  // isd rngrun
104  TestCase::QUICK);
105 
106 } // end of LteCellSelectionTestSuite::LteCellSelectionTestSuite ()
107 
108 
110 
111 
112 
113 /*
114  * Test Case
115  */
116 
117 
119  double relPosX, double relPosY, bool isCsgMember, Time checkPoint,
120  uint16_t expectedCellId1, uint16_t expectedCellId2)
121  : position (Vector (relPosX, relPosY, 0.0)),
122  isCsgMember (isCsgMember),
123  checkPoint (checkPoint),
124  expectedCellId1 (expectedCellId1),
125  expectedCellId2 (expectedCellId2)
126 {
127 }
128 
129 
131  std::string name, bool isEpcMode, bool isIdealRrc,
132  double interSiteDistance,
133  std::vector<UeSetup_t> ueSetupList, uint64_t rngRun)
134  : TestCase (name),
135  m_isEpcMode (isEpcMode),
136  m_isIdealRrc (isIdealRrc),
137  m_interSiteDistance (interSiteDistance),
138  m_ueSetupList (ueSetupList),
139  m_rngRun (rngRun)
140 {
141  NS_LOG_FUNCTION (this << GetName ());
142  m_lastState.resize (m_ueSetupList.size (), LteUeRrc::NUM_STATES);
143 }
144 
145 
147 {
148  NS_LOG_FUNCTION (this << GetName ());
149 }
150 
151 
152 void
154 {
155  NS_LOG_FUNCTION (this << GetName ());
156 
158 
159  Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
160  lteHelper->SetAttribute ("PathlossModel",
161  StringValue ("ns3::FriisSpectrumPropagationLossModel"));
162  lteHelper->SetAttribute ("UseIdealRrc", BooleanValue (m_isIdealRrc));
163 
164  Ptr<PointToPointEpcHelper> epcHelper;
165 
166  if (m_isEpcMode)
167  {
168  epcHelper = CreateObject<PointToPointEpcHelper> ();
169  lteHelper->SetEpcHelper (epcHelper);
170  }
171 
172  /*
173  * The topology is the following (the number on the node indicate the cell ID)
174  *
175  * [1] [3]
176  * non-CSG -- non-CSG
177  * | |
178  * | | 60 m
179  * | |
180  * [2] [4]
181  * CSG ------ CSG
182  * 60 m
183  */
184 
185  // Create Nodes
186  NodeContainer enbNodes;
187  enbNodes.Create (4);
188  NodeContainer ueNodes;
189  uint16_t nUe = static_cast<uint16_t> (m_ueSetupList.size ());
190  ueNodes.Create (nUe);
191 
192  // Assign nodes to position
193  Ptr<ListPositionAllocator> positionAlloc = CreateObject<ListPositionAllocator> ();
194  // eNodeB
195  positionAlloc->Add (Vector ( 0.0, m_interSiteDistance, 0.0));
196  positionAlloc->Add (Vector ( 0.0, 0.0, 0.0));
197  positionAlloc->Add (Vector (m_interSiteDistance, m_interSiteDistance, 0.0));
198  positionAlloc->Add (Vector (m_interSiteDistance, 0.0, 0.0));
199  // UE
200  std::vector<UeSetup_t>::const_iterator itSetup;
201  for (itSetup = m_ueSetupList.begin ();
202  itSetup != m_ueSetupList.end (); itSetup++)
203  {
204  Vector uePos (m_interSiteDistance * itSetup->position.x,
205  m_interSiteDistance * itSetup->position.y,
206  m_interSiteDistance * itSetup->position.z);
207  NS_LOG_INFO ("UE position " << uePos);
208  positionAlloc->Add (uePos);
209  }
210 
212  mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
213  mobility.SetPositionAllocator (positionAlloc);
214  mobility.Install (enbNodes);
215  mobility.Install (ueNodes);
216 
217  // Create Devices and install them in the Nodes (eNB and UE)
218  int64_t stream = 1;
219  NetDeviceContainer enbDevs;
220 
221  // cell ID 1 is a non-CSG cell
222  lteHelper->SetEnbDeviceAttribute ("CsgId", UintegerValue (0));
223  lteHelper->SetEnbDeviceAttribute ("CsgIndication", BooleanValue (false));
224  enbDevs.Add (lteHelper->InstallEnbDevice (enbNodes.Get (0)));
225 
226  // cell ID 2 is a CSG cell
227  lteHelper->SetEnbDeviceAttribute ("CsgId", UintegerValue (1));
228  lteHelper->SetEnbDeviceAttribute ("CsgIndication", BooleanValue (true));
229  enbDevs.Add (lteHelper->InstallEnbDevice (enbNodes.Get (1)));
230 
231  // cell ID 3 is a non-CSG cell
232  lteHelper->SetEnbDeviceAttribute ("CsgId", UintegerValue (0));
233  lteHelper->SetEnbDeviceAttribute ("CsgIndication", BooleanValue (false));
234  enbDevs.Add (lteHelper->InstallEnbDevice (enbNodes.Get (2)));
235 
236  // cell ID 4 is a CSG cell
237  lteHelper->SetEnbDeviceAttribute ("CsgId", UintegerValue (1));
238  lteHelper->SetEnbDeviceAttribute ("CsgIndication", BooleanValue (true));
239  enbDevs.Add (lteHelper->InstallEnbDevice (enbNodes.Get (3)));
240 
241  NetDeviceContainer ueDevs;
242  Time lastCheckPoint = MilliSeconds (0);
243  NS_ASSERT (m_ueSetupList.size () == ueNodes.GetN ());
245  for (itSetup = m_ueSetupList.begin (), itNode = ueNodes.Begin ();
246  itSetup != m_ueSetupList.end () || itNode != ueNodes.End ();
247  itSetup++, itNode++)
248  {
249  if (itSetup->isCsgMember)
250  {
251  lteHelper->SetUeDeviceAttribute ("CsgId", UintegerValue (1));
252  }
253  else
254  {
255  lteHelper->SetUeDeviceAttribute ("CsgId", UintegerValue (0));
256  }
257 
258  NetDeviceContainer devs = lteHelper->InstallUeDevice (*itNode);
259  Ptr<LteUeNetDevice> ueDev = devs.Get (0)->GetObject<LteUeNetDevice> ();
260  NS_ASSERT (ueDev != 0);
261  ueDevs.Add (devs);
262  Simulator::Schedule (itSetup->checkPoint,
264  this, ueDev,
265  itSetup->expectedCellId1, itSetup->expectedCellId2);
266 
267  if (lastCheckPoint < itSetup->checkPoint)
268  {
269  lastCheckPoint = itSetup->checkPoint;
270  }
271  }
272 
273  stream += lteHelper->AssignStreams (enbDevs, stream);
274  stream += lteHelper->AssignStreams (ueDevs, stream);
275 
276  // Tests
277  NS_ASSERT (m_ueSetupList.size () == ueDevs.GetN ());
279  for (itSetup = m_ueSetupList.begin (), itDev = ueDevs.Begin ();
280  itSetup != m_ueSetupList.end () || itDev != ueDevs.End ();
281  itSetup++, itDev++)
282  {
283  Ptr<LteUeNetDevice> ueDev = (*itDev)->GetObject<LteUeNetDevice> ();
284  }
285 
286  if (m_isEpcMode)
287  {
288  // Create P-GW node
289  Ptr<Node> pgw = epcHelper->GetPgwNode ();
290 
291  // Create a single RemoteHost
292  NodeContainer remoteHostContainer;
293  remoteHostContainer.Create (1);
294  Ptr<Node> remoteHost = remoteHostContainer.Get (0);
295  InternetStackHelper internet;
296  internet.Install (remoteHostContainer);
297 
298  // Create the Internet
299  PointToPointHelper p2ph;
300  p2ph.SetDeviceAttribute ("DataRate", DataRateValue (DataRate ("100Gb/s")));
301  p2ph.SetDeviceAttribute ("Mtu", UintegerValue (1500));
302  p2ph.SetChannelAttribute ("Delay", TimeValue (Seconds (0.010)));
303  NetDeviceContainer internetDevices = p2ph.Install (pgw, remoteHost);
304  Ipv4AddressHelper ipv4h;
305  ipv4h.SetBase ("1.0.0.0", "255.0.0.0");
306  Ipv4InterfaceContainer internetIpIfaces = ipv4h.Assign (internetDevices);
307 
308  // Routing of the Internet Host (towards the LTE network)
309  Ipv4StaticRoutingHelper ipv4RoutingHelper;
310  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
311  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1);
312 
313  // Install the IP stack on the UEs
314  internet.Install (ueNodes);
315  Ipv4InterfaceContainer ueIpIfaces;
316  ueIpIfaces = epcHelper->AssignUeIpv4Address (NetDeviceContainer (ueDevs));
317 
318  // Assign IP address to UEs
319  for (uint32_t u = 0; u < ueNodes.GetN (); ++u)
320  {
321  Ptr<Node> ueNode = ueNodes.Get (u);
322  // Set the default gateway for the UE
323  Ptr<Ipv4StaticRouting> ueStaticRouting = ipv4RoutingHelper.GetStaticRouting (ueNode->GetObject<Ipv4> ());
324  ueStaticRouting->SetDefaultRoute (epcHelper->GetUeDefaultGatewayAddress (), 1);
325  }
326 
327  } // end of if (m_isEpcMode)
328  else
329  {
330  NS_FATAL_ERROR ("No support yet for LTE-only simulations");
331  }
332 
333  // Connect to trace sources in UEs
334  Config::Connect ("/NodeList/*/DeviceList/*/LteUeRrc/StateTransition",
336  this));
337  Config::Connect ("/NodeList/*/DeviceList/*/LteUeRrc/InitialCellSelectionEndOk",
339  this));
340  Config::Connect ("/NodeList/*/DeviceList/*/LteUeRrc/InitialCellSelectionEndError",
342  this));
343  Config::Connect ("/NodeList/*/DeviceList/*/LteUeRrc/ConnectionEstablished",
345  this));
346 
347  // Enable Idle mode cell selection
348  lteHelper->Attach (ueDevs);
349 
350  // Run simulation
351  Simulator::Stop (lastCheckPoint);
352  Simulator::Run ();
353 
354  NS_LOG_INFO ("Simulation ends");
355  Simulator::Destroy ();
356 
357 } // end of void LteCellSelectionTestCase::DoRun ()
358 
359 
360 void
362  uint16_t expectedCellId1,
363  uint16_t expectedCellId2)
364 {
365  uint16_t actualCellId = ueDev->GetRrc ()->GetCellId ();
366 
367  if (expectedCellId2 == 0)
368  {
369  NS_TEST_ASSERT_MSG_EQ (actualCellId, expectedCellId1,
370  "IMSI " << ueDev->GetImsi ()
371  << " has attached to an unexpected cell");
372  }
373  else
374  {
375  bool pass = (actualCellId == expectedCellId1) ||
376  (actualCellId == expectedCellId2);
377  NS_TEST_ASSERT_MSG_EQ (pass, true,
378  "IMSI " << ueDev->GetImsi ()
379  << " has attached to an unexpected cell"
380  << " (actual: " << actualCellId << ","
381  << " expected: " << expectedCellId1
382  << " or " << expectedCellId2 << ")");
383  }
384 
385  if (expectedCellId1 > 0)
386  {
387  NS_TEST_ASSERT_MSG_EQ (m_lastState.at (static_cast<unsigned int>(ueDev->GetImsi () - 1)),
388  LteUeRrc::CONNECTED_NORMALLY,
389  "UE " << ueDev->GetImsi ()
390  << " is not at CONNECTED_NORMALLY state");
391  }
392 }
393 
394 
395 void
397  std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti,
398  LteUeRrc::State oldState, LteUeRrc::State newState)
399 {
400  NS_LOG_FUNCTION (this << imsi << cellId << rnti << oldState << newState);
401  m_lastState.at (static_cast<unsigned int>(imsi - 1)) = newState;
402 }
403 
404 
405 void
407  std::string context, uint64_t imsi, uint16_t cellId)
408 {
409  NS_LOG_FUNCTION (this << imsi << cellId);
410 }
411 
412 
413 void
415  std::string context, uint64_t imsi, uint16_t cellId)
416 {
417  NS_LOG_FUNCTION (this << imsi << cellId);
418 }
419 
420 
421 void
423  std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti)
424 {
425  NS_LOG_FUNCTION (this << imsi << cellId << rnti);
426 }
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr<NetDevice> stored in this container at a given index.
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:102
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
AttributeValue implementation for Boolean.
Definition: boolean.h:36
NetDeviceContainer InstallEnbDevice(NodeContainer c)
Create a set of eNodeB devices.
Definition: lte-helper.cc:474
void InitialCellSelectionEndOkCallback(std::string context, uint64_t imsi, uint16_t cellId)
Initial cell selection end ok callback function.
holds a vector of std::pair of Ptr<Ipv4> and interface index.
void SetDefaultRoute(Ipv4Address nextHop, uint32_t interface, uint32_t metric=0)
Add a default route to the static routing table.
std::vector< Ptr< Node > >::const_iterator Iterator
Node container iterator.
Iterator End(void) const
Get an iterator which indicates past-the-last NetDevice in the container.
Hold variables of type string.
Definition: string.h:41
NetDeviceContainer Install(NodeContainer c)
a class to represent an Ipv4 address mask
Definition: ipv4-address.h:258
A set of input parameters for setting up a UE in the simulation.
A suite of tests to run.
Definition: test.h:1342
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
Definition: assert.h:67
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:957
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:202
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1022
aggregate IP/TCP/UDP functionality to existing Nodes.
void SetUeDeviceAttribute(std::string n, const AttributeValue &v)
Set an attribute for the UE devices (LteUeNetDevice) to be created.
Definition: lte-helper.cc:422
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Definition: log.h:278
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Definition: fatal-error.h:162
double m_interSiteDistance
inter site distance
Build a set of PointToPointNetDevice objects.
encapsulates test code
Definition: test.h:1155
Iterator End(void) const
Get an iterator which indicates past-the-last Node in the container.
int64_t AssignStreams(NetDeviceContainer c, int64_t stream)
Assign a fixed random variable stream number to the random variables used.
Definition: lte-helper.cc:1439
void InitialCellSelectionEndErrorCallback(std::string context, uint64_t imsi, uint16_t cellId)
Initial cell selection end error callback function.
void SetDeviceAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each NetDevice created by the helper.
mobility
Definition: third.py:101
Class for representing data rates.
Definition: data-rate.h:88
uint64_t GetImsi() const
Get the IMSI.
void CheckPoint(Ptr< LteUeNetDevice > ueDev, uint16_t expectedCellId1, uint16_t expectedCellId2)
Verifies if the given UE is attached to either of the given two cells and in a CONNECTED_NORMALLY sta...
UeSetup_t(double relPosX, double relPosY, bool isCsgMember, Time checkPoint, uint16_t expectedCellId1, uint16_t expectedCellId2)
UE test setup function.
AttributeValue implementation for Time.
Definition: nstime.h:1076
LteCellSelectionTestCase(std::string name, bool isEpcMode, bool isIdealRrc, double interSiteDistance, std::vector< UeSetup_t > ueSetupList, uint64_t rngRun)
Creates an instance of the initial cell selection test case.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
Definition: test.cc:299
Iterator Begin(void) const
Get an iterator which refers to the first NetDevice in the container.
void Add(NetDeviceContainer other)
Append the contents of another NetDeviceContainer to the end of this container.
Hold an unsigned integer type.
Definition: uinteger.h:44
Vector3D Vector
Definition: vector.h:217
#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:168
holds a vector of ns3::NetDevice pointers
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
Definition: callback.h:1489
void Connect(std::string path, const CallbackBase &cb)
Definition: config.cc:843
uint32_t GetN(void) const
Get the number of Ptr<Node> stored in this container.
Access to the IPv4 forwarding table, interfaces, and configuration.
Definition: ipv4.h:76
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
Definition: object.h:459
Testing the initial cell selection procedure by UE at IDLE state in the beginning of simulation...
virtual Ipv4Address GetUeDefaultGatewayAddress()
Every class exported by the ns3 library is enclosed in the ns3 namespace.
keep track of a set of node pointers.
static LteCellSelectionTestSuite g_lteCellSelectionTestSuite
void SetChannelAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each Channel created by the helper.
void Install(std::string nodeName) const
Aggregate implementations of the ns3::Ipv4, ns3::Ipv6, ns3::Udp, and ns3::Tcp classes onto the provid...
std::vector< UeSetup_t > m_ueSetupList
UE setup list.
NetDeviceContainer InstallUeDevice(NodeContainer c)
Create a set of UE devices.
Definition: lte-helper.cc:489
virtual Ipv4InterfaceContainer AssignUeIpv4Address(NetDeviceContainer ueDevices)
Assign IPv4 addresses to UE devices.
State
The states of the UE RRC entity.
Definition: lte-ue-rrc.h:103
Helper class used to assign positions and mobility models to nodes.
void AddNetworkRouteTo(Ipv4Address network, Ipv4Mask networkMask, Ipv4Address nextHop, uint32_t interface, uint32_t metric=0)
Add a network route to the static routing table.
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:40
virtual void DoRun()
Setup the simulation according to the configuration set by the class constructor, run it...
Ipv4InterfaceContainer Assign(const NetDeviceContainer &c)
Assign IP addresses to the net devices specified in the container based on the current network prefix...
std::string GetName(void) const
Definition: test.cc:370
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
bool m_isEpcMode
whether the LTE configuration in test is using EPC
void SetGlobal(std::string name, const AttributeValue &value)
Definition: config.cc:822
void ConnectionEstablishedCallback(std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti)
Connection established callback function.
Helper class that adds ns3::Ipv4StaticRouting objects.
AttributeValue implementation for DataRate.
Definition: data-rate.h:242
std::vector< Ptr< NetDevice > >::const_iterator Iterator
NetDevice container iterator.
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1014
uint32_t GetN(void) const
Get the number of Ptr<NetDevice> stored in this container.
void Add(Vector v)
Add a position to the list of positions.
Ptr< LteUeRrc > GetRrc() const
Get the RRC.
Ptr< Node > Get(uint32_t i) const
Get the Ptr<Node> stored in this container at a given index.
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
std::vector< LteUeRrc::State > m_lastState
The current UE RRC state.
Test suite for executing the cell selection test cases in without-EPC and with-EPC scenarios...
void SetAttribute(std::string name, const AttributeValue &value)
Set a single attribute, raising fatal errors if unsuccessful.
Definition: object-base.cc:185
bool m_isIdealRrc
whether the LTE is configured to use ideal RRC
Iterator Begin(void) const
Get an iterator which refers to the first Node in the container.
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...
void SetBase(Ipv4Address network, Ipv4Mask mask, Ipv4Address base="0.0.0.1")
Set the base network number, network mask and base address.
void StateTransitionCallback(std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti, LteUeRrc::State oldState, LteUeRrc::State newState)
State transition callback function.
void SetEnbDeviceAttribute(std::string n, const AttributeValue &v)
Set an attribute for the eNodeB devices (LteEnbNetDevice) to be created.
Definition: lte-helper.cc:400
The LteUeNetDevice class implements the UE net device.