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