A Discrete-Event Network Simulator
API
lte-enb-cphy-sap.h
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2011, 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  * Marco Miozzo <mmiozzo@cttc.es>
20  */
21 
22 #ifndef LTE_ENB_CPHY_SAP_H
23 #define LTE_ENB_CPHY_SAP_H
24 
25 #include <stdint.h>
26 #include <ns3/ptr.h>
27 
28 #include <ns3/lte-rrc-sap.h>
29 
30 namespace ns3 {
31 
32 class LteEnbNetDevice;
33 
41 {
42 public:
43 
47  virtual ~LteEnbCphySapProvider ();
48 
54  virtual void SetCellId (uint16_t cellId) = 0;
55 
60  virtual void SetBandwidth (uint8_t ulBandwidth, uint8_t dlBandwidth) = 0;
61 
66  virtual void SetEarfcn (uint16_t ulEarfcn, uint16_t dlEarfcn) = 0;
67 
73  virtual void AddUe (uint16_t rnti) = 0;
74 
80  virtual void RemoveUe (uint16_t rnti) = 0;
81 
88  virtual void SetPa (uint16_t rnti, double pa) = 0;
89 
94  virtual void SetTransmissionMode (uint16_t rnti, uint8_t txMode) = 0;
95 
100  virtual void SetSrsConfigurationIndex (uint16_t rnti, uint16_t srsCi) = 0;
101 
107 
113 
118  virtual int8_t GetReferenceSignalPower () = 0;
119 };
120 
121 
129 {
130 public:
131 
135  virtual ~LteEnbCphySapUser ();
136 
137 };
138 
139 
145 template <class C>
147 {
148 public:
149  MemberLteEnbCphySapProvider (C* owner);
150 
151  // inherited from LteEnbCphySapProvider
152  virtual void SetCellId (uint16_t cellId);
153  virtual void SetBandwidth (uint8_t ulBandwidth, uint8_t dlBandwidth);
154  virtual void SetEarfcn (uint16_t ulEarfcn, uint16_t dlEarfcn);
155  virtual void AddUe (uint16_t rnti);
156  virtual void RemoveUe (uint16_t rnti);
157  virtual void SetPa (uint16_t rnti, double pa);
158  virtual void SetTransmissionMode (uint16_t rnti, uint8_t txMode);
159  virtual void SetSrsConfigurationIndex (uint16_t rnti, uint16_t srsCi);
162  virtual int8_t GetReferenceSignalPower ();
163 
164 private:
167 };
168 
169 template <class C>
171  : m_owner (owner)
172 {
173 }
174 
175 template <class C>
177 {
178 }
179 
180 template <class C>
181 void
183 {
184  m_owner->DoSetCellId (cellId);
185 }
186 
187 
188 template <class C>
189 void
190 MemberLteEnbCphySapProvider<C>::SetBandwidth (uint8_t ulBandwidth, uint8_t dlBandwidth)
191 {
192  m_owner->DoSetBandwidth (ulBandwidth, dlBandwidth);
193 }
194 
195 template <class C>
196 void
197 MemberLteEnbCphySapProvider<C>::SetEarfcn (uint16_t ulEarfcn, uint16_t dlEarfcn)
198 {
199  m_owner->DoSetEarfcn (ulEarfcn, dlEarfcn);
200 }
201 
202 template <class C>
203 void
205 {
206  m_owner->DoAddUe (rnti);
207 }
208 
209 template <class C>
210 void
212 {
213  m_owner->DoRemoveUe (rnti);
214 }
215 
216 template <class C>
217 void
218 MemberLteEnbCphySapProvider<C>::SetPa (uint16_t rnti, double pa)
219 {
220  m_owner->DoSetPa (rnti, pa);
221 }
222 
223 template <class C>
224 void
226 {
227  m_owner->DoSetTransmissionMode (rnti, txMode);
228 }
229 
230 template <class C>
231 void
233 {
234  m_owner->DoSetSrsConfigurationIndex (rnti, srsCi);
235 }
236 
237 template <class C>
238 void
240 {
241  m_owner->DoSetMasterInformationBlock (mib);
242 }
243 
244 template <class C>
245 void
247 {
248  m_owner->DoSetSystemInformationBlockType1 (sib1);
249 }
250 
251 template <class C>
252 int8_t
254 {
255  return m_owner->DoGetReferenceSignalPower ();
256 }
257 
263 template <class C>
265 {
266 public:
267  MemberLteEnbCphySapUser (C* owner);
268 
269  // methods inherited from LteEnbCphySapUser go here
270 
271 private:
274 };
275 
276 template <class C>
278  : m_owner (owner)
279 {
280 }
281 
282 template <class C>
284 {
285 }
286 
287 
288 
289 
290 
291 
292 } // namespace ns3
293 
294 
295 #endif // LTE_ENB_CPHY_SAP_H
virtual void SetMasterInformationBlock(LteRrcSap::MasterInformationBlock mib)=0
Template for the implementation of the LteEnbCphySapProvider as a member of an owner class of type C ...
virtual void SetPa(uint16_t rnti, double pa)=0
Set the UE transmission power offset P_A.
virtual void AddUe(uint16_t rnti)=0
Add a new UE to the cell.
virtual void SetTransmissionMode(uint16_t rnti, uint8_t txMode)=0
virtual void SetEarfcn(uint16_t ulEarfcn, uint16_t dlEarfcn)=0
virtual void SetSystemInformationBlockType1(LteRrcSap::SystemInformationBlockType1 sib1)
Service Access Point (SAP) offered by the UE PHY to the UE RRC for control purposes.
virtual void SetCellId(uint16_t cellId)=0
virtual void SetBandwidth(uint8_t ulBandwidth, uint8_t dlBandwidth)=0
Template for the implementation of the LteEnbCphySapUser as a member of an owner class of type C to w...
virtual void SetMasterInformationBlock(LteRrcSap::MasterInformationBlock mib)
virtual void SetBandwidth(uint8_t ulBandwidth, uint8_t dlBandwidth)
virtual void SetCellId(uint16_t cellId)
virtual ~LteEnbCphySapUser()
destructor
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual void SetSystemInformationBlockType1(LteRrcSap::SystemInformationBlockType1 sib1)=0
virtual int8_t GetReferenceSignalPower()=0
virtual void RemoveUe(uint16_t rnti)
Remove an UE from the the cell.
virtual void SetTransmissionMode(uint16_t rnti, uint8_t txMode)
virtual void SetSrsConfigurationIndex(uint16_t rnti, uint16_t srsCi)
virtual void SetSrsConfigurationIndex(uint16_t rnti, uint16_t srsCi)=0
virtual void SetEarfcn(uint16_t ulEarfcn, uint16_t dlEarfcn)
virtual void SetPa(uint16_t rnti, double pa)
Set the UE transmission power offset P_A.
virtual ~LteEnbCphySapProvider()
destructor
Service Access Point (SAP) offered by the UE PHY to the UE RRC for control purposes.
virtual void AddUe(uint16_t rnti)
Add a new UE to the cell.
virtual void RemoveUe(uint16_t rnti)=0
Remove an UE from the the cell.