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 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Authors: Nicola Baldo <nbaldo@cttc.es>
7 * Lluis Parcerisa <lparcerisa@cttc.cat>
8 */
9
10#ifndef LTE_RRC_PROTOCOL_REAL_H
11#define LTE_RRC_PROTOCOL_REAL_H
12
13#include "lte-pdcp-sap.h"
14#include "lte-rlc-sap.h"
15#include "lte-rrc-sap.h"
16
17#include <ns3/object.h>
18#include <ns3/ptr.h>
19
20#include <map>
21#include <stdint.h>
22
23namespace ns3
24{
25
27class LteUeRrcSapUser;
29class LteUeRrc;
30
31/**
32 * \ingroup lte
33 *
34 * Models the transmission of RRC messages from the UE to the eNB in
35 * a real fashion, by creating real RRC PDUs and transmitting them
36 * over Signaling Radio Bearers using radio resources allocated by the
37 * LTE MAC scheduler.
38 *
39 */
41{
42 /// allow MemberLteUeRrcSapUser<LteUeRrcProtocolReal> class friend access
44 /// allow LteRlcSpecificLteRlcSapUser<LteUeRrcProtocolReal> class friend access
46 /// allow LtePdcpSpecificLtePdcpSapUser<LteUeRrcProtocolReal> class friend access
48
49 public:
51 ~LteUeRrcProtocolReal() override;
52
53 // inherited from Object
54 void DoDispose() override;
55 /**
56 * \brief Get the type ID.
57 * \return the object TypeId
58 */
59 static TypeId GetTypeId();
60
61 /**
62 * Set LTE UE RRC SAP provider function
63 *
64 * \param p the LTE UE RRC SAP provider
65 */
67 /**
68 * Get LTE UE RRC SAP user function
69 *
70 * \returns LTE UE RRC SAP user
71 */
73
74 /**
75 * Set UE RRC function
76 *
77 * \param rrc the LTE UE RRC
78 */
79 void SetUeRrc(Ptr<LteUeRrc> rrc);
80
81 private:
82 // methods forwarded from LteUeRrcSapUser
83 /**
84 * Setup function
85 *
86 * \param params LteUeRrcSapUser::SetupParameters
87 */
89 /**
90 * Send RRC connection request function
91 *
92 * \param msg LteRrcSap::RrcConnectionRequest
93 */
95 /**
96 * Send RRC connection setup completed function
97 *
98 * \param msg LteRrcSap::RrcConnectionSetupCompleted
99 */
101 /**
102 * Send RRC connection reconfiguration setup completed function
103 *
104 * \param msg LteRrcSap::RrcConnectionReconfigurationCompleted
105 */
108 /**
109 * Send RRC connection reestablishment request function
110 *
111 * \param msg LteRrcSap::RrcConnectionReestablishmentRequest
112 */
115 /**
116 * Send RRC connection reestablishment complete function
117 *
118 * \param msg LteRrcSap::RrcConnectionReestablishmentComplete
119 */
122 /**
123 * Send measurement report function
124 *
125 * \param msg LteRrcSap::MeasurementReport
126 */
128 /**
129 * \brief Send ideal UE context remove request function
130 *
131 * Notify eNodeB to release UE context once radio link failure
132 * or random access failure is detected. It is needed since no
133 * RLF detection mechanism at eNodeB is implemented
134 *
135 * \param rnti the RNTI of the UE
136 */
137 void DoSendIdealUeContextRemoveRequest(uint16_t rnti);
138
139 /// Set ENB RRC SAP provider
141 /**
142 * Receive PDCP PDU function
143 *
144 * \param p the packet
145 */
147 /**
148 * Receive PDCP SDU function
149 *
150 * \param params LtePdcpSapUser::ReceivePdcpSduParameters
151 */
153
154 Ptr<LteUeRrc> m_rrc; ///< the RRC
155 uint16_t m_rnti; ///< the RNTI
156 LteUeRrcSapProvider* m_ueRrcSapProvider; ///< UE RRC SAP provider
157 LteUeRrcSapUser* m_ueRrcSapUser; ///< UE RRC SAP user
158 LteEnbRrcSapProvider* m_enbRrcSapProvider; ///< ENB RRC SAP provider
159
162 m_completeSetupParameters; ///< complete setup parameters
163};
164
165/**
166 * Models the transmission of RRC messages from the UE to the eNB in
167 * a real fashion, by creating real RRC PDUs and transmitting them
168 * over Signaling Radio Bearers using radio resources allocated by the
169 * LTE MAC scheduler.
170 *
171 */
173{
174 /// allow MemberLteEnbRrcSapUser<LteEnbRrcProtocolReal> class friend access
176 /// allow LtePdcpSpecificLtePdcpSapUser<LteEnbRrcProtocolReal> class friend access
178 /// allow LteRlcSpecificLteRlcSapUser<LteEnbRrcProtocolReal> class friend access
180 /// allow RealProtocolRlcSapUser class friend access
182
183 public:
185 ~LteEnbRrcProtocolReal() override;
186
187 // inherited from Object
188 void DoDispose() override;
189 /**
190 * \brief Get the type ID.
191 * \return the object TypeId
192 */
193 static TypeId GetTypeId();
194
195 /**
196 * Set LTE ENB RRC SAP provider function
197 *
198 * \param p LteEnbRrcSapProvider *
199 */
201 /**
202 * Get LTE ENB RRC SAP user function
203 *
204 * \returns LteEnbRrcSapUser *
205 */
207
208 /**
209 * Set cell ID function
210 *
211 * \param cellId the cell ID
212 */
213 void SetCellId(uint16_t cellId);
214
215 /**
216 * Get UE RRC SAP provider function
217 *
218 * \param rnti the RNTI
219 * \returns LteUeRrcSapProvider *
220 */
222 /**
223 * Set UE RRC SAP provider function
224 *
225 * \param rnti the RNTI
226 * \param p LteUeRrcSapProvider *
227 */
228 void SetUeRrcSapProvider(uint16_t rnti, LteUeRrcSapProvider* p);
229
230 private:
231 // methods forwarded from LteEnbRrcSapUser
232 /**
233 * Setup UE function
234 *
235 * \param rnti the RNTI
236 * \param params LteEnbRrcSapUser::SetupUeParameters
237 */
238 void DoSetupUe(uint16_t rnti, LteEnbRrcSapUser::SetupUeParameters params);
239 /**
240 * Remove UE function
241 *
242 * \param rnti the RNTI
243 */
244 void DoRemoveUe(uint16_t rnti);
245 /**
246 * Send system information function
247 *
248 * \param cellId cell ID
249 * \param msg LteRrcSap::SystemInformation
250 */
251 void DoSendSystemInformation(uint16_t cellId, LteRrcSap::SystemInformation msg);
252 /**
253 * Send system information function
254 *
255 * \param cellId cell ID
256 * \param msg LteRrcSap::SystemInformation
257 */
259 /**
260 * Send RRC connection setup function
261 *
262 * \param rnti the RNTI
263 * \param msg LteRrcSap::RrcConnectionSetup
264 */
266 /**
267 * Send RRC connection reconfiguration function
268 *
269 * \param rnti the RNTI
270 * \param msg LteRrcSap::RrcConnectionReconfiguration
271 */
272 void DoSendRrcConnectionReconfiguration(uint16_t rnti,
274 /**
275 * Send RRC connection reestabishment function
276 *
277 * \param rnti the RNTI
278 * \param msg LteRrcSap::RrcConnectionReestablishment
279 */
280 void DoSendRrcConnectionReestablishment(uint16_t rnti,
282 /**
283 * Send RRC connection reestabishment reject function
284 *
285 * \param rnti the RNTI
286 * \param msg LteRrcSap::RrcConnectionReestablishmentReject
287 */
289 uint16_t rnti,
291 /**
292 * Send RRC connection release function
293 *
294 * \param rnti the RNTI
295 * \param msg LteRrcSap::RrcConnectionRelease
296 */
298 /**
299 * Send RRC connection reject function
300 *
301 * \param rnti the RNTI
302 * \param msg LteRrcSap::RrcConnectionReject
303 */
305 /**
306 * Encode handover preparation information function
307 *
308 * \param msg LteRrcSap::HandoverPreparationInfo
309 * \returns the packet
310 */
312 /**
313 * Decode handover preparation information function
314 *
315 * \param p the packet
316 * \returns LteRrcSap::HandoverPreparationInfo
317 */
319 /**
320 * Encode handover command function
321 *
322 * \param msg LteRrcSap::RrcConnectionReconfiguration
323 * \returns the packet
324 */
326 /**
327 * Decode handover command function
328 *
329 * \param p the packet
330 * \returns LteRrcSap::RrcConnectionReconfiguration
331 */
333
334 /**
335 * Receive PDCP SDU function
336 *
337 * \param params LtePdcpSapUser::ReceivePdcpSduParameters
338 */
340 /**
341 * Receive PDCP PDU function
342 *
343 * \param rnti the RNTI
344 * \param p the packet
345 */
346 void DoReceivePdcpPdu(uint16_t rnti, Ptr<Packet> p);
347
348 uint16_t m_rnti; ///< the RNTI
349 uint16_t m_cellId; ///< the cell ID
350 LteEnbRrcSapProvider* m_enbRrcSapProvider; ///< ENB RRC SAP provider
351 LteEnbRrcSapUser* m_enbRrcSapUser; ///< ENB RRC SAP user
352 std::map<uint16_t, LteUeRrcSapProvider*> m_enbRrcSapProviderMap; ///< ENB RRC SAP provider map
353 std::map<uint16_t, LteEnbRrcSapUser::SetupUeParameters>
354 m_setupUeParametersMap; ///< setup UE parameters map
355 std::map<uint16_t, LteEnbRrcSapProvider::CompleteSetupUeParameters>
356 m_completeSetupUeParametersMap; ///< complete setup UE parameters map
357};
358
359/// RealProtocolRlcSapUser class
361{
362 public:
363 /**
364 * Real protocol RC SAP user
365 *
366 * \param pdcp LteEnbRrcProtocolReal *
367 * \param rnti the RNTI
368 */
369 RealProtocolRlcSapUser(LteEnbRrcProtocolReal* pdcp, uint16_t rnti);
370
371 // Interface implemented from LteRlcSapUser
372 void ReceivePdcpPdu(Ptr<Packet> p) override;
373
374 private:
377 uint16_t m_rnti; ///< RNTI
378};
379
380} // namespace ns3
381
382#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.
Part of the RRC protocol.
LtePdcpSpecificLtePdcpSapUser class.
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:56
LteRlcSpecificLteRlcSapUser class.
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.
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.
Part of the RRC protocol.
Template for the implementation of the LteEnbRrcSapUser as a member of an owner class of type C to wh...
Template for the implementation of the LteUeRrcSapUser as a member of an owner class of type C to whi...
A base class which provides memory management and object aggregation.
Definition object.h:78
Smart pointer class similar to boost::intrusive_ptr.
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:48
Every class exported by the ns3 library is enclosed in the ns3 namespace.
SetupUeParameters structure.
Parameters for LtePdcpSapUser::ReceivePdcpSdu.
HandoverPreparationInfo structure.
MeasurementReport structure.
RrcConnectionReconfigurationCompleted structure.
RrcConnectionReconfiguration structure.
RrcConnectionReestablishmentComplete structure.
RrcConnectionReestablishment structure.
RrcConnectionReestablishmentReject structure.
RrcConnectionReestablishmentRequest structure.
RrcConnectionReject structure.
RrcConnectionRelease structure.
RrcConnectionRequest structure.
RrcConnectionSetupCompleted structure.
RrcConnectionSetup structure.
SystemInformation structure.
CompleteSetupParameters structure.
SetupParameters structure.