A Discrete-Event Network Simulator
API
lte-rrc-protocol-real.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  * Authors: Nicola Baldo <nbaldo@cttc.es>
19  * Lluis Parcerisa <lparcerisa@cttc.cat>
20  */
21 
22 #include <ns3/fatal-error.h>
23 #include <ns3/log.h>
24 #include <ns3/nstime.h>
25 #include <ns3/node-list.h>
26 #include <ns3/node.h>
27 #include <ns3/simulator.h>
28 
29 #include "lte-rrc-protocol-real.h"
30 #include "lte-ue-rrc.h"
31 #include "lte-enb-rrc.h"
32 #include "lte-enb-net-device.h"
33 #include "lte-ue-net-device.h"
34 
35 namespace ns3 {
36 
37 NS_LOG_COMPONENT_DEFINE ("LteRrcProtocolReal");
38 
41 
43 
45  : m_ueRrcSapProvider (0),
46  m_enbRrcSapProvider (0)
47 {
51 }
52 
54 {
55 }
56 
57 void
59 {
60  NS_LOG_FUNCTION (this);
61  delete m_ueRrcSapUser;
64  m_rrc = 0;
65 }
66 
67 TypeId
69 {
70  static TypeId tid = TypeId ("ns3::LteUeRrcProtocolReal")
71  .SetParent<Object> ()
72  .SetGroupName("Lte")
73  .AddConstructor<LteUeRrcProtocolReal> ()
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 
104 }
105 
106 void
108 {
109  // initialize the RNTI and get the EnbLteRrcSapProvider for the
110  // eNB we are currently attached to
111  m_rnti = m_rrc->GetRnti ();
113 
114  Ptr<Packet> packet = Create<Packet> ();
115 
116  RrcConnectionRequestHeader rrcConnectionRequestHeader;
117  rrcConnectionRequestHeader.SetMessage (msg);
118 
119  packet->AddHeader (rrcConnectionRequestHeader);
120 
121  LteRlcSapProvider::TransmitPdcpPduParameters transmitPdcpPduParameters;
122  transmitPdcpPduParameters.pdcpPdu = packet;
123  transmitPdcpPduParameters.rnti = m_rnti;
124  transmitPdcpPduParameters.lcid = 0;
125 
126  m_setupParameters.srb0SapProvider->TransmitPdcpPdu (transmitPdcpPduParameters);
127 }
128 
129 void
131 {
132  Ptr<Packet> packet = Create<Packet> ();
133 
134  RrcConnectionSetupCompleteHeader rrcConnectionSetupCompleteHeader;
135  rrcConnectionSetupCompleteHeader.SetMessage (msg);
136 
137  packet->AddHeader (rrcConnectionSetupCompleteHeader);
138 
139  LtePdcpSapProvider::TransmitPdcpSduParameters transmitPdcpSduParameters;
140  transmitPdcpSduParameters.pdcpSdu = packet;
141  transmitPdcpSduParameters.rnti = m_rnti;
142  transmitPdcpSduParameters.lcid = 1;
143 
145  {
146  m_setupParameters.srb1SapProvider->TransmitPdcpSdu (transmitPdcpSduParameters);
147  }
148 }
149 
150 void
152 {
153  // re-initialize the RNTI and get the EnbLteRrcSapProvider for the
154  // eNB we are currently attached to
155  m_rnti = m_rrc->GetRnti ();
157 
158  Ptr<Packet> packet = Create<Packet> ();
159 
160  RrcConnectionReconfigurationCompleteHeader rrcConnectionReconfigurationCompleteHeader;
161  rrcConnectionReconfigurationCompleteHeader.SetMessage (msg);
162 
163  packet->AddHeader (rrcConnectionReconfigurationCompleteHeader);
164 
165  LtePdcpSapProvider::TransmitPdcpSduParameters transmitPdcpSduParameters;
166  transmitPdcpSduParameters.pdcpSdu = packet;
167  transmitPdcpSduParameters.rnti = m_rnti;
168  transmitPdcpSduParameters.lcid = 1;
169 
170  m_setupParameters.srb1SapProvider->TransmitPdcpSdu (transmitPdcpSduParameters);
171 }
172 
173 void
175 {
176  // re-initialize the RNTI and get the EnbLteRrcSapProvider for the
177  // eNB we are currently attached to
178  m_rnti = m_rrc->GetRnti ();
180 
181  Ptr<Packet> packet = Create<Packet> ();
182 
183  MeasurementReportHeader measurementReportHeader;
184  measurementReportHeader.SetMessage (msg);
185 
186  packet->AddHeader (measurementReportHeader);
187 
188  LtePdcpSapProvider::TransmitPdcpSduParameters transmitPdcpSduParameters;
189  transmitPdcpSduParameters.pdcpSdu = packet;
190  transmitPdcpSduParameters.rnti = m_rnti;
191  transmitPdcpSduParameters.lcid = 1;
192 
193  m_setupParameters.srb1SapProvider->TransmitPdcpSdu (transmitPdcpSduParameters);
194 }
195 
196 void
198 {
199  NS_LOG_FUNCTION(this<<rnti);
200  uint16_t cellId = m_rrc->GetCellId ();
201  // re-initialize the RNTI and get the EnbLteRrcSapProvider for the
202  // eNB we are currently attached to or attempting random access to
203  // a target eNB
204  m_rnti = m_rrc->GetRnti ();
205 
206  NS_LOG_DEBUG ("RNTI " << rnti
207  << " sending UE context remove request to cell id " << cellId);
208  NS_ABORT_MSG_IF (m_rnti != rnti, "RNTI mismatch");
209 
210  SetEnbRrcSapProvider (); //the provider has to be reset since the cell might
211  // have changed due to handover
212  //ideally informing eNB
214  m_enbRrcSapProvider, rnti);
215 }
216 
217 void
219 {
220  Ptr<Packet> packet = Create<Packet> ();
221 
222  RrcConnectionReestablishmentRequestHeader rrcConnectionReestablishmentRequestHeader;
223  rrcConnectionReestablishmentRequestHeader.SetMessage (msg);
224 
225  packet->AddHeader (rrcConnectionReestablishmentRequestHeader);
226 
227  LteRlcSapProvider::TransmitPdcpPduParameters transmitPdcpPduParameters;
228  transmitPdcpPduParameters.pdcpPdu = packet;
229  transmitPdcpPduParameters.rnti = m_rnti;
230  transmitPdcpPduParameters.lcid = 0;
231 
232  m_setupParameters.srb0SapProvider->TransmitPdcpPdu (transmitPdcpPduParameters);
233 }
234 
235 void
237 {
238  Ptr<Packet> packet = Create<Packet> ();
239 
240  RrcConnectionReestablishmentCompleteHeader rrcConnectionReestablishmentCompleteHeader;
241  rrcConnectionReestablishmentCompleteHeader.SetMessage (msg);
242 
243  packet->AddHeader (rrcConnectionReestablishmentCompleteHeader);
244 
245  LtePdcpSapProvider::TransmitPdcpSduParameters transmitPdcpSduParameters;
246  transmitPdcpSduParameters.pdcpSdu = packet;
247  transmitPdcpSduParameters.rnti = m_rnti;
248  transmitPdcpSduParameters.lcid = 1;
249 
250  m_setupParameters.srb1SapProvider->TransmitPdcpSdu (transmitPdcpSduParameters);
251 }
252 
253 
254 void
256 {
257  NS_LOG_FUNCTION (this);
258 
259  uint16_t cellId = m_rrc->GetCellId ();
260 
261  NS_LOG_DEBUG ("RNTI " << m_rnti << " connected to cell " << cellId);
262 
263  // walk list of all nodes to get the peer eNB
264  Ptr<LteEnbNetDevice> enbDev;
265  NodeList::Iterator listEnd = NodeList::End ();
266  bool found = false;
267  for (NodeList::Iterator i = NodeList::Begin ();
268  (i != listEnd) && (!found);
269  ++i)
270  {
271  Ptr<Node> node = *i;
272  int nDevs = node->GetNDevices ();
273  for (int j = 0;
274  (j < nDevs) && (!found);
275  j++)
276  {
277  enbDev = node->GetDevice (j)->GetObject <LteEnbNetDevice> ();
278  if (enbDev == 0)
279  {
280  continue;
281  }
282  else
283  {
284  if (enbDev->HasCellId (cellId))
285  {
286  found = true;
287  break;
288  }
289  }
290  }
291  }
292  NS_ASSERT_MSG (found, " Unable to find eNB with CellId =" << cellId);
293  m_enbRrcSapProvider = enbDev->GetRrc ()->GetLteEnbRrcSapProvider ();
294  Ptr<LteEnbRrcProtocolReal> enbRrcProtocolReal = enbDev->GetRrc ()->GetObject<LteEnbRrcProtocolReal> ();
295  enbRrcProtocolReal->SetUeRrcSapProvider (m_rnti, m_ueRrcSapProvider);
296 }
297 
298 void
300 {
301  // Get type of message received
302  RrcDlCcchMessage rrcDlCcchMessage;
303  p->PeekHeader (rrcDlCcchMessage);
304 
305  // Declare possible headers to receive
306  RrcConnectionReestablishmentHeader rrcConnectionReestablishmentHeader;
307  RrcConnectionReestablishmentRejectHeader rrcConnectionReestablishmentRejectHeader;
308  RrcConnectionSetupHeader rrcConnectionSetupHeader;
309  RrcConnectionRejectHeader rrcConnectionRejectHeader;
310 
311  // Declare possible messages
312  LteRrcSap::RrcConnectionReestablishment rrcConnectionReestablishmentMsg;
313  LteRrcSap::RrcConnectionReestablishmentReject rrcConnectionReestablishmentRejectMsg;
314  LteRrcSap::RrcConnectionSetup rrcConnectionSetupMsg;
315  LteRrcSap::RrcConnectionReject rrcConnectionRejectMsg;
316 
317  // Deserialize packet and call member recv function with appropriate structure
318  switch ( rrcDlCcchMessage.GetMessageType () )
319  {
320  case 0:
321  // RrcConnectionReestablishment
322  p->RemoveHeader (rrcConnectionReestablishmentHeader);
323  rrcConnectionReestablishmentMsg = rrcConnectionReestablishmentHeader.GetMessage ();
324  m_ueRrcSapProvider->RecvRrcConnectionReestablishment (rrcConnectionReestablishmentMsg);
325  break;
326  case 1:
327  // RrcConnectionReestablishmentReject
328  p->RemoveHeader (rrcConnectionReestablishmentRejectHeader);
329  rrcConnectionReestablishmentRejectMsg = rrcConnectionReestablishmentRejectHeader.GetMessage ();
330  // m_ueRrcSapProvider->RecvRrcConnectionReestablishmentReject (rrcConnectionReestablishmentRejectMsg);
331  break;
332  case 2:
333  // RrcConnectionReject
334  p->RemoveHeader (rrcConnectionRejectHeader);
335  rrcConnectionRejectMsg = rrcConnectionRejectHeader.GetMessage ();
336  m_ueRrcSapProvider->RecvRrcConnectionReject (rrcConnectionRejectMsg);
337  break;
338  case 3:
339  // RrcConnectionSetup
340  p->RemoveHeader (rrcConnectionSetupHeader);
341  rrcConnectionSetupMsg = rrcConnectionSetupHeader.GetMessage ();
342  m_ueRrcSapProvider->RecvRrcConnectionSetup (rrcConnectionSetupMsg);
343  break;
344  }
345 }
346 
347 void
349 {
350  // Get type of message received
351  RrcDlDcchMessage rrcDlDcchMessage;
352  params.pdcpSdu->PeekHeader (rrcDlDcchMessage);
353 
354  // Declare possible headers to receive
355  RrcConnectionReconfigurationHeader rrcConnectionReconfigurationHeader;
356  RrcConnectionReleaseHeader rrcConnectionReleaseHeader;
357 
358  // Declare possible messages to receive
359  LteRrcSap::RrcConnectionReconfiguration rrcConnectionReconfigurationMsg;
360  LteRrcSap::RrcConnectionRelease rrcConnectionReleaseMsg;
361 
362  // Deserialize packet and call member recv function with appropriate structure
363  switch ( rrcDlDcchMessage.GetMessageType () )
364  {
365  case 4:
366  params.pdcpSdu->RemoveHeader (rrcConnectionReconfigurationHeader);
367  rrcConnectionReconfigurationMsg = rrcConnectionReconfigurationHeader.GetMessage ();
368  m_ueRrcSapProvider->RecvRrcConnectionReconfiguration (rrcConnectionReconfigurationMsg);
369  break;
370  case 5:
371  params.pdcpSdu->RemoveHeader (rrcConnectionReleaseHeader);
372  rrcConnectionReleaseMsg = rrcConnectionReleaseHeader.GetMessage ();
373  //m_ueRrcSapProvider->RecvRrcConnectionRelease (rrcConnectionReleaseMsg);
374  break;
375  }
376 }
377 
379 
381  : m_enbRrcSapProvider (0)
382 {
383  NS_LOG_FUNCTION (this);
385 }
386 
388 {
389  NS_LOG_FUNCTION (this);
390 }
391 
392 void
394 {
395  NS_LOG_FUNCTION (this);
396  delete m_enbRrcSapUser;
397  for (std::map<uint16_t, LteEnbRrcSapProvider::CompleteSetupUeParameters>::iterator
398  it = m_completeSetupUeParametersMap.begin ();
399  it != m_completeSetupUeParametersMap.end ();
400  ++it)
401  {
402  delete it->second.srb0SapUser;
403  delete it->second.srb1SapUser;
404  }
406 }
407 
408 TypeId
410 {
411  static TypeId tid = TypeId ("ns3::LteEnbRrcProtocolReal")
412  .SetParent<Object> ()
413  .SetGroupName("Lte")
414  .AddConstructor<LteEnbRrcProtocolReal> ()
415  ;
416  return tid;
417 }
418 
419 void
421 {
423 }
424 
427 {
428  return m_enbRrcSapUser;
429 }
430 
431 void
433 {
434  m_cellId = cellId;
435 }
436 
439 {
440  std::map<uint16_t, LteUeRrcSapProvider*>::const_iterator it;
441  it = m_enbRrcSapProviderMap.find (rnti);
442  NS_ASSERT_MSG (it != m_enbRrcSapProviderMap.end (), "could not find RNTI = " << rnti);
443  return it->second;
444 }
445 
446 void
448 {
449  std::map<uint16_t, LteUeRrcSapProvider*>::iterator it;
450  it = m_enbRrcSapProviderMap.find (rnti);
451  // TODO: remove after merge of ho_failure branch
452  // assign UE RRC only if the RNTI is found at eNB
453  if (it != m_enbRrcSapProviderMap.end ())
454  {
455  it->second = p;
456  }
457 }
458 
459 void
461 {
462  NS_LOG_FUNCTION (this << rnti);
463 
464  // // walk list of all nodes to get the peer UE RRC SAP Provider
465  // Ptr<LteUeRrc> ueRrc;
466  // NodeList::Iterator listEnd = NodeList::End ();
467  // bool found = false;
468  // for (NodeList::Iterator i = NodeList::Begin (); (i != listEnd) && (found == false); i++)
469  // {
470  // Ptr<Node> node = *i;
471  // int nDevs = node->GetNDevices ();
472  // for (int j = 0; j < nDevs; j++)
473  // {
474  // Ptr<LteUeNetDevice> ueDev = node->GetDevice (j)->GetObject <LteUeNetDevice> ();
475  // if (!ueDev)
476  // {
477  // continue;
478  // }
479  // else
480  // {
481  // ueRrc = ueDev->GetRrc ();
482  // if ((ueRrc->GetRnti () == rnti) && (ueRrc->GetCellId () == m_cellId))
483  // {
484  // found = true;
485  // break;
486  // }
487  // }
488  // }
489  // }
490  // NS_ASSERT_MSG (found , " Unable to find UE with RNTI=" << rnti << " cellId=" << m_cellId);
491  // m_enbRrcSapProviderMap[rnti] = ueRrc->GetLteUeRrcSapProvider ();
492 
493  // just create empty entry, the UeRrcSapProvider will be set by the
494  // ue upon connection request or connection reconfiguration
495  // completed
496  m_enbRrcSapProviderMap[rnti] = 0;
497 
498  // Store SetupUeParameters
499  m_setupUeParametersMap[rnti] = params;
500 
501  LteEnbRrcSapProvider::CompleteSetupUeParameters completeSetupUeParameters;
502  std::map<uint16_t, LteEnbRrcSapProvider::CompleteSetupUeParameters>::iterator
503  csupIt = m_completeSetupUeParametersMap.find (rnti);
504  if (csupIt == m_completeSetupUeParametersMap.end ())
505  {
506  // Create LteRlcSapUser, LtePdcpSapUser
507  LteRlcSapUser* srb0SapUser = new RealProtocolRlcSapUser (this,rnti);
509  completeSetupUeParameters.srb0SapUser = srb0SapUser;
510  completeSetupUeParameters.srb1SapUser = srb1SapUser;
511  // Store LteRlcSapUser, LtePdcpSapUser
512  m_completeSetupUeParametersMap[rnti] = completeSetupUeParameters;
513  }
514  else
515  {
516  completeSetupUeParameters = csupIt->second;
517  }
518  m_enbRrcSapProvider->CompleteSetupUe (rnti, completeSetupUeParameters);
519 }
520 
521 void
523 {
524  NS_LOG_FUNCTION (this << rnti);
525  std::map<uint16_t, LteEnbRrcSapProvider::CompleteSetupUeParameters>::iterator
526  it = m_completeSetupUeParametersMap.find (rnti);
528  delete it->second.srb0SapUser;
529  delete it->second.srb1SapUser;
531  m_enbRrcSapProviderMap.erase (rnti);
532  m_setupUeParametersMap.erase (rnti);
533 }
534 
535 void
537 {
538  NS_LOG_FUNCTION (this << cellId);
539  // walk list of all nodes to get UEs with this cellId
540  Ptr<LteUeRrc> ueRrc;
541  for (NodeList::Iterator i = NodeList::Begin (); i != NodeList::End (); ++i)
542  {
543  Ptr<Node> node = *i;
544  int nDevs = node->GetNDevices ();
545  for (int j = 0; j < nDevs; ++j)
546  {
547  Ptr<LteUeNetDevice> ueDev = node->GetDevice (j)->GetObject <LteUeNetDevice> ();
548  if (ueDev != 0)
549  {
550  Ptr<LteUeRrc> ueRrc = ueDev->GetRrc ();
551  NS_LOG_LOGIC ("considering UE IMSI " << ueDev->GetImsi () << " that has cellId " << ueRrc->GetCellId ());
552  if (ueRrc->GetCellId () == cellId)
553  {
554  NS_LOG_LOGIC ("sending SI to IMSI " << ueDev->GetImsi ());
555 
559  ueRrc->GetLteUeRrcSapProvider (),
560  msg);
561  }
562  }
563  }
564  }
565 }
566 
567 void
569 {
570  Ptr<Packet> packet = Create<Packet> ();
571 
572  RrcConnectionSetupHeader rrcConnectionSetupHeader;
573  rrcConnectionSetupHeader.SetMessage (msg);
574 
575  packet->AddHeader (rrcConnectionSetupHeader);
576 
577  LteRlcSapProvider::TransmitPdcpPduParameters transmitPdcpPduParameters;
578  transmitPdcpPduParameters.pdcpPdu = packet;
579  transmitPdcpPduParameters.rnti = rnti;
580  transmitPdcpPduParameters.lcid = 0;
581 
582  m_setupUeParametersMap.at (rnti).srb0SapProvider->TransmitPdcpPdu (transmitPdcpPduParameters);
583 }
584 
585 void
587 {
588  Ptr<Packet> packet = Create<Packet> ();
589 
590  RrcConnectionRejectHeader rrcConnectionRejectHeader;
591  rrcConnectionRejectHeader.SetMessage (msg);
592 
593  packet->AddHeader (rrcConnectionRejectHeader);
594 
595  LteRlcSapProvider::TransmitPdcpPduParameters transmitPdcpPduParameters;
596  transmitPdcpPduParameters.pdcpPdu = packet;
597  transmitPdcpPduParameters.rnti = rnti;
598  transmitPdcpPduParameters.lcid = 0;
599 
600  m_setupUeParametersMap[rnti].srb0SapProvider->TransmitPdcpPdu (transmitPdcpPduParameters);
601 }
602 
603 void
605 {
606  Ptr<Packet> packet = Create<Packet> ();
607 
608  RrcConnectionReconfigurationHeader rrcConnectionReconfigurationHeader;
609  rrcConnectionReconfigurationHeader.SetMessage (msg);
610 
611  packet->AddHeader (rrcConnectionReconfigurationHeader);
612 
613  LtePdcpSapProvider::TransmitPdcpSduParameters transmitPdcpSduParameters;
614  transmitPdcpSduParameters.pdcpSdu = packet;
615  transmitPdcpSduParameters.rnti = rnti;
616  transmitPdcpSduParameters.lcid = 1;
617 
618  m_setupUeParametersMap[rnti].srb1SapProvider->TransmitPdcpSdu (transmitPdcpSduParameters);
619 }
620 
621 void
623 {
624  Ptr<Packet> packet = Create<Packet> ();
625 
626  RrcConnectionReestablishmentHeader rrcConnectionReestablishmentHeader;
627  rrcConnectionReestablishmentHeader.SetMessage (msg);
628 
629  packet->AddHeader (rrcConnectionReestablishmentHeader);
630 
631  LteRlcSapProvider::TransmitPdcpPduParameters transmitPdcpPduParameters;
632  transmitPdcpPduParameters.pdcpPdu = packet;
633  transmitPdcpPduParameters.rnti = rnti;
634  transmitPdcpPduParameters.lcid = 0;
635 
636  m_setupUeParametersMap[rnti].srb0SapProvider->TransmitPdcpPdu (transmitPdcpPduParameters);
637 }
638 
639 void
641 {
642  Ptr<Packet> packet = Create<Packet> ();
643 
644  RrcConnectionReestablishmentRejectHeader rrcConnectionReestablishmentRejectHeader;
645  rrcConnectionReestablishmentRejectHeader.SetMessage (msg);
646 
647  packet->AddHeader (rrcConnectionReestablishmentRejectHeader);
648 
649  LteRlcSapProvider::TransmitPdcpPduParameters transmitPdcpPduParameters;
650  transmitPdcpPduParameters.pdcpPdu = packet;
651  transmitPdcpPduParameters.rnti = rnti;
652  transmitPdcpPduParameters.lcid = 0;
653 
654  m_setupUeParametersMap[rnti].srb0SapProvider->TransmitPdcpPdu (transmitPdcpPduParameters);
655 }
656 
657 void
659 {
660  Ptr<Packet> packet = Create<Packet> ();
661 
662  RrcConnectionReleaseHeader rrcConnectionReleaseHeader;
663  rrcConnectionReleaseHeader.SetMessage (msg);
664 
665  packet->AddHeader (rrcConnectionReleaseHeader);
666 
667  LtePdcpSapProvider::TransmitPdcpSduParameters transmitPdcpSduParameters;
668  transmitPdcpSduParameters.pdcpSdu = packet;
669  transmitPdcpSduParameters.rnti = rnti;
670  transmitPdcpSduParameters.lcid = 1;
671 
672  m_setupUeParametersMap[rnti].srb1SapProvider->TransmitPdcpSdu (transmitPdcpSduParameters);
673 }
674 
675 void
677 {
678  // Get type of message received
679  RrcUlCcchMessage rrcUlCcchMessage;
680  p->PeekHeader (rrcUlCcchMessage);
681 
682  // Declare possible headers to receive
683  RrcConnectionReestablishmentRequestHeader rrcConnectionReestablishmentRequestHeader;
684  RrcConnectionRequestHeader rrcConnectionRequestHeader;
685 
686  // Deserialize packet and call member recv function with appropriate structure
687  switch ( rrcUlCcchMessage.GetMessageType () )
688  {
689  case 0:
690  p->RemoveHeader (rrcConnectionReestablishmentRequestHeader);
691  LteRrcSap::RrcConnectionReestablishmentRequest rrcConnectionReestablishmentRequestMsg;
692  rrcConnectionReestablishmentRequestMsg = rrcConnectionReestablishmentRequestHeader.GetMessage ();
693  m_enbRrcSapProvider->RecvRrcConnectionReestablishmentRequest (rnti,rrcConnectionReestablishmentRequestMsg);
694  break;
695  case 1:
696  p->RemoveHeader (rrcConnectionRequestHeader);
697  LteRrcSap::RrcConnectionRequest rrcConnectionRequestMsg;
698  rrcConnectionRequestMsg = rrcConnectionRequestHeader.GetMessage ();
699  m_enbRrcSapProvider->RecvRrcConnectionRequest (rnti,rrcConnectionRequestMsg);
700  break;
701  }
702 }
703 
704 void
706 {
707  // Get type of message received
708  RrcUlDcchMessage rrcUlDcchMessage;
709  params.pdcpSdu->PeekHeader (rrcUlDcchMessage);
710 
711  // Declare possible headers to receive
712  MeasurementReportHeader measurementReportHeader;
713  RrcConnectionReconfigurationCompleteHeader rrcConnectionReconfigurationCompleteHeader;
714  RrcConnectionReestablishmentCompleteHeader rrcConnectionReestablishmentCompleteHeader;
715  RrcConnectionSetupCompleteHeader rrcConnectionSetupCompleteHeader;
716 
717  // Declare possible messages to receive
718  LteRrcSap::MeasurementReport measurementReportMsg;
719  LteRrcSap::RrcConnectionReconfigurationCompleted rrcConnectionReconfigurationCompleteMsg;
720  LteRrcSap::RrcConnectionReestablishmentComplete rrcConnectionReestablishmentCompleteMsg;
721  LteRrcSap::RrcConnectionSetupCompleted rrcConnectionSetupCompletedMsg;
722 
723  // Deserialize packet and call member recv function with appropriate structure
724  switch ( rrcUlDcchMessage.GetMessageType () )
725  {
726  case 1:
727  params.pdcpSdu->RemoveHeader (measurementReportHeader);
728  measurementReportMsg = measurementReportHeader.GetMessage ();
729  m_enbRrcSapProvider->RecvMeasurementReport (params.rnti,measurementReportMsg);
730  break;
731  case 2:
732  params.pdcpSdu->RemoveHeader (rrcConnectionReconfigurationCompleteHeader);
733  rrcConnectionReconfigurationCompleteMsg = rrcConnectionReconfigurationCompleteHeader.GetMessage ();
734  m_enbRrcSapProvider->RecvRrcConnectionReconfigurationCompleted (params.rnti,rrcConnectionReconfigurationCompleteMsg);
735  break;
736  case 3:
737  params.pdcpSdu->RemoveHeader (rrcConnectionReestablishmentCompleteHeader);
738  rrcConnectionReestablishmentCompleteMsg = rrcConnectionReestablishmentCompleteHeader.GetMessage ();
739  m_enbRrcSapProvider->RecvRrcConnectionReestablishmentComplete (params.rnti,rrcConnectionReestablishmentCompleteMsg);
740  break;
741  case 4:
742  params.pdcpSdu->RemoveHeader (rrcConnectionSetupCompleteHeader);
743  rrcConnectionSetupCompletedMsg = rrcConnectionSetupCompleteHeader.GetMessage ();
744  m_enbRrcSapProvider->RecvRrcConnectionSetupCompleted (params.rnti, rrcConnectionSetupCompletedMsg);
745  break;
746  }
747 }
748 
751 {
753  h.SetMessage (msg);
754 
755  Ptr<Packet> p = Create<Packet> ();
756  p->AddHeader (h);
757  return p;
758 }
759 
762 {
764  p->RemoveHeader (h);
766  return msg;
767 }
768 
771 {
773  h.SetMessage (msg);
774  Ptr<Packet> p = Create<Packet> ();
775  p->AddHeader (h);
776  return p;
777 }
778 
781 {
783  p->RemoveHeader (h);
785  return msg;
786 }
787 
789 
791  : m_pdcp (pdcp),
792  m_rnti (rnti)
793 {
794 }
795 
797 {
798 }
799 
800 void
802 {
804 }
805 
806 } // 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
ns3::LteUeRrcProtocolReal::DoSendIdealUeContextRemoveRequest
void DoSendIdealUeContextRemoveRequest(uint16_t rnti)
Send ideal UE context remove request function.
Definition: lte-rrc-protocol-real.cc:197
lte-ue-net-device.h
ns3::LteEnbRrcProtocolReal::DoSendRrcConnectionReestablishmentReject
void DoSendRrcConnectionReestablishmentReject(uint16_t rnti, LteRrcSap::RrcConnectionReestablishmentReject msg)
Send RRC connection reestabishment reject function.
Definition: lte-rrc-protocol-real.cc:640
ns3::LteEnbRrcProtocolReal::SetUeRrcSapProvider
void SetUeRrcSapProvider(uint16_t rnti, LteUeRrcSapProvider *p)
Set UE RRC SAP provider function.
Definition: lte-rrc-protocol-real.cc:447
ns3::LteEnbRrcProtocolReal
Models the transmission of RRC messages from the UE to the eNB in a real fashion, by creating real RR...
Definition: lte-rrc-protocol-real.h:185
NS_OBJECT_ENSURE_REGISTERED
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition: object-base.h:45
NS_ASSERT
#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
ns3::RrcUlDcchMessage
This class only serves to discriminate which message type has been received in uplink (ue to eNb) for...
Definition: lte-rrc-header.h:385
ns3::LteEnbRrcSapUser::SetupUeParameters
SetupUeParameters structure.
Definition: lte-rrc-sap.h:1086
ns3::LteRrcSap::RrcConnectionSetupCompleted
RrcConnectionSetupCompleted structure.
Definition: lte-rrc-sap.h:706
ns3::Packet::PeekHeader
uint32_t PeekHeader(Header &header) const
Deserialize but does not remove the header from the internal buffer.
Definition: packet.cc:290
ns3::LteEnbRrcProtocolReal::MemberLteEnbRrcSapUser< LteEnbRrcProtocolReal >
friend class MemberLteEnbRrcSapUser< LteEnbRrcProtocolReal >
allow MemberLteEnbRrcSapUser<LteEnbRrcProtocolReal> class friend access
Definition: lte-rrc-protocol-real.h:187
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::Simulator::ScheduleWithContext
static void ScheduleWithContext(uint32_t context, Time const &delay, FUNC f, Ts &&... args)
Schedule an event with the given context.
Definition: simulator.h:572
ns3::NodeList::Begin
static Iterator Begin(void)
Definition: node-list.cc:229
ns3::LteRrcSap::RrcConnectionRelease
RrcConnectionRelease structure.
Definition: lte-rrc-sap.h:884
ns3::Node::GetId
uint32_t GetId(void) const
Definition: node.cc:109
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::LteUeRrcSapUser
Part of the RRC protocol.
Definition: lte-rrc-sap.h:917
ns3::MeasurementReportHeader
This class manages the serialization/deserialization of MeasurementReport IE.
Definition: lte-rrc-header.h:1084
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::LteUeRrcProtocolReal::m_completeSetupParameters
LteUeRrcSapProvider::CompleteSetupParameters m_completeSetupParameters
complete setup parameters
Definition: lte-rrc-protocol-real.h:172
ns3::LteUeRrcProtocolReal::GetLteUeRrcSapUser
LteUeRrcSapUser * GetLteUeRrcSapUser()
Get LTE UE RRC SAP user function.
Definition: lte-rrc-protocol-real.cc:85
ns3::LteEnbRrcProtocolReal::m_enbRrcSapUser
LteEnbRrcSapUser * m_enbRrcSapUser
ENB RRC SAP user.
Definition: lte-rrc-protocol-real.h:359
ns3::LteRrcSap::SystemInformation
SystemInformation structure.
Definition: lte-rrc-sap.h:609
ns3::RealProtocolRlcSapUser::RealProtocolRlcSapUser
RealProtocolRlcSapUser()
Definition: lte-rrc-protocol-real.cc:796
ns3::MeasurementReportHeader::GetMessage
LteRrcSap::MeasurementReport GetMessage() const
Returns a MeasurementReport IE from the values in the class attributes.
Definition: lte-rrc-header.cc:6808
ns3::LteUeRrcProtocolReal::m_enbRrcSapProvider
LteEnbRrcSapProvider * m_enbRrcSapProvider
ENB RRC SAP provider.
Definition: lte-rrc-protocol-real.h:169
ns3::RrcConnectionReestablishmentCompleteHeader
This class manages the serialization/deserialization of RrcConnectionReestablishmentComplete IE.
Definition: lte-rrc-header.h:959
ns3::LteEnbRrcSapProvider::CompleteSetupUeParameters::srb1SapUser
LtePdcpSapUser * srb1SapUser
SRB1 SAP user.
Definition: lte-rrc-sap.h:1207
ns3::LteEnbRrcProtocolReal::m_enbRrcSapProvider
LteEnbRrcSapProvider * m_enbRrcSapProvider
ENB RRC SAP provider.
Definition: lte-rrc-protocol-real.h:358
ns3::LteUeRrcProtocolReal::~LteUeRrcProtocolReal
virtual ~LteUeRrcProtocolReal()
Definition: lte-rrc-protocol-real.cc:53
ns3::RrcConnectionReleaseHeader::GetMessage
LteRrcSap::RrcConnectionRelease GetMessage() const
Returns a RrcConnectionRelease IE from the values in the class attributes.
Definition: lte-rrc-header.cc:6551
ns3::LteUeRrcSapUser::SetupParameters::srb0SapProvider
LteRlcSapProvider * srb0SapProvider
SRB0 SAP provider.
Definition: lte-rrc-sap.h:922
ns3::RrcConnectionSetupHeader
This class manages the serialization/deserialization of RrcConnectionSetup IE.
Definition: lte-rrc-header.h:563
ns3::RrcConnectionReestablishmentHeader::SetMessage
void SetMessage(LteRrcSap::RrcConnectionReestablishment msg)
Receives a RrcConnectionReestablishment IE and stores the contents into the class attributes.
Definition: lte-rrc-header.cc:6220
ns3::LteEnbRrcProtocolReal::GetLteEnbRrcSapUser
LteEnbRrcSapUser * GetLteEnbRrcSapUser()
Get LTE ENB RRC SAP user function.
Definition: lte-rrc-protocol-real.cc:426
ns3::LteUeRrcSapProvider::RecvRrcConnectionReestablishment
virtual void RecvRrcConnectionReestablishment(RrcConnectionReestablishment msg)=0
Receive an RRCConnectionReestablishment message from the serving eNodeB during an RRC connection re-e...
ns3::LtePdcpSapProvider::TransmitPdcpSduParameters::pdcpSdu
Ptr< Packet > pdcpSdu
the RRC PDU
Definition: lte-pdcp-sap.h:45
ns3::RrcConnectionReestablishmentRejectHeader::GetMessage
LteRrcSap::RrcConnectionReestablishmentReject GetMessage() const
Returns a RrcConnectionReestablishmentReject IE from the values in the class attributes.
Definition: lte-rrc-header.cc:6426
ns3::RrcConnectionReestablishmentHeader::GetMessage
LteRrcSap::RrcConnectionReestablishment GetMessage() const
Returns a RrcConnectionReestablishment IE from the values in the class attributes.
Definition: lte-rrc-header.cc:6228
ns3::RrcConnectionSetupCompleteHeader::GetMessage
LteRrcSap::RrcConnectionSetupCompleted GetMessage() const
Returns a RrcConnectionSetupCompleted IE from the values in the class attributes.
Definition: lte-rrc-header.cc:4985
ns3::LteRrcSap::RrcConnectionReconfigurationCompleted
RrcConnectionReconfigurationCompleted structure.
Definition: lte-rrc-sap.h:852
ns3::RrcConnectionReestablishmentCompleteHeader::SetMessage
void SetMessage(LteRrcSap::RrcConnectionReestablishmentComplete msg)
Receives a RrcConnectionReestablishmentComplete IE and stores the contents into the class attributes.
Definition: lte-rrc-header.cc:6326
ns3::RealProtocolRlcSapUser::m_rnti
uint16_t m_rnti
RNTI.
Definition: lte-rrc-protocol-real.h:385
ns3::LteRrcSap::RrcConnectionReject
RrcConnectionReject structure.
Definition: lte-rrc-sap.h:890
ns3::LteRrcSap::HandoverPreparationInfo
HandoverPreparationInfo structure.
Definition: lte-rrc-sap.h:896
ns3::LteRrcSap::RrcConnectionSetup
RrcConnectionSetup structure.
Definition: lte-rrc-sap.h:699
ns3::LtePdcpSapUser::ReceivePdcpSduParameters
Parameters for LtePdcpSapUser::ReceivePdcpSdu.
Definition: lte-pdcp-sap.h:78
ns3::LteUeRrcProtocolReal::m_ueRrcSapProvider
LteUeRrcSapProvider * m_ueRrcSapProvider
UE RRC SAP provider.
Definition: lte-rrc-protocol-real.h:167
ns3::LteEnbRrcProtocolReal::LteEnbRrcProtocolReal
LteEnbRrcProtocolReal()
Definition: lte-rrc-protocol-real.cc:380
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::LteEnbRrcProtocolReal::DoReceivePdcpPdu
void DoReceivePdcpPdu(uint16_t rnti, Ptr< Packet > p)
Receive PDCP PDU function.
Definition: lte-rrc-protocol-real.cc:676
ns3::RrcDlCcchMessage
This class only serves to discriminate which message type has been received in downlink (eNb to ue) f...
Definition: lte-rrc-header.h:478
ns3::RrcConnectionReestablishmentRejectHeader::SetMessage
void SetMessage(LteRrcSap::RrcConnectionReestablishmentReject msg)
Receives a RrcConnectionReestablishmentReject IE and stores the contents into the class attributes.
Definition: lte-rrc-header.cc:6419
ns3::HandoverPreparationInfoHeader::SetMessage
void SetMessage(LteRrcSap::HandoverPreparationInfo msg)
Receives a HandoverPreparationInfo IE and stores the contents into the class attributes.
Definition: lte-rrc-header.cc:5929
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::LteUeRrcProtocolReal::m_rrc
Ptr< LteUeRrc > m_rrc
the RRC
Definition: lte-rrc-protocol-real.h:165
ns3::LteUeRrcProtocolReal::LtePdcpSpecificLtePdcpSapUser< LteUeRrcProtocolReal >
friend class LtePdcpSpecificLtePdcpSapUser< LteUeRrcProtocolReal >
allow LtePdcpSpecificLtePdcpSapUser<LteUeRrcProtocolReal> class friend access
Definition: lte-rrc-protocol-real.h:60
ns3::LteUeRrcProtocolReal::DoSendRrcConnectionReestablishmentComplete
void DoSendRrcConnectionReestablishmentComplete(LteRrcSap::RrcConnectionReestablishmentComplete msg)
Send RRC connection reestablishment complete function.
Definition: lte-rrc-protocol-real.cc:236
ns3::RrcAsn1Header::GetMessageType
int GetMessageType()
Get message type.
Definition: lte-rrc-header.cc:71
ns3::LteEnbNetDevice::GetRrc
Ptr< LteEnbRrc > GetRrc() const
Definition: lte-enb-net-device.cc:212
ns3::RrcConnectionRequestHeader::GetMessage
LteRrcSap::RrcConnectionRequest GetMessage() const
Returns a RrcConnectionRequest IE from the values in the class attributes.
Definition: lte-rrc-header.cc:4687
ns3::LteRlcSapProvider::TransmitPdcpPduParameters::rnti
uint16_t rnti
the C-RNTI identifying the UE
Definition: lte-rlc-sap.h:46
ns3::LteEnbRrcProtocolReal::DoSendRrcConnectionReject
void DoSendRrcConnectionReject(uint16_t rnti, LteRrcSap::RrcConnectionReject msg)
Send RRC connection reject function.
Definition: lte-rrc-protocol-real.cc:586
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::RrcConnectionSetupHeader::SetMessage
void SetMessage(LteRrcSap::RrcConnectionSetup msg)
Receives a RrcConnectionSetup IE and stores the contents into the class attributes.
Definition: lte-rrc-header.cc:4828
ns3::LteEnbRrcSapProvider::CompleteSetupUeParameters
CompleteSetupUeParameters structure.
Definition: lte-rrc-sap.h:1205
ns3::LteEnbRrcProtocolReal::SetCellId
void SetCellId(uint16_t cellId)
Set cell ID function.
Definition: lte-rrc-protocol-real.cc:432
ns3::LteEnbRrcProtocolReal::m_setupUeParametersMap
std::map< uint16_t, LteEnbRrcSapUser::SetupUeParameters > m_setupUeParametersMap
setup UE parameters map
Definition: lte-rrc-protocol-real.h:361
ns3::LteUeRrcProtocolReal::DoSendRrcConnectionReconfigurationCompleted
void DoSendRrcConnectionReconfigurationCompleted(LteRrcSap::RrcConnectionReconfigurationCompleted msg)
Send RRC connection reconfiguration setup completed function.
Definition: lte-rrc-protocol-real.cc:151
ns3::LteEnbRrcProtocolReal::m_cellId
uint16_t m_cellId
the cell ID
Definition: lte-rrc-protocol-real.h:357
ns3::LteEnbRrcProtocolReal::DoDispose
virtual void DoDispose(void)
Destructor implementation.
Definition: lte-rrc-protocol-real.cc:393
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:74
ns3::HandoverPreparationInfoHeader::GetMessage
LteRrcSap::HandoverPreparationInfo GetMessage() const
Returns a HandoverPreparationInfo IE from the values in the class attributes.
Definition: lte-rrc-header.cc:5936
ns3::RrcConnectionSetupCompleteHeader::SetMessage
void SetMessage(LteRrcSap::RrcConnectionSetupCompleted msg)
Receives a RrcConnectionSetupCompleted IE and stores the contents into the class attributes.
Definition: lte-rrc-header.cc:4972
ns3::LteEnbRrcProtocolReal::m_enbRrcSapProviderMap
std::map< uint16_t, LteUeRrcSapProvider * > m_enbRrcSapProviderMap
ENB RRC SAP provider map.
Definition: lte-rrc-protocol-real.h:360
ns3::LteUeRrcProtocolReal::DoReceivePdcpSdu
void DoReceivePdcpSdu(LtePdcpSapUser::ReceivePdcpSduParameters params)
Receive PDCP SDU function.
Definition: lte-rrc-protocol-real.cc:348
ns3::LteEnbRrcProtocolReal::SetLteEnbRrcSapProvider
void SetLteEnbRrcSapProvider(LteEnbRrcSapProvider *p)
Set LTE ENB RRC SAP provider function.
Definition: lte-rrc-protocol-real.cc:420
ns3::LteEnbRrcSapProvider::CompleteSetupUe
virtual void CompleteSetupUe(uint16_t rnti, CompleteSetupUeParameters params)=0
Complete setup UE function.
ns3::RrcConnectionReconfigurationHeader::GetMessage
LteRrcSap::RrcConnectionReconfiguration GetMessage() const
Returns a RrcConnectionReconfiguration IE from the values in the class attributes.
Definition: lte-rrc-header.cc:5616
ns3::LteEnbRrcProtocolReal::m_completeSetupUeParametersMap
std::map< uint16_t, LteEnbRrcSapProvider::CompleteSetupUeParameters > m_completeSetupUeParametersMap
complete setup UE parameters map
Definition: lte-rrc-protocol-real.h:362
ns3::NodeList::Iterator
std::vector< Ptr< Node > >::const_iterator Iterator
Node container iterator.
Definition: node-list.h:44
ns3::Object
A base class which provides memory management and object aggregation.
Definition: object.h:88
ns3::RealProtocolRlcSapUser::m_pdcp
LteEnbRrcProtocolReal * m_pdcp
PDCP.
Definition: lte-rrc-protocol-real.h:384
ns3::LteRrcSap::RrcConnectionRequest
RrcConnectionRequest structure.
Definition: lte-rrc-sap.h:693
ns3::LteRrcSap::RrcConnectionReestablishmentReject
RrcConnectionReestablishmentReject structure.
Definition: lte-rrc-sap.h:879
ns3::LteEnbRrcProtocolReal::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition: lte-rrc-protocol-real.cc:409
ns3::LteUeRrcProtocolReal::m_ueRrcSapUser
LteUeRrcSapUser * m_ueRrcSapUser
UE RRC SAP user.
Definition: lte-rrc-protocol-real.h:168
ns3::RrcConnectionReconfigurationCompleteHeader::GetMessage
LteRrcSap::RrcConnectionReconfigurationCompleted GetMessage() const
Returns a RrcConnectionReconfigurationCompleted IE from the values in the class attributes.
Definition: lte-rrc-header.cc:5070
ns3::RrcConnectionSetupHeader::GetMessage
LteRrcSap::RrcConnectionSetup GetMessage() const
Returns a RrcConnectionSetup IE from the values in the class attributes.
Definition: lte-rrc-header.cc:4836
ns3::LteEnbRrcProtocolReal::DoDecodeHandoverPreparationInformation
LteRrcSap::HandoverPreparationInfo DoDecodeHandoverPreparationInformation(Ptr< Packet > p)
Decode handover preparation information function.
Definition: lte-rrc-protocol-real.cc:761
ns3::RRC_REAL_MSG_DELAY
const Time RRC_REAL_MSG_DELAY
RRC real message delay.
Definition: lte-rrc-protocol-real.cc:40
ns3::RrcConnectionRequestHeader::SetMessage
void SetMessage(LteRrcSap::RrcConnectionRequest msg)
Receives a RrcConnectionRequest IE and stores the contents into the class attributes.
Definition: lte-rrc-header.cc:4679
ns3::LteEnbRrcProtocolReal::DoSendRrcConnectionRelease
void DoSendRrcConnectionRelease(uint16_t rnti, LteRrcSap::RrcConnectionRelease msg)
Send RRC connection release function.
Definition: lte-rrc-protocol-real.cc:658
ns3::LteEnbRrcSapProvider::RecvIdealUeContextRemoveRequest
virtual void RecvIdealUeContextRemoveRequest(uint16_t rnti)=0
Receive ideal UE context remove request from the UE RRC.
ns3::LteEnbRrcSapProvider::CompleteSetupUeParameters::srb0SapUser
LteRlcSapUser * srb0SapUser
SRB0 SAP user.
Definition: lte-rrc-sap.h:1206
ns3::RrcConnectionRejectHeader::SetMessage
void SetMessage(LteRrcSap::RrcConnectionReject msg)
Receives a RrcConnectionReject IE and stores the contents into the class attributes.
Definition: lte-rrc-header.cc:6652
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::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::LteUeRrcProtocolReal::DoSendMeasurementReport
void DoSendMeasurementReport(LteRrcSap::MeasurementReport msg)
Send measurement report function.
Definition: lte-rrc-protocol-real.cc:174
ns3::RrcConnectionReleaseHeader
This class manages the serialization/deserialization of RrcConnectionRelease IE.
Definition: lte-rrc-header.h:1024
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:104
ns3::LteEnbRrcProtocolReal::DoReceivePdcpSdu
void DoReceivePdcpSdu(LtePdcpSapUser::ReceivePdcpSduParameters params)
Receive PDCP SDU function.
Definition: lte-rrc-protocol-real.cc:705
ns3::RrcConnectionReestablishmentRequestHeader::SetMessage
void SetMessage(LteRrcSap::RrcConnectionReestablishmentRequest msg)
Receives a RrcConnectionReestablishmentRequest IE and stores the contents into the class attributes.
Definition: lte-rrc-header.cc:6087
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::LteUeRrcProtocolReal::SetUeRrc
void SetUeRrc(Ptr< LteUeRrc > rrc)
Set UE RRC function.
Definition: lte-rrc-protocol-real.cc:91
ns3::LteUeRrcProtocolReal::m_setupParameters
LteUeRrcSapUser::SetupParameters m_setupParameters
setup parameters
Definition: lte-rrc-protocol-real.h:171
ns3::LteEnbRrcSapProvider
Part of the RRC protocol.
Definition: lte-rrc-sap.h:1201
ns3::RrcConnectionReestablishmentRequestHeader::GetMessage
LteRrcSap::RrcConnectionReestablishmentRequest GetMessage() const
Returns a RrcConnectionReestablishmentRequest IE from the values in the class attributes.
Definition: lte-rrc-header.cc:6095
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::LteRlcSapProvider::TransmitPdcpPdu
virtual void TransmitPdcpPdu(TransmitPdcpPduParameters params)=0
Send a PDCP PDU to the RLC for transmission This method is to be called when upper PDCP entity has a ...
ns3::LteRlcSapProvider::TransmitPdcpPduParameters::lcid
uint8_t lcid
the logical channel id corresponding to the sending RLC instance
Definition: lte-rlc-sap.h:47
ns3::LteEnbRrcProtocolReal::DoSetupUe
void DoSetupUe(uint16_t rnti, LteEnbRrcSapUser::SetupUeParameters params)
Setup UE function.
Definition: lte-rrc-protocol-real.cc:460
ns3::LteUeRrcProtocolReal::DoSetup
void DoSetup(LteUeRrcSapUser::SetupParameters params)
Setup function.
Definition: lte-rrc-protocol-real.cc:97
ns3::LteRrcSap::RrcConnectionReestablishmentRequest
RrcConnectionReestablishmentRequest structure.
Definition: lte-rrc-sap.h:859
lte-enb-net-device.h
ns3::RrcUlCcchMessage
This class only serves to discriminate which message type has been received in uplink (ue to eNb) for...
Definition: lte-rrc-header.h:447
ns3::LteRrcSap::MeasurementReport
MeasurementReport structure.
Definition: lte-rrc-sap.h:902
ns3::RrcConnectionReconfigurationHeader
This class manages the serialization/deserialization of RrcConnectionReconfiguration IE.
Definition: lte-rrc-header.h:710
NS_LOG_LOGIC
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
Definition: log.h:289
ns3::RrcConnectionReestablishmentHeader
This class manages the serialization/deserialization of RrcConnectionReestablishment IE.
Definition: lte-rrc-header.h:916
ns3::LteEnbRrcProtocolReal::~LteEnbRrcProtocolReal
virtual ~LteEnbRrcProtocolReal()
Definition: lte-rrc-protocol-real.cc:387
lte-enb-rrc.h
ns3::LteUeRrcSapProvider::CompleteSetupParameters::srb1SapUser
LtePdcpSapUser * srb1SapUser
SRB1 SAP user.
Definition: lte-rrc-sap.h:1007
ns3::LteUeRrcProtocolReal::DoDispose
virtual void DoDispose(void)
Destructor implementation.
Definition: lte-rrc-protocol-real.cc:58
ns3::LteUeRrcProtocolReal::MemberLteUeRrcSapUser< LteUeRrcProtocolReal >
friend class MemberLteUeRrcSapUser< LteUeRrcProtocolReal >
allow MemberLteUeRrcSapUser<LteUeRrcProtocolReal> class friend access
Definition: lte-rrc-protocol-real.h:56
ns3::RrcConnectionRejectHeader
This class manages the serialization/deserialization of RrcConnectionReject IE.
Definition: lte-rrc-header.h:1054
ns3::RrcConnectionReconfigurationHeader::SetMessage
void SetMessage(LteRrcSap::RrcConnectionReconfiguration msg)
Receives a RrcConnectionReconfiguration IE and stores the contents into the class attributes.
Definition: lte-rrc-header.cc:5600
ns3::RrcConnectionReconfigurationCompleteHeader::SetMessage
void SetMessage(LteRrcSap::RrcConnectionReconfigurationCompleted msg)
Receives a RrcConnectionReconfigurationCompleted IE and stores the contents into the class attributes...
Definition: lte-rrc-header.cc:5063
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::LteRlcSapProvider::TransmitPdcpPduParameters
Parameters for LteRlcSapProvider::TransmitPdcpPdu.
Definition: lte-rlc-sap.h:44
ns3::RealProtocolRlcSapUser::ReceivePdcpPdu
virtual void ReceivePdcpPdu(Ptr< Packet > p)
Called by the RLC entity to notify the PDCP entity of the reception of a new PDCP PDU.
Definition: lte-rrc-protocol-real.cc:801
ns3::LteUeRrcProtocolReal::DoReceivePdcpPdu
void DoReceivePdcpPdu(Ptr< Packet > p)
Receive PDCP PDU function.
Definition: lte-rrc-protocol-real.cc:299
ns3::LteEnbRrcProtocolReal::DoSendRrcConnectionSetup
void DoSendRrcConnectionSetup(uint16_t rnti, LteRrcSap::RrcConnectionSetup msg)
Send RRC connection setup function.
Definition: lte-rrc-protocol-real.cc:568
NS_LOG_DEBUG
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition: log.h:273
ns3::RrcConnectionReconfigurationCompleteHeader
This class manages the serialization/deserialization of RrcConnectionSetupComplete IE.
Definition: lte-rrc-header.h:673
ns3::LteUeRrcSapUser::SetupParameters
SetupParameters structure.
Definition: lte-rrc-sap.h:921
ns3::LteUeRrcProtocolReal::SetEnbRrcSapProvider
void SetEnbRrcSapProvider()
Set ENB RRC SAP provider.
Definition: lte-rrc-protocol-real.cc:255
ns3::LteRlcSapProvider::TransmitPdcpPduParameters::pdcpPdu
Ptr< Packet > pdcpPdu
the PDCP PDU
Definition: lte-rlc-sap.h:45
ns3::LtePdcpSapProvider::TransmitPdcpSduParameters
Parameters for LtePdcpSapProvider::TransmitPdcpSdu.
Definition: lte-pdcp-sap.h:44
ns3::RrcConnectionRequestHeader
This class manages the serialization/deserialization of RrcConnectionRequest IE.
Definition: lte-rrc-header.h:508
ns3::LtePdcpSapProvider::TransmitPdcpSdu
virtual void TransmitPdcpSdu(TransmitPdcpSduParameters params)=0
Send RRC PDU parameters to the PDCP for transmission.
ns3::LtePdcpSapProvider::TransmitPdcpSduParameters::lcid
uint8_t lcid
the logical channel id corresponding to the sending RLC instance
Definition: lte-pdcp-sap.h:47
ns3::RrcDlDcchMessage
This class only serves to discriminate which message type has been received in downlink (eNb to ue) f...
Definition: lte-rrc-header.h:416
ns3::LteUeRrcProtocolReal::SetLteUeRrcSapProvider
void SetLteUeRrcSapProvider(LteUeRrcSapProvider *p)
Set LTE UE RRC SAP provider function.
Definition: lte-rrc-protocol-real.cc:79
ns3::LteEnbRrcProtocolReal::LtePdcpSpecificLtePdcpSapUser< LteEnbRrcProtocolReal >
friend class LtePdcpSpecificLtePdcpSapUser< LteEnbRrcProtocolReal >
allow LtePdcpSpecificLtePdcpSapUser<LteEnbRrcProtocolReal> class friend access
Definition: lte-rrc-protocol-real.h:189
ns3::LteUeRrcProtocolReal::LteUeRrcProtocolReal
LteUeRrcProtocolReal()
Definition: lte-rrc-protocol-real.cc:44
ns3::RrcConnectionReestablishmentRejectHeader
This class manages the serialization/deserialization of RrcConnectionReestablishmentReject IE.
Definition: lte-rrc-header.h:994
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::LteUeRrcProtocolReal::DoSendRrcConnectionReestablishmentRequest
void DoSendRrcConnectionReestablishmentRequest(LteRrcSap::RrcConnectionReestablishmentRequest msg)
Send RRC connection reestablishment request function.
Definition: lte-rrc-protocol-real.cc:218
ns3::LtePdcpSapUser::ReceivePdcpSduParameters::rnti
uint16_t rnti
the C-RNTI identifying the UE
Definition: lte-pdcp-sap.h:80
ns3::LteRrcSap::RrcConnectionReconfiguration
RrcConnectionReconfiguration structure.
Definition: lte-rrc-sap.h:837
ns3::LteUeRrcSapUser::SetupParameters::srb1SapProvider
LtePdcpSapProvider * srb1SapProvider
SRB1 SAP provider.
Definition: lte-rrc-sap.h:923
ns3::LteUeRrcSapProvider::CompleteSetup
virtual void CompleteSetup(CompleteSetupParameters params)=0
Complete setup function.
ns3::HandoverPreparationInfoHeader
This class manages the serialization/deserialization of HandoverPreparationInfo IE.
Definition: lte-rrc-header.h:838
ns3::LteUeRrcProtocolReal::DoSendRrcConnectionRequest
void DoSendRrcConnectionRequest(LteRrcSap::RrcConnectionRequest msg)
Send RRC connection request function.
Definition: lte-rrc-protocol-real.cc:107
ns3::RrcConnectionReestablishmentRequestHeader
This class manages the serialization/deserialization of RRCConnectionReestablishmentRequest IE.
Definition: lte-rrc-header.h:873
ns3::LteEnbRrcProtocolReal::DoSendSystemInformation
void DoSendSystemInformation(uint16_t cellId, LteRrcSap::SystemInformation msg)
Send system information function.
Definition: lte-rrc-protocol-real.cc:536
ns3::LteUeRrcProtocolReal
Models the transmission of RRC messages from the UE to the eNB in a real fashion, by creating real RR...
Definition: lte-rrc-protocol-real.h:54
ns3::LteUeRrcSapProvider::RecvRrcConnectionReconfiguration
virtual void RecvRrcConnectionReconfiguration(RrcConnectionReconfiguration msg)=0
Receive an RRCConnectionReconfiguration message from the serving eNodeB during an RRC connection reco...
ns3::LteEnbRrcProtocolReal::DoEncodeHandoverCommand
Ptr< Packet > DoEncodeHandoverCommand(LteRrcSap::RrcConnectionReconfiguration msg)
Encode handover command function.
Definition: lte-rrc-protocol-real.cc:770
ns3::Node::GetNDevices
uint32_t GetNDevices(void) const
Definition: node.cc:152
ns3::LtePdcpSapProvider::TransmitPdcpSduParameters::rnti
uint16_t rnti
the C-RNTI identifying the UE
Definition: lte-pdcp-sap.h:46
ns3::LteEnbRrcProtocolReal::DoDecodeHandoverCommand
LteRrcSap::RrcConnectionReconfiguration DoDecodeHandoverCommand(Ptr< Packet > p)
Decode handover command function.
Definition: lte-rrc-protocol-real.cc:780
ns3::LteEnbRrcProtocolReal::DoRemoveUe
void DoRemoveUe(uint16_t rnti)
Remove UE function.
Definition: lte-rrc-protocol-real.cc:522
ns3::LteEnbRrcProtocolReal::DoEncodeHandoverPreparationInformation
Ptr< Packet > DoEncodeHandoverPreparationInformation(LteRrcSap::HandoverPreparationInfo msg)
Encode handover preparation information function.
Definition: lte-rrc-protocol-real.cc:750
ns3::LteUeRrcProtocolReal::DoSendRrcConnectionSetupCompleted
void DoSendRrcConnectionSetupCompleted(LteRrcSap::RrcConnectionSetupCompleted msg)
Send RRC connection setup completed function.
Definition: lte-rrc-protocol-real.cc:130
ns3::LtePdcpSapUser::ReceivePdcpSduParameters::pdcpSdu
Ptr< Packet > pdcpSdu
the RRC PDU
Definition: lte-pdcp-sap.h:79
ns3::LteEnbRrcProtocolReal::DoSendRrcConnectionReconfiguration
void DoSendRrcConnectionReconfiguration(uint16_t rnti, LteRrcSap::RrcConnectionReconfiguration msg)
Send RRC connection reconfiguration function.
Definition: lte-rrc-protocol-real.cc:604
ns3::LteUeRrcSapProvider::CompleteSetupParameters::srb0SapUser
LteRlcSapUser * srb0SapUser
SRB0 SAP user.
Definition: lte-rrc-sap.h:1006
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::RrcConnectionReestablishmentCompleteHeader::GetMessage
LteRrcSap::RrcConnectionReestablishmentComplete GetMessage() const
Returns a RrcConnectionReestablishmentComplete IE from the values in the class attributes.
Definition: lte-rrc-header.cc:6333
ns3::LteEnbRrcProtocolReal::GetUeRrcSapProvider
LteUeRrcSapProvider * GetUeRrcSapProvider(uint16_t rnti)
Get UE RRC SAP provider function.
Definition: lte-rrc-protocol-real.cc:438
ns3::LteUeRrcProtocolReal::m_rnti
uint16_t m_rnti
the RNTI
Definition: lte-rrc-protocol-real.h:166
ns3::LteEnbNetDevice::HasCellId
bool HasCellId(uint16_t cellId) const
Definition: lte-enb-net-device.cc:230
ns3::LtePdcpSapUser
Service Access Point (SAP) offered by the PDCP entity to the RRC entity See 3GPP 36....
Definition: lte-pdcp-sap.h:70
ns3::LteRrcSap::RrcConnectionReestablishmentComplete
RrcConnectionReestablishmentComplete structure.
Definition: lte-rrc-sap.h:873
ns3::LteEnbRrcProtocolReal::DoSendRrcConnectionReestablishment
void DoSendRrcConnectionReestablishment(uint16_t rnti, LteRrcSap::RrcConnectionReestablishment msg)
Send RRC connection reestabishment function.
Definition: lte-rrc-protocol-real.cc:622
ns3::LteEnbRrcProtocolReal::RealProtocolRlcSapUser
friend class RealProtocolRlcSapUser
allow RealProtocolRlcSapUser class friend access
Definition: lte-rrc-protocol-real.h:193
ns3::RrcConnectionSetupCompleteHeader
This class manages the serialization/deserialization of RrcConnectionSetupComplete IE.
Definition: lte-rrc-header.h:636
ns3::LteUeRrcProtocolReal::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition: lte-rrc-protocol-real.cc:68
ns3::LteEnbNetDevice
The eNodeB device implementation.
Definition: lte-enb-net-device.h:57
ns3::LteUeRrcProtocolReal::LteRlcSpecificLteRlcSapUser< LteUeRrcProtocolReal >
friend class LteRlcSpecificLteRlcSapUser< LteUeRrcProtocolReal >
allow LteRlcSpecificLteRlcSapUser<LteUeRrcProtocolReal> class friend access
Definition: lte-rrc-protocol-real.h:58
ns3::MeasurementReportHeader::SetMessage
void SetMessage(LteRrcSap::MeasurementReport msg)
Receives a MeasurementReport IE and stores the contents into the class attributes.
Definition: lte-rrc-header.cc:6801
lte-ue-rrc.h
lte-rrc-protocol-real.h
ns3::RrcConnectionReleaseHeader::SetMessage
void SetMessage(LteRrcSap::RrcConnectionRelease msg)
Receives a RrcConnectionRelease IE and stores the contents into the class attributes.
Definition: lte-rrc-header.cc:6544
ns3::RrcConnectionRejectHeader::GetMessage
LteRrcSap::RrcConnectionReject GetMessage() const
Returns a RrcConnectionReject IE from the values in the class attributes.
Definition: lte-rrc-header.cc:6659
ns3::LteRlcSapUser
Service Access Point (SAP) offered by the UM-RLC and AM-RLC entities to the PDCP entity See 3GPP 36....
Definition: lte-rlc-sap.h:68