A Discrete-Event Network Simulator
API
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 // inherited from LteEnbCphySapProvider
162 void SetCellId(uint16_t cellId) override;
163 void SetBandwidth(uint16_t ulBandwidth, uint16_t dlBandwidth) override;
164 void SetEarfcn(uint32_t ulEarfcn, uint32_t dlEarfcn) override;
165 void AddUe(uint16_t rnti) override;
166 void RemoveUe(uint16_t rnti) override;
167 void SetPa(uint16_t rnti, double pa) override;
168 void SetTransmissionMode(uint16_t rnti, uint8_t txMode) override;
169 void SetSrsConfigurationIndex(uint16_t rnti, uint16_t srsCi) override;
173
174 private:
177};
178
179template <class C>
181 : m_owner(owner)
182{
183}
184
185template <class C>
187{
188}
189
190template <class C>
191void
193{
194 m_owner->DoSetCellId(cellId);
195}
196
197template <class C>
198void
199MemberLteEnbCphySapProvider<C>::SetBandwidth(uint16_t ulBandwidth, uint16_t dlBandwidth)
200{
201 m_owner->DoSetBandwidth(ulBandwidth, dlBandwidth);
202}
203
204template <class C>
205void
207{
208 m_owner->DoSetEarfcn(ulEarfcn, dlEarfcn);
209}
210
211template <class C>
212void
214{
215 m_owner->DoAddUe(rnti);
216}
217
218template <class C>
219void
221{
222 m_owner->DoRemoveUe(rnti);
223}
224
225template <class C>
226void
228{
229 m_owner->DoSetPa(rnti, pa);
230}
231
232template <class C>
233void
235{
236 m_owner->DoSetTransmissionMode(rnti, txMode);
237}
238
239template <class C>
240void
242{
243 m_owner->DoSetSrsConfigurationIndex(rnti, srsCi);
244}
245
246template <class C>
247void
249{
250 m_owner->DoSetMasterInformationBlock(mib);
251}
252
253template <class C>
254void
257{
258 m_owner->DoSetSystemInformationBlockType1(sib1);
259}
260
261template <class C>
262int8_t
264{
265 return m_owner->DoGetReferenceSignalPower();
266}
267
272template <class C>
274{
275 public:
281 MemberLteEnbCphySapUser(C* owner);
282
283 // methods inherited from LteEnbCphySapUser go here
284
285 private:
288};
289
290template <class C>
292 : m_owner(owner)
293{
294}
295
296template <class C>
298{
299}
300
301} // namespace ns3
302
303#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:608
SystemInformationBlockType1 structure.
Definition: lte-rrc-sap.h:615