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 (uint16_t dlEarfcn) = 0;
70 
86  virtual void SynchronizeWithEnb (uint16_t cellId) = 0;
87 
104  virtual void SynchronizeWithEnb (uint16_t cellId, uint16_t dlEarfcn) = 0;
105 
109  virtual void SetDlBandwidth (uint8_t dlBandwidth) = 0;
110 
117  virtual void ConfigureUplink (uint16_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; // [dBm]
174  double m_rsrq; // [dB]
175  };
176 
178  {
179  std::vector <struct UeMeasurementsElement> m_ueMeasurementsList;
180  };
181 
182 
191  virtual void RecvMasterInformationBlock (uint16_t cellId,
193 
202  virtual void RecvSystemInformationBlockType1 (uint16_t cellId,
204 
210  virtual void ReportUeMeasurements (UeMeasurementsParameters params) = 0;
211 
212 };
213 
214 
215 
216 
222 template <class C>
224 {
225 public:
226  MemberLteUeCphySapProvider (C* owner);
227 
228  // inherited from LteUeCphySapProvider
229  virtual void Reset ();
230  virtual void StartCellSearch (uint16_t dlEarfcn);
231  virtual void SynchronizeWithEnb (uint16_t cellId);
232  virtual void SynchronizeWithEnb (uint16_t cellId, uint16_t dlEarfcn);
233  virtual void SetDlBandwidth (uint8_t dlBandwidth);
234  virtual void ConfigureUplink (uint16_t ulEarfcn, uint8_t ulBandwidth);
235  virtual void ConfigureReferenceSignalPower (int8_t referenceSignalPower);
236  virtual void SetRnti (uint16_t rnti);
237  virtual void SetTransmissionMode (uint8_t txMode);
238  virtual void SetSrsConfigurationIndex (uint16_t srcCi);
239  virtual void SetPa (double pa);
240 
241 private:
244 };
245 
246 template <class C>
248  : m_owner (owner)
249 {
250 }
251 
252 template <class C>
254 {
255 }
256 
257 template <class C>
258 void
260 {
261  m_owner->DoReset ();
262 }
263 
264 template <class C>
265 void
267 {
268  m_owner->DoStartCellSearch (dlEarfcn);
269 }
270 
271 template <class C>
272 void
274 {
275  m_owner->DoSynchronizeWithEnb (cellId);
276 }
277 
278 template <class C>
279 void
280 MemberLteUeCphySapProvider<C>::SynchronizeWithEnb (uint16_t cellId, uint16_t dlEarfcn)
281 {
282  m_owner->DoSynchronizeWithEnb (cellId, dlEarfcn);
283 }
284 
285 template <class C>
286 void
288 {
289  m_owner->DoSetDlBandwidth (dlBandwidth);
290 }
291 
292 template <class C>
293 void
294 MemberLteUeCphySapProvider<C>::ConfigureUplink (uint16_t ulEarfcn, uint8_t ulBandwidth)
295 {
296  m_owner->DoConfigureUplink (ulEarfcn, ulBandwidth);
297 }
298 
299 template <class C>
300 void
302 {
303  m_owner->DoConfigureReferenceSignalPower (referenceSignalPower);
304 }
305 
306 template <class C>
307 void
309 {
310  m_owner->DoSetRnti (rnti);
311 }
312 
313 template <class C>
314 void
316 {
317  m_owner->DoSetTransmissionMode (txMode);
318 }
319 
320 template <class C>
321 void
323 {
324  m_owner->DoSetSrsConfigurationIndex (srcCi);
325 }
326 
327 template <class C>
328 void
330 {
331  m_owner->DoSetPa (pa);
332 }
333 
334 
340 template <class C>
342 {
343 public:
344  MemberLteUeCphySapUser (C* owner);
345 
346  // methods inherited from LteUeCphySapUser go here
347  virtual void RecvMasterInformationBlock (uint16_t cellId,
349  virtual void RecvSystemInformationBlockType1 (uint16_t cellId,
352 
353 private:
356 };
357 
358 template <class C>
360  : m_owner (owner)
361 {
362 }
363 
364 template <class C>
366 {
367 }
368 
369 template <class C>
370 void
373 {
374  m_owner->DoRecvMasterInformationBlock (cellId, mib);
375 }
376 
377 template <class C>
378 void
381 {
382  m_owner->DoRecvSystemInformationBlockType1 (cellId, sib1);
383 }
384 
385 template <class C>
386 void
388 {
389  m_owner->DoReportUeMeasurements (params);
390 }
391 
392 
393 } // namespace ns3
394 
395 
396 #endif // LTE_UE_CPHY_SAP_H
virtual void Reset()=0
reset the PHY
std::vector< struct UeMeasurementsElement > m_ueMeasurementsList
virtual void ConfigureUplink(uint16_t ulEarfcn, uint8_t ulBandwidth)
Configure uplink (normally done after reception of SIB2)
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
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 RecvSystemInformationBlockType1(uint16_t cellId, LteRrcSap::SystemInformationBlockType1 sib1)=0
Relay an SIB1 message from the PHY entity to the RRC layer.
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 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 void StartCellSearch(uint16_t dlEarfcn)=0
Tell the PHY entity to listen to PSS from surrounding cells and measure the RSRP. ...
virtual ~LteUeCphySapUser()
destructor
virtual void StartCellSearch(uint16_t dlEarfcn)
Tell the PHY entity to listen to PSS from surrounding cells and measure the RSRP. ...
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.
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 ConfigureUplink(uint16_t ulEarfcn, uint8_t ulBandwidth)=0
Configure uplink (normally done after reception of SIB2)
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...