A Discrete-Event Network Simulator
API
lte-ue-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_UE_CPHY_SAP_H
23 #define LTE_UE_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 
33 class LteEnbNetDevice;
34 
42 {
43 public:
44 
48  virtual ~LteUeCphySapProvider ();
49 
54  virtual void Reset () = 0;
55 
69  virtual void StartCellSearch (uint32_t dlEarfcn) = 0;
70 
86  virtual void SynchronizeWithEnb (uint16_t cellId) = 0;
87 
104  virtual void SynchronizeWithEnb (uint16_t cellId, uint32_t dlEarfcn) = 0;
105 
109  virtual void SetDlBandwidth (uint8_t dlBandwidth) = 0;
110 
117  virtual void ConfigureUplink (uint32_t ulEarfcn, uint8_t ulBandwidth) = 0;
118 
124  virtual void ConfigureReferenceSignalPower (int8_t referenceSignalPower) = 0;
125 
130  virtual void SetRnti (uint16_t rnti) = 0;
131 
135  virtual void SetTransmissionMode (uint8_t txMode) = 0;
136 
140  virtual void SetSrsConfigurationIndex (uint16_t srcCi) = 0;
141 
145  virtual void SetPa (double pa) = 0;
146 
147 };
148 
149 
157 {
158 public:
159 
163  virtual ~LteUeCphySapUser ();
164 
165 
171  {
172  uint16_t m_cellId;
173  double m_rsrp;
174  double m_rsrq;
175  };
176 
179  {
180  std::vector <struct UeMeasurementsElement> m_ueMeasurementsList;
182  };
183 
184 
193  virtual void RecvMasterInformationBlock (uint16_t cellId,
195 
204  virtual void RecvSystemInformationBlockType1 (uint16_t cellId,
206 
212  virtual void ReportUeMeasurements (UeMeasurementsParameters params) = 0;
213 
214 };
215 
216 
217 
218 
224 template <class C>
226 {
227 public:
233  MemberLteUeCphySapProvider (C* owner);
234 
235  // inherited from LteUeCphySapProvider
236  virtual void Reset ();
237  virtual void StartCellSearch (uint32_t dlEarfcn);
238  virtual void SynchronizeWithEnb (uint16_t cellId);
239  virtual void SynchronizeWithEnb (uint16_t cellId, uint32_t dlEarfcn);
240  virtual void SetDlBandwidth (uint8_t dlBandwidth);
241  virtual void ConfigureUplink (uint32_t ulEarfcn, uint8_t ulBandwidth);
242  virtual void ConfigureReferenceSignalPower (int8_t referenceSignalPower);
243  virtual void SetRnti (uint16_t rnti);
244  virtual void SetTransmissionMode (uint8_t txMode);
245  virtual void SetSrsConfigurationIndex (uint16_t srcCi);
246  virtual void SetPa (double pa);
247 
248 private:
250  C* m_owner;
251 };
252 
253 template <class C>
255  : m_owner (owner)
256 {
257 }
258 
259 template <class C>
261 {
262 }
263 
264 template <class C>
265 void
267 {
268  m_owner->DoReset ();
269 }
270 
271 template <class C>
272 void
274 {
275  m_owner->DoStartCellSearch (dlEarfcn);
276 }
277 
278 template <class C>
279 void
281 {
282  m_owner->DoSynchronizeWithEnb (cellId);
283 }
284 
285 template <class C>
286 void
287 MemberLteUeCphySapProvider<C>::SynchronizeWithEnb (uint16_t cellId, uint32_t dlEarfcn)
288 {
289  m_owner->DoSynchronizeWithEnb (cellId, dlEarfcn);
290 }
291 
292 template <class C>
293 void
295 {
296  m_owner->DoSetDlBandwidth (dlBandwidth);
297 }
298 
299 template <class C>
300 void
301 MemberLteUeCphySapProvider<C>::ConfigureUplink (uint32_t ulEarfcn, uint8_t ulBandwidth)
302 {
303  m_owner->DoConfigureUplink (ulEarfcn, ulBandwidth);
304 }
305 
306 template <class C>
307 void
309 {
310  m_owner->DoConfigureReferenceSignalPower (referenceSignalPower);
311 }
312 
313 template <class C>
314 void
316 {
317  m_owner->DoSetRnti (rnti);
318 }
319 
320 template <class C>
321 void
323 {
324  m_owner->DoSetTransmissionMode (txMode);
325 }
326 
327 template <class C>
328 void
330 {
331  m_owner->DoSetSrsConfigurationIndex (srcCi);
332 }
333 
334 template <class C>
335 void
337 {
338  m_owner->DoSetPa (pa);
339 }
340 
341 
347 template <class C>
349 {
350 public:
356  MemberLteUeCphySapUser (C* owner);
357 
358  // methods inherited from LteUeCphySapUser go here
359  virtual void RecvMasterInformationBlock (uint16_t cellId,
361  virtual void RecvSystemInformationBlockType1 (uint16_t cellId,
364 
365 private:
367  C* m_owner;
368 };
369 
370 template <class C>
372  : m_owner (owner)
373 {
374 }
375 
376 template <class C>
378 {
379 }
380 
381 template <class C>
382 void
385 {
386  m_owner->DoRecvMasterInformationBlock (cellId, mib);
387 }
388 
389 template <class C>
390 void
393 {
394  m_owner->DoRecvSystemInformationBlockType1 (cellId, sib1);
395 }
396 
397 template <class C>
398 void
400 {
401  m_owner->DoReportUeMeasurements (params);
402 }
403 
404 
405 } // namespace ns3
406 
407 
408 #endif // LTE_UE_CPHY_SAP_H
virtual void Reset()=0
reset the PHY
uint8_t m_componentCarrierId
component carrier ID
std::vector< struct UeMeasurementsElement > m_ueMeasurementsList
UE measurement list.
virtual void Reset()
reset the PHY
Template for the implementation of the LteUeCphySapUser as a member of an owner class of type C to wh...
virtual ~LteUeCphySapProvider()
destructor
virtual void RecvMasterInformationBlock(uint16_t cellId, LteRrcSap::MasterInformationBlock mib)
Relay an MIB message from the PHY entity to the RRC layer.
virtual void SetTransmissionMode(uint8_t txMode)
virtual void SetPa(double pa)=0
Service Access Point (SAP) offered by the UE PHY to the UE RRC for control purposes.
virtual void SynchronizeWithEnb(uint16_t cellId)=0
Tell the PHY entity to synchronize with a given eNodeB over the currently active EARFCN for communica...
virtual void SetRnti(uint16_t rnti)=0
C * m_owner
the owner class
virtual void ReportUeMeasurements(LteUeCphySapUser::UeMeasurementsParameters params)
Send a report of RSRP and RSRQ values perceived from PSS by the PHY entity (after applying layer-1 fi...
Template for the implementation of the LteUeCphySapProvider as a member of an owner class of type C t...
virtual void ConfigureReferenceSignalPower(int8_t referenceSignalPower)=0
Configure referenceSignalPower.
Service Access Point (SAP) offered by the UE PHY to the UE RRC for control purposes.
virtual void ConfigureUplink(uint32_t ulEarfcn, uint8_t ulBandwidth)=0
Configure uplink (normally done after reception of SIB2)
virtual void StartCellSearch(uint32_t dlEarfcn)
Tell the PHY entity to listen to PSS from surrounding cells and measure the RSRP. ...
virtual void RecvSystemInformationBlockType1(uint16_t cellId, LteRrcSap::SystemInformationBlockType1 sib1)=0
Relay an SIB1 message from the PHY entity to the RRC layer.
virtual void StartCellSearch(uint32_t dlEarfcn)=0
Tell the PHY entity to listen to PSS from surrounding cells and measure the RSRP. ...
virtual void ConfigureReferenceSignalPower(int8_t referenceSignalPower)
Configure referenceSignalPower.
virtual void RecvMasterInformationBlock(uint16_t cellId, LteRrcSap::MasterInformationBlock mib)=0
Relay an MIB message from the PHY entity to the RRC layer.
virtual void ConfigureUplink(uint32_t ulEarfcn, uint8_t ulBandwidth)
Configure uplink (normally done after reception of SIB2)
SystemInformationBlockType1 structure.
Definition: lte-rrc-sap.h:587
virtual void SetDlBandwidth(uint8_t dlBandwidth)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual void SetSrsConfigurationIndex(uint16_t srcCi)=0
virtual ~LteUeCphySapUser()
destructor
MasterInformationBlock structure.
Definition: lte-rrc-sap.h:580
virtual void SetPa(double pa)
virtual void SetDlBandwidth(uint8_t dlBandwidth)=0
virtual void SetTransmissionMode(uint8_t txMode)=0
virtual void RecvSystemInformationBlockType1(uint16_t cellId, LteRrcSap::SystemInformationBlockType1 sib1)
Relay an SIB1 message from the PHY entity to the RRC layer.
UeMeasurementsParameters structure.
virtual void SynchronizeWithEnb(uint16_t cellId)
Tell the PHY entity to synchronize with a given eNodeB over the currently active EARFCN for communica...
virtual void SetRnti(uint16_t rnti)
Parameters of the ReportUeMeasurements primitive: RSRP [dBm] and RSRQ [dB] See section 5...
virtual void SetSrsConfigurationIndex(uint16_t srcCi)
virtual void ReportUeMeasurements(UeMeasurementsParameters params)=0
Send a report of RSRP and RSRQ values perceived from PSS by the PHY entity (after applying layer-1 fi...