A Discrete-Event Network Simulator
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
15#include "lte-rrc-sap.h"
16
17#include <ns3/nstime.h>
18
19namespace 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 */
55{
56 public:
57 /// Creates a strongest cell handover algorithm instance.
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
71
72 /// let the forwarder class access the protected and private members
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 */
101 /**
102 * The `TimeToTrigger` attribute. Time during which neighbour cell's RSRP
103 * must continuously higher than serving cell's RSRP "
104 */
106
107 /// Interface to the eNodeB RRC instance.
109 /// Receive API calls from the eNodeB RRC instance.
111
112}; // end of class A3RsrpHandoverAlgorithm
113
114} // end of namespace ns3
115
116#endif /* A3_RSRP_HANDOVER_ALGORITHM_H */
Implementation of the strongest cell handover algorithm, based on RSRP measurements and Event A3.
bool IsValidNeighbour(uint16_t cellId)
Determines if a neighbour cell is a valid destination for handover.
double m_hysteresisDb
The Hysteresis attribute.
LteHandoverManagementSapUser * m_handoverManagementSapUser
Interface to the eNodeB RRC instance.
static TypeId GetTypeId()
Get the type ID.
LteHandoverManagementSapProvider * m_handoverManagementSapProvider
Receive API calls from the eNodeB RRC instance.
Time m_timeToTrigger
The TimeToTrigger attribute.
void DoDispose() override
Destructor implementation.
A3RsrpHandoverAlgorithm()
Creates a strongest cell handover algorithm instance.
void DoInitialize() override
Initialize() implementation.
LteHandoverManagementSapProvider * GetLteHandoverManagementSapProvider() override
Export the "provider" part of the Handover Management SAP interface.
std::vector< uint8_t > m_measIds
The expected measurement identity for A3 measurements.
void SetLteHandoverManagementSapUser(LteHandoverManagementSapUser *s) override
Set the "user" part of the Handover Management SAP interface that this handover algorithm instance wi...
void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults) override
Implementation of LteHandoverManagementSapProvider::ReportUeMeas.
The abstract base class of a handover algorithm that operates using the Handover Management SAP inter...
Service Access Point (SAP) offered by the handover algorithm instance to the eNodeB RRC instance.
Service Access Point (SAP) offered by the eNodeB RRC instance to the handover algorithm instance.
Template for the implementation of the LteHandoverManagementSapProvider as a member of an owner class...
Simulation virtual time values and global simulation resolution.
Definition nstime.h:94
a unique identifier for an interface.
Definition type-id.h:48
Every class exported by the ns3 library is enclosed in the ns3 namespace.
MeasResults structure.