A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
142 };
143 
144 
152 {
153 public:
154 
158  virtual ~LteUeCphySapUser ();
159 
160 
166  {
167  uint16_t m_cellId;
168  double m_rsrp; // [dBm]
169  double m_rsrq; // [dB]
170  };
171 
173  {
174  std::vector <struct UeMeasurementsElement> m_ueMeasurementsList;
175  };
176 
177 
186  virtual void RecvMasterInformationBlock (uint16_t cellId,
188 
197  virtual void RecvSystemInformationBlockType1 (uint16_t cellId,
199 
205  virtual void ReportUeMeasurements (UeMeasurementsParameters params) = 0;
206 
207 };
208 
209 
210 
211 
217 template <class C>
219 {
220 public:
221  MemberLteUeCphySapProvider (C* owner);
222 
223  // inherited from LteUeCphySapProvider
224  virtual void Reset ();
225  virtual void StartCellSearch (uint16_t dlEarfcn);
226  virtual void SynchronizeWithEnb (uint16_t cellId);
227  virtual void SynchronizeWithEnb (uint16_t cellId, uint16_t dlEarfcn);
228  virtual void SetDlBandwidth (uint8_t dlBandwidth);
229  virtual void ConfigureUplink (uint16_t ulEarfcn, uint8_t ulBandwidth);
230  virtual void ConfigureReferenceSignalPower (int8_t referenceSignalPower);
231  virtual void SetRnti (uint16_t rnti);
232  virtual void SetTransmissionMode (uint8_t txMode);
233  virtual void SetSrsConfigurationIndex (uint16_t srcCi);
234 
235 private:
238 };
239 
240 template <class C>
242  : m_owner (owner)
243 {
244 }
245 
246 template <class C>
248 {
249 }
250 
251 template <class C>
252 void
254 {
255  m_owner->DoReset ();
256 }
257 
258 template <class C>
259 void
261 {
262  m_owner->DoStartCellSearch (dlEarfcn);
263 }
264 
265 template <class C>
266 void
268 {
269  m_owner->DoSynchronizeWithEnb (cellId);
270 }
271 
272 template <class C>
273 void
274 MemberLteUeCphySapProvider<C>::SynchronizeWithEnb (uint16_t cellId, uint16_t dlEarfcn)
275 {
276  m_owner->DoSynchronizeWithEnb (cellId, dlEarfcn);
277 }
278 
279 template <class C>
280 void
282 {
283  m_owner->DoSetDlBandwidth (dlBandwidth);
284 }
285 
286 template <class C>
287 void
288 MemberLteUeCphySapProvider<C>::ConfigureUplink (uint16_t ulEarfcn, uint8_t ulBandwidth)
289 {
290  m_owner->DoConfigureUplink (ulEarfcn, ulBandwidth);
291 }
292 
293 template <class C>
294 void
296 {
297  m_owner->DoConfigureReferenceSignalPower (referenceSignalPower);
298 }
299 
300 template <class C>
301 void
303 {
304  m_owner->DoSetRnti (rnti);
305 }
306 
307 template <class C>
308 void
310 {
311  m_owner->DoSetTransmissionMode (txMode);
312 }
313 
314 template <class C>
315 void
317 {
318  m_owner->DoSetSrsConfigurationIndex (srcCi);
319 }
320 
321 
322 
328 template <class C>
330 {
331 public:
332  MemberLteUeCphySapUser (C* owner);
333 
334  // methods inherited from LteUeCphySapUser go here
335  virtual void RecvMasterInformationBlock (uint16_t cellId,
337  virtual void RecvSystemInformationBlockType1 (uint16_t cellId,
340 
341 private:
344 };
345 
346 template <class C>
348  : m_owner (owner)
349 {
350 }
351 
352 template <class C>
354 {
355 }
356 
357 template <class C>
358 void
361 {
362  m_owner->DoRecvMasterInformationBlock (cellId, mib);
363 }
364 
365 template <class C>
366 void
369 {
370  m_owner->DoRecvSystemInformationBlockType1 (cellId, sib1);
371 }
372 
373 template <class C>
374 void
376 {
377  m_owner->DoReportUeMeasurements (params);
378 }
379 
380 
381 } // namespace ns3
382 
383 
384 #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)
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)
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 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...