A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-rrc-protocol-ideal.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 * Author: Nicola Baldo <nbaldo@cttc.es>
7 */
8
9#ifndef LTE_RRC_PROTOCOL_IDEAL_H
10#define LTE_RRC_PROTOCOL_IDEAL_H
11
12#include "lte-rrc-sap.h"
13
14#include <ns3/object.h>
15#include <ns3/ptr.h>
16
17#include <map>
18#include <stdint.h>
19
20namespace ns3
21{
22
24class LteUeRrcSapUser;
26class LteUeRrc;
27
28/**
29 * \ingroup lte
30 *
31 * Models the transmission of RRC messages from the UE to the eNB in
32 * an ideal fashion, without errors and without consuming any radio
33 * resources.
34 *
35 */
37{
38 /// allow MemberLteUeRrcSapUser<LteUeRrcProtocolIdeal> class friend access
40
41 public:
43 ~LteUeRrcProtocolIdeal() override;
44
45 // inherited from Object
46 void DoDispose() override;
47 /**
48 * \brief Get the type ID.
49 * \return the object TypeId
50 */
51 static TypeId GetTypeId();
52
53 /**
54 * Set LTE UE RRC SAP provider function
55 *
56 * \param p LTE UE RRC SAP provider
57 */
59 /**
60 * Get LTE UE RRC SAP user function
61 *
62 * \returns LTE UE RRC SAP user
63 */
65
66 /**
67 * Set LTE UE RRC function
68 *
69 * \param rrc LTE UE RRC
70 */
71 void SetUeRrc(Ptr<LteUeRrc> rrc);
72
73 private:
74 // methods forwarded from LteUeRrcSapUser
75 /**
76 * Setup function
77 *
78 * \param params LteUeRrcSapUser::SetupParameters
79 */
81 /**
82 * Send RRC connection request function
83 *
84 * \param msg LteRrcSap::RrcConnectionRequest
85 */
87 /**
88 * Send RRC connection setup completed function
89 *
90 * \param msg LteRrcSap::RrcConnectionSetupCompleted
91 */
93 /**
94 * Send RRC connection reconfiguration completed function
95 *
96 * \param msg LteRrcSap::RrcConnectionReconfigurationCompleted
97 */
100 /**
101 * Send RRC connection reestablishment request function
102 *
103 * \param msg LteRrcSap::RrcConnectionReestablishmentRequest
104 */
107 /**
108 * Send RRC connection reestablishment complete function
109 *
110 * \param msg LteRrcSap::RrcConnectionReestablishmentRequest
111 */
114 /**
115 * Send measurement report function
116 *
117 * \param msg LteRrcSap::MeasurementReport
118 */
120
121 /**
122 * \brief Send Ideal UE context remove request function
123 *
124 * Notify eNodeB to release UE context once radio link failure
125 * or random access failure is detected. It is needed since no
126 * RLF detection mechanism at eNodeB is implemented
127 *
128 * \param rnti the RNTI of the UE
129 */
130 void DoSendIdealUeContextRemoveRequest(uint16_t rnti);
131
132 /// Set ENB RRC SAP provider
134
135 Ptr<LteUeRrc> m_rrc; ///< the RRC
136 uint16_t m_rnti; ///< the RNTI
137 LteUeRrcSapProvider* m_ueRrcSapProvider; ///< the UE RRC SAP provider
138 LteUeRrcSapUser* m_ueRrcSapUser; ///< the RRC SAP user
139 LteEnbRrcSapProvider* m_enbRrcSapProvider; ///< the ENB RRC SAP provider
140};
141
142/**
143 * Models the transmission of RRC messages from the UE to the eNB in
144 * an ideal fashion, without errors and without consuming any radio
145 * resources.
146 *
147 */
149{
150 /// allow MemberLteEnbRrcSapUser<LteEnbRrcProtocolIdeal> class friend access
152
153 public:
155 ~LteEnbRrcProtocolIdeal() override;
156
157 // inherited from Object
158 void DoDispose() override;
159 /**
160 * \brief Get the type ID.
161 * \return the object TypeId
162 */
163 static TypeId GetTypeId();
164
165 /**
166 * Set LTE ENB RRC SAP provider function
167 *
168 * \param p the LTE ENB RRC SAP provider
169 */
171 /**
172 * Get LTE ENB RRC SAP user function
173 *
174 * \returns LTE ENB RRC SAP user
175 */
177
178 /**
179 * Set the cell ID function
180 *
181 * \param cellId the cell ID
182 */
183 void SetCellId(uint16_t cellId);
184
185 /**
186 * Get LTE UE RRC SAP provider function
187 *
188 * \param rnti the RNTI
189 * \returns LTE UE RRC SAP provider
190 */
192 /**
193 * Set UE RRC SAP provider function
194 *
195 * \param rnti the RNTI
196 * \param p the UE RRC SAP provider
197 */
198 void SetUeRrcSapProvider(uint16_t rnti, LteUeRrcSapProvider* p);
199
200 private:
201 // methods forwarded from LteEnbRrcSapUser
202 /**
203 * Setup UE function
204 *
205 * \param rnti the RNTI
206 * \param params LteEnbRrcSapUser::SetupUeParameters
207 */
208 void DoSetupUe(uint16_t rnti, LteEnbRrcSapUser::SetupUeParameters params);
209 /**
210 * Remove UE function
211 *
212 * \param rnti the RNTI
213 */
214 void DoRemoveUe(uint16_t rnti);
215 /**
216 * Send system information function
217 *
218 * \param cellId cell ID
219 * \param msg LteRrcSap::SystemInformation
220 */
221 void DoSendSystemInformation(uint16_t cellId, LteRrcSap::SystemInformation msg);
222 /**
223 * Send system information function
224 *
225 * \param msg LteRrcSap::SystemInformation
226 */
228 /**
229 * Send RRC connection setup function
230 *
231 * \param rnti the RNTI
232 * \param msg LteRrcSap::RrcConnectionSetup
233 */
235 /**
236 * Send RRC connection reconfiguration function
237 *
238 * \param rnti the RNTI
239 * \param msg LteRrcSap::RrcConnectionReconfiguration
240 */
241 void DoSendRrcConnectionReconfiguration(uint16_t rnti,
243 /**
244 * Send RRC connection reestablishment function
245 *
246 * \param rnti the RNTI
247 * \param msg LteRrcSap::RrcConnectionReestablishment
248 */
249 void DoSendRrcConnectionReestablishment(uint16_t rnti,
251 /**
252 * Send RRC connection reestablishment reject function
253 *
254 * \param rnti the RNTI
255 * \param msg LteRrcSap::RrcConnectionReestablishmentReject
256 */
258 uint16_t rnti,
260 /**
261 * Send RRC connection release function
262 *
263 * \param rnti the RNTI
264 * \param msg LteRrcSap::RrcConnectionRelease
265 */
267 /**
268 * Send RRC connection reject function
269 *
270 * \param rnti the RNTI
271 * \param msg LteRrcSap::RrcConnectionReject
272 */
274 /**
275 * Encode handover preparation information function
276 *
277 * \param msg LteRrcSap::HandoverPreparationInfo
278 * \returns the packet
279 */
281 /**
282 * Encode handover preparation information function
283 *
284 * \param p the packet
285 * \returns LteRrcSap::HandoverPreparationInfo
286 */
288 /**
289 * Encode handover command function
290 *
291 * \param msg LteRrcSap::RrcConnectionReconfiguration
292 * \returns rnti the RNTI
293 */
295 /**
296 * Decode handover command function
297 *
298 * \param p the packet
299 * \returns LteRrcSap::RrcConnectionReconfiguration
300 */
302
303 uint16_t m_rnti; ///< the RNTI
304 uint16_t m_cellId; ///< the cell ID
305 LteEnbRrcSapProvider* m_enbRrcSapProvider; ///< the ENB RRC SAP provider
306 LteEnbRrcSapUser* m_enbRrcSapUser; ///< the ENB RRC SAP user
307 std::map<uint16_t, LteUeRrcSapProvider*>
308 m_enbRrcSapProviderMap; ///< the LTE UE RRC SAP provider
309};
310
311} // namespace ns3
312
313#endif // LTE_RRC_PROTOCOL_IDEAL_H
Models the transmission of RRC messages from the UE to the eNB in an ideal fashion,...
void DoRemoveUe(uint16_t rnti)
Remove UE function.
void DoSendRrcConnectionReconfiguration(uint16_t rnti, LteRrcSap::RrcConnectionReconfiguration msg)
Send RRC connection reconfiguration function.
LteRrcSap::HandoverPreparationInfo DoDecodeHandoverPreparationInformation(Ptr< Packet > p)
Encode handover preparation information function.
void SetUeRrcSapProvider(uint16_t rnti, LteUeRrcSapProvider *p)
Set UE RRC SAP provider function.
void DoSendRrcConnectionSetup(uint16_t rnti, LteRrcSap::RrcConnectionSetup msg)
Send RRC connection setup function.
LteEnbRrcSapProvider * m_enbRrcSapProvider
the ENB RRC SAP provider
void SetCellId(uint16_t cellId)
Set the cell ID function.
static TypeId GetTypeId()
Get the type ID.
void DoSendSystemInformation(uint16_t cellId, LteRrcSap::SystemInformation msg)
Send system information function.
void DoSendRrcConnectionReject(uint16_t rnti, LteRrcSap::RrcConnectionReject msg)
Send RRC connection reject function.
LteEnbRrcSapUser * m_enbRrcSapUser
the ENB RRC SAP user
void DoSendRrcConnectionReestablishment(uint16_t rnti, LteRrcSap::RrcConnectionReestablishment msg)
Send RRC connection reestablishment function.
LteRrcSap::RrcConnectionReconfiguration DoDecodeHandoverCommand(Ptr< Packet > p)
Decode handover command function.
void DoSendRrcConnectionRelease(uint16_t rnti, LteRrcSap::RrcConnectionRelease msg)
Send RRC connection release function.
void SetLteEnbRrcSapProvider(LteEnbRrcSapProvider *p)
Set LTE ENB RRC SAP provider function.
std::map< uint16_t, LteUeRrcSapProvider * > m_enbRrcSapProviderMap
the LTE UE RRC SAP provider
void SendSystemInformation(LteRrcSap::SystemInformation msg)
Send system information function.
void DoSendRrcConnectionReestablishmentReject(uint16_t rnti, LteRrcSap::RrcConnectionReestablishmentReject msg)
Send RRC connection reestablishment reject function.
Ptr< Packet > DoEncodeHandoverPreparationInformation(LteRrcSap::HandoverPreparationInfo msg)
Encode handover preparation information function.
LteEnbRrcSapUser * GetLteEnbRrcSapUser()
Get LTE ENB RRC SAP user function.
Ptr< Packet > DoEncodeHandoverCommand(LteRrcSap::RrcConnectionReconfiguration msg)
Encode handover command function.
void DoSetupUe(uint16_t rnti, LteEnbRrcSapUser::SetupUeParameters params)
Setup UE function.
LteUeRrcSapProvider * GetUeRrcSapProvider(uint16_t rnti)
Get LTE UE RRC SAP provider function.
void DoDispose() override
Destructor implementation.
Part of the RRC protocol.
Part of the RRC protocol.
Models the transmission of RRC messages from the UE to the eNB in an ideal fashion,...
void DoSendRrcConnectionSetupCompleted(LteRrcSap::RrcConnectionSetupCompleted msg)
Send RRC connection setup completed function.
void DoSendMeasurementReport(LteRrcSap::MeasurementReport msg)
Send measurement report function.
void DoSendIdealUeContextRemoveRequest(uint16_t rnti)
Send Ideal UE context remove request function.
LteUeRrcSapUser * m_ueRrcSapUser
the RRC SAP user
void DoDispose() override
Destructor implementation.
void SetUeRrc(Ptr< LteUeRrc > rrc)
Set LTE UE RRC function.
void DoSendRrcConnectionReestablishmentRequest(LteRrcSap::RrcConnectionReestablishmentRequest msg)
Send RRC connection reestablishment request function.
void DoSendRrcConnectionReconfigurationCompleted(LteRrcSap::RrcConnectionReconfigurationCompleted msg)
Send RRC connection reconfiguration completed function.
void SetLteUeRrcSapProvider(LteUeRrcSapProvider *p)
Set LTE UE RRC SAP provider function.
void SetEnbRrcSapProvider()
Set ENB RRC SAP provider.
void DoSendRrcConnectionReestablishmentComplete(LteRrcSap::RrcConnectionReestablishmentComplete msg)
Send RRC connection reestablishment complete function.
void DoSetup(LteUeRrcSapUser::SetupParameters params)
Setup function.
LteUeRrcSapUser * GetLteUeRrcSapUser()
Get LTE UE RRC SAP user function.
LteEnbRrcSapProvider * m_enbRrcSapProvider
the ENB RRC SAP provider
void DoSendRrcConnectionRequest(LteRrcSap::RrcConnectionRequest msg)
Send RRC connection request function.
LteUeRrcSapProvider * m_ueRrcSapProvider
the UE RRC SAP provider
static TypeId GetTypeId()
Get the type ID.
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.
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.
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.
SetupParameters structure.