A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-ue-cphy-sap.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2011, 2012 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Author: Nicola Baldo <nbaldo@cttc.es>,
18 * Marco Miozzo <mmiozzo@cttc.es>
19 */
20
21#ifndef LTE_UE_CPHY_SAP_H
22#define LTE_UE_CPHY_SAP_H
23
24#include <ns3/lte-rrc-sap.h>
25#include <ns3/ptr.h>
26
27#include <stdint.h>
28
29namespace ns3
30{
31
32class LteEnbNetDevice;
33
41{
42 public:
46 virtual ~LteUeCphySapProvider();
47
51 virtual void Reset() = 0;
52
66 virtual void StartCellSearch(uint32_t dlEarfcn) = 0;
67
83 virtual void SynchronizeWithEnb(uint16_t cellId) = 0;
84
101 virtual void SynchronizeWithEnb(uint16_t cellId, uint32_t dlEarfcn) = 0;
102
107 virtual uint16_t GetCellId() = 0;
108
113 virtual uint32_t GetDlEarfcn() = 0;
114
118 virtual void SetDlBandwidth(uint16_t dlBandwidth) = 0;
119
126 virtual void ConfigureUplink(uint32_t ulEarfcn, uint16_t ulBandwidth) = 0;
127
133 virtual void ConfigureReferenceSignalPower(int8_t referenceSignalPower) = 0;
134
140 virtual void SetRnti(uint16_t rnti) = 0;
141
147 virtual void SetTransmissionMode(uint8_t txMode) = 0;
148
154 virtual void SetSrsConfigurationIndex(uint16_t srcCi) = 0;
155
161 virtual void SetPa(double pa) = 0;
162
172 virtual void SetRsrpFilterCoefficient(uint8_t rsrpFilterCoefficient) = 0;
173
179 virtual void ResetPhyAfterRlf() = 0;
180
188 virtual void ResetRlfParams() = 0;
189
197 virtual void StartInSnycDetection() = 0;
198
203 virtual void SetImsi(uint64_t imsi) = 0;
204};
205
213{
214 public:
218 virtual ~LteUeCphySapUser();
219
225 {
226 uint16_t m_cellId;
227 double m_rsrp;
228 double m_rsrq;
229 };
230
233 {
234 std::vector<struct UeMeasurementsElement> m_ueMeasurementsList;
236 };
237
247 virtual void RecvMasterInformationBlock(uint16_t cellId,
249
259 virtual void RecvSystemInformationBlockType1(uint16_t cellId,
261
269
276 virtual void NotifyOutOfSync() = 0;
277
284 virtual void NotifyInSync() = 0;
285
292 virtual void ResetSyncIndicationCounter() = 0;
293};
294
299template <class C>
301{
302 public:
309
310 // Delete default constructor to avoid misuse
312
313 // inherited from LteUeCphySapProvider
314 void Reset() override;
315 void StartCellSearch(uint32_t dlEarfcn) override;
316 void SynchronizeWithEnb(uint16_t cellId) override;
317 void SynchronizeWithEnb(uint16_t cellId, uint32_t dlEarfcn) override;
318 uint16_t GetCellId() override;
319 uint32_t GetDlEarfcn() override;
320 void SetDlBandwidth(uint16_t dlBandwidth) override;
321 void ConfigureUplink(uint32_t ulEarfcn, uint16_t ulBandwidth) override;
322 void ConfigureReferenceSignalPower(int8_t referenceSignalPower) override;
323 void SetRnti(uint16_t rnti) override;
324 void SetTransmissionMode(uint8_t txMode) override;
325 void SetSrsConfigurationIndex(uint16_t srcCi) override;
326 void SetPa(double pa) override;
327 void SetRsrpFilterCoefficient(uint8_t rsrpFilterCoefficient) override;
328 void ResetPhyAfterRlf() override;
329 void ResetRlfParams() override;
330 void StartInSnycDetection() override;
331 void SetImsi(uint64_t imsi) override;
332
333 private:
335};
336
337template <class C>
339 : m_owner(owner)
340{
341}
342
343template <class C>
344void
346{
347 m_owner->DoReset();
348}
349
350template <class C>
351void
353{
354 m_owner->DoStartCellSearch(dlEarfcn);
355}
356
357template <class C>
358void
360{
361 m_owner->DoSynchronizeWithEnb(cellId);
362}
363
364template <class C>
365void
367{
368 m_owner->DoSynchronizeWithEnb(cellId, dlEarfcn);
369}
370
371template <class C>
372uint16_t
374{
375 return m_owner->DoGetCellId();
376}
377
378template <class C>
381{
382 return m_owner->DoGetDlEarfcn();
383}
384
385template <class C>
386void
388{
389 m_owner->DoSetDlBandwidth(dlBandwidth);
390}
391
392template <class C>
393void
395{
396 m_owner->DoConfigureUplink(ulEarfcn, ulBandwidth);
397}
398
399template <class C>
400void
402{
403 m_owner->DoConfigureReferenceSignalPower(referenceSignalPower);
404}
405
406template <class C>
407void
409{
410 m_owner->DoSetRnti(rnti);
411}
412
413template <class C>
414void
416{
417 m_owner->DoSetTransmissionMode(txMode);
418}
419
420template <class C>
421void
423{
424 m_owner->DoSetSrsConfigurationIndex(srcCi);
425}
426
427template <class C>
428void
430{
431 m_owner->DoSetPa(pa);
432}
433
434template <class C>
435void
437{
438 m_owner->DoSetRsrpFilterCoefficient(rsrpFilterCoefficient);
439}
440
441template <class C>
442void
444{
445 m_owner->DoResetPhyAfterRlf();
446}
447
448template <class C>
449void
451{
452 m_owner->DoResetRlfParams();
453}
454
455template <class C>
456void
458{
459 m_owner->DoStartInSnycDetection();
460}
461
462template <class C>
463void
465{
466 m_owner->DoSetImsi(imsi);
467}
468
473template <class C>
475{
476 public:
482 MemberLteUeCphySapUser(C* owner);
483
484 // Delete default constructor to avoid misuse
486
487 // methods inherited from LteUeCphySapUser go here
488 void RecvMasterInformationBlock(uint16_t cellId,
490 void RecvSystemInformationBlockType1(uint16_t cellId,
493 void NotifyOutOfSync() override;
494 void NotifyInSync() override;
495 void ResetSyncIndicationCounter() override;
496
497 private:
499};
500
501template <class C>
503 : m_owner(owner)
504{
505}
506
507template <class C>
508void
511{
512 m_owner->DoRecvMasterInformationBlock(cellId, mib);
513}
514
515template <class C>
516void
518 uint16_t cellId,
520{
521 m_owner->DoRecvSystemInformationBlockType1(cellId, sib1);
522}
523
524template <class C>
525void
527{
528 m_owner->DoReportUeMeasurements(params);
529}
530
531template <class C>
532void
534{
535 m_owner->DoNotifyOutOfSync();
536}
537
538template <class C>
539void
541{
542 m_owner->DoNotifyInSync();
543}
544
545template <class C>
546void
548{
549 m_owner->DoResetSyncIndicationCounter();
550}
551
552} // namespace ns3
553
554#endif // LTE_UE_CPHY_SAP_H
Service Access Point (SAP) offered by the UE PHY to the UE RRC for control purposes.
virtual void SynchronizeWithEnb(uint16_t cellId, uint32_t dlEarfcn)=0
Tell the PHY entity to align to the given EARFCN and synchronize with a given eNodeB for communicatio...
virtual uint16_t GetCellId()=0
Get PHY cell ID.
virtual void ResetPhyAfterRlf()=0
Reset the PHY after radio link failure function It resets the physical layer parameters of the UE aft...
virtual void SetRnti(uint16_t rnti)=0
Set Rnti function.
virtual void ConfigureReferenceSignalPower(int8_t referenceSignalPower)=0
Configure referenceSignalPower.
virtual void StartCellSearch(uint32_t dlEarfcn)=0
Tell the PHY entity to listen to PSS from surrounding cells and measure the RSRP.
virtual void SetTransmissionMode(uint8_t txMode)=0
Set transmission mode.
virtual ~LteUeCphySapProvider()
Destructor.
virtual void SetSrsConfigurationIndex(uint16_t srcCi)=0
Set SRS configuration index.
virtual void SetPa(double pa)=0
Set P_A value for UE power control.
virtual void ResetRlfParams()=0
Reset radio link failure parameters.
virtual void Reset()=0
Reset the PHY.
virtual void SetImsi(uint64_t imsi)=0
A method call by UE RRC to communicate the IMSI to the UE PHY.
virtual void SetRsrpFilterCoefficient(uint8_t rsrpFilterCoefficient)=0
Set RSRP filter coefficient.
virtual void ConfigureUplink(uint32_t ulEarfcn, uint16_t ulBandwidth)=0
Configure uplink (normally done after reception of SIB2)
virtual uint32_t GetDlEarfcn()=0
Get PHY DL EARFCN.
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 SetDlBandwidth(uint16_t dlBandwidth)=0
virtual void StartInSnycDetection()=0
Start in-sync detection function When T310 timer is started, it indicates that physical layer problem...
Service Access Point (SAP) offered by the UE PHY to the UE RRC for control purposes.
virtual void NotifyInSync()=0
Send an in sync indication to UE RRC.
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...
virtual void RecvMasterInformationBlock(uint16_t cellId, LteRrcSap::MasterInformationBlock mib)=0
Relay an MIB message from the PHY entity to the RRC layer.
virtual void RecvSystemInformationBlockType1(uint16_t cellId, LteRrcSap::SystemInformationBlockType1 sib1)=0
Relay an SIB1 message from the PHY entity to the RRC layer.
virtual void NotifyOutOfSync()=0
Send an out of sync indication to UE RRC.
virtual void ResetSyncIndicationCounter()=0
Reset the sync indication counter.
virtual ~LteUeCphySapUser()
destructor
Template for the implementation of the LteUeCphySapProvider as a member of an owner class of type C t...
void SetDlBandwidth(uint16_t dlBandwidth) override
void StartInSnycDetection() override
Start in-sync detection function When T310 timer is started, it indicates that physical layer problem...
void ConfigureReferenceSignalPower(int8_t referenceSignalPower) override
Configure referenceSignalPower.
void Reset() override
Reset the PHY.
uint16_t GetCellId() override
Get PHY cell ID.
void SetSrsConfigurationIndex(uint16_t srcCi) override
Set SRS configuration index.
void SetRnti(uint16_t rnti) override
Set Rnti function.
void ResetPhyAfterRlf() override
Reset the PHY after radio link failure function It resets the physical layer parameters of the UE aft...
void SetImsi(uint64_t imsi) override
A method call by UE RRC to communicate the IMSI to the UE PHY.
void ResetRlfParams() override
Reset radio link failure parameters.
void SetPa(double pa) override
Set P_A value for UE power control.
uint32_t GetDlEarfcn() override
Get PHY DL EARFCN.
void ConfigureUplink(uint32_t ulEarfcn, uint16_t ulBandwidth) override
Configure uplink (normally done after reception of SIB2)
void SetTransmissionMode(uint8_t txMode) override
Set transmission mode.
void StartCellSearch(uint32_t dlEarfcn) override
Tell the PHY entity to listen to PSS from surrounding cells and measure the RSRP.
void SetRsrpFilterCoefficient(uint8_t rsrpFilterCoefficient) override
Set RSRP filter coefficient.
void SynchronizeWithEnb(uint16_t cellId) override
Tell the PHY entity to synchronize with a given eNodeB over the currently active EARFCN for communica...
Template for the implementation of the LteUeCphySapUser as a member of an owner class of type C to wh...
void NotifyOutOfSync() override
Send an out of sync indication to UE RRC.
void ResetSyncIndicationCounter() override
Reset the sync indication counter.
C * m_owner
the owner class
void ReportUeMeasurements(LteUeCphySapUser::UeMeasurementsParameters params) override
Send a report of RSRP and RSRQ values perceived from PSS by the PHY entity (after applying layer-1 fi...
void NotifyInSync() override
Send an in sync indication to UE RRC.
void RecvSystemInformationBlockType1(uint16_t cellId, LteRrcSap::SystemInformationBlockType1 sib1) override
Relay an SIB1 message from the PHY entity to the RRC layer.
void RecvMasterInformationBlock(uint16_t cellId, LteRrcSap::MasterInformationBlock mib) override
Relay an MIB message from the PHY entity to the RRC layer.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
MasterInformationBlock structure.
Definition: lte-rrc-sap.h:622
SystemInformationBlockType1 structure.
Definition: lte-rrc-sap.h:629
Parameters of the ReportUeMeasurements primitive: RSRP [dBm] and RSRQ [dB] See section 5....
UeMeasurementsParameters structure.
uint8_t m_componentCarrierId
component carrier ID
std::vector< struct UeMeasurementsElement > m_ueMeasurementsList
UE measurement list.