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
epc-ue-nas.h
Go to the documentation of this file.
1
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2012 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 EPC_UE_NAS_H
22
#define EPC_UE_NAS_H
23
24
25
#include <ns3/object.h>
26
#include <ns3/lte-as-sap.h>
27
#include <ns3/epc-tft-classifier.h>
28
29
namespace
ns3 {
30
31
32
class
EpcHelper;
33
34
class
EpcUeNas
:
public
Object
35
{
36
friend
class
MemberLteAsSapUser
<
EpcUeNas
>;
37
public
:
38
42
EpcUeNas
();
43
47
virtual
~EpcUeNas
();
48
49
// inherited from Object
50
virtual
void
DoDispose
(
void
);
51
static
TypeId
GetTypeId
(
void
);
52
53
58
void
SetDevice
(
Ptr<NetDevice>
dev);
59
65
void
SetImsi
(uint64_t imsi);
66
72
void
SetAsSapProvider
(
LteAsSapProvider
*
s
);
73
79
LteAsSapUser
*
GetAsSapUser
();
80
86
void
SetForwardUpCallback
(
Callback
<
void
,
Ptr<Packet>
> cb);
87
96
void
Connect
(uint16_t cellId, uint16_t earfcn);
97
102
void
Disconnect
();
103
104
111
void
ActivateEpsBearer
(
EpsBearer
bearer,
Ptr<EpcTft>
tft);
112
120
bool
Send
(
Ptr<Packet>
p);
121
122
128
enum
State
129
{
130
OFF
= 0,
131
ATTACHING
,
132
IDLE_REGISTERED
,
133
CONNECTING_TO_EPC
,
134
ACTIVE
,
135
NUM_STATES
136
};
137
138
139
private
:
140
141
// LTE AS SAP methods
142
void
DoNotifyConnectionSuccessful
();
143
void
DoNotifyConnectionFailed
();
144
void
DoNotifyConnectionReleased
();
145
void
DoRecvData
(
Ptr<Packet>
packet);
146
147
// internal methods
148
void
DoActivateEpsBearer
(
EpsBearer
bearer,
Ptr<EpcTft>
tft);
149
void
SwitchToState
(
State
s
);
150
151
State
m_state
;
152
153
TracedCallback<State, State>
m_stateTransitionCallback
;
154
155
Ptr<NetDevice>
m_device
;
156
157
uint64_t
m_imsi
;
158
159
LteAsSapProvider
*
m_asSapProvider
;
160
LteAsSapUser
*
m_asSapUser
;
161
162
uint8_t
m_bidCounter
;
163
EpcTftClassifier
m_tftClassifier
;
164
165
Callback <void, Ptr<Packet>
>
m_forwardUpCallback
;
166
167
struct
BearerToBeActivated
168
{
169
EpsBearer
bearer
;
170
Ptr<EpcTft>
tft
;
171
};
172
173
std::list<BearerToBeActivated>
m_bearersToBeActivatedList
;
174
175
};
176
177
178
}
// namespace ns3
179
180
#endif // EPC_UE_NAS_H
src
lte
model
epc-ue-nas.h
Generated on Fri Aug 30 2013 01:42:53 for ns-3 by
1.8.1.2