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
30namespace ns3 {
31
32class LteEnbNetDevice;
33
41{
42public:
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
119};
120
121
129{
130public:
131
135 virtual ~LteEnbCphySapUser ();
136
137};
138
139
145template <class C>
147{
148public:
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);
168
169private:
172};
173
174template <class C>
176 : m_owner (owner)
177{
178}
179
180template <class C>
182{
183}
184
185template <class C>
186void
188{
189 m_owner->DoSetCellId (cellId);
190}
191
192
193template <class C>
194void
195MemberLteEnbCphySapProvider<C>::SetBandwidth (uint16_t ulBandwidth, uint16_t dlBandwidth)
196{
197 m_owner->DoSetBandwidth (ulBandwidth, dlBandwidth);
198}
199
200template <class C>
201void
203{
204 m_owner->DoSetEarfcn (ulEarfcn, dlEarfcn);
205}
206
207template <class C>
208void
210{
211 m_owner->DoAddUe (rnti);
212}
213
214template <class C>
215void
217{
218 m_owner->DoRemoveUe (rnti);
219}
220
221template <class C>
222void
224{
225 m_owner->DoSetPa (rnti, pa);
226}
227
228template <class C>
229void
231{
232 m_owner->DoSetTransmissionMode (rnti, txMode);
233}
234
235template <class C>
236void
238{
239 m_owner->DoSetSrsConfigurationIndex (rnti, srsCi);
240}
241
242template <class C>
243void
245{
246 m_owner->DoSetMasterInformationBlock (mib);
247}
248
249template <class C>
250void
252{
253 m_owner->DoSetSystemInformationBlockType1 (sib1);
254}
255
256template <class C>
257int8_t
259{
260 return m_owner->DoGetReferenceSignalPower ();
261}
262
268template <class C>
270{
271public:
277 MemberLteEnbCphySapUser (C* owner);
278
279 // methods inherited from LteEnbCphySapUser go here
280
281private:
284};
285
286template <class C>
288 : m_owner (owner)
289{
290}
291
292template <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