A Discrete-Event Network Simulator
API
lte-rrc-protocol-real.h
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 
23 #ifndef LTE_RRC_PROTOCOL_REAL_H
24 #define LTE_RRC_PROTOCOL_REAL_H
25 
26 #include <stdint.h>
27 #include <map>
28 
29 #include <ns3/ptr.h>
30 #include <ns3/object.h>
31 #include <ns3/lte-rrc-sap.h>
32 #include <ns3/lte-pdcp-sap.h>
33 #include <ns3/lte-rlc-sap.h>
34 #include <ns3/lte-rrc-header.h>
35 
36 namespace ns3 {
37 
39 class LteUeRrcSapUser;
41 class LteUeRrc;
42 
43 
54 {
61 
62 public:
64  virtual ~LteUeRrcProtocolReal ();
65 
66  // inherited from Object
67  virtual void DoDispose (void);
72  static TypeId GetTypeId (void);
73 
86 
92  void SetUeRrc (Ptr<LteUeRrc> rrc);
93 
94 
95 private:
96  // methods forwarded from LteUeRrcSapUser
148  void DoSendIdealUeContextRemoveRequest (uint16_t rnti);
149 
151  void SetEnbRrcSapProvider ();
157  void DoReceivePdcpPdu (Ptr<Packet> p);
164 
166  uint16_t m_rnti;
170 
173 
174 };
175 
176 
185 {
194 
195 public:
197  virtual ~LteEnbRrcProtocolReal ();
198 
199  // inherited from Object
200  virtual void DoDispose (void);
205  static TypeId GetTypeId (void);
206 
219 
225  void SetCellId (uint16_t cellId);
226 
233  LteUeRrcSapProvider* GetUeRrcSapProvider (uint16_t rnti);
240  void SetUeRrcSapProvider (uint16_t rnti, LteUeRrcSapProvider* p);
241 
242 private:
243  // methods forwarded from LteEnbRrcSapUser
250  void DoSetupUe (uint16_t rnti, LteEnbRrcSapUser::SetupUeParameters params);
256  void DoRemoveUe (uint16_t rnti);
263  void DoSendSystemInformation (uint16_t cellId, LteRrcSap::SystemInformation msg);
341 
354  void DoReceivePdcpPdu (uint16_t rnti, Ptr<Packet> p);
355 
356  uint16_t m_rnti;
357  uint16_t m_cellId;
360  std::map<uint16_t, LteUeRrcSapProvider*> m_enbRrcSapProviderMap;
361  std::map<uint16_t, LteEnbRrcSapUser::SetupUeParameters> m_setupUeParametersMap;
362  std::map<uint16_t, LteEnbRrcSapProvider::CompleteSetupUeParameters> m_completeSetupUeParametersMap;
363 
364 };
365 
366 
369 {
370 public:
377  RealProtocolRlcSapUser (LteEnbRrcProtocolReal* pdcp, uint16_t rnti);
378 
379  // Interface implemented from LteRlcSapUser
380  virtual void ReceivePdcpPdu (Ptr<Packet> p);
381 
382 private:
385  uint16_t m_rnti;
386 };
387 
388 
389 }
390 
391 
392 #endif // LTE_RRC_PROTOCOL_REAL_H
Models the transmission of RRC messages from the UE to the eNB in a real fashion, by creating real RR...
void DoSendRrcConnectionRelease(uint16_t rnti, LteRrcSap::RrcConnectionRelease msg)
Send RRC connection release function.
std::map< uint16_t, LteEnbRrcSapProvider::CompleteSetupUeParameters > m_completeSetupUeParametersMap
complete setup UE parameters map
void SendSystemInformation(uint16_t cellId, LteRrcSap::SystemInformation msg)
Send system information function.
void DoSetupUe(uint16_t rnti, LteEnbRrcSapUser::SetupUeParameters params)
Setup UE function.
LteUeRrcSapProvider * GetUeRrcSapProvider(uint16_t rnti)
Get UE RRC SAP provider function.
void SetCellId(uint16_t cellId)
Set cell ID function.
void DoReceivePdcpSdu(LtePdcpSapUser::ReceivePdcpSduParameters params)
Receive PDCP SDU function.
void DoSendRrcConnectionReestablishmentReject(uint16_t rnti, LteRrcSap::RrcConnectionReestablishmentReject msg)
Send RRC connection reestabishment reject function.
void DoSendSystemInformation(uint16_t cellId, LteRrcSap::SystemInformation msg)
Send system information function.
void DoReceivePdcpPdu(uint16_t rnti, Ptr< Packet > p)
Receive PDCP PDU function.
LteEnbRrcSapProvider * m_enbRrcSapProvider
ENB RRC SAP provider.
Ptr< Packet > DoEncodeHandoverCommand(LteRrcSap::RrcConnectionReconfiguration msg)
Encode handover command function.
LteEnbRrcSapUser * GetLteEnbRrcSapUser()
Get LTE ENB RRC SAP user function.
void DoSendRrcConnectionSetup(uint16_t rnti, LteRrcSap::RrcConnectionSetup msg)
Send RRC connection setup function.
static TypeId GetTypeId(void)
Get the type ID.
void DoRemoveUe(uint16_t rnti)
Remove UE function.
Ptr< Packet > DoEncodeHandoverPreparationInformation(LteRrcSap::HandoverPreparationInfo msg)
Encode handover preparation information function.
void SetLteEnbRrcSapProvider(LteEnbRrcSapProvider *p)
Set LTE ENB RRC SAP provider function.
LteEnbRrcSapUser * m_enbRrcSapUser
ENB RRC SAP user.
void DoSendRrcConnectionReject(uint16_t rnti, LteRrcSap::RrcConnectionReject msg)
Send RRC connection reject function.
std::map< uint16_t, LteEnbRrcSapUser::SetupUeParameters > m_setupUeParametersMap
setup UE parameters map
LteRrcSap::RrcConnectionReconfiguration DoDecodeHandoverCommand(Ptr< Packet > p)
Decode handover command function.
LteRrcSap::HandoverPreparationInfo DoDecodeHandoverPreparationInformation(Ptr< Packet > p)
Decode handover preparation information function.
virtual void DoDispose(void)
Destructor implementation.
void DoSendRrcConnectionReestablishment(uint16_t rnti, LteRrcSap::RrcConnectionReestablishment msg)
Send RRC connection reestabishment function.
void SetUeRrcSapProvider(uint16_t rnti, LteUeRrcSapProvider *p)
Set UE RRC SAP provider function.
void DoSendRrcConnectionReconfiguration(uint16_t rnti, LteRrcSap::RrcConnectionReconfiguration msg)
Send RRC connection reconfiguration function.
std::map< uint16_t, LteUeRrcSapProvider * > m_enbRrcSapProviderMap
ENB RRC SAP provider map.
Part of the RRC protocol.
Definition: lte-rrc-sap.h:1201
Part of the RRC protocol.
Definition: lte-rrc-sap.h:1082
LtePdcpSpecificLtePdcpSapUser class.
Definition: lte-pdcp-sap.h:134
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
LteRlcSpecificLteRlcSapUser class.
Definition: lte-rlc-sap.h:125
Models the transmission of RRC messages from the UE to the eNB in a real fashion, by creating real RR...
LteEnbRrcSapProvider * m_enbRrcSapProvider
ENB RRC SAP provider.
LteUeRrcSapProvider * m_ueRrcSapProvider
UE RRC SAP provider.
LteUeRrcSapUser::SetupParameters m_setupParameters
setup parameters
void SetEnbRrcSapProvider()
Set ENB RRC SAP provider.
void DoSendRrcConnectionReconfigurationCompleted(LteRrcSap::RrcConnectionReconfigurationCompleted msg)
Send RRC connection reconfiguration setup completed function.
virtual void DoDispose(void)
Destructor implementation.
void SetLteUeRrcSapProvider(LteUeRrcSapProvider *p)
Set LTE UE RRC SAP provider function.
void DoSendRrcConnectionSetupCompleted(LteRrcSap::RrcConnectionSetupCompleted msg)
Send RRC connection setup completed function.
void DoReceivePdcpPdu(Ptr< Packet > p)
Receive PDCP PDU function.
Ptr< LteUeRrc > m_rrc
the RRC
void DoSendRrcConnectionReestablishmentComplete(LteRrcSap::RrcConnectionReestablishmentComplete msg)
Send RRC connection reestablishment complete function.
void DoReceivePdcpSdu(LtePdcpSapUser::ReceivePdcpSduParameters params)
Receive PDCP SDU function.
void DoSetup(LteUeRrcSapUser::SetupParameters params)
Setup function.
void SetUeRrc(Ptr< LteUeRrc > rrc)
Set UE RRC function.
LteUeRrcSapUser * m_ueRrcSapUser
UE RRC SAP user.
void DoSendMeasurementReport(LteRrcSap::MeasurementReport msg)
Send measurement report function.
void DoSendRrcConnectionReestablishmentRequest(LteRrcSap::RrcConnectionReestablishmentRequest msg)
Send RRC connection reestablishment request function.
LteUeRrcSapUser * GetLteUeRrcSapUser()
Get LTE UE RRC SAP user function.
void DoSendIdealUeContextRemoveRequest(uint16_t rnti)
Send ideal UE context remove request function.
static TypeId GetTypeId(void)
Get the type ID.
void DoSendRrcConnectionRequest(LteRrcSap::RrcConnectionRequest msg)
Send RRC connection request function.
LteUeRrcSapProvider::CompleteSetupParameters m_completeSetupParameters
complete setup parameters
Part of the RRC protocol.
Definition: lte-rrc-sap.h:1001
Part of the RRC protocol.
Definition: lte-rrc-sap.h:917
Template for the implementation of the LteEnbRrcSapUser as a member of an owner class of type C to wh...
Definition: lte-rrc-sap.h:1503
Template for the implementation of the LteUeRrcSapUser as a member of an owner class of type C to whi...
Definition: lte-rrc-sap.h:1306
A base class which provides memory management and object aggregation.
Definition: object.h:88
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:74
RealProtocolRlcSapUser class.
virtual void ReceivePdcpPdu(Ptr< Packet > p)
Called by the RLC entity to notify the PDCP entity of the reception of a new PDCP PDU.
LteEnbRrcProtocolReal * m_pdcp
PDCP.
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.
SetupUeParameters structure.
Definition: lte-rrc-sap.h:1086
Parameters for LtePdcpSapUser::ReceivePdcpSdu.
Definition: lte-pdcp-sap.h:78
HandoverPreparationInfo structure.
Definition: lte-rrc-sap.h:896
MeasurementReport structure.
Definition: lte-rrc-sap.h:902
RrcConnectionReconfigurationCompleted structure.
Definition: lte-rrc-sap.h:852
RrcConnectionReconfiguration structure.
Definition: lte-rrc-sap.h:837
RrcConnectionReestablishmentComplete structure.
Definition: lte-rrc-sap.h:873
RrcConnectionReestablishment structure.
Definition: lte-rrc-sap.h:866
RrcConnectionReestablishmentReject structure.
Definition: lte-rrc-sap.h:879
RrcConnectionReestablishmentRequest structure.
Definition: lte-rrc-sap.h:859
RrcConnectionReject structure.
Definition: lte-rrc-sap.h:890
RrcConnectionRelease structure.
Definition: lte-rrc-sap.h:884
RrcConnectionRequest structure.
Definition: lte-rrc-sap.h:693
RrcConnectionSetupCompleted structure.
Definition: lte-rrc-sap.h:706
RrcConnectionSetup structure.
Definition: lte-rrc-sap.h:699
SystemInformation structure.
Definition: lte-rrc-sap.h:609
CompleteSetupParameters structure.
Definition: lte-rrc-sap.h:1005
SetupParameters structure.
Definition: lte-rrc-sap.h:921