A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
lte-ue-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_UE_RRC_H
22 #define LTE_UE_RRC_H
23 
24 #include <ns3/object.h>
25 #include <ns3/packet.h>
26 #include <ns3/lte-ue-cmac-sap.h>
27 #include <ns3/epc-tft-classifier.h>
28 #include <ns3/lte-pdcp-sap.h>
29 
30 #include <map>
31 
32 namespace ns3 {
33 
34 class LteRlc;
35 class LteMacSapProvider;
36 class LteUeCmacSapUser;
37 class LteUeCmacSapProvider;
38 class LteRadioBearerInfo;
39 class LtePdcpSapUser;
40 class LtePdcpSapProvider;
41 
42 
47 class LteUeRrc : public Object
48 {
49 
53 
54 public:
59  LteUeRrc ();
60 
61 
65  virtual ~LteUeRrc ();
66 
67 
68  // inherited from Object
69  virtual void DoDispose (void);
70  static TypeId GetTypeId (void);
71 
72 
79 
86 
87 
96 
103  void ConfigureUe (uint16_t rnti, uint16_t cellId);
104 
115  void SetupRadioBearer (uint16_t rnti, EpsBearer bearer, TypeId rlcTypeId, uint8_t lcid, Ptr<EpcTft> tft);
116 
117 
125  void ReleaseRadioBearer (uint16_t rnti, uint8_t lcId);
126 
127 
132  uint16_t GetRnti ();
133 
134 
139  uint16_t GetCellId ();
140 
145  std::vector<uint8_t> GetLcIdVector ();
146 
147 
155  bool Send (Ptr<Packet> p);
156 
163  void SetForwardUpCallback (Callback <void, Ptr<Packet> > cb);
164 
171 
172 private:
173 
175 
176  // forwarded from CMAC SAP user
177  void DoLcConfigCompleted ();
178 
180 
183 
186 
187  uint16_t m_rnti;
188  uint16_t m_cellId;
189 
190  std::map <uint8_t, Ptr<LteRadioBearerInfo> > m_rbMap;
191 
193 
194 };
195 
196 
197 } // namespace ns3
198 
199 #endif // LTE_UE_RRC_H