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 * 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 * Author: Nicola Baldo <nbaldo@cttc.es>
18 */
19
20#ifndef LTE_RRC_PROTOCOL_IDEAL_H
21#define LTE_RRC_PROTOCOL_IDEAL_H
22
23#include "lte-rrc-sap.h"
24
25#include <ns3/object.h>
26#include <ns3/ptr.h>
27
28#include <map>
29#include <stdint.h>
30
31namespace ns3
32{
33
35class LteUeRrcSapUser;
37class LteUeRrc;
38
39/**
40 * \ingroup lte
41 *
42 * Models the transmission of RRC messages from the UE to the eNB in
43 * an ideal fashion, without errors and without consuming any radio
44 * resources.
45 *
46 */
48{
49 /// allow MemberLteUeRrcSapUser<LteUeRrcProtocolIdeal> class friend access
51
52 public:
54 ~LteUeRrcProtocolIdeal() override;
55
56 // inherited from Object
57 void DoDispose() override;
58 /**
59 * \brief Get the type ID.
60 * \return the object TypeId
61 */
62 static TypeId GetTypeId();
63
64 /**
65 * Set LTE UE RRC SAP provider function
66 *
67 * \param p LTE UE RRC SAP provider
68 */
70 /**
71 * Get LTE UE RRC SAP user function
72 *
73 * \returns LTE UE RRC SAP user
74 */
76
77 /**
78 * Set LTE UE RRC function
79 *
80 * \param rrc LTE UE RRC
81 */
82 void SetUeRrc(Ptr<LteUeRrc> rrc);
83
84 private:
85 // methods forwarded from LteUeRrcSapUser
86 /**
87 * Setup function
88 *
89 * \param params LteUeRrcSapUser::SetupParameters
90 */
92 /**
93 * Send RRC connection request function
94 *
95 * \param msg LteRrcSap::RrcConnectionRequest
96 */
98 /**
99 * Send RRC connection setup completed function
100 *
101 * \param msg LteRrcSap::RrcConnectionSetupCompleted
102 */
104 /**
105 * Send RRC connection reconfiguration completed function
106 *
107 * \param msg LteRrcSap::RrcConnectionReconfigurationCompleted
108 */
111 /**
112 * Send RRC connection reestablishment request function
113 *
114 * \param msg LteRrcSap::RrcConnectionReestablishmentRequest
115 */
118 /**
119 * Send RRC connection reestablishment complete function
120 *
121 * \param msg LteRrcSap::RrcConnectionReestablishmentRequest
122 */
125 /**
126 * Send measurement report function
127 *
128 * \param msg LteRrcSap::MeasurementReport
129 */
131
132 /**
133 * \brief Send Ideal UE context remove request function
134 *
135 * Notify eNodeB to release UE context once radio link failure
136 * or random access failure is detected. It is needed since no
137 * RLF detection mechanism at eNodeB is implemented
138 *
139 * \param rnti the RNTI of the UE
140 */
141 void DoSendIdealUeContextRemoveRequest(uint16_t rnti);
142
143 /// Set ENB RRC SAP provider
145
146 Ptr<LteUeRrc> m_rrc; ///< the RRC
147 uint16_t m_rnti; ///< the RNTI
148 LteUeRrcSapProvider* m_ueRrcSapProvider; ///< the UE RRC SAP provider
149 LteUeRrcSapUser* m_ueRrcSapUser; ///< the RRC SAP user
150 LteEnbRrcSapProvider* m_enbRrcSapProvider; ///< the ENB RRC SAP provider
151};
152
153/**
154 * Models the transmission of RRC messages from the UE to the eNB in
155 * an ideal fashion, without errors and without consuming any radio
156 * resources.
157 *
158 */
160{
161 /// allow MemberLteEnbRrcSapUser<LteEnbRrcProtocolIdeal> class friend access
163
164 public:
166 ~LteEnbRrcProtocolIdeal() override;
167
168 // inherited from Object
169 void DoDispose() override;
170 /**
171 * \brief Get the type ID.
172 * \return the object TypeId
173 */
174 static TypeId GetTypeId();
175
176 /**
177 * Set LTE ENB RRC SAP provider function
178 *
179 * \param p the LTE ENB RRC SAP provider
180 */
182 /**
183 * Get LTE ENB RRC SAP user function
184 *
185 * \returns LTE ENB RRC SAP user
186 */
188
189 /**
190 * Set the cell ID function
191 *
192 * \param cellId the cell ID
193 */
194 void SetCellId(uint16_t cellId);
195
196 /**
197 * Get LTE UE RRC SAP provider function
198 *
199 * \param rnti the RNTI
200 * \returns LTE UE RRC SAP provider
201 */
203 /**
204 * Set UE RRC SAP provider function
205 *
206 * \param rnti the RNTI
207 * \param p the UE RRC SAP provider
208 */
209 void SetUeRrcSapProvider(uint16_t rnti, LteUeRrcSapProvider* p);
210
211 private:
212 // methods forwarded from LteEnbRrcSapUser
213 /**
214 * Setup UE function
215 *
216 * \param rnti the RNTI
217 * \param params LteEnbRrcSapUser::SetupUeParameters
218 */
219 void DoSetupUe(uint16_t rnti, LteEnbRrcSapUser::SetupUeParameters params);
220 /**
221 * Remove UE function
222 *
223 * \param rnti the RNTI
224 */
225 void DoRemoveUe(uint16_t rnti);
226 /**
227 * Send system information function
228 *
229 * \param cellId cell ID
230 * \param msg LteRrcSap::SystemInformation
231 */
232 void DoSendSystemInformation(uint16_t cellId, LteRrcSap::SystemInformation msg);
233 /**
234 * Send system information function
235 *
236 * \param msg LteRrcSap::SystemInformation
237 */
239 /**
240 * Send RRC connection setup function
241 *
242 * \param rnti the RNTI
243 * \param msg LteRrcSap::RrcConnectionSetup
244 */
246 /**
247 * Send RRC connection reconfiguration function
248 *
249 * \param rnti the RNTI
250 * \param msg LteRrcSap::RrcConnectionReconfiguration
251 */
252 void DoSendRrcConnectionReconfiguration(uint16_t rnti,
254 /**
255 * Send RRC connection reestablishment function
256 *
257 * \param rnti the RNTI
258 * \param msg LteRrcSap::RrcConnectionReestablishment
259 */
260 void DoSendRrcConnectionReestablishment(uint16_t rnti,
262 /**
263 * Send RRC connection reestablishment reject function
264 *
265 * \param rnti the RNTI
266 * \param msg LteRrcSap::RrcConnectionReestablishmentReject
267 */
269 uint16_t rnti,
271 /**
272 * Send RRC connection release function
273 *
274 * \param rnti the RNTI
275 * \param msg LteRrcSap::RrcConnectionRelease
276 */
278 /**
279 * Send RRC connection reject function
280 *
281 * \param rnti the RNTI
282 * \param msg LteRrcSap::RrcConnectionReject
283 */
285 /**
286 * Encode handover preparation information function
287 *
288 * \param msg LteRrcSap::HandoverPreparationInfo
289 * \returns the packet
290 */
292 /**
293 * Encode handover preparation information function
294 *
295 * \param p the packet
296 * \returns LteRrcSap::HandoverPreparationInfo
297 */
299 /**
300 * Encode handover command function
301 *
302 * \param msg LteRrcSap::RrcConnectionReconfiguration
303 * \returns rnti the RNTI
304 */
306 /**
307 * Decode handover command function
308 *
309 * \param p the packet
310 * \returns LteRrcSap::RrcConnectionReconfiguration
311 */
313
314 uint16_t m_rnti; ///< the RNTI
315 uint16_t m_cellId; ///< the cell ID
316 LteEnbRrcSapProvider* m_enbRrcSapProvider; ///< the ENB RRC SAP provider
317 LteEnbRrcSapUser* m_enbRrcSapUser; ///< the ENB RRC SAP user
318 std::map<uint16_t, LteUeRrcSapProvider*>
319 m_enbRrcSapProviderMap; ///< the LTE UE RRC SAP provider
320};
321
322} // namespace ns3
323
324#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.
Definition: lte-rrc-sap.h:1244
Part of the RRC protocol.
Definition: lte-rrc-sap.h:1124
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.
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
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
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
SetupParameters structure.
Definition: lte-rrc-sap.h:964