author | Manuel Requena <manuel.requena@cttc.es> |
Tue, 26 Mar 2013 10:41:49 +0100 | |
changeset 10019 | 6efd95740e39 |
parent 9995 | 32e393c01fdb |
child 10063 | 6b30859ebd37 |
permissions | -rw-r--r-- |
7886 | 1 |
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
2 |
/* |
|
3 |
* Copyright (c) 2011 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 |
* Author: Nicola Baldo <nbaldo@cttc.es> |
|
19 |
*/ |
|
20 |
||
21 |
#ifndef LTE_UE_RRC_H |
|
22 |
#define LTE_UE_RRC_H |
|
23 |
||
24 |
#include <ns3/object.h> |
|
25 |
#include <ns3/packet.h> |
|
26 |
#include <ns3/lte-ue-cmac-sap.h> |
|
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8160
diff
changeset
|
27 |
#include <ns3/lte-pdcp-sap.h> |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
28 |
#include <ns3/lte-as-sap.h> |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
29 |
#include <ns3/lte-ue-cphy-sap.h> |
9406 | 30 |
#include <ns3/lte-rrc-sap.h> |
31 |
#include <ns3/traced-callback.h> |
|
7886 | 32 |
|
33 |
#include <map> |
|
9995
32e393c01fdb
added support for measurements in LteUeRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9986
diff
changeset
|
34 |
#include <set> |
7886 | 35 |
|
36 |
namespace ns3 { |
|
37 |
||
38 |
class LteRlc; |
|
39 |
class LteMacSapProvider; |
|
40 |
class LteUeCmacSapUser; |
|
41 |
class LteUeCmacSapProvider; |
|
9406 | 42 |
class LteDataRadioBearerInfo; |
43 |
class LteSignalingRadioBearerInfo; |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
44 |
class LteEnbRrc; |
7886 | 45 |
|
46 |
/** |
|
47 |
* |
|
48 |
* |
|
49 |
*/ |
|
50 |
class LteUeRrc : public Object |
|
51 |
{ |
|
52 |
||
53 |
friend class UeMemberLteUeCmacSapUser; |
|
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8160
diff
changeset
|
54 |
friend class UeRrcMemberLteEnbCmacSapUser; |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8160
diff
changeset
|
55 |
friend class LtePdcpSpecificLtePdcpSapUser<LteUeRrc>; |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
56 |
friend class MemberLteAsSapProvider<LteUeRrc>; |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
57 |
friend class MemberLteUeCphySapUser<LteUeRrc>; |
9406 | 58 |
friend class MemberLteUeRrcSapProvider<LteUeRrc>; |
7886 | 59 |
|
60 |
public: |
|
9406 | 61 |
|
62 |
/** |
|
63 |
* The states of the UE RRC entity |
|
64 |
* |
|
65 |
*/ |
|
66 |
enum State |
|
67 |
{ |
|
68 |
IDLE_CELL_SELECTION = 0, |
|
69 |
IDLE_WAIT_SYSTEM_INFO, |
|
70 |
IDLE_CAMPED_NORMALLY, |
|
71 |
IDLE_RANDOM_ACCESS, |
|
72 |
IDLE_CONNECTING, |
|
73 |
CONNECTED_NORMALLY, |
|
74 |
CONNECTED_REESTABLISHING, |
|
75 |
CONNECTED_HANDOVER, |
|
76 |
NUM_STATES |
|
77 |
}; |
|
78 |
||
79 |
||
7886 | 80 |
/** |
81 |
* create an RRC instance for use within an ue |
|
82 |
* |
|
83 |
*/ |
|
84 |
LteUeRrc (); |
|
85 |
||
86 |
||
87 |
/** |
|
88 |
* Destructor |
|
89 |
*/ |
|
90 |
virtual ~LteUeRrc (); |
|
91 |
||
92 |
||
93 |
// inherited from Object |
|
9406 | 94 |
private: |
95 |
virtual void DoStart (void); |
|
7886 | 96 |
virtual void DoDispose (void); |
9406 | 97 |
public: |
7886 | 98 |
static TypeId GetTypeId (void); |
99 |
||
100 |
||
101 |
/** |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
102 |
* set the CPHY SAP this RRC should use to interact with the PHY |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
103 |
* |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
104 |
* \param s the CPHY SAP Provider |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
105 |
*/ |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
106 |
void SetLteUeCphySapProvider (LteUeCphySapProvider * s); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
107 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
108 |
/** |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
109 |
* |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
110 |
* |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
111 |
* \return s the CPHY SAP User interface offered to the PHY by this RRC |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
112 |
*/ |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
113 |
LteUeCphySapUser* GetLteUeCphySapUser (); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
114 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
115 |
/** |
7886 | 116 |
* set the CMAC SAP this RRC should interact with |
117 |
* |
|
118 |
* \param s the CMAC SAP Provider to be used by this RRC |
|
119 |
*/ |
|
120 |
void SetLteUeCmacSapProvider (LteUeCmacSapProvider * s); |
|
121 |
||
122 |
/** |
|
123 |
* |
|
124 |
* |
|
125 |
* \return s the CMAC SAP User interface offered to the MAC by this RRC |
|
126 |
*/ |
|
127 |
LteUeCmacSapUser* GetLteUeCmacSapUser (); |
|
128 |
||
9406 | 129 |
|
130 |
/** |
|
131 |
* set the RRC SAP this RRC should interact with |
|
132 |
* |
|
133 |
* \param s the RRC SAP User to be used by this RRC |
|
134 |
*/ |
|
135 |
void SetLteUeRrcSapUser (LteUeRrcSapUser * s); |
|
136 |
||
137 |
/** |
|
138 |
* |
|
139 |
* |
|
140 |
* \return s the RRC SAP Provider interface offered to the MAC by this RRC |
|
141 |
*/ |
|
142 |
LteUeRrcSapProvider* GetLteUeRrcSapProvider (); |
|
143 |
||
7886 | 144 |
/** |
145 |
* set the MAC SAP provider. The ue RRC does not use this |
|
146 |
* directly, but it needs to provide it to newly created RLC instances. |
|
147 |
* |
|
148 |
* \param s the MAC SAP provider that will be used by all |
|
149 |
* newly created RLC instances |
|
150 |
*/ |
|
151 |
void SetLteMacSapProvider (LteMacSapProvider* s); |
|
152 |
||
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
153 |
/** |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
154 |
* Set the AS SAP user to interact with the NAS entity |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
155 |
* |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
156 |
* \param s the AS SAP user |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
157 |
*/ |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
158 |
void SetAsSapUser (LteAsSapUser* s); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
159 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
160 |
/** |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
161 |
* |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
162 |
* |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
163 |
* \return the AS SAP provider exported by this RRC |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
164 |
*/ |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
165 |
LteAsSapProvider* GetAsSapProvider (); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
166 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
167 |
/** |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
168 |
* |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
169 |
* \param imsi the unique UE identifier |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
170 |
*/ |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
171 |
void SetImsi (uint64_t imsi); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
172 |
|
7886 | 173 |
/** |
9386
24df31b77b25
PhyStats calculator implementation. All code needed added to LteHelper. Prototype order changed in order to respect cellId,IMSI, rnti
Jaume Nin
parents:
9346
diff
changeset
|
174 |
* |
24df31b77b25
PhyStats calculator implementation. All code needed added to LteHelper. Prototype order changed in order to respect cellId,IMSI, rnti
Jaume Nin
parents:
9346
diff
changeset
|
175 |
* \return imsi the unique UE identifier |
24df31b77b25
PhyStats calculator implementation. All code needed added to LteHelper. Prototype order changed in order to respect cellId,IMSI, rnti
Jaume Nin
parents:
9346
diff
changeset
|
176 |
*/ |
24df31b77b25
PhyStats calculator implementation. All code needed added to LteHelper. Prototype order changed in order to respect cellId,IMSI, rnti
Jaume Nin
parents:
9346
diff
changeset
|
177 |
uint64_t GetImsi (void); |
24df31b77b25
PhyStats calculator implementation. All code needed added to LteHelper. Prototype order changed in order to respect cellId,IMSI, rnti
Jaume Nin
parents:
9346
diff
changeset
|
178 |
|
24df31b77b25
PhyStats calculator implementation. All code needed added to LteHelper. Prototype order changed in order to respect cellId,IMSI, rnti
Jaume Nin
parents:
9346
diff
changeset
|
179 |
|
24df31b77b25
PhyStats calculator implementation. All code needed added to LteHelper. Prototype order changed in order to respect cellId,IMSI, rnti
Jaume Nin
parents:
9346
diff
changeset
|
180 |
/** |
7886 | 181 |
* |
182 |
* \return the C-RNTI of the user |
|
183 |
*/ |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
184 |
uint16_t GetRnti () const; |
7886 | 185 |
|
8160 | 186 |
|
187 |
/** |
|
188 |
* |
|
189 |
* \return the CellId of the attached Enb |
|
190 |
*/ |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
191 |
uint16_t GetCellId () const; |
8160 | 192 |
|
9406 | 193 |
|
194 |
/** |
|
195 |
* \return the uplink bandwidth in RBs |
|
8055 | 196 |
*/ |
9406 | 197 |
uint8_t GetUlBandwidth () const; |
8055 | 198 |
|
8714
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8464
diff
changeset
|
199 |
/** |
9406 | 200 |
* \return the downlink bandwidth in RBs |
201 |
*/ |
|
202 |
uint8_t GetDlBandwidth () const; |
|
203 |
||
204 |
/** |
|
205 |
* \return the downlink carrier frequency (EARFCN) |
|
9346 | 206 |
*/ |
9406 | 207 |
uint16_t GetDlEarfcn () const; |
9346 | 208 |
|
8714
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8464
diff
changeset
|
209 |
/** |
9406 | 210 |
* \return the uplink carrier frequency (EARFCN) |
9346 | 211 |
*/ |
9406 | 212 |
uint16_t GetUlEarfcn () const; |
9346 | 213 |
|
214 |
/** |
|
9406 | 215 |
* |
216 |
* \return the current state |
|
9346 | 217 |
*/ |
9406 | 218 |
State GetState (); |
9345
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9337
diff
changeset
|
219 |
|
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9337
diff
changeset
|
220 |
/** |
9406 | 221 |
* |
9345
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9337
diff
changeset
|
222 |
* |
9406 | 223 |
* \param val true if RLC SM is to be used, false if RLC UM/AM are to be used |
9345
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9337
diff
changeset
|
224 |
*/ |
9406 | 225 |
void SetUseRlcSm (bool val); |
226 |
||
227 |
||
7886 | 228 |
private: |
9345
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9337
diff
changeset
|
229 |
|
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9337
diff
changeset
|
230 |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
231 |
// PDCP SAP methods |
9406 | 232 |
void DoReceivePdcpSdu (LtePdcpSapUser::ReceivePdcpSduParameters params); |
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8160
diff
changeset
|
233 |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
234 |
// CMAC SAP methods |
9406 | 235 |
void DoSetTemporaryCellRnti (uint16_t rnti); |
236 |
void DoNotifyRandomAccessSuccessful (); |
|
237 |
void DoNotifyRandomAccessFailed (); |
|
238 |
||
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
239 |
// LTE AS SAP methods |
9430
e8b87593ee5b
added MME with simulated S1AP and S11 interfaces
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
240 |
void DoForceCampedOnEnb (uint16_t cellId, uint16_t earfcn); |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
241 |
void DoConnect (); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
242 |
void DoSendData (Ptr<Packet> packet, uint8_t bid); |
9406 | 243 |
void DoDisconnect (); |
244 |
||
245 |
// CPHY SAP methods |
|
246 |
void DoRecvMasterInformationBlock (LteRrcSap::MasterInformationBlock msg); |
|
9986
d1c0357a227f
Update Phy support for Ue Measurements with time filtering and c-phy-sap measurements grouping
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9983
diff
changeset
|
247 |
void DoReportUeMeasurements (LteUeCphySapUser::UeMeasurementsParameters params); |
9406 | 248 |
|
249 |
// RRC SAP methods |
|
9447
f836d3a3b71a
added LteUeRrcSapProvider::CompleteSetup ()
Nicola Baldo <nbaldo@cttc.es>
parents:
9430
diff
changeset
|
250 |
void DoCompleteSetup (LteUeRrcSapProvider::CompleteSetupParameters params); |
9406 | 251 |
void DoRecvSystemInformationBlockType1 (LteRrcSap::SystemInformationBlockType1 msg); |
252 |
void DoRecvSystemInformation (LteRrcSap::SystemInformation msg); |
|
253 |
void DoRecvRrcConnectionSetup (LteRrcSap::RrcConnectionSetup msg); |
|
254 |
void DoRecvRrcConnectionReconfiguration (LteRrcSap::RrcConnectionReconfiguration msg); |
|
255 |
void DoRecvRrcConnectionReestablishment (LteRrcSap::RrcConnectionReestablishment msg); |
|
256 |
void DoRecvRrcConnectionReestablishmentReject (LteRrcSap::RrcConnectionReestablishmentReject msg); |
|
257 |
void DoRecvRrcConnectionRelease (LteRrcSap::RrcConnectionRelease msg); |
|
9510
1f57ceb87c95
Add functions in SAP's to send/receive ConnRej msg.
Lluis Parcerisa <parcerisa@gmail.com>
parents:
9452
diff
changeset
|
258 |
void DoRecvRrcConnectionReject (LteRrcSap::RrcConnectionReject msg); |
9406 | 259 |
|
260 |
||
261 |
// internal methods |
|
262 |
void ApplyRadioResourceConfigDedicated (LteRrcSap::RadioResourceConfigDedicated rrcd); |
|
9995
32e393c01fdb
added support for measurements in LteUeRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9986
diff
changeset
|
263 |
void ApplyMeasConfig (LteRrcSap::MeasConfig mc); |
32e393c01fdb
added support for measurements in LteUeRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9986
diff
changeset
|
264 |
void SendMeasurementReport (uint8_t measId); |
9406 | 265 |
void StartConnection (); |
266 |
void LeaveConnectedMode (); |
|
9572
e07415ca12c9
dispose SRB1 in a separate event rather than in LteUeRrc::DoRecvRrcConnectionReconfiguration
Nicola Baldo <nbaldo@cttc.es>
parents:
9562
diff
changeset
|
267 |
void DisposeOldSrb1 (); |
9406 | 268 |
uint8_t Bid2Drbid (uint8_t bid); |
269 |
void SwitchToState (State s); |
|
270 |
||
271 |
std::map<uint8_t, uint8_t> m_bid2DrbidMap; |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
272 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
273 |
LteUeCphySapUser* m_cphySapUser; |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
274 |
LteUeCphySapProvider* m_cphySapProvider; |
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8160
diff
changeset
|
275 |
|
7886 | 276 |
LteUeCmacSapUser* m_cmacSapUser; |
277 |
LteUeCmacSapProvider* m_cmacSapProvider; |
|
278 |
||
9406 | 279 |
LteUeRrcSapUser* m_rrcSapUser; |
280 |
LteUeRrcSapProvider* m_rrcSapProvider; |
|
281 |
||
7886 | 282 |
LteMacSapProvider* m_macSapProvider; |
9447
f836d3a3b71a
added LteUeRrcSapProvider::CompleteSetup ()
Nicola Baldo <nbaldo@cttc.es>
parents:
9430
diff
changeset
|
283 |
LtePdcpSapUser* m_drbPdcpSapUser; |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
284 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
285 |
LteAsSapProvider* m_asSapProvider; |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
286 |
LteAsSapUser* m_asSapUser; |
7886 | 287 |
|
9406 | 288 |
State m_state; |
289 |
||
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
290 |
uint64_t m_imsi; |
7886 | 291 |
uint16_t m_rnti; |
8007 | 292 |
uint16_t m_cellId; |
7886 | 293 |
|
9406 | 294 |
Ptr<LteSignalingRadioBearerInfo> m_srb0; |
295 |
Ptr<LteSignalingRadioBearerInfo> m_srb1; |
|
9572
e07415ca12c9
dispose SRB1 in a separate event rather than in LteUeRrc::DoRecvRrcConnectionReconfiguration
Nicola Baldo <nbaldo@cttc.es>
parents:
9562
diff
changeset
|
296 |
Ptr<LteSignalingRadioBearerInfo> m_srb1Old; |
9406 | 297 |
std::map <uint8_t, Ptr<LteDataRadioBearerInfo> > m_drbMap; |
298 |
||
299 |
bool m_useRlcSm; |
|
300 |
||
301 |
uint8_t m_lastRrcTransactionIdentifier; |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
302 |
|
9406 | 303 |
uint8_t m_dlBandwidth; /**< downlink bandwidth in RBs */ |
304 |
uint8_t m_ulBandwidth; /**< uplink bandwidth in RBs */ |
|
305 |
||
306 |
uint16_t m_dlEarfcn; /**< downlink carrier frequency */ |
|
307 |
uint16_t m_ulEarfcn; /**< uplink carrier frequency */ |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8714
diff
changeset
|
308 |
|
9452
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9447
diff
changeset
|
309 |
// imsi cellid rnti |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9447
diff
changeset
|
310 |
TracedCallback<uint64_t, uint16_t, uint16_t, State, State> m_stateTransitionTrace; |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9447
diff
changeset
|
311 |
// imsi cellid rnti |
9615 | 312 |
TracedCallback<uint64_t, uint16_t, uint16_t> m_randomAccessSuccessfulTrace; |
313 |
// imsi cellid rnti |
|
9452
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9447
diff
changeset
|
314 |
TracedCallback<uint64_t, uint16_t, uint16_t> m_connectionEstablishedTrace; |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9447
diff
changeset
|
315 |
// imsi cellid rnti |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9447
diff
changeset
|
316 |
TracedCallback<uint64_t, uint16_t, uint16_t> m_connectionReconfigurationTrace; |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9447
diff
changeset
|
317 |
// imsi cellid rnti targetCellId |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9447
diff
changeset
|
318 |
TracedCallback<uint64_t, uint16_t, uint16_t, uint16_t> m_handoverStartTrace; |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9447
diff
changeset
|
319 |
// imsi cellid rnti |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9447
diff
changeset
|
320 |
TracedCallback<uint64_t, uint16_t, uint16_t> m_handoverEndOkTrace; |
9406 | 321 |
|
322 |
bool m_connectionPending; /**< true if a connection request by upper layers is pending */ |
|
323 |
bool m_receivedMib; /**< true if MIB was received for the current cell */ |
|
324 |
bool m_receivedSib2; /**< true if SIB2 was received for the current cell */ |
|
325 |
||
9995
32e393c01fdb
added support for measurements in LteUeRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9986
diff
changeset
|
326 |
|
32e393c01fdb
added support for measurements in LteUeRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9986
diff
changeset
|
327 |
/** |
32e393c01fdb
added support for measurements in LteUeRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9986
diff
changeset
|
328 |
* Includes the accumulated configuration of the measurements to be |
32e393c01fdb
added support for measurements in LteUeRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9986
diff
changeset
|
329 |
* performed by the UE, see TS 36.331 section 7.1. Also note that some |
32e393c01fdb
added support for measurements in LteUeRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9986
diff
changeset
|
330 |
* optional variables in the specs are omitted. |
32e393c01fdb
added support for measurements in LteUeRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9986
diff
changeset
|
331 |
* |
32e393c01fdb
added support for measurements in LteUeRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9986
diff
changeset
|
332 |
*/ |
32e393c01fdb
added support for measurements in LteUeRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9986
diff
changeset
|
333 |
struct VarMeasConfig |
32e393c01fdb
added support for measurements in LteUeRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9986
diff
changeset
|
334 |
{ |
32e393c01fdb
added support for measurements in LteUeRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9986
diff
changeset
|
335 |
std::map<uint8_t, LteRrcSap::MeasIdToAddMod> measIdList; |
32e393c01fdb
added support for measurements in LteUeRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9986
diff
changeset
|
336 |
std::map<uint8_t, LteRrcSap::MeasObjectToAddMod> measObjectList; |
32e393c01fdb
added support for measurements in LteUeRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9986
diff
changeset
|
337 |
std::map<uint8_t, LteRrcSap::ReportConfigToAddMod> reportConfigList; |
32e393c01fdb
added support for measurements in LteUeRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9986
diff
changeset
|
338 |
LteRrcSap::QuantityConfig quantityConfig; |
32e393c01fdb
added support for measurements in LteUeRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9986
diff
changeset
|
339 |
double aRsrp; |
32e393c01fdb
added support for measurements in LteUeRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9986
diff
changeset
|
340 |
double aRsrq; |
32e393c01fdb
added support for measurements in LteUeRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9986
diff
changeset
|
341 |
}; |
32e393c01fdb
added support for measurements in LteUeRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9986
diff
changeset
|
342 |
|
32e393c01fdb
added support for measurements in LteUeRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9986
diff
changeset
|
343 |
struct VarMeasReport |
32e393c01fdb
added support for measurements in LteUeRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9986
diff
changeset
|
344 |
{ |
32e393c01fdb
added support for measurements in LteUeRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9986
diff
changeset
|
345 |
uint8_t measId; |
32e393c01fdb
added support for measurements in LteUeRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9986
diff
changeset
|
346 |
std::set<uint16_t> cellsTriggeredList; // note: only EUTRA is |
32e393c01fdb
added support for measurements in LteUeRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9986
diff
changeset
|
347 |
// supported |
32e393c01fdb
added support for measurements in LteUeRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9986
diff
changeset
|
348 |
uint32_t numberOfReportsSent; |
32e393c01fdb
added support for measurements in LteUeRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9986
diff
changeset
|
349 |
EventId periodicReportTimer; |
32e393c01fdb
added support for measurements in LteUeRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9986
diff
changeset
|
350 |
}; |
32e393c01fdb
added support for measurements in LteUeRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9986
diff
changeset
|
351 |
|
32e393c01fdb
added support for measurements in LteUeRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9986
diff
changeset
|
352 |
VarMeasConfig m_varMeasConfig; |
32e393c01fdb
added support for measurements in LteUeRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9986
diff
changeset
|
353 |
// measId |
32e393c01fdb
added support for measurements in LteUeRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9986
diff
changeset
|
354 |
std::map<uint8_t, VarMeasReport> m_varMeasReportList; |
32e393c01fdb
added support for measurements in LteUeRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9986
diff
changeset
|
355 |
|
32e393c01fdb
added support for measurements in LteUeRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9986
diff
changeset
|
356 |
struct MeasValues |
32e393c01fdb
added support for measurements in LteUeRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9986
diff
changeset
|
357 |
{ |
32e393c01fdb
added support for measurements in LteUeRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9986
diff
changeset
|
358 |
double rsrp; |
32e393c01fdb
added support for measurements in LteUeRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9986
diff
changeset
|
359 |
double rsrq; |
32e393c01fdb
added support for measurements in LteUeRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9986
diff
changeset
|
360 |
Time timestamp; |
32e393c01fdb
added support for measurements in LteUeRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9986
diff
changeset
|
361 |
}; |
32e393c01fdb
added support for measurements in LteUeRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9986
diff
changeset
|
362 |
|
32e393c01fdb
added support for measurements in LteUeRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9986
diff
changeset
|
363 |
/////////cellId |
32e393c01fdb
added support for measurements in LteUeRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9986
diff
changeset
|
364 |
std::map<uint16_t, MeasValues> m_storedMeasValues; |
32e393c01fdb
added support for measurements in LteUeRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9986
diff
changeset
|
365 |
|
32e393c01fdb
added support for measurements in LteUeRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9986
diff
changeset
|
366 |
|
7886 | 367 |
}; |
368 |
||
369 |
||
370 |
} // namespace ns3 |
|
371 |
||
372 |
#endif // LTE_UE_RRC_H |