A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
lte-rrc-protocol-real.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  * Authors: Nicola Baldo <nbaldo@cttc.es>
19  * Lluis Parcerisa <lparcerisa@cttc.cat>
20  */
21 
22 
23 #ifndef LTE_RRC_PROTOCOL_REAL_H
24 #define LTE_RRC_PROTOCOL_REAL_H
25 
26 #include <stdint.h>
27 #include <map>
28 
29 #include <ns3/ptr.h>
30 #include <ns3/object.h>
31 #include <ns3/lte-rrc-sap.h>
32 #include <ns3/lte-pdcp-sap.h>
33 #include <ns3/lte-rlc-sap.h>
34 #include <ns3/lte-rrc-header.h>
35 
36 namespace ns3 {
37 
38 class LteUeRrcSapProvider;
39 class LteUeRrcSapUser;
40 class LteEnbRrcSapProvider;
41 class LteUeRrc;
42 
43 
52 {
56 
57 public:
59  virtual ~LteUeRrcProtocolReal ();
60 
61  // inherited from Object
62  virtual void DoDispose (void);
63  static TypeId GetTypeId (void);
64 
67 
68  void SetUeRrc (Ptr<LteUeRrc> rrc);
69 
70 
71 private:
72  // methods forwarded from LteUeRrcSapUser
80 
81  void SetEnbRrcSapProvider ();
84 
86  uint16_t m_rnti;
90 
93 
94 };
95 
96 
105 {
110 
111 public:
113  virtual ~LteEnbRrcProtocolReal ();
114 
115  // inherited from Object
116  virtual void DoDispose (void);
117  static TypeId GetTypeId (void);
118 
121 
122  void SetCellId (uint16_t cellId);
123 
124  LteUeRrcSapProvider* GetUeRrcSapProvider (uint16_t rnti);
125  void SetUeRrcSapProvider (uint16_t rnti, LteUeRrcSapProvider* p);
126 
127 private:
128  // methods forwarded from LteEnbRrcSapUser
129  void DoSetupUe (uint16_t rnti, LteEnbRrcSapUser::SetupUeParameters params);
130  void DoRemoveUe (uint16_t rnti);
145 
147  void DoReceivePdcpPdu (uint16_t rnti, Ptr<Packet> p);
148 
149  uint16_t m_rnti;
150  uint16_t m_cellId;
153  std::map<uint16_t, LteUeRrcSapProvider*> m_enbRrcSapProviderMap;
154  std::map<uint16_t, LteEnbRrcSapUser::SetupUeParameters> m_setupUeParametersMap;
155  std::map<uint16_t, LteEnbRrcSapProvider::CompleteSetupUeParameters> m_completeSetupUeParametersMap;
156 
157 };
158 
160 
162 {
163 public:
164  RealProtocolRlcSapUser (LteEnbRrcProtocolReal* pdcp, uint16_t rnti);
165 
166  // Interface implemented from LteRlcSapUser
167  virtual void ReceivePdcpPdu (Ptr<Packet> p);
168 
169 private:
172  uint16_t m_rnti;
173 };
174 
175 
176 }
177 
178 
179 #endif // LTE_RRC_PROTOCOL_REAL_H