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