A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
lte-ue-rrc.h
Go to the documentation of this file.
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>
27
#include <ns3/lte-pdcp-sap.h>
28
#include <ns3/lte-as-sap.h>
29
#include <ns3/lte-ue-cphy-sap.h>
30
#include <ns3/lte-rrc-sap.h>
31
#include <ns3/traced-callback.h>
32
33
#include <map>
34
35
namespace
ns3 {
36
37
class
LteRlc;
38
class
LteMacSapProvider;
39
class
LteUeCmacSapUser;
40
class
LteUeCmacSapProvider;
41
class
LteDataRadioBearerInfo;
42
class
LteSignalingRadioBearerInfo;
43
class
LteEnbRrc;
44
49
class
LteUeRrc
:
public
Object
50
{
51
52
friend
class
UeMemberLteUeCmacSapUser
;
53
friend
class
UeRrcMemberLteEnbCmacSapUser
;
54
friend
class
LtePdcpSpecificLtePdcpSapUser
<
LteUeRrc
>;
55
friend
class
MemberLteAsSapProvider
<
LteUeRrc
>;
56
friend
class
MemberLteUeCphySapUser
<
LteUeRrc
>;
57
friend
class
MemberLteUeRrcSapProvider
<
LteUeRrc
>;
58
59
public
:
60
65
enum
State
66
{
67
IDLE_CELL_SELECTION
= 0,
68
IDLE_WAIT_SYSTEM_INFO
,
69
IDLE_CAMPED_NORMALLY
,
70
IDLE_RANDOM_ACCESS
,
71
IDLE_CONNECTING
,
72
CONNECTED_NORMALLY
,
73
CONNECTED_REESTABLISHING
,
74
CONNECTED_HANDOVER
,
75
NUM_STATES
76
};
77
78
83
LteUeRrc
();
84
85
89
virtual
~LteUeRrc
();
90
91
92
// inherited from Object
93
private
:
94
virtual
void
DoInitialize
(
void
);
95
virtual
void
DoDispose
(
void
);
96
public
:
97
static
TypeId
GetTypeId
(
void
);
98
99
105
void
SetLteUeCphySapProvider
(
LteUeCphySapProvider
* s);
106
112
LteUeCphySapUser
*
GetLteUeCphySapUser
();
113
119
void
SetLteUeCmacSapProvider
(
LteUeCmacSapProvider
* s);
120
126
LteUeCmacSapUser
*
GetLteUeCmacSapUser
();
127
128
134
void
SetLteUeRrcSapUser
(
LteUeRrcSapUser
* s);
135
141
LteUeRrcSapProvider
*
GetLteUeRrcSapProvider
();
142
150
void
SetLteMacSapProvider
(
LteMacSapProvider
* s);
151
157
void
SetAsSapUser
(
LteAsSapUser
* s);
158
164
LteAsSapProvider
*
GetAsSapProvider
();
165
170
void
SetImsi
(uint64_t imsi);
171
176
uint64_t
GetImsi
(
void
);
177
178
183
uint16_t
GetRnti
()
const
;
184
185
190
uint16_t
GetCellId
()
const
;
191
192
196
uint8_t
GetUlBandwidth
()
const
;
197
201
uint8_t
GetDlBandwidth
()
const
;
202
206
uint16_t
GetDlEarfcn
()
const
;
207
211
uint16_t
GetUlEarfcn
()
const
;
212
217
State
GetState
();
218
224
void
SetUseRlcSm
(
bool
val);
225
226
227
private
:
228
229
230
// PDCP SAP methods
231
void
DoReceivePdcpSdu
(
LtePdcpSapUser::ReceivePdcpSduParameters
params);
232
233
// CMAC SAP methods
234
void
DoSetTemporaryCellRnti
(uint16_t rnti);
235
void
DoNotifyRandomAccessSuccessful
();
236
void
DoNotifyRandomAccessFailed
();
237
238
// LTE AS SAP methods
239
void
DoForceCampedOnEnb
(uint16_t cellId, uint16_t earfcn);
240
void
DoConnect
();
241
void
DoSendData
(
Ptr<Packet>
packet, uint8_t bid);
242
void
DoDisconnect
();
243
244
// CPHY SAP methods
245
void
DoRecvMasterInformationBlock
(
LteRrcSap::MasterInformationBlock
msg);
246
247
// RRC SAP methods
248
void
DoCompleteSetup
(
LteUeRrcSapProvider::CompleteSetupParameters
params);
249
void
DoRecvSystemInformationBlockType1
(
LteRrcSap::SystemInformationBlockType1
msg);
250
void
DoRecvSystemInformation
(
LteRrcSap::SystemInformation
msg);
251
void
DoRecvRrcConnectionSetup
(
LteRrcSap::RrcConnectionSetup
msg);
252
void
DoRecvRrcConnectionReconfiguration
(
LteRrcSap::RrcConnectionReconfiguration
msg);
253
void
DoRecvRrcConnectionReestablishment
(
LteRrcSap::RrcConnectionReestablishment
msg);
254
void
DoRecvRrcConnectionReestablishmentReject
(
LteRrcSap::RrcConnectionReestablishmentReject
msg);
255
void
DoRecvRrcConnectionRelease
(
LteRrcSap::RrcConnectionRelease
msg);
256
void
DoRecvRrcConnectionReject
(
LteRrcSap::RrcConnectionReject
msg);
257
258
259
// internal methods
260
void
ApplyRadioResourceConfigDedicated
(
LteRrcSap::RadioResourceConfigDedicated
rrcd);
261
void
StartConnection
();
262
void
LeaveConnectedMode
();
263
void
DisposeOldSrb1
();
264
uint8_t
Bid2Drbid
(uint8_t bid);
265
void
SwitchToState
(
State
s);
266
267
std::map<uint8_t, uint8_t>
m_bid2DrbidMap
;
268
269
LteUeCphySapUser
*
m_cphySapUser
;
270
LteUeCphySapProvider
*
m_cphySapProvider
;
271
272
LteUeCmacSapUser
*
m_cmacSapUser
;
273
LteUeCmacSapProvider
*
m_cmacSapProvider
;
274
275
LteUeRrcSapUser
*
m_rrcSapUser
;
276
LteUeRrcSapProvider
*
m_rrcSapProvider
;
277
278
LteMacSapProvider
*
m_macSapProvider
;
279
LtePdcpSapUser
*
m_drbPdcpSapUser
;
280
281
LteAsSapProvider
*
m_asSapProvider
;
282
LteAsSapUser
*
m_asSapUser
;
283
284
State
m_state
;
285
286
uint64_t
m_imsi
;
287
uint16_t
m_rnti
;
288
uint16_t
m_cellId
;
289
290
Ptr<LteSignalingRadioBearerInfo>
m_srb0
;
291
Ptr<LteSignalingRadioBearerInfo>
m_srb1
;
292
Ptr<LteSignalingRadioBearerInfo>
m_srb1Old
;
293
std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >
m_drbMap
;
294
295
bool
m_useRlcSm
;
296
297
uint8_t
m_lastRrcTransactionIdentifier
;
298
299
uint8_t
m_dlBandwidth
;
300
uint8_t
m_ulBandwidth
;
302
uint16_t
m_dlEarfcn
;
303
uint16_t
m_ulEarfcn
;
305
// imsi cellid rnti
306
TracedCallback<uint64_t, uint16_t, uint16_t, State, State>
m_stateTransitionTrace
;
307
// imsi cellid rnti
308
TracedCallback<uint64_t, uint16_t, uint16_t>
m_randomAccessSuccessfulTrace
;
309
// imsi cellid rnti
310
TracedCallback<uint64_t, uint16_t, uint16_t>
m_connectionEstablishedTrace
;
311
// imsi cellid rnti
312
TracedCallback<uint64_t, uint16_t, uint16_t>
m_connectionReconfigurationTrace
;
313
// imsi cellid rnti targetCellId
314
TracedCallback<uint64_t, uint16_t, uint16_t, uint16_t>
m_handoverStartTrace
;
315
// imsi cellid rnti
316
TracedCallback<uint64_t, uint16_t, uint16_t>
m_handoverEndOkTrace
;
317
318
bool
m_connectionPending
;
319
bool
m_receivedMib
;
320
bool
m_receivedSib2
;
322
};
323
324
325
}
// namespace ns3
326
327
#endif // LTE_UE_RRC_H
src
lte
model
lte-ue-rrc.h
Generated on Tue May 14 2013 11:08:26 for ns-3 by
1.8.1.2