A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-enb-cphy-sap.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2011, 2012 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Author: Nicola Baldo <nbaldo@cttc.es>,
18 * Marco Miozzo <mmiozzo@cttc.es>
19 */
20
21#ifndef LTE_ENB_CPHY_SAP_H
22#define LTE_ENB_CPHY_SAP_H
23
24#include "lte-rrc-sap.h"
25
26#include <ns3/ptr.h>
27
28#include <stdint.h>
29
30namespace ns3
31{
32
33class LteEnbNetDevice;
34
42{
43 public:
47 virtual ~LteEnbCphySapProvider();
48
54 virtual void SetCellId(uint16_t cellId) = 0;
55
62 virtual void SetBandwidth(uint16_t ulBandwidth, uint16_t dlBandwidth) = 0;
63
70 virtual void SetEarfcn(uint32_t ulEarfcn, uint32_t dlEarfcn) = 0;
71
77 virtual void AddUe(uint16_t rnti) = 0;
78
84 virtual void RemoveUe(uint16_t rnti) = 0;
85
92 virtual void SetPa(uint16_t rnti, double pa) = 0;
93
100 virtual void SetTransmissionMode(uint16_t rnti, uint8_t txMode) = 0;
101
108 virtual void SetSrsConfigurationIndex(uint16_t rnti, uint16_t srsCi) = 0;
109
116
123
130};
131
139{
140 public:
144 virtual ~LteEnbCphySapUser();
145};
146
151template <class C>
153{
154 public:
161
162 // Delete default constructor to avoid misuse
164
165 // inherited from LteEnbCphySapProvider
166 void SetCellId(uint16_t cellId) override;
167 void SetBandwidth(uint16_t ulBandwidth, uint16_t dlBandwidth) override;
168 void SetEarfcn(uint32_t ulEarfcn, uint32_t dlEarfcn) override;
169 void AddUe(uint16_t rnti) override;
170 void RemoveUe(uint16_t rnti) override;
171 void SetPa(uint16_t rnti, double pa) override;
172 void SetTransmissionMode(uint16_t rnti, uint8_t txMode) override;
173 void SetSrsConfigurationIndex(uint16_t rnti, uint16_t srsCi) override;
177
178 private:
180};
181
182template <class C>
184 : m_owner(owner)
185{
186}
187
188template <class C>
189void
191{
192 m_owner->DoSetCellId(cellId);
193}
194
195template <class C>
196void
197MemberLteEnbCphySapProvider<C>::SetBandwidth(uint16_t ulBandwidth, uint16_t dlBandwidth)
198{
199 m_owner->DoSetBandwidth(ulBandwidth, dlBandwidth);
200}
201
202template <class C>
203void
205{
206 m_owner->DoSetEarfcn(ulEarfcn, dlEarfcn);
207}
208
209template <class C>
210void
212{
213 m_owner->DoAddUe(rnti);
214}
215
216template <class C>
217void
219{
220 m_owner->DoRemoveUe(rnti);
221}
222
223template <class C>
224void
226{
227 m_owner->DoSetPa(rnti, pa);
228}
229
230template <class C>
231void
233{
234 m_owner->DoSetTransmissionMode(rnti, txMode);
235}
236
237template <class C>
238void
240{
241 m_owner->DoSetSrsConfigurationIndex(rnti, srsCi);
242}
243
244template <class C>
245void
247{
248 m_owner->DoSetMasterInformationBlock(mib);
249}
250
251template <class C>
252void
255{
256 m_owner->DoSetSystemInformationBlockType1(sib1);
257}
258
259template <class C>
260int8_t
262{
263 return m_owner->DoGetReferenceSignalPower();
264}
265
270template <class C>
272{
273 public:
279 MemberLteEnbCphySapUser(C* owner);
280
281 // Delete default constructor to avoid misuse
283
284 // methods inherited from LteEnbCphySapUser go here
285
286 private:
288};
289
290template <class C>
292 : m_owner(owner)
293{
294}
295
296} // namespace ns3
297
298#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
Set SRS configuration index.
virtual void SetBandwidth(uint16_t ulBandwidth, uint16_t dlBandwidth)=0
Set bandwidth.
virtual void SetSystemInformationBlockType1(LteRrcSap::SystemInformationBlockType1 sib1)=0
Set system information block type 1.
virtual void SetEarfcn(uint32_t ulEarfcn, uint32_t dlEarfcn)=0
Set EARFCN.
virtual void SetTransmissionMode(uint16_t rnti, uint8_t txMode)=0
Set transmission mode.
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
Set cell ID.
virtual int8_t GetReferenceSignalPower()=0
Get reference signal power.
virtual void SetMasterInformationBlock(LteRrcSap::MasterInformationBlock mib)=0
Set master information block.
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 ...
void RemoveUe(uint16_t rnti) override
Remove an UE from the cell.
void SetCellId(uint16_t cellId) override
Set cell ID.
void SetPa(uint16_t rnti, double pa) override
Set the UE transmission power offset P_A.
void SetTransmissionMode(uint16_t rnti, uint8_t txMode) override
Set transmission mode.
void SetSrsConfigurationIndex(uint16_t rnti, uint16_t srsCi) override
Set SRS configuration index.
void AddUe(uint16_t rnti) override
Add a new UE to the cell.
void SetSystemInformationBlockType1(LteRrcSap::SystemInformationBlockType1 sib1) override
Set system information block type 1.
void SetMasterInformationBlock(LteRrcSap::MasterInformationBlock mib) override
Set master information block.
void SetBandwidth(uint16_t ulBandwidth, uint16_t dlBandwidth) override
Set bandwidth.
int8_t GetReferenceSignalPower() override
Get reference signal power.
void SetEarfcn(uint32_t ulEarfcn, uint32_t dlEarfcn) override
Set EARFCN.
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:622
SystemInformationBlockType1 structure.
Definition: lte-rrc-sap.h:629