A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
lte-enb-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_ENB_RRC_H
22 #define LTE_ENB_RRC_H
23 
24 #include <ns3/object.h>
25 #include <ns3/packet.h>
26 #include <ns3/lte-enb-cmac-sap.h>
27 #include <ns3/ff-mac-common.h>
28 #include <ns3/lte-pdcp-sap.h>
29 
30 #include <map>
31 
32 namespace ns3 {
33 
34 class FfMacSchedSapProvider;
35 class LteMacSapProvider;
36 class LteRadioBearerInfo;
37 class LtePdcpSapUser;
38 class LtePdcpSapProvider;
39 
40 
46 class UeInfo : public Object
47 {
48 public:
56  uint8_t AddRadioBearer (Ptr<LteRadioBearerInfo> radioBearerInfo);
57 
66 
67 
73  void RemoveRadioBearer (uint8_t lcid);
74 
75  UeInfo (void);
76  UeInfo (uint64_t imsi);
77  virtual ~UeInfo (void);
78 
79  static TypeId GetTypeId (void);
80 
81  uint64_t GetImsi (void);
82 
83 private:
84  std::map <uint8_t, Ptr<LteRadioBearerInfo> > m_rbMap;
86  uint64_t m_imsi;
87 };
88 
89 
94 class LteEnbRrc : public Object
95 {
96 
99 
100 public:
105  LteEnbRrc ();
106 
110  virtual ~LteEnbRrc ();
111 
112 
113  // inherited from Object
114  virtual void DoDispose (void);
115  static TypeId GetTypeId (void);
116 
117 
124 
130 
131 
140 
141 
150 
151 
152 
159  void ConfigureCell (uint8_t ulBandwidth,
160  uint8_t dlBandwidth);
161 
168  uint16_t AddUe (uint64_t imsi);
169 
175  void RemoveUe (uint16_t rnti);
176 
177  uint16_t GetLastAllocatedRnti () const;
178  void SetLastAllocatedRnti (uint16_t lastAllocatedRnti);
179  void SetUeMap (std::map<uint16_t,Ptr<UeInfo> > ueMap);
180  std::map<uint16_t,Ptr<UeInfo> > GetUeMap (void) const;
181 
191  uint8_t SetupRadioBearer (uint16_t rnti, EpsBearer bearer, TypeId rlcTypeId);
192 
193 
201  void ReleaseRadioBearer (uint16_t rnti, uint8_t lcId);
202 
203 
211  bool Send (Ptr<Packet> p);
212 
219  void SetForwardUpCallback (Callback <void, Ptr<Packet> > cb);
220 
221 
222 private:
223 
226 
227  void DoNotifyLcConfigResult (uint16_t rnti, uint8_t lcid, bool success);
228  LtePdcpSapProvider* GetLtePdcpSapProvider (uint16_t rnti, uint8_t lcid);
229 
230  // management of multiple UE info instances
231  uint16_t CreateUeInfo (uint64_t imsi);
232  Ptr<UeInfo> GetUeInfo (uint16_t rnti);
233  void RemoveUeInfo (uint16_t rnti);
234 
236 
239 
243 
246 
247  std::map<uint16_t, Ptr<UeInfo> > m_ueMap;
248 
250 
251 };
252 
253 
254 } // namespace ns3
255 
256 #endif // LTE_ENB_RRC_H