A Discrete-Event Network Simulator
API
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 // inherited from LteUeCphySapProvider
311 void Reset() override;
312 void StartCellSearch(uint32_t dlEarfcn) override;
313 void SynchronizeWithEnb(uint16_t cellId) override;
314 void SynchronizeWithEnb(uint16_t cellId, uint32_t dlEarfcn) override;
315 uint16_t GetCellId() override;
316 uint32_t GetDlEarfcn() override;
317 void SetDlBandwidth(uint16_t dlBandwidth) override;
318 void ConfigureUplink(uint32_t ulEarfcn, uint16_t ulBandwidth) override;
319 void ConfigureReferenceSignalPower(int8_t referenceSignalPower) override;
320 void SetRnti(uint16_t rnti) override;
321 void SetTransmissionMode(uint8_t txMode) override;
322 void SetSrsConfigurationIndex(uint16_t srcCi) override;
323 void SetPa(double pa) override;
324 void SetRsrpFilterCoefficient(uint8_t rsrpFilterCoefficient) override;
325 void ResetPhyAfterRlf() override;
326 void ResetRlfParams() override;
327 void StartInSnycDetection() override;
328 void SetImsi(uint64_t imsi) override;
329
330 private:
333};
334
335template <class C>
337 : m_owner(owner)
338{
339}
340
341template <class C>
343{
344}
345
346template <class C>
347void
349{
350 m_owner->DoReset();
351}
352
353template <class C>
354void
356{
357 m_owner->DoStartCellSearch(dlEarfcn);
358}
359
360template <class C>
361void
363{
364 m_owner->DoSynchronizeWithEnb(cellId);
365}
366
367template <class C>
368void
370{
371 m_owner->DoSynchronizeWithEnb(cellId, dlEarfcn);
372}
373
374template <class C>
375uint16_t
377{
378 return m_owner->DoGetCellId();
379}
380
381template <class C>
384{
385 return m_owner->DoGetDlEarfcn();
386}
387
388template <class C>
389void
391{
392 m_owner->DoSetDlBandwidth(dlBandwidth);
393}
394
395template <class C>
396void
398{
399 m_owner->DoConfigureUplink(ulEarfcn, ulBandwidth);
400}
401
402template <class C>
403void
405{
406 m_owner->DoConfigureReferenceSignalPower(referenceSignalPower);
407}
408
409template <class C>
410void
412{
413 m_owner->DoSetRnti(rnti);
414}
415
416template <class C>
417void
419{
420 m_owner->DoSetTransmissionMode(txMode);
421}
422
423template <class C>
424void
426{
427 m_owner->DoSetSrsConfigurationIndex(srcCi);
428}
429
430template <class C>
431void
433{
434 m_owner->DoSetPa(pa);
435}
436
437template <class C>
438void
440{
441 m_owner->DoSetRsrpFilterCoefficient(rsrpFilterCoefficient);
442}
443
444template <class C>
445void
447{
448 m_owner->DoResetPhyAfterRlf();
449}
450
451template <class C>
452void
454{
455 m_owner->DoResetRlfParams();
456}
457
458template <class C>
459void
461{
462 m_owner->DoStartInSnycDetection();
463}
464
465template <class C>
466void
468{
469 m_owner->DoSetImsi(imsi);
470}
471
476template <class C>
478{
479 public:
485 MemberLteUeCphySapUser(C* owner);
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:
500};
501
502template <class C>
504 : m_owner(owner)
505{
506}
507
508template <class C>
510{
511}
512
513template <class C>
514void
517{
518 m_owner->DoRecvMasterInformationBlock(cellId, mib);
519}
520
521template <class C>
522void
524 uint16_t cellId,
526{
527 m_owner->DoRecvSystemInformationBlockType1(cellId, sib1);
528}
529
530template <class C>
531void
533{
534 m_owner->DoReportUeMeasurements(params);
535}
536
537template <class C>
538void
540{
541 m_owner->DoNotifyOutOfSync();
542}
543
544template <class C>
545void
547{
548 m_owner->DoNotifyInSync();
549}
550
551template <class C>
552void
554{
555 m_owner->DoResetSyncIndicationCounter();
556}
557
558} // namespace ns3
559
560#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:608
SystemInformationBlockType1 structure.
Definition: lte-rrc-sap.h:615
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.