A Discrete-Event Network Simulator
API
lte-rrc-protocol-ideal.cc
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2012 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: Nicola Baldo <nbaldo@cttc.es>
19  */
20 
21 #include <ns3/fatal-error.h>
22 #include <ns3/log.h>
23 #include <ns3/nstime.h>
24 #include <ns3/node-list.h>
25 #include <ns3/node.h>
26 #include <ns3/simulator.h>
27 
28 #include "lte-rrc-protocol-ideal.h"
29 #include "lte-ue-rrc.h"
30 #include "lte-enb-rrc.h"
31 #include "lte-enb-net-device.h"
32 #include "lte-ue-net-device.h"
33 
34 namespace ns3 {
35 
36 NS_LOG_COMPONENT_DEFINE ("LteRrcProtocolIdeal");
37 
43 static const Time RRC_IDEAL_MSG_DELAY = MilliSeconds (0);
45 
46 NS_OBJECT_ENSURE_REGISTERED (LteUeRrcProtocolIdeal);
47 
49  : m_ueRrcSapProvider (0),
50  m_enbRrcSapProvider (0)
51 {
53 }
54 
56 {
57 }
58 
59 void
61 {
62  NS_LOG_FUNCTION (this);
63  delete m_ueRrcSapUser;
64  m_rrc = 0;
65 }
66 
67 TypeId
69 {
70  static TypeId tid = TypeId ("ns3::LteUeRrcProtocolIdeal")
71  .SetParent<Object> ()
72  .SetGroupName("Lte")
73  .AddConstructor<LteUeRrcProtocolIdeal> ()
74  ;
75  return tid;
76 }
77 
78 void
80 {
82 }
83 
86 {
87  return m_ueRrcSapUser;
88 }
89 
90 void
92 {
93  m_rrc = rrc;
94 }
95 
96 void
98 {
99  NS_LOG_FUNCTION (this);
100  // We don't care about SRB0/SRB1 since we use ideal RRC messages.
101 }
102 
103 void
105 {
106  // initialize the RNTI and get the EnbLteRrcSapProvider for the
107  // eNB we are currently attached to
108  m_rnti = m_rrc->GetRnti ();
110 
114  m_rnti,
115  msg);
116 }
117 
118 void
120 {
124  m_rnti,
125  msg);
126 }
127 
128 void
130 {
131  // re-initialize the RNTI and get the EnbLteRrcSapProvider for the
132  // eNB we are currently attached to
133  m_rnti = m_rrc->GetRnti ();
135 
139  m_rnti,
140  msg);
141 }
142 
143 void
145 {
149  m_rnti,
150  msg);
151 }
152 
153 void
155 {
159  m_rnti,
160 msg);
161 }
162 
163 void
165 {
169  m_rnti,
170  msg);
171 }
172 
173 void
175 {
176  NS_LOG_FUNCTION (this);
177 
178  uint16_t cellId = m_rrc->GetCellId ();
179  // re-initialize the RNTI and get the EnbLteRrcSapProvider for the
180  // eNB we are currently attached to or attempting random access to
181  // a target eNB
182  m_rnti = m_rrc->GetRnti ();
183 
184  NS_LOG_DEBUG ("RNTI " << rnti
185  << " sending UE context remove request to cell id " << cellId);
186  NS_ABORT_MSG_IF (m_rnti != rnti, "RNTI mismatch");
187 
188  SetEnbRrcSapProvider (); //the provider has to be reset since the cell might have changed due to handover
189  //ideally informing eNB
192 }
193 
194 void
196 {
197  NS_LOG_FUNCTION (this);
198 
199  uint16_t cellId = m_rrc->GetCellId ();
200  NS_LOG_DEBUG ("RNTI " << m_rnti << " connected to cell " << cellId);
201 
202  // walk list of all nodes to get the peer eNB
203  Ptr<LteEnbNetDevice> enbDev;
204  NodeList::Iterator listEnd = NodeList::End ();
205  bool found = false;
206  for (NodeList::Iterator i = NodeList::Begin ();
207  (i != listEnd) && (!found);
208  ++i)
209  {
210  Ptr<Node> node = *i;
211  int nDevs = node->GetNDevices ();
212  for (int j = 0;
213  (j < nDevs) && (!found);
214  j++)
215  {
216  enbDev = node->GetDevice (j)->GetObject <LteEnbNetDevice> ();
217  if (enbDev == 0)
218  {
219  continue;
220  }
221  else
222  {
223  if (enbDev->HasCellId (cellId))
224  {
225  found = true;
226  break;
227  }
228  }
229  }
230  }
231  NS_ASSERT_MSG (found, " Unable to find eNB with CellId =" << cellId);
232  m_enbRrcSapProvider = enbDev->GetRrc ()->GetLteEnbRrcSapProvider ();
233  Ptr<LteEnbRrcProtocolIdeal> enbRrcProtocolIdeal = enbDev->GetRrc ()->GetObject<LteEnbRrcProtocolIdeal> ();
234  enbRrcProtocolIdeal->SetUeRrcSapProvider (m_rnti, m_ueRrcSapProvider);
235 }
236 
237 
239 
241  : m_enbRrcSapProvider (0)
242 {
243  NS_LOG_FUNCTION (this);
245 }
246 
248 {
249  NS_LOG_FUNCTION (this);
250 }
251 
252 void
254 {
255  NS_LOG_FUNCTION (this);
256  delete m_enbRrcSapUser;
257 }
258 
259 TypeId
261 {
262  static TypeId tid = TypeId ("ns3::LteEnbRrcProtocolIdeal")
263  .SetParent<Object> ()
264  .SetGroupName("Lte")
265  .AddConstructor<LteEnbRrcProtocolIdeal> ()
266  ;
267  return tid;
268 }
269 
270 void
272 {
274 }
275 
278 {
279  return m_enbRrcSapUser;
280 }
281 
282 void
284 {
285  m_cellId = cellId;
286 }
287 
290 {
291  std::map<uint16_t, LteUeRrcSapProvider*>::const_iterator it;
292  it = m_enbRrcSapProviderMap.find (rnti);
293  NS_ASSERT_MSG (it != m_enbRrcSapProviderMap.end (), "could not find RNTI = " << rnti);
294  return it->second;
295 }
296 
297 void
299 {
300  std::map<uint16_t, LteUeRrcSapProvider*>::iterator it;
301  it = m_enbRrcSapProviderMap.find (rnti);
302  NS_ASSERT_MSG (it != m_enbRrcSapProviderMap.end (), "Cell id " << m_cellId
303  << " could not find RNTI = " << rnti);
304  it->second = p;
305 }
306 
307 void
309 {
310  NS_LOG_FUNCTION (this << rnti);
311 
312  // // walk list of all nodes to get the peer UE RRC SAP Provider
313  // Ptr<LteUeRrc> ueRrc;
314  // NodeList::Iterator listEnd = NodeList::End ();
315  // bool found = false;
316  // for (NodeList::Iterator i = NodeList::Begin (); (i != listEnd) && (found == false); i++)
317  // {
318  // Ptr<Node> node = *i;
319  // int nDevs = node->GetNDevices ();
320  // for (int j = 0; j < nDevs; j++)
321  // {
322  // Ptr<LteUeNetDevice> ueDev = node->GetDevice (j)->GetObject <LteUeNetDevice> ();
323  // if (!ueDev)
324  // {
325  // continue;
326  // }
327  // else
328  // {
329  // ueRrc = ueDev->GetRrc ();
330  // if ((ueRrc->GetRnti () == rnti) && (ueRrc->GetCellId () == m_cellId))
331  // {
332  // found = true;
333  // break;
334  // }
335  // }
336  // }
337  // }
338  // NS_ASSERT_MSG (found , " Unable to find UE with RNTI=" << rnti << " cellId=" << m_cellId);
339  // m_enbRrcSapProviderMap[rnti] = ueRrc->GetLteUeRrcSapProvider ();
340 
341 
342  // just create empty entry, the UeRrcSapProvider will be set by the
343  // ue upon connection request or connection reconfiguration
344  // completed
345  m_enbRrcSapProviderMap[rnti] = 0;
346 
347 }
348 
349 void
351 {
352  NS_LOG_FUNCTION (this << rnti);
353  m_enbRrcSapProviderMap.erase (rnti);
354 }
355 
356 void
358 {
359  NS_LOG_FUNCTION (this << cellId);
360  // walk list of all nodes to get UEs with this cellId
361  Ptr<LteUeRrc> ueRrc;
362  for (NodeList::Iterator i = NodeList::Begin (); i != NodeList::End (); ++i)
363  {
364  Ptr<Node> node = *i;
365  int nDevs = node->GetNDevices ();
366  for (int j = 0; j < nDevs; ++j)
367  {
368  Ptr<LteUeNetDevice> ueDev = node->GetDevice (j)->GetObject <LteUeNetDevice> ();
369  if (ueDev != 0)
370  {
371  Ptr<LteUeRrc> ueRrc = ueDev->GetRrc ();
372  NS_LOG_LOGIC ("considering UE IMSI " << ueDev->GetImsi () << " that has cellId " << ueRrc->GetCellId ());
373  if (ueRrc->GetCellId () == cellId)
374  {
375  NS_LOG_LOGIC ("sending SI to IMSI " << ueDev->GetImsi ());
376  ueRrc->GetLteUeRrcSapProvider ()->RecvSystemInformation (msg);
379  ueRrc->GetLteUeRrcSapProvider (),
380  msg);
381  }
382  }
383  }
384  }
385 }
386 
387 void
389 {
392  GetUeRrcSapProvider (rnti),
393  msg);
394 }
395 
396 void
398 {
401  GetUeRrcSapProvider (rnti),
402  msg);
403 }
404 
405 void
407 {
410  GetUeRrcSapProvider (rnti),
411  msg);
412 }
413 
414 void
416 {
419  GetUeRrcSapProvider (rnti),
420  msg);
421 }
422 
423 void
425 {
428  GetUeRrcSapProvider (rnti),
429  msg);
430 }
431 
432 void
434 {
437  GetUeRrcSapProvider (rnti),
438  msg);
439 }
440 
441 /*
442  * The purpose of LteEnbRrcProtocolIdeal is to avoid encoding
443  * messages. In order to do so, we need to have some form of encoding for
444  * inter-node RRC messages like HandoverPreparationInfo and HandoverCommand. Doing so
445  * directly is not practical (these messages includes a lot of
446  * information elements, so encoding all of them would defeat the
447  * purpose of LteEnbRrcProtocolIdeal. The workaround is to store the
448  * actual message in a global map, so that then we can just encode the
449  * key in a header and send that between eNBs over X2.
450  *
451  */
452 
453 static std::map<uint32_t, LteRrcSap::HandoverPreparationInfo> g_handoverPreparationInfoMsgMap;
455 
462 {
463 public:
469  uint32_t GetMsgId ();
475  void SetMsgId (uint32_t id);
480  static TypeId GetTypeId (void);
481  virtual TypeId GetInstanceTypeId (void) const;
482  virtual void Print (std::ostream &os) const;
483  virtual uint32_t GetSerializedSize (void) const;
484  virtual void Serialize (Buffer::Iterator start) const;
485  virtual uint32_t Deserialize (Buffer::Iterator start);
486 
487 private:
488  uint32_t m_msgId;
489 };
490 
491 uint32_t
493 {
494  return m_msgId;
495 }
496 
497 void
499 {
500  m_msgId = id;
501 }
502 
503 
504 TypeId
506 {
507  static TypeId tid = TypeId ("ns3::IdealHandoverPreparationInfoHeader")
508  .SetParent<Header> ()
509  .SetGroupName("Lte")
510  .AddConstructor<IdealHandoverPreparationInfoHeader> ()
511  ;
512  return tid;
513 }
514 
515 TypeId
517 {
518  return GetTypeId ();
519 }
520 
521 void IdealHandoverPreparationInfoHeader::Print (std::ostream &os) const
522 {
523  os << " msgId=" << m_msgId;
524 }
525 
527 {
528  return 4;
529 }
530 
532 {
533  start.WriteU32 (m_msgId);
534 }
535 
537 {
538  m_msgId = start.ReadU32 ();
539  return GetSerializedSize ();
540 }
541 
542 
543 
546 {
547  uint32_t msgId = ++g_handoverPreparationInfoMsgIdCounter;
548  NS_ASSERT_MSG (g_handoverPreparationInfoMsgMap.find (msgId) == g_handoverPreparationInfoMsgMap.end (), "msgId " << msgId << " already in use");
549  NS_LOG_INFO (" encoding msgId = " << msgId);
550  g_handoverPreparationInfoMsgMap.insert (std::pair<uint32_t, LteRrcSap::HandoverPreparationInfo> (msgId, msg));
552  h.SetMsgId (msgId);
553  Ptr<Packet> p = Create<Packet> ();
554  p->AddHeader (h);
555  return p;
556 }
557 
560 {
562  p->RemoveHeader (h);
563  uint32_t msgId = h.GetMsgId ();
564  NS_LOG_INFO (" decoding msgId = " << msgId);
565  std::map<uint32_t, LteRrcSap::HandoverPreparationInfo>::iterator it = g_handoverPreparationInfoMsgMap.find (msgId);
566  NS_ASSERT_MSG (it != g_handoverPreparationInfoMsgMap.end (), "msgId " << msgId << " not found");
567  LteRrcSap::HandoverPreparationInfo msg = it->second;
569  return msg;
570 }
571 
572 
573 
574 static std::map<uint32_t, LteRrcSap::RrcConnectionReconfiguration> g_handoverCommandMsgMap;
575 static uint32_t g_handoverCommandMsgIdCounter = 0;
576 
583 {
584 public:
590  uint32_t GetMsgId ();
596  void SetMsgId (uint32_t id);
601  static TypeId GetTypeId (void);
602  virtual TypeId GetInstanceTypeId (void) const;
603  virtual void Print (std::ostream &os) const;
604  virtual uint32_t GetSerializedSize (void) const;
605  virtual void Serialize (Buffer::Iterator start) const;
606  virtual uint32_t Deserialize (Buffer::Iterator start);
607 
608 private:
609  uint32_t m_msgId;
610 };
611 
612 uint32_t
614 {
615  return m_msgId;
616 }
617 
618 void
620 {
621  m_msgId = id;
622 }
623 
624 
625 TypeId
627 {
628  static TypeId tid = TypeId ("ns3::IdealHandoverCommandHeader")
629  .SetParent<Header> ()
630  .SetGroupName("Lte")
631  .AddConstructor<IdealHandoverCommandHeader> ()
632  ;
633  return tid;
634 }
635 
636 TypeId
638 {
639  return GetTypeId ();
640 }
641 
642 void IdealHandoverCommandHeader::Print (std::ostream &os) const
643 {
644  os << " msgId=" << m_msgId;
645 }
646 
648 {
649  return 4;
650 }
651 
653 {
654  start.WriteU32 (m_msgId);
655 }
656 
658 {
659  m_msgId = start.ReadU32 ();
660  return GetSerializedSize ();
661 }
662 
663 
664 
667 {
668  uint32_t msgId = ++g_handoverCommandMsgIdCounter;
669  NS_ASSERT_MSG (g_handoverCommandMsgMap.find (msgId) == g_handoverCommandMsgMap.end (), "msgId " << msgId << " already in use");
670  NS_LOG_INFO (" encoding msgId = " << msgId);
671  g_handoverCommandMsgMap.insert (std::pair<uint32_t, LteRrcSap::RrcConnectionReconfiguration> (msgId, msg));
673  h.SetMsgId (msgId);
674  Ptr<Packet> p = Create<Packet> ();
675  p->AddHeader (h);
676  return p;
677 }
678 
681 {
683  p->RemoveHeader (h);
684  uint32_t msgId = h.GetMsgId ();
685  NS_LOG_INFO (" decoding msgId = " << msgId);
686  std::map<uint32_t, LteRrcSap::RrcConnectionReconfiguration>::iterator it = g_handoverCommandMsgMap.find (msgId);
687  NS_ASSERT_MSG (it != g_handoverCommandMsgMap.end (), "msgId " << msgId << " not found");
689  g_handoverCommandMsgMap.erase (it);
690  return msg;
691 }
692 
693 
694 
695 
696 
697 } // namespace ns3
ns3::TypeId
a unique identifier for an interface.
Definition: type-id.h:59
NS_LOG_COMPONENT_DEFINE
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:205
lte-ue-net-device.h
ns3::LteEnbRrcProtocolIdeal::DoSendRrcConnectionReestablishmentReject
void DoSendRrcConnectionReestablishmentReject(uint16_t rnti, LteRrcSap::RrcConnectionReestablishmentReject msg)
Send RRC connection reestablishment reject function.
Definition: lte-rrc-protocol-ideal.cc:415
ns3::LteUeRrcProtocolIdeal::DoSendRrcConnectionReestablishmentRequest
void DoSendRrcConnectionReestablishmentRequest(LteRrcSap::RrcConnectionReestablishmentRequest msg)
Send RRC connection reestablishment request function.
Definition: lte-rrc-protocol-ideal.cc:144
NS_OBJECT_ENSURE_REGISTERED
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition: object-base.h:45
ns3::LteEnbRrcSapUser::SetupUeParameters
SetupUeParameters structure.
Definition: lte-rrc-sap.h:1086
ns3::LteRrcSap::RrcConnectionSetupCompleted
RrcConnectionSetupCompleted structure.
Definition: lte-rrc-sap.h:706
ns3::LteUeRrcSapProvider::RecvRrcConnectionReestablishmentReject
virtual void RecvRrcConnectionReestablishmentReject(RrcConnectionReestablishmentReject msg)=0
Receive an RRCConnectionReestablishmentReject message from the serving eNodeB during an RRC connectio...
ns3::LteEnbRrcSapProvider::RecvRrcConnectionSetupCompleted
virtual void RecvRrcConnectionSetupCompleted(uint16_t rnti, RrcConnectionSetupCompleted msg)=0
Receive an RRCConnectionSetupComplete message from a UE during an RRC connection establishment proced...
ns3::IdealHandoverCommandHeader::GetInstanceTypeId
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition: lte-rrc-protocol-ideal.cc:637
ns3::NodeList::Begin
static Iterator Begin(void)
Definition: node-list.cc:229
ns3::LteRrcSap::RrcConnectionRelease
RrcConnectionRelease structure.
Definition: lte-rrc-sap.h:884
ns3::LteEnbRrcProtocolIdeal::LteEnbRrcProtocolIdeal
LteEnbRrcProtocolIdeal()
Definition: lte-rrc-protocol-ideal.cc:240
ns3::IdealHandoverPreparationInfoHeader::GetMsgId
uint32_t GetMsgId()
Get the message ID function.
Definition: lte-rrc-protocol-ideal.cc:492
ns3::Packet::AddHeader
void AddHeader(const Header &header)
Add header to this packet.
Definition: packet.cc:256
ns3::LteUeRrcSapProvider
Part of the RRC protocol.
Definition: lte-rrc-sap.h:1001
ns3::LteUeRrcSapProvider::RecvSystemInformation
virtual void RecvSystemInformation(SystemInformation msg)=0
Receive a SystemInformation message from the serving eNodeB during a system information acquisition p...
ns3::LteUeRrcProtocolIdeal::DoSendRrcConnectionRequest
void DoSendRrcConnectionRequest(LteRrcSap::RrcConnectionRequest msg)
Send RRC connection request function.
Definition: lte-rrc-protocol-ideal.cc:104
ns3::LteUeRrcSapUser
Part of the RRC protocol.
Definition: lte-rrc-sap.h:917
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::LteRrcSap::SystemInformation
SystemInformation structure.
Definition: lte-rrc-sap.h:609
ns3::LteEnbRrcProtocolIdeal::~LteEnbRrcProtocolIdeal
virtual ~LteEnbRrcProtocolIdeal()
Definition: lte-rrc-protocol-ideal.cc:247
ns3::g_handoverCommandMsgIdCounter
static uint32_t g_handoverCommandMsgIdCounter
handover command message ID counter
Definition: lte-rrc-protocol-ideal.cc:575
ns3::Object::GetObject
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
Definition: object.h:470
ns3::LteEnbRrcProtocolIdeal::DoDispose
virtual void DoDispose(void)
Destructor implementation.
Definition: lte-rrc-protocol-ideal.cc:253
ns3::g_handoverPreparationInfoMsgIdCounter
static uint32_t g_handoverPreparationInfoMsgIdCounter
handover preparation info message ID counter
Definition: lte-rrc-protocol-ideal.cc:454
ns3::LteUeRrcProtocolIdeal::DoSendRrcConnectionReestablishmentComplete
void DoSendRrcConnectionReestablishmentComplete(LteRrcSap::RrcConnectionReestablishmentComplete msg)
Send RRC connection reestablishment complete function.
Definition: lte-rrc-protocol-ideal.cc:154
ns3::LteUeRrcProtocolIdeal::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition: lte-rrc-protocol-ideal.cc:68
ns3::LteUeRrcProtocolIdeal::SetUeRrc
void SetUeRrc(Ptr< LteUeRrc > rrc)
Set LTE UE RRC function.
Definition: lte-rrc-protocol-ideal.cc:91
ns3::LteUeRrcSapProvider::RecvRrcConnectionReestablishment
virtual void RecvRrcConnectionReestablishment(RrcConnectionReestablishment msg)=0
Receive an RRCConnectionReestablishment message from the serving eNodeB during an RRC connection re-e...
ns3::LteRrcSap::RrcConnectionReconfigurationCompleted
RrcConnectionReconfigurationCompleted structure.
Definition: lte-rrc-sap.h:852
lte-rrc-protocol-ideal.h
ns3::LteRrcSap::RrcConnectionReject
RrcConnectionReject structure.
Definition: lte-rrc-sap.h:890
ns3::LteRrcSap::HandoverPreparationInfo
HandoverPreparationInfo structure.
Definition: lte-rrc-sap.h:896
ns3::IdealHandoverCommandHeader::SetMsgId
void SetMsgId(uint32_t id)
Set the message ID function.
Definition: lte-rrc-protocol-ideal.cc:619
ns3::LteRrcSap::RrcConnectionSetup
RrcConnectionSetup structure.
Definition: lte-rrc-sap.h:699
ns3::Simulator::Schedule
static EventId Schedule(Time const &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
Definition: simulator.h:557
ns3::LteEnbRrcSapProvider::RecvRrcConnectionReestablishmentComplete
virtual void RecvRrcConnectionReestablishmentComplete(uint16_t rnti, RrcConnectionReestablishmentComplete msg)=0
Receive an RRCConnectionReestablishmentComplete message from a UE during an RRC connection re-establi...
ns3::IdealHandoverCommandHeader::m_msgId
uint32_t m_msgId
message ID
Definition: lte-rrc-protocol-ideal.cc:609
ns3::LteEnbRrcProtocolIdeal::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition: lte-rrc-protocol-ideal.cc:260
ns3::TypeId::SetParent
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:923
ns3::LteUeRrcSapProvider::RecvRrcConnectionSetup
virtual void RecvRrcConnectionSetup(RrcConnectionSetup msg)=0
Receive an RRCConnectionSetup message from the serving eNodeB during an RRC connection establishment ...
ns3::IdealHandoverCommandHeader::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition: lte-rrc-protocol-ideal.cc:626
ns3::IdealHandoverPreparationInfoHeader
This header encodes the map key discussed above.
Definition: lte-rrc-protocol-ideal.cc:462
ns3::IdealHandoverCommandHeader::Serialize
virtual void Serialize(Buffer::Iterator start) const
Definition: lte-rrc-protocol-ideal.cc:652
ns3::LteUeRrcProtocolIdeal::DoSendRrcConnectionReconfigurationCompleted
void DoSendRrcConnectionReconfigurationCompleted(LteRrcSap::RrcConnectionReconfigurationCompleted msg)
Send RRC connection reconfiguration completed function.
Definition: lte-rrc-protocol-ideal.cc:129
ns3::LteEnbNetDevice::GetRrc
Ptr< LteEnbRrc > GetRrc() const
Definition: lte-enb-net-device.cc:212
ns3::LteEnbRrcSapProvider::RecvRrcConnectionReconfigurationCompleted
virtual void RecvRrcConnectionReconfigurationCompleted(uint16_t rnti, RrcConnectionReconfigurationCompleted msg)=0
Receive an RRCConnectionReconfigurationComplete message from a UE during an RRC connection reconfigur...
ns3::LteEnbRrcSapProvider::RecvRrcConnectionReestablishmentRequest
virtual void RecvRrcConnectionReestablishmentRequest(uint16_t rnti, RrcConnectionReestablishmentRequest msg)=0
Receive an RRCConnectionReestablishmentRequest message from a UE during an RRC connection re-establis...
ns3::LteUeRrcProtocolIdeal::DoSetup
void DoSetup(LteUeRrcSapUser::SetupParameters params)
Setup function.
Definition: lte-rrc-protocol-ideal.cc:97
ns3::IdealHandoverPreparationInfoHeader::m_msgId
uint32_t m_msgId
message ID
Definition: lte-rrc-protocol-ideal.cc:488
ns3::LteUeRrcProtocolIdeal::m_ueRrcSapProvider
LteUeRrcSapProvider * m_ueRrcSapProvider
the UE RRC SAP provider
Definition: lte-rrc-protocol-ideal.h:149
ns3::LteUeRrcProtocolIdeal::DoSendIdealUeContextRemoveRequest
void DoSendIdealUeContextRemoveRequest(uint16_t rnti)
Send Ideal UE context remove request function.
Definition: lte-rrc-protocol-ideal.cc:174
ns3::LteEnbRrcProtocolIdeal::DoSendSystemInformation
void DoSendSystemInformation(uint16_t cellId, LteRrcSap::SystemInformation msg)
Send system information function.
Definition: lte-rrc-protocol-ideal.cc:357
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:74
ns3::LteEnbRrcProtocolIdeal::DoDecodeHandoverCommand
LteRrcSap::RrcConnectionReconfiguration DoDecodeHandoverCommand(Ptr< Packet > p)
Decode handover command function.
Definition: lte-rrc-protocol-ideal.cc:680
visualizer.core.start
def start()
Definition: core.py:1855
ns3::IdealHandoverCommandHeader::GetMsgId
uint32_t GetMsgId()
Get the message ID function.
Definition: lte-rrc-protocol-ideal.cc:613
ns3::LteUeRrcProtocolIdeal::DoSendRrcConnectionSetupCompleted
void DoSendRrcConnectionSetupCompleted(LteRrcSap::RrcConnectionSetupCompleted msg)
Send RRC connection setup completed function.
Definition: lte-rrc-protocol-ideal.cc:119
ns3::LteUeRrcSapProvider::RecvRrcConnectionRelease
virtual void RecvRrcConnectionRelease(RrcConnectionRelease msg)=0
Receive an RRCConnectionRelease message from the serving eNodeB during an RRC connection release proc...
ns3::NodeList::Iterator
std::vector< Ptr< Node > >::const_iterator Iterator
Node container iterator.
Definition: node-list.h:44
ns3::LteUeRrcProtocolIdeal
Models the transmission of RRC messages from the UE to the eNB in an ideal fashion,...
Definition: lte-rrc-protocol-ideal.h:49
ns3::Object
A base class which provides memory management and object aggregation.
Definition: object.h:88
ns3::LteRrcSap::RrcConnectionRequest
RrcConnectionRequest structure.
Definition: lte-rrc-sap.h:693
ns3::LteRrcSap::RrcConnectionReestablishmentReject
RrcConnectionReestablishmentReject structure.
Definition: lte-rrc-sap.h:879
ns3::LteEnbRrcSapProvider::RecvIdealUeContextRemoveRequest
virtual void RecvIdealUeContextRemoveRequest(uint16_t rnti)=0
Receive ideal UE context remove request from the UE RRC.
ns3::LteEnbRrcProtocolIdeal::SetCellId
void SetCellId(uint16_t cellId)
Set the cell ID function.
Definition: lte-rrc-protocol-ideal.cc:283
NS_LOG_INFO
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Definition: log.h:281
ns3::LteEnbRrcProtocolIdeal::MemberLteEnbRrcSapUser< LteEnbRrcProtocolIdeal >
friend class MemberLteEnbRrcSapUser< LteEnbRrcProtocolIdeal >
allow MemberLteEnbRrcSapUser<LteEnbRrcProtocolIdeal> class friend access
Definition: lte-rrc-protocol-ideal.h:165
ns3::LteEnbRrcProtocolIdeal::DoSendRrcConnectionRelease
void DoSendRrcConnectionRelease(uint16_t rnti, LteRrcSap::RrcConnectionRelease msg)
Send RRC connection release function.
Definition: lte-rrc-protocol-ideal.cc:424
ns3::MilliSeconds
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1297
ns3::Packet::RemoveHeader
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer.
Definition: packet.cc:280
ns3::Node::GetDevice
Ptr< NetDevice > GetDevice(uint32_t index) const
Retrieve the index-th NetDevice associated to this node.
Definition: node.cc:144
ns3::LteUeNetDevice
The LteUeNetDevice class implements the UE net device.
Definition: lte-ue-net-device.h:57
ns3::LteUeRrcProtocolIdeal::m_rnti
uint16_t m_rnti
the RNTI
Definition: lte-rrc-protocol-ideal.h:148
ns3::LteEnbRrcSapProvider::RecvMeasurementReport
virtual void RecvMeasurementReport(uint16_t rnti, MeasurementReport msg)=0
Receive a MeasurementReport message from a UE during a measurement reporting procedure (Section 5....
ns3::IdealHandoverCommandHeader::GetSerializedSize
virtual uint32_t GetSerializedSize(void) const
Definition: lte-rrc-protocol-ideal.cc:647
ns3::IdealHandoverPreparationInfoHeader::SetMsgId
void SetMsgId(uint32_t id)
Set the message ID function.
Definition: lte-rrc-protocol-ideal.cc:498
ns3::Header
Protocol header serialization and deserialization.
Definition: header.h:43
ns3::IdealHandoverPreparationInfoHeader::GetInstanceTypeId
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition: lte-rrc-protocol-ideal.cc:516
ns3::LteEnbRrcProtocolIdeal::m_cellId
uint16_t m_cellId
the cell ID
Definition: lte-rrc-protocol-ideal.h:317
ns3::LteEnbRrcProtocolIdeal::DoSendRrcConnectionSetup
void DoSendRrcConnectionSetup(uint16_t rnti, LteRrcSap::RrcConnectionSetup msg)
Send RRC connection setup function.
Definition: lte-rrc-protocol-ideal.cc:388
ns3::LteUeRrcProtocolIdeal::GetLteUeRrcSapUser
LteUeRrcSapUser * GetLteUeRrcSapUser()
Get LTE UE RRC SAP user function.
Definition: lte-rrc-protocol-ideal.cc:85
NS_ABORT_MSG_IF
#define NS_ABORT_MSG_IF(cond, msg)
Abnormal program termination if a condition is true, with a message.
Definition: abort.h:108
ns3::LteUeRrcSapProvider::RecvRrcConnectionReject
virtual void RecvRrcConnectionReject(RrcConnectionReject msg)=0
Receive an RRCConnectionReject message from the serving eNodeB during an RRC connection establishment...
ns3::LteRrcSap::RrcConnectionReestablishment
RrcConnectionReestablishment structure.
Definition: lte-rrc-sap.h:866
ns3::IdealHandoverPreparationInfoHeader::Print
virtual void Print(std::ostream &os) const
Definition: lte-rrc-protocol-ideal.cc:521
ns3::LteEnbRrcSapProvider
Part of the RRC protocol.
Definition: lte-rrc-sap.h:1201
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::LteEnbRrcProtocolIdeal::DoDecodeHandoverPreparationInformation
LteRrcSap::HandoverPreparationInfo DoDecodeHandoverPreparationInformation(Ptr< Packet > p)
Encode handover preparation information function.
Definition: lte-rrc-protocol-ideal.cc:559
ns3::LteRrcSap::RrcConnectionReestablishmentRequest
RrcConnectionReestablishmentRequest structure.
Definition: lte-rrc-sap.h:859
lte-enb-net-device.h
ns3::LteRrcSap::MeasurementReport
MeasurementReport structure.
Definition: lte-rrc-sap.h:902
ns3::RRC_IDEAL_MSG_DELAY
static const Time RRC_IDEAL_MSG_DELAY
Definition: lte-rrc-protocol-ideal.cc:44
ns3::LteEnbRrcProtocolIdeal::m_enbRrcSapUser
LteEnbRrcSapUser * m_enbRrcSapUser
the ENB RRC SAP user
Definition: lte-rrc-protocol-ideal.h:319
ns3::LteEnbRrcProtocolIdeal::DoSendRrcConnectionReject
void DoSendRrcConnectionReject(uint16_t rnti, LteRrcSap::RrcConnectionReject msg)
Send RRC connection reject function.
Definition: lte-rrc-protocol-ideal.cc:433
ns3::Header::Deserialize
virtual uint32_t Deserialize(Buffer::Iterator start)=0
Deserialize the object from a buffer iterator.
NS_LOG_LOGIC
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
Definition: log.h:289
ns3::LteUeRrcProtocolIdeal::m_enbRrcSapProvider
LteEnbRrcSapProvider * m_enbRrcSapProvider
the ENB RRC SAP provider
Definition: lte-rrc-protocol-ideal.h:151
lte-enb-rrc.h
ns3::LteUeRrcProtocolIdeal::DoSendMeasurementReport
void DoSendMeasurementReport(LteRrcSap::MeasurementReport msg)
Send measurement report function.
Definition: lte-rrc-protocol-ideal.cc:164
ns3::g_handoverCommandMsgMap
static std::map< uint32_t, LteRrcSap::RrcConnectionReconfiguration > g_handoverCommandMsgMap
handover command message map
Definition: lte-rrc-protocol-ideal.cc:574
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition: buffer.h:99
ns3::IdealHandoverCommandHeader
This header encodes the map key discussed above.
Definition: lte-rrc-protocol-ideal.cc:583
ns3::LteUeRrcProtocolIdeal::m_rrc
Ptr< LteUeRrc > m_rrc
the RRC
Definition: lte-rrc-protocol-ideal.h:147
ns3::LteEnbRrcSapUser
Part of the RRC protocol.
Definition: lte-rrc-sap.h:1082
ns3::NodeList::End
static Iterator End(void)
Definition: node-list.cc:235
ns3::LteUeRrcProtocolIdeal::LteUeRrcProtocolIdeal
LteUeRrcProtocolIdeal()
Definition: lte-rrc-protocol-ideal.cc:48
ns3::LteEnbRrcProtocolIdeal::m_enbRrcSapProviderMap
std::map< uint16_t, LteUeRrcSapProvider * > m_enbRrcSapProviderMap
the LTE UE RRC SAP provider
Definition: lte-rrc-protocol-ideal.h:320
ns3::IdealHandoverPreparationInfoHeader::GetSerializedSize
virtual uint32_t GetSerializedSize(void) const
Definition: lte-rrc-protocol-ideal.cc:526
ns3::LteEnbRrcProtocolIdeal::DoEncodeHandoverPreparationInformation
Ptr< Packet > DoEncodeHandoverPreparationInformation(LteRrcSap::HandoverPreparationInfo msg)
Encode handover preparation information function.
Definition: lte-rrc-protocol-ideal.cc:545
ns3::IdealHandoverPreparationInfoHeader::Serialize
virtual void Serialize(Buffer::Iterator start) const
Definition: lte-rrc-protocol-ideal.cc:531
NS_LOG_DEBUG
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition: log.h:273
ns3::LteEnbRrcProtocolIdeal::SetUeRrcSapProvider
void SetUeRrcSapProvider(uint16_t rnti, LteUeRrcSapProvider *p)
Set UE RRC SAP provider function.
Definition: lte-rrc-protocol-ideal.cc:298
ns3::LteUeRrcSapUser::SetupParameters
SetupParameters structure.
Definition: lte-rrc-sap.h:921
ns3::LteUeRrcProtocolIdeal::SetEnbRrcSapProvider
void SetEnbRrcSapProvider()
Set ENB RRC SAP provider.
Definition: lte-rrc-protocol-ideal.cc:195
ns3::LteEnbRrcProtocolIdeal::GetUeRrcSapProvider
LteUeRrcSapProvider * GetUeRrcSapProvider(uint16_t rnti)
Get LTE UE RRC SAP provider function.
Definition: lte-rrc-protocol-ideal.cc:289
ns3::IdealHandoverCommandHeader::Print
virtual void Print(std::ostream &os) const
Definition: lte-rrc-protocol-ideal.cc:642
ns3::LteUeRrcProtocolIdeal::SetLteUeRrcSapProvider
void SetLteUeRrcSapProvider(LteUeRrcSapProvider *p)
Set LTE UE RRC SAP provider function.
Definition: lte-rrc-protocol-ideal.cc:79
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::LteRrcSap::RrcConnectionReconfiguration
RrcConnectionReconfiguration structure.
Definition: lte-rrc-sap.h:837
ns3::LteUeRrcProtocolIdeal::DoDispose
virtual void DoDispose(void)
Destructor implementation.
Definition: lte-rrc-protocol-ideal.cc:60
ns3::LteUeRrcProtocolIdeal::~LteUeRrcProtocolIdeal
virtual ~LteUeRrcProtocolIdeal()
Definition: lte-rrc-protocol-ideal.cc:55
ns3::LteEnbRrcProtocolIdeal::DoSendRrcConnectionReconfiguration
void DoSendRrcConnectionReconfiguration(uint16_t rnti, LteRrcSap::RrcConnectionReconfiguration msg)
Send RRC connection reconfiguration function.
Definition: lte-rrc-protocol-ideal.cc:397
ns3::LteEnbRrcProtocolIdeal
Models the transmission of RRC messages from the UE to the eNB in an ideal fashion,...
Definition: lte-rrc-protocol-ideal.h:163
ns3::TracedValueCallback::Time
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
Definition: nstime.h:813
ns3::LteUeRrcSapProvider::RecvRrcConnectionReconfiguration
virtual void RecvRrcConnectionReconfiguration(RrcConnectionReconfiguration msg)=0
Receive an RRCConnectionReconfiguration message from the serving eNodeB during an RRC connection reco...
ns3::LteEnbRrcProtocolIdeal::m_enbRrcSapProvider
LteEnbRrcSapProvider * m_enbRrcSapProvider
the ENB RRC SAP provider
Definition: lte-rrc-protocol-ideal.h:318
ns3::IdealHandoverPreparationInfoHeader::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition: lte-rrc-protocol-ideal.cc:505
ns3::LteUeRrcProtocolIdeal::MemberLteUeRrcSapUser< LteUeRrcProtocolIdeal >
friend class MemberLteUeRrcSapUser< LteUeRrcProtocolIdeal >
allow MemberLteUeRrcSapUser<LteUeRrcProtocolIdeal> class friend access
Definition: lte-rrc-protocol-ideal.h:51
ns3::Node::GetNDevices
uint32_t GetNDevices(void) const
Definition: node.cc:152
ns3::g_handoverPreparationInfoMsgMap
static std::map< uint32_t, LteRrcSap::HandoverPreparationInfo > g_handoverPreparationInfoMsgMap
handover preparation info message map
Definition: lte-rrc-protocol-ideal.cc:453
ns3::LteEnbRrcProtocolIdeal::GetLteEnbRrcSapUser
LteEnbRrcSapUser * GetLteEnbRrcSapUser()
Get LTE ENB RRC SAP user function.
Definition: lte-rrc-protocol-ideal.cc:277
ns3::LteEnbRrcSapProvider::RecvRrcConnectionRequest
virtual void RecvRrcConnectionRequest(uint16_t rnti, RrcConnectionRequest msg)=0
Receive an RRCConnectionRequest message from a UE during an RRC connection establishment procedure (S...
ns3::LteEnbNetDevice::HasCellId
bool HasCellId(uint16_t cellId) const
Definition: lte-enb-net-device.cc:230
ns3::LteRrcSap::RrcConnectionReestablishmentComplete
RrcConnectionReestablishmentComplete structure.
Definition: lte-rrc-sap.h:873
ns3::LteEnbRrcProtocolIdeal::DoEncodeHandoverCommand
Ptr< Packet > DoEncodeHandoverCommand(LteRrcSap::RrcConnectionReconfiguration msg)
Encode handover command function.
Definition: lte-rrc-protocol-ideal.cc:666
ns3::LteEnbNetDevice
The eNodeB device implementation.
Definition: lte-enb-net-device.h:57
ns3::LteUeRrcProtocolIdeal::m_ueRrcSapUser
LteUeRrcSapUser * m_ueRrcSapUser
the RRC SAP user
Definition: lte-rrc-protocol-ideal.h:150
lte-ue-rrc.h
ns3::LteEnbRrcProtocolIdeal::DoSendRrcConnectionReestablishment
void DoSendRrcConnectionReestablishment(uint16_t rnti, LteRrcSap::RrcConnectionReestablishment msg)
Send RRC connection reestablishment function.
Definition: lte-rrc-protocol-ideal.cc:406
ns3::LteEnbRrcProtocolIdeal::DoRemoveUe
void DoRemoveUe(uint16_t rnti)
Remove UE function.
Definition: lte-rrc-protocol-ideal.cc:350
ns3::LteEnbRrcProtocolIdeal::SetLteEnbRrcSapProvider
void SetLteEnbRrcSapProvider(LteEnbRrcSapProvider *p)
Set LTE ENB RRC SAP provider function.
Definition: lte-rrc-protocol-ideal.cc:271
ns3::LteEnbRrcProtocolIdeal::DoSetupUe
void DoSetupUe(uint16_t rnti, LteEnbRrcSapUser::SetupUeParameters params)
Setup UE function.
Definition: lte-rrc-protocol-ideal.cc:308