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 (uint16_t dlBandwidth) = 0;
110 
117  virtual void ConfigureUplink (uint32_t ulEarfcn, uint16_t ulBandwidth) = 0;
118 
124  virtual void ConfigureReferenceSignalPower (int8_t referenceSignalPower) = 0;
125 
131  virtual void SetRnti (uint16_t rnti) = 0;
132 
138  virtual void SetTransmissionMode (uint8_t txMode) = 0;
139 
145  virtual void SetSrsConfigurationIndex (uint16_t srcCi) = 0;
146 
152  virtual void SetPa (double pa) = 0;
153 
163  virtual void SetRsrpFilterCoefficient (uint8_t rsrpFilterCoefficient) = 0;
164 
171  virtual void ResetPhyAfterRlf () = 0;
172 
181  virtual void ResetRlfParams () = 0;
182 
191  virtual void StartInSnycDetection () = 0;
192 
197  virtual void SetImsi (uint64_t imsi) = 0;
198 
199 };
200 
201 
209 {
210 public:
211 
215  virtual ~LteUeCphySapUser ();
216 
217 
223  {
224  uint16_t m_cellId;
225  double m_rsrp;
226  double m_rsrq;
227  };
228 
231  {
232  std::vector <struct UeMeasurementsElement> m_ueMeasurementsList;
234  };
235 
236 
246  virtual void RecvMasterInformationBlock (uint16_t cellId,
248 
258  virtual void RecvSystemInformationBlockType1 (uint16_t cellId,
260 
267  virtual void ReportUeMeasurements (UeMeasurementsParameters params) = 0;
268 
275  virtual void NotifyOutOfSync () = 0;
276 
283  virtual void NotifyInSync () = 0;
284 
291  virtual void ResetSyncIndicationCounter () = 0;
292 
293 };
294 
295 
296 
297 
303 template <class C>
305 {
306 public:
312  MemberLteUeCphySapProvider (C* owner);
313 
314  // inherited from LteUeCphySapProvider
315  virtual void Reset ();
316  virtual void StartCellSearch (uint32_t dlEarfcn);
317  virtual void SynchronizeWithEnb (uint16_t cellId);
318  virtual void SynchronizeWithEnb (uint16_t cellId, uint32_t dlEarfcn);
319  virtual void SetDlBandwidth (uint16_t dlBandwidth);
320  virtual void ConfigureUplink (uint32_t ulEarfcn, uint16_t ulBandwidth);
321  virtual void ConfigureReferenceSignalPower (int8_t referenceSignalPower);
322  virtual void SetRnti (uint16_t rnti);
323  virtual void SetTransmissionMode (uint8_t txMode);
324  virtual void SetSrsConfigurationIndex (uint16_t srcCi);
325  virtual void SetPa (double pa);
326  virtual void SetRsrpFilterCoefficient (uint8_t rsrpFilterCoefficient);
327  virtual void ResetPhyAfterRlf ();
328  virtual void ResetRlfParams ();
329  virtual void StartInSnycDetection ();
330  virtual void SetImsi (uint64_t imsi);
331 
332 private:
334  C* m_owner;
335 };
336 
337 template <class C>
339  : m_owner (owner)
340 {
341 }
342 
343 template <class C>
345 {
346 }
347 
348 template <class C>
349 void
351 {
352  m_owner->DoReset ();
353 }
354 
355 template <class C>
356 void
358 {
359  m_owner->DoStartCellSearch (dlEarfcn);
360 }
361 
362 template <class C>
363 void
365 {
366  m_owner->DoSynchronizeWithEnb (cellId);
367 }
368 
369 template <class C>
370 void
371 MemberLteUeCphySapProvider<C>::SynchronizeWithEnb (uint16_t cellId, uint32_t dlEarfcn)
372 {
373  m_owner->DoSynchronizeWithEnb (cellId, dlEarfcn);
374 }
375 
376 template <class C>
377 void
379 {
380  m_owner->DoSetDlBandwidth (dlBandwidth);
381 }
382 
383 template <class C>
384 void
385 MemberLteUeCphySapProvider<C>::ConfigureUplink (uint32_t ulEarfcn, uint16_t ulBandwidth)
386 {
387  m_owner->DoConfigureUplink (ulEarfcn, ulBandwidth);
388 }
389 
390 template <class C>
391 void
393 {
394  m_owner->DoConfigureReferenceSignalPower (referenceSignalPower);
395 }
396 
397 template <class C>
398 void
400 {
401  m_owner->DoSetRnti (rnti);
402 }
403 
404 template <class C>
405 void
407 {
408  m_owner->DoSetTransmissionMode (txMode);
409 }
410 
411 template <class C>
412 void
414 {
415  m_owner->DoSetSrsConfigurationIndex (srcCi);
416 }
417 
418 template <class C>
419 void
421 {
422  m_owner->DoSetPa (pa);
423 }
424 
425 template <class C>
426 void
428 {
429  m_owner->DoSetRsrpFilterCoefficient (rsrpFilterCoefficient);
430 }
431 
432 template <class C>
433 void
435 {
436  m_owner->DoResetPhyAfterRlf ();
437 }
438 
439 template <class C>
441 {
442  m_owner->DoResetRlfParams ();
443 }
444 
445 template <class C>
447 {
448  m_owner->DoStartInSnycDetection ();
449 }
450 
451 template <class C>
453 {
454  m_owner->DoSetImsi (imsi);
455 }
456 
457 
458 
464 template <class C>
466 {
467 public:
473  MemberLteUeCphySapUser (C* owner);
474 
475  // methods inherited from LteUeCphySapUser go here
476  virtual void RecvMasterInformationBlock (uint16_t cellId,
478  virtual void RecvSystemInformationBlockType1 (uint16_t cellId,
481  virtual void NotifyOutOfSync ();
482  virtual void NotifyInSync ();
483  virtual void ResetSyncIndicationCounter ();
484 
485 private:
487  C* m_owner;
488 };
489 
490 template <class C>
492  : m_owner (owner)
493 {
494 }
495 
496 template <class C>
498 {
499 }
500 
501 template <class C>
502 void
505 {
506  m_owner->DoRecvMasterInformationBlock (cellId, mib);
507 }
508 
509 template <class C>
510 void
513 {
514  m_owner->DoRecvSystemInformationBlockType1 (cellId, sib1);
515 }
516 
517 template <class C>
518 void
520 {
521  m_owner->DoReportUeMeasurements (params);
522 }
523 
524 template <class C>
525 void
527 {
528  m_owner->DoNotifyOutOfSync ();
529 }
530 
531 template <class C>
532 void
534 {
535  m_owner->DoNotifyInSync ();
536 }
537 
538 template <class C>
539 void
541 {
542  m_owner->DoResetSyncIndicationCounter ();
543 }
544 
545 
546 } // namespace ns3
547 
548 
549 #endif // LTE_UE_CPHY_SAP_H
virtual void Reset()=0
reset the PHY
virtual void ResetRlfParams()=0
Reset radio link failure parameters.
uint8_t m_componentCarrierId
component carrier ID
std::vector< struct UeMeasurementsElement > m_ueMeasurementsList
UE measurement list.
virtual void ResetPhyAfterRlf()=0
Reset the PHY after radio link failure function It resets the physical layer parameters of the UE aft...
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)
Set transmission mode.
virtual void SetImsi(uint64_t imsi)=0
A method call by UE RRC to communicate the IMSI to the UE PHY.
virtual void StartInSnycDetection()=0
Start in-sync detection function When T310 timer is started, it indicates that physical layer problem...
virtual void ResetPhyAfterRlf()
Reset the PHY after radio link failure function It resets the physical layer parameters of the UE aft...
virtual void SetPa(double pa)=0
Set P_A value for UE power control.
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
Set Rnti function.
C * m_owner
the owner class
virtual void StartInSnycDetection()
Start in-sync detection function When T310 timer is started, it indicates that physical layer problem...
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...
virtual void SetRsrpFilterCoefficient(uint8_t rsrpFilterCoefficient)=0
Set RSRP filter coefficient.
virtual void ConfigureUplink(uint32_t ulEarfcn, uint16_t ulBandwidth)
Configure uplink (normally done after reception of SIB2)
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 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 NotifyOutOfSync()
Send an out of sync indication to UE RRC.
SystemInformationBlockType1 structure.
Definition: lte-rrc-sap.h:594
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual void SetSrsConfigurationIndex(uint16_t srcCi)=0
Set SRS configuration index.
virtual void NotifyOutOfSync()=0
Send an out of sync indication to UE RRC.
virtual ~LteUeCphySapUser()
destructor
MasterInformationBlock structure.
Definition: lte-rrc-sap.h:587
virtual void SetPa(double pa)
Set P_A value for UE power control.
virtual void SetImsi(uint64_t imsi)
A method call by UE RRC to communicate the IMSI to the UE PHY.
virtual void ConfigureUplink(uint32_t ulEarfcn, uint16_t ulBandwidth)=0
Configure uplink (normally done after reception of SIB2)
virtual void ResetSyncIndicationCounter()=0
Reset the sync indication counter.
virtual void SetTransmissionMode(uint8_t txMode)=0
Set transmission mode.
virtual void ResetSyncIndicationCounter()
Reset the sync indication counter.
virtual void RecvSystemInformationBlockType1(uint16_t cellId, LteRrcSap::SystemInformationBlockType1 sib1)
Relay an SIB1 message from the PHY entity to the RRC layer.
virtual void NotifyInSync()=0
Send an in sync indication to UE RRC.
virtual void SetDlBandwidth(uint16_t dlBandwidth)=0
UeMeasurementsParameters structure.
virtual void NotifyInSync()
Send an in sync indication to UE RRC.
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)
Set Rnti function.
Parameters of the ReportUeMeasurements primitive: RSRP [dBm] and RSRQ [dB] See section 5...
virtual void SetSrsConfigurationIndex(uint16_t srcCi)
Set SRS configuration index.
virtual void SetRsrpFilterCoefficient(uint8_t rsrpFilterCoefficient)
Set RSRP filter coefficient.
virtual void ResetRlfParams()
Reset radio link failure parameters.
virtual void SetDlBandwidth(uint16_t dlBandwidth)
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...