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 (uint16_t ulBandwidth, uint16_t dlBandwidth) = 0;
61 
66  virtual void SetEarfcn (uint32_t ulEarfcn, uint32_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:
154  MemberLteEnbCphySapProvider (C* owner);
155 
156  // inherited from LteEnbCphySapProvider
157  virtual void SetCellId (uint16_t cellId);
158  virtual void SetBandwidth (uint16_t ulBandwidth, uint16_t dlBandwidth);
159  virtual void SetEarfcn (uint32_t ulEarfcn, uint32_t dlEarfcn);
160  virtual void AddUe (uint16_t rnti);
161  virtual void RemoveUe (uint16_t rnti);
162  virtual void SetPa (uint16_t rnti, double pa);
163  virtual void SetTransmissionMode (uint16_t rnti, uint8_t txMode);
164  virtual void SetSrsConfigurationIndex (uint16_t rnti, uint16_t srsCi);
167  virtual int8_t GetReferenceSignalPower ();
168 
169 private:
171  C* m_owner;
172 };
173 
174 template <class C>
176  : m_owner (owner)
177 {
178 }
179 
180 template <class C>
182 {
183 }
184 
185 template <class C>
186 void
188 {
189  m_owner->DoSetCellId (cellId);
190 }
191 
192 
193 template <class C>
194 void
195 MemberLteEnbCphySapProvider<C>::SetBandwidth (uint16_t ulBandwidth, uint16_t dlBandwidth)
196 {
197  m_owner->DoSetBandwidth (ulBandwidth, dlBandwidth);
198 }
199 
200 template <class C>
201 void
202 MemberLteEnbCphySapProvider<C>::SetEarfcn (uint32_t ulEarfcn, uint32_t dlEarfcn)
203 {
204  m_owner->DoSetEarfcn (ulEarfcn, dlEarfcn);
205 }
206 
207 template <class C>
208 void
210 {
211  m_owner->DoAddUe (rnti);
212 }
213 
214 template <class C>
215 void
217 {
218  m_owner->DoRemoveUe (rnti);
219 }
220 
221 template <class C>
222 void
223 MemberLteEnbCphySapProvider<C>::SetPa (uint16_t rnti, double pa)
224 {
225  m_owner->DoSetPa (rnti, pa);
226 }
227 
228 template <class C>
229 void
231 {
232  m_owner->DoSetTransmissionMode (rnti, txMode);
233 }
234 
235 template <class C>
236 void
238 {
239  m_owner->DoSetSrsConfigurationIndex (rnti, srsCi);
240 }
241 
242 template <class C>
243 void
245 {
246  m_owner->DoSetMasterInformationBlock (mib);
247 }
248 
249 template <class C>
250 void
252 {
253  m_owner->DoSetSystemInformationBlockType1 (sib1);
254 }
255 
256 template <class C>
257 int8_t
259 {
260  return m_owner->DoGetReferenceSignalPower ();
261 }
262 
268 template <class C>
270 {
271 public:
277  MemberLteEnbCphySapUser (C* owner);
278 
279  // methods inherited from LteEnbCphySapUser go here
280 
281 private:
283  C* m_owner;
284 };
285 
286 template <class C>
288  : m_owner (owner)
289 {
290 }
291 
292 template <class C>
294 {
295 }
296 
297 
298 
299 
300 
301 
302 } // namespace ns3
303 
304 
305 #endif // LTE_ENB_CPHY_SAP_H
Service Access Point (SAP) offered by the UE PHY to the UE RRC for control purposes.
virtual ~LteEnbCphySapProvider()
destructor
virtual void SetSrsConfigurationIndex(uint16_t rnti, uint16_t srsCi)=0
virtual void SetBandwidth(uint16_t ulBandwidth, uint16_t dlBandwidth)=0
virtual void SetSystemInformationBlockType1(LteRrcSap::SystemInformationBlockType1 sib1)=0
virtual void SetEarfcn(uint32_t ulEarfcn, uint32_t dlEarfcn)=0
virtual void SetTransmissionMode(uint16_t rnti, uint8_t txMode)=0
virtual void RemoveUe(uint16_t rnti)=0
Remove an UE from the cell.
virtual void SetPa(uint16_t rnti, double pa)=0
Set the UE transmission power offset P_A.
virtual void SetCellId(uint16_t cellId)=0
virtual int8_t GetReferenceSignalPower()=0
virtual void SetMasterInformationBlock(LteRrcSap::MasterInformationBlock mib)=0
virtual void AddUe(uint16_t rnti)=0
Add a new UE to the cell.
Service Access Point (SAP) offered by the UE PHY to the UE RRC for control purposes.
virtual ~LteEnbCphySapUser()
destructor
Template for the implementation of the LteEnbCphySapProvider as a member of an owner class of type C ...
virtual void SetSystemInformationBlockType1(LteRrcSap::SystemInformationBlockType1 sib1)
virtual void SetTransmissionMode(uint16_t rnti, uint8_t txMode)
virtual void SetEarfcn(uint32_t ulEarfcn, uint32_t dlEarfcn)
virtual void SetPa(uint16_t rnti, double pa)
Set the UE transmission power offset P_A.
virtual void AddUe(uint16_t rnti)
Add a new UE to the cell.
virtual void SetSrsConfigurationIndex(uint16_t rnti, uint16_t srsCi)
virtual void SetCellId(uint16_t cellId)
virtual void SetBandwidth(uint16_t ulBandwidth, uint16_t dlBandwidth)
virtual void SetMasterInformationBlock(LteRrcSap::MasterInformationBlock mib)
virtual void RemoveUe(uint16_t rnti)
Remove an UE from the cell.
Template for the implementation of the LteEnbCphySapUser as a member of an owner class of type C to w...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
MasterInformationBlock structure.
Definition: lte-rrc-sap.h:588
SystemInformationBlockType1 structure.
Definition: lte-rrc-sap.h:595