A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-rrc-protocol-real.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2012 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Authors: Nicola Baldo <nbaldo@cttc.es>
18 * Lluis Parcerisa <lparcerisa@cttc.cat>
19 */
20
21#ifndef LTE_RRC_PROTOCOL_REAL_H
22#define LTE_RRC_PROTOCOL_REAL_H
23
24#include "lte-pdcp-sap.h"
25#include "lte-rlc-sap.h"
26#include "lte-rrc-sap.h"
27
28#include <ns3/object.h>
29#include <ns3/ptr.h>
30
31#include <map>
32#include <stdint.h>
33
34namespace ns3
35{
36
38class LteUeRrcSapUser;
40class LteUeRrc;
41
42/**
43 * \ingroup lte
44 *
45 * Models the transmission of RRC messages from the UE to the eNB in
46 * a real fashion, by creating real RRC PDUs and transmitting them
47 * over Signaling Radio Bearers using radio resources allocated by the
48 * LTE MAC scheduler.
49 *
50 */
52{
53 /// allow MemberLteUeRrcSapUser<LteUeRrcProtocolReal> class friend access
55 /// allow LteRlcSpecificLteRlcSapUser<LteUeRrcProtocolReal> class friend access
57 /// allow LtePdcpSpecificLtePdcpSapUser<LteUeRrcProtocolReal> class friend access
59
60 public:
62 ~LteUeRrcProtocolReal() override;
63
64 // inherited from Object
65 void DoDispose() override;
66 /**
67 * \brief Get the type ID.
68 * \return the object TypeId
69 */
70 static TypeId GetTypeId();
71
72 /**
73 * Set LTE UE RRC SAP provider function
74 *
75 * \param p the LTE UE RRC SAP provider
76 */
78 /**
79 * Get LTE UE RRC SAP user function
80 *
81 * \returns LTE UE RRC SAP user
82 */
84
85 /**
86 * Set UE RRC function
87 *
88 * \param rrc the LTE UE RRC
89 */
90 void SetUeRrc(Ptr<LteUeRrc> rrc);
91
92 private:
93 // methods forwarded from LteUeRrcSapUser
94 /**
95 * Setup function
96 *
97 * \param params LteUeRrcSapUser::SetupParameters
98 */
100 /**
101 * Send RRC connection request function
102 *
103 * \param msg LteRrcSap::RrcConnectionRequest
104 */
106 /**
107 * Send RRC connection setup completed function
108 *
109 * \param msg LteRrcSap::RrcConnectionSetupCompleted
110 */
112 /**
113 * Send RRC connection reconfiguration setup completed function
114 *
115 * \param msg LteRrcSap::RrcConnectionReconfigurationCompleted
116 */
119 /**
120 * Send RRC connection reestablishment request function
121 *
122 * \param msg LteRrcSap::RrcConnectionReestablishmentRequest
123 */
126 /**
127 * Send RRC connection reestablishment complete function
128 *
129 * \param msg LteRrcSap::RrcConnectionReestablishmentComplete
130 */
133 /**
134 * Send measurement report function
135 *
136 * \param msg LteRrcSap::MeasurementReport
137 */
139 /**
140 * \brief Send ideal UE context remove request function
141 *
142 * Notify eNodeB to release UE context once radio link failure
143 * or random access failure is detected. It is needed since no
144 * RLF detection mechanism at eNodeB is implemented
145 *
146 * \param rnti the RNTI of the UE
147 */
148 void DoSendIdealUeContextRemoveRequest(uint16_t rnti);
149
150 /// Set ENB RRC SAP provider
152 /**
153 * Receive PDCP PDU function
154 *
155 * \param p the packet
156 */
158 /**
159 * Receive PDCP SDU function
160 *
161 * \param params LtePdcpSapUser::ReceivePdcpSduParameters
162 */
164
165 Ptr<LteUeRrc> m_rrc; ///< the RRC
166 uint16_t m_rnti; ///< the RNTI
167 LteUeRrcSapProvider* m_ueRrcSapProvider; ///< UE RRC SAP provider
168 LteUeRrcSapUser* m_ueRrcSapUser; ///< UE RRC SAP user
169 LteEnbRrcSapProvider* m_enbRrcSapProvider; ///< ENB RRC SAP provider
170
173 m_completeSetupParameters; ///< complete setup parameters
174};
175
176/**
177 * Models the transmission of RRC messages from the UE to the eNB in
178 * a real fashion, by creating real RRC PDUs and transmitting them
179 * over Signaling Radio Bearers using radio resources allocated by the
180 * LTE MAC scheduler.
181 *
182 */
184{
185 /// allow MemberLteEnbRrcSapUser<LteEnbRrcProtocolReal> class friend access
187 /// allow LtePdcpSpecificLtePdcpSapUser<LteEnbRrcProtocolReal> class friend access
189 /// allow LteRlcSpecificLteRlcSapUser<LteEnbRrcProtocolReal> class friend access
191 /// allow RealProtocolRlcSapUser class friend access
193
194 public:
196 ~LteEnbRrcProtocolReal() override;
197
198 // inherited from Object
199 void DoDispose() override;
200 /**
201 * \brief Get the type ID.
202 * \return the object TypeId
203 */
204 static TypeId GetTypeId();
205
206 /**
207 * Set LTE ENB RRC SAP provider function
208 *
209 * \param p LteEnbRrcSapProvider *
210 */
212 /**
213 * Get LTE ENB RRC SAP user function
214 *
215 * \returns LteEnbRrcSapUser *
216 */
218
219 /**
220 * Set cell ID function
221 *
222 * \param cellId the cell ID
223 */
224 void SetCellId(uint16_t cellId);
225
226 /**
227 * Get UE RRC SAP provider function
228 *
229 * \param rnti the RNTI
230 * \returns LteUeRrcSapProvider *
231 */
233 /**
234 * Set UE RRC SAP provider function
235 *
236 * \param rnti the RNTI
237 * \param p LteUeRrcSapProvider *
238 */
239 void SetUeRrcSapProvider(uint16_t rnti, LteUeRrcSapProvider* p);
240
241 private:
242 // methods forwarded from LteEnbRrcSapUser
243 /**
244 * Setup UE function
245 *
246 * \param rnti the RNTI
247 * \param params LteEnbRrcSapUser::SetupUeParameters
248 */
249 void DoSetupUe(uint16_t rnti, LteEnbRrcSapUser::SetupUeParameters params);
250 /**
251 * Remove UE function
252 *
253 * \param rnti the RNTI
254 */
255 void DoRemoveUe(uint16_t rnti);
256 /**
257 * Send system information function
258 *
259 * \param cellId cell ID
260 * \param msg LteRrcSap::SystemInformation
261 */
262 void DoSendSystemInformation(uint16_t cellId, LteRrcSap::SystemInformation msg);
263 /**
264 * Send system information function
265 *
266 * \param cellId cell ID
267 * \param msg LteRrcSap::SystemInformation
268 */
270 /**
271 * Send RRC connection setup function
272 *
273 * \param rnti the RNTI
274 * \param msg LteRrcSap::RrcConnectionSetup
275 */
277 /**
278 * Send RRC connection reconfiguration function
279 *
280 * \param rnti the RNTI
281 * \param msg LteRrcSap::RrcConnectionReconfiguration
282 */
283 void DoSendRrcConnectionReconfiguration(uint16_t rnti,
285 /**
286 * Send RRC connection reestabishment function
287 *
288 * \param rnti the RNTI
289 * \param msg LteRrcSap::RrcConnectionReestablishment
290 */
291 void DoSendRrcConnectionReestablishment(uint16_t rnti,
293 /**
294 * Send RRC connection reestabishment reject function
295 *
296 * \param rnti the RNTI
297 * \param msg LteRrcSap::RrcConnectionReestablishmentReject
298 */
300 uint16_t rnti,
302 /**
303 * Send RRC connection release function
304 *
305 * \param rnti the RNTI
306 * \param msg LteRrcSap::RrcConnectionRelease
307 */
309 /**
310 * Send RRC connection reject function
311 *
312 * \param rnti the RNTI
313 * \param msg LteRrcSap::RrcConnectionReject
314 */
316 /**
317 * Encode handover preparation information function
318 *
319 * \param msg LteRrcSap::HandoverPreparationInfo
320 * \returns the packet
321 */
323 /**
324 * Decode handover preparation information function
325 *
326 * \param p the packet
327 * \returns LteRrcSap::HandoverPreparationInfo
328 */
330 /**
331 * Encode handover command function
332 *
333 * \param msg LteRrcSap::RrcConnectionReconfiguration
334 * \returns the packet
335 */
337 /**
338 * Decode handover command function
339 *
340 * \param p the packet
341 * \returns LteRrcSap::RrcConnectionReconfiguration
342 */
344
345 /**
346 * Receive PDCP SDU function
347 *
348 * \param params LtePdcpSapUser::ReceivePdcpSduParameters
349 */
351 /**
352 * Receive PDCP PDU function
353 *
354 * \param rnti the RNTI
355 * \param p the packet
356 */
357 void DoReceivePdcpPdu(uint16_t rnti, Ptr<Packet> p);
358
359 uint16_t m_rnti; ///< the RNTI
360 uint16_t m_cellId; ///< the cell ID
361 LteEnbRrcSapProvider* m_enbRrcSapProvider; ///< ENB RRC SAP provider
362 LteEnbRrcSapUser* m_enbRrcSapUser; ///< ENB RRC SAP user
363 std::map<uint16_t, LteUeRrcSapProvider*> m_enbRrcSapProviderMap; ///< ENB RRC SAP provider map
364 std::map<uint16_t, LteEnbRrcSapUser::SetupUeParameters>
365 m_setupUeParametersMap; ///< setup UE parameters map
366 std::map<uint16_t, LteEnbRrcSapProvider::CompleteSetupUeParameters>
367 m_completeSetupUeParametersMap; ///< complete setup UE parameters map
368};
369
370/// RealProtocolRlcSapUser class
372{
373 public:
374 /**
375 * Real protocol RC SAP user
376 *
377 * \param pdcp LteEnbRrcProtocolReal *
378 * \param rnti the RNTI
379 */
380 RealProtocolRlcSapUser(LteEnbRrcProtocolReal* pdcp, uint16_t rnti);
381
382 // Interface implemented from LteRlcSapUser
383 void ReceivePdcpPdu(Ptr<Packet> p) override;
384
385 private:
388 uint16_t m_rnti; ///< RNTI
389};
390
391} // namespace ns3
392
393#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.
static TypeId GetTypeId()
Get the type ID.
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.
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.
void DoDispose() override
Destructor implementation.
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.
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:1244
Part of the RRC protocol.
Definition: lte-rrc-sap.h:1124
LtePdcpSpecificLtePdcpSapUser class.
Definition: lte-pdcp-sap.h:129
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:67
LteRlcSpecificLteRlcSapUser class.
Definition: lte-rlc-sap.h:120
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.
void SetLteUeRrcSapProvider(LteUeRrcSapProvider *p)
Set LTE UE RRC SAP provider function.
static TypeId GetTypeId()
Get the type ID.
void DoSendRrcConnectionReestablishmentRequest(LteRrcSap::RrcConnectionReestablishmentRequest msg) const
Send RRC connection reestablishment request function.
void DoReceivePdcpPdu(Ptr< Packet > p)
Receive PDCP PDU function.
void DoSendRrcConnectionReestablishmentComplete(LteRrcSap::RrcConnectionReestablishmentComplete msg) const
Send RRC connection reestablishment complete function.
Ptr< LteUeRrc > m_rrc
the RRC
void DoReceivePdcpSdu(LtePdcpSapUser::ReceivePdcpSduParameters params)
Receive PDCP SDU function.
void DoSetup(LteUeRrcSapUser::SetupParameters params)
Setup function.
void DoSendRrcConnectionSetupCompleted(LteRrcSap::RrcConnectionSetupCompleted msg) const
Send RRC connection setup completed 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.
LteUeRrcSapUser * GetLteUeRrcSapUser()
Get LTE UE RRC SAP user function.
void DoSendIdealUeContextRemoveRequest(uint16_t rnti)
Send ideal UE context remove request function.
void DoDispose() override
Destructor implementation.
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:1045
Part of the RRC protocol.
Definition: lte-rrc-sap.h:960
Template for the implementation of the LteEnbRrcSapUser as a member of an owner class of type C to wh...
Definition: lte-rrc-sap.h:1539
Template for the implementation of the LteUeRrcSapUser as a member of an owner class of type C to whi...
Definition: lte-rrc-sap.h:1344
A base class which provides memory management and object aggregation.
Definition: object.h:89
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
RealProtocolRlcSapUser class.
LteEnbRrcProtocolReal * m_pdcp
PDCP.
void ReceivePdcpPdu(Ptr< Packet > p) override
Called by the RLC entity to notify the PDCP entity of the reception of a new PDCP PDU.
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:1128
Parameters for LtePdcpSapUser::ReceivePdcpSdu.
Definition: lte-pdcp-sap.h:77
HandoverPreparationInfo structure.
Definition: lte-rrc-sap.h:942
MeasurementReport structure.
Definition: lte-rrc-sap.h:948
RrcConnectionReconfigurationCompleted structure.
Definition: lte-rrc-sap.h:898
RrcConnectionReconfiguration structure.
Definition: lte-rrc-sap.h:881
RrcConnectionReestablishmentComplete structure.
Definition: lte-rrc-sap.h:919
RrcConnectionReestablishment structure.
Definition: lte-rrc-sap.h:911
RrcConnectionReestablishmentReject structure.
Definition: lte-rrc-sap.h:925
RrcConnectionReestablishmentRequest structure.
Definition: lte-rrc-sap.h:904
RrcConnectionReject structure.
Definition: lte-rrc-sap.h:936
RrcConnectionRelease structure.
Definition: lte-rrc-sap.h:930
RrcConnectionRequest structure.
Definition: lte-rrc-sap.h:730
RrcConnectionSetupCompleted structure.
Definition: lte-rrc-sap.h:744
RrcConnectionSetup structure.
Definition: lte-rrc-sap.h:736
SystemInformation structure.
Definition: lte-rrc-sap.h:643
CompleteSetupParameters structure.
Definition: lte-rrc-sap.h:1049
SetupParameters structure.
Definition: lte-rrc-sap.h:964