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 <ns3/lte-rrc-sap.h>
25#include <ns3/ptr.h>
26
27#include <stdint.h>
28
29namespace ns3
30{
31
32class LteEnbNetDevice;
33
41{
42 public:
46 virtual ~LteEnbCphySapProvider();
47
53 virtual void SetCellId(uint16_t cellId) = 0;
54
61 virtual void SetBandwidth(uint16_t ulBandwidth, uint16_t dlBandwidth) = 0;
62
69 virtual void SetEarfcn(uint32_t ulEarfcn, uint32_t dlEarfcn) = 0;
70
76 virtual void AddUe(uint16_t rnti) = 0;
77
83 virtual void RemoveUe(uint16_t rnti) = 0;
84
91 virtual void SetPa(uint16_t rnti, double pa) = 0;
92
99 virtual void SetTransmissionMode(uint16_t rnti, uint8_t txMode) = 0;
100
107 virtual void SetSrsConfigurationIndex(uint16_t rnti, uint16_t srsCi) = 0;
108
115
122
129};
130
138{
139 public:
143 virtual ~LteEnbCphySapUser();
144};
145
150template <class C>
152{
153 public:
160
161 // Delete default constructor to avoid misuse
163
164 // inherited from LteEnbCphySapProvider
165 void SetCellId(uint16_t cellId) override;
166 void SetBandwidth(uint16_t ulBandwidth, uint16_t dlBandwidth) override;
167 void SetEarfcn(uint32_t ulEarfcn, uint32_t dlEarfcn) override;
168 void AddUe(uint16_t rnti) override;
169 void RemoveUe(uint16_t rnti) override;
170 void SetPa(uint16_t rnti, double pa) override;
171 void SetTransmissionMode(uint16_t rnti, uint8_t txMode) override;
172 void SetSrsConfigurationIndex(uint16_t rnti, uint16_t srsCi) override;
176
177 private:
179};
180
181template <class C>
183 : m_owner(owner)
184{
185}
186
187template <class C>
188void
190{
191 m_owner->DoSetCellId(cellId);
192}
193
194template <class C>
195void
196MemberLteEnbCphySapProvider<C>::SetBandwidth(uint16_t ulBandwidth, uint16_t dlBandwidth)
197{
198 m_owner->DoSetBandwidth(ulBandwidth, dlBandwidth);
199}
200
201template <class C>
202void
204{
205 m_owner->DoSetEarfcn(ulEarfcn, dlEarfcn);
206}
207
208template <class C>
209void
211{
212 m_owner->DoAddUe(rnti);
213}
214
215template <class C>
216void
218{
219 m_owner->DoRemoveUe(rnti);
220}
221
222template <class C>
223void
225{
226 m_owner->DoSetPa(rnti, pa);
227}
228
229template <class C>
230void
232{
233 m_owner->DoSetTransmissionMode(rnti, txMode);
234}
235
236template <class C>
237void
239{
240 m_owner->DoSetSrsConfigurationIndex(rnti, srsCi);
241}
242
243template <class C>
244void
246{
247 m_owner->DoSetMasterInformationBlock(mib);
248}
249
250template <class C>
251void
254{
255 m_owner->DoSetSystemInformationBlockType1(sib1);
256}
257
258template <class C>
259int8_t
261{
262 return m_owner->DoGetReferenceSignalPower();
263}
264
269template <class C>
271{
272 public:
278 MemberLteEnbCphySapUser(C* owner);
279
280 // Delete default constructor to avoid misuse
282
283 // methods inherited from LteEnbCphySapUser go here
284
285 private:
287};
288
289template <class C>
291 : m_owner(owner)
292{
293}
294
295} // namespace ns3
296
297#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