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
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
epc-ue-nas.h
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
ns3::EpcUeNas::ActivateEpsBearer
void ActivateEpsBearer(EpsBearer bearer, Ptr< EpcTft > tft)
Definition:
epc-ue-nas.cc:146
ns3::Ptr
smart pointer class similar to boost::intrusive_ptr
Definition:
ptr.h:59
ns3::Callback
Callback template class.
Definition:
callback.h:369
ns3::TracedCallback< State, State >
ns3::EpcTftClassifier
classifies IP packets accoding to Traffic Flow Templates (TFTs)
Definition:
epc-tft-classifier.h:43
ns3::EpcUeNas::EpcUeNas
EpcUeNas()
Definition:
epc-ue-nas.cc:57
ns3::LteAsSapProvider
Definition:
lte-as-sap.h:41
ns3::EpcUeNas
Definition:
epc-ue-nas.h:34
ns3::EpsBearer
Definition:
eps-bearer.h:71
ns3::EpcUeNas::GetAsSapUser
LteAsSapUser * GetAsSapUser()
Definition:
epc-ue-nas.cc:111
ns3::EpcUeNas::SetDevice
void SetDevice(Ptr< NetDevice > dev)
Definition:
epc-ue-nas.cc:93
ns3::MemberLteAsSapUser
Definition:
lte-as-sap.h:192
ns3::EpcUeNas::Connect
void Connect(uint16_t cellId, uint16_t earfcn)
Definition:
epc-ue-nas.cc:123
ns3::LteAsSapUser
Definition:
lte-as-sap.h:87
ns3::EpcUeNas::BearerToBeActivated
Definition:
epc-ue-nas.h:167
ns3::EpcUeNas::Send
bool Send(Ptr< Packet > p)
Definition:
epc-ue-nas.cc:165
ns3::EpcUeNas::Disconnect
void Disconnect()
Definition:
epc-ue-nas.cc:137
ns3::EpcUeNas::~EpcUeNas
virtual ~EpcUeNas()
Definition:
epc-ue-nas.cc:67
ns3::EpcUeNas::SetForwardUpCallback
void SetForwardUpCallback(Callback< void, Ptr< Packet > > cb)
Definition:
epc-ue-nas.cc:117
ns3::EpcUeNas::State
State
Definition:
epc-ue-nas.h:128
ns3::EpcUeNas::SetAsSapProvider
void SetAsSapProvider(LteAsSapProvider *s)
Definition:
epc-ue-nas.cc:105
ns3::Object
a base class which provides memory management and object aggregation
Definition:
object.h:63
ns3::EpcUeNas::SetImsi
void SetImsi(uint64_t imsi)
Definition:
epc-ue-nas.cc:99
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:44
ns3::EpcUeNas::DoDispose
virtual void DoDispose(void)
Definition:
epc-ue-nas.cc:73
src
lte
model
epc-ue-nas.h
Generated on Sun Mar 16 2014 11:25:05 for ns-3 by
1.8.6