A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
a3-rsrp-handover-algorithm.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2013 Budiarto Herman
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: Budiarto Herman <budiarto.herman@magister.fi>
18
*
19
*/
20
21
#ifndef A3_RSRP_HANDOVER_ALGORITHM_H
22
#define A3_RSRP_HANDOVER_ALGORITHM_H
23
24
#include "
lte-handover-algorithm.h
"
25
#include "
lte-handover-management-sap.h
"
26
#include "
lte-rrc-sap.h
"
27
28
#include <ns3/nstime.h>
29
30
namespace
ns3
31
{
32
33
/**
34
* \brief Implementation of the strongest cell handover algorithm, based on RSRP
35
* measurements and Event A3.
36
*
37
* The algorithm utilizes Event A3 (Section 5.5.4.4 of 3GPP TS 36.331) UE
38
* measurements and the Reference Signal Reference Power (RSRP). It is defined
39
* as the event when the UE perceives that a neighbour cell's RSRP is better
40
* than the serving cell's RSRP.
41
*
42
* Handover margin (a.k.a. hysteresis) and time-to-trigger (TTT) can be
43
* configured to delay the event triggering. The values of these parameters
44
* apply to all attached UEs.
45
*
46
* The following code snippet is an example of using and configuring the
47
* handover algorithm in a simulation program:
48
*
49
* Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
50
*
51
* NodeContainer enbNodes;
52
* // configure the nodes here...
53
*
54
* lteHelper->SetHandoverAlgorithmType ("ns3::A3RsrpHandoverAlgorithm");
55
* lteHelper->SetHandoverAlgorithmAttribute ("Hysteresis",
56
* DoubleValue (3.0));
57
* lteHelper->SetHandoverAlgorithmAttribute ("TimeToTrigger",
58
* TimeValue (MilliSeconds (256)));
59
* NetDeviceContainer enbLteDevs = lteHelper->InstallEnbDevice (enbNodes);
60
*
61
* \note Setting the handover algorithm type and attributes after the call to
62
* LteHelper::InstallEnbDevice does not have any effect to the devices
63
* that have already been installed.
64
*/
65
class
A3RsrpHandoverAlgorithm
:
public
LteHandoverAlgorithm
66
{
67
public
:
68
/// Creates a strongest cell handover algorithm instance.
69
A3RsrpHandoverAlgorithm
();
70
71
~A3RsrpHandoverAlgorithm
()
override
;
72
73
/**
74
* \brief Get the type ID.
75
* \return the object TypeId
76
*/
77
static
TypeId
GetTypeId
();
78
79
// inherited from LteHandoverAlgorithm
80
void
SetLteHandoverManagementSapUser
(
LteHandoverManagementSapUser
* s)
override
;
81
LteHandoverManagementSapProvider
*
GetLteHandoverManagementSapProvider
()
override
;
82
83
/// let the forwarder class access the protected and private members
84
friend
class
MemberLteHandoverManagementSapProvider
<
A3RsrpHandoverAlgorithm
>;
85
86
protected
:
87
// inherited from Object
88
void
DoInitialize
()
override
;
89
void
DoDispose
()
override
;
90
91
// inherited from LteHandoverAlgorithm as a Handover Management SAP implementation
92
void
DoReportUeMeas
(uint16_t rnti,
LteRrcSap::MeasResults
measResults)
override
;
93
94
private
:
95
/**
96
* Determines if a neighbour cell is a valid destination for handover.
97
* Currently always return true.
98
*
99
* \param cellId The cell ID of the neighbour cell.
100
* \return True if the cell is a valid destination for handover.
101
*/
102
bool
IsValidNeighbour
(uint16_t cellId);
103
104
/// The expected measurement identity for A3 measurements.
105
std::vector<uint8_t>
m_measIds
;
106
107
/**
108
* The `Hysteresis` attribute. Handover margin (hysteresis) in dB (rounded to
109
* the nearest multiple of 0.5 dB).
110
*/
111
double
m_hysteresisDb
;
112
/**
113
* The `TimeToTrigger` attribute. Time during which neighbour cell's RSRP
114
* must continuously higher than serving cell's RSRP "
115
*/
116
Time
m_timeToTrigger
;
117
118
/// Interface to the eNodeB RRC instance.
119
LteHandoverManagementSapUser
*
m_handoverManagementSapUser
;
120
/// Receive API calls from the eNodeB RRC instance.
121
LteHandoverManagementSapProvider
*
m_handoverManagementSapProvider
;
122
123
};
// end of class A3RsrpHandoverAlgorithm
124
125
}
// end of namespace ns3
126
127
#endif
/* A3_RSRP_HANDOVER_ALGORITHM_H */
ns3::A3RsrpHandoverAlgorithm
Implementation of the strongest cell handover algorithm, based on RSRP measurements and Event A3.
Definition:
a3-rsrp-handover-algorithm.h:66
ns3::A3RsrpHandoverAlgorithm::IsValidNeighbour
bool IsValidNeighbour(uint16_t cellId)
Determines if a neighbour cell is a valid destination for handover.
Definition:
a3-rsrp-handover-algorithm.cc:175
ns3::A3RsrpHandoverAlgorithm::m_hysteresisDb
double m_hysteresisDb
The Hysteresis attribute.
Definition:
a3-rsrp-handover-algorithm.h:111
ns3::A3RsrpHandoverAlgorithm::m_handoverManagementSapUser
LteHandoverManagementSapUser * m_handoverManagementSapUser
Interface to the eNodeB RRC instance.
Definition:
a3-rsrp-handover-algorithm.h:119
ns3::A3RsrpHandoverAlgorithm::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
a3-rsrp-handover-algorithm.cc:52
ns3::A3RsrpHandoverAlgorithm::m_handoverManagementSapProvider
LteHandoverManagementSapProvider * m_handoverManagementSapProvider
Receive API calls from the eNodeB RRC instance.
Definition:
a3-rsrp-handover-algorithm.h:121
ns3::A3RsrpHandoverAlgorithm::m_timeToTrigger
Time m_timeToTrigger
The TimeToTrigger attribute.
Definition:
a3-rsrp-handover-algorithm.h:116
ns3::A3RsrpHandoverAlgorithm::DoDispose
void DoDispose() override
Destructor implementation.
Definition:
a3-rsrp-handover-algorithm.cc:116
ns3::A3RsrpHandoverAlgorithm::A3RsrpHandoverAlgorithm
A3RsrpHandoverAlgorithm()
Creates a strongest cell handover algorithm instance.
Definition:
a3-rsrp-handover-algorithm.cc:38
ns3::A3RsrpHandoverAlgorithm::~A3RsrpHandoverAlgorithm
~A3RsrpHandoverAlgorithm() override
Definition:
a3-rsrp-handover-algorithm.cc:46
ns3::A3RsrpHandoverAlgorithm::DoInitialize
void DoInitialize() override
Initialize() implementation.
Definition:
a3-rsrp-handover-algorithm.cc:93
ns3::A3RsrpHandoverAlgorithm::GetLteHandoverManagementSapProvider
LteHandoverManagementSapProvider * GetLteHandoverManagementSapProvider() override
Export the "provider" part of the Handover Management SAP interface.
Definition:
a3-rsrp-handover-algorithm.cc:86
ns3::A3RsrpHandoverAlgorithm::m_measIds
std::vector< uint8_t > m_measIds
The expected measurement identity for A3 measurements.
Definition:
a3-rsrp-handover-algorithm.h:105
ns3::A3RsrpHandoverAlgorithm::SetLteHandoverManagementSapUser
void SetLteHandoverManagementSapUser(LteHandoverManagementSapUser *s) override
Set the "user" part of the Handover Management SAP interface that this handover algorithm instance wi...
Definition:
a3-rsrp-handover-algorithm.cc:79
ns3::A3RsrpHandoverAlgorithm::DoReportUeMeas
void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults) override
Implementation of LteHandoverManagementSapProvider::ReportUeMeas.
Definition:
a3-rsrp-handover-algorithm.cc:123
ns3::LteHandoverAlgorithm
The abstract base class of a handover algorithm that operates using the Handover Management SAP inter...
Definition:
lte-handover-algorithm.h:66
ns3::LteHandoverManagementSapProvider
Service Access Point (SAP) offered by the handover algorithm instance to the eNodeB RRC instance.
Definition:
lte-handover-management-sap.h:38
ns3::LteHandoverManagementSapUser
Service Access Point (SAP) offered by the eNodeB RRC instance to the handover algorithm instance.
Definition:
lte-handover-management-sap.h:65
ns3::MemberLteHandoverManagementSapProvider
Template for the implementation of the LteHandoverManagementSapProvider as a member of an owner class...
Definition:
lte-handover-management-sap.h:112
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:105
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
lte-handover-algorithm.h
lte-handover-management-sap.h
lte-rrc-sap.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::LteRrcSap::MeasResults
MeasResults structure.
Definition:
lte-rrc-sap.h:717
src
lte
model
a3-rsrp-handover-algorithm.h
Generated on Tue May 28 2024 23:37:05 for ns-3 by
1.9.6