A Discrete-Event Network Simulator
API
 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 {
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 
73 
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,
136  };
137 
138 
139 private:
140 
141  // LTE AS SAP methods
143  void DoNotifyConnectionFailed ();
145  void DoRecvData (Ptr<Packet> packet);
146 
147  // internal methods
148  void DoActivateEpsBearer (EpsBearer bearer, Ptr<EpcTft> tft);
149  void SwitchToState (State s);
150 
152 
154 
156 
157  uint64_t m_imsi;
158 
161 
162  uint8_t m_bidCounter;
164 
166 
168  {
171  };
172 
173  std::list<BearerToBeActivated> m_bearersToBeActivatedList;
174 
175 };
176 
177 
178 } // namespace ns3
179 
180 #endif // EPC_UE_NAS_H
void SwitchToState(State s)
Definition: epc-ue-nas.cc:233
void ActivateEpsBearer(EpsBearer bearer, Ptr< EpcTft > tft)
Definition: epc-ue-nas.cc:146
Callback< void, Ptr< Packet > > m_forwardUpCallback
Definition: epc-ue-nas.h:165
smart pointer class similar to boost::intrusive_ptr
Definition: ptr.h:59
LteAsSapProvider * m_asSapProvider
Definition: epc-ue-nas.h:159
Callback template class.
Definition: callback.h:920
classifies IP packets accoding to Traffic Flow Templates (TFTs)
void DoNotifyConnectionSuccessful()
Definition: epc-ue-nas.cc:196
Ptr< NetDevice > m_device
Definition: epc-ue-nas.h:155
void DoNotifyConnectionReleased()
Definition: epc-ue-nas.cc:217
LteAsSapUser * GetAsSapUser()
Definition: epc-ue-nas.cc:111
void SetDevice(Ptr< NetDevice > dev)
Definition: epc-ue-nas.cc:93
Ptr< SampleEmitter > s
uint64_t m_imsi
Definition: epc-ue-nas.h:157
void Connect(uint16_t cellId, uint16_t earfcn)
Definition: epc-ue-nas.cc:123
EpcTftClassifier m_tftClassifier
Definition: epc-ue-nas.h:163
TracedCallback< State, State > m_stateTransitionCallback
Definition: epc-ue-nas.h:153
void DoNotifyConnectionFailed()
Definition: epc-ue-nas.cc:204
bool Send(Ptr< Packet > p)
Definition: epc-ue-nas.cc:165
void Disconnect()
Definition: epc-ue-nas.cc:137
virtual ~EpcUeNas()
Definition: epc-ue-nas.cc:67
void SetForwardUpCallback(Callback< void, Ptr< Packet > > cb)
Definition: epc-ue-nas.cc:117
LteAsSapUser * m_asSapUser
Definition: epc-ue-nas.h:160
void DoActivateEpsBearer(EpsBearer bearer, Ptr< EpcTft > tft)
Definition: epc-ue-nas.cc:224
void SetAsSapProvider(LteAsSapProvider *s)
Definition: epc-ue-nas.cc:105
static TypeId GetTypeId(void)
Definition: epc-ue-nas.cc:80
a base class which provides memory management and object aggregation
Definition: object.h:63
void SetImsi(uint64_t imsi)
Definition: epc-ue-nas.cc:99
a unique identifier for an interface.
Definition: type-id.h:49
void DoRecvData(Ptr< Packet > packet)
Definition: epc-ue-nas.cc:210
std::list< BearerToBeActivated > m_bearersToBeActivatedList
Definition: epc-ue-nas.h:173
uint8_t m_bidCounter
Definition: epc-ue-nas.h:162
virtual void DoDispose(void)
Definition: epc-ue-nas.cc:73