A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-handover-management-sap.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 LTE_HANDOVER_MANAGEMENT_SAP_H
22#define LTE_HANDOVER_MANAGEMENT_SAP_H
23
24#include "lte-rrc-sap.h"
25
26namespace ns3
27{
28
29/**
30 * \brief Service Access Point (SAP) offered by the handover algorithm instance
31 * to the eNodeB RRC instance.
32 *
33 * This is the *Handover Management SAP Provider*, i.e., the part of the SAP
34 * that contains the handover algorithm methods called by the eNodeB RRC
35 * instance.
36 */
38{
39 public:
41
42 /**
43 * \brief Send a UE measurement report to handover algorithm.
44 * \param rnti Radio Network Temporary Identity, an integer identifying the UE
45 * where the report originates from
46 * \param measResults a single report of one measurement identity
47 *
48 * The received measurement report is a result of the UE measurement
49 * configuration previously configured by calling
50 * LteHandoverManagementSapUser::AddUeMeasReportConfigForHandover. The report
51 * may be stored and utilised for the purpose of making handover decision.
52 */
53 virtual void ReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults) = 0;
54
55}; // end of class LteHandoverManagementSapProvider
56
57/**
58 * \brief Service Access Point (SAP) offered by the eNodeB RRC instance to the
59 * handover algorithm instance.
60 *
61 * This is the *Handover Management SAP User*, i.e., the part of the SAP that
62 * contains the eNodeB RRC methods called by the handover algorithm instance.
63 */
65{
66 public:
68
69 /**
70 * \brief Request a certain reporting configuration to be fulfilled by the UEs
71 * attached to the eNodeB entity.
72 * \param reportConfig the UE measurement reporting configuration
73 * \return the measurement identities associated with this newly added
74 * reporting configuration
75 *
76 * The eNodeB RRC entity is expected to configure the same reporting
77 * configuration in each of the attached UEs. When later in the simulation a
78 * UE measurement report is received from a UE as a result of this
79 * configuration, the eNodeB RRC entity shall forward this report to the
80 * handover algorithm through the LteHandoverManagementSapProvider::ReportUeMeas
81 * SAP function.
82 *
83 * \note This function is only valid before the simulation begins.
84 */
85 virtual std::vector<uint8_t> AddUeMeasReportConfigForHandover(
86 LteRrcSap::ReportConfigEutra reportConfig) = 0;
87
88 /**
89 * \brief Instruct the eNodeB RRC entity to prepare a handover.
90 * \param rnti Radio Network Temporary Identity, an integer identifying the
91 * UE which shall perform the handover
92 * \param targetCellId the cell ID of the target eNodeB
93 *
94 * This function is used by the handover algorithm entity when a handover
95 * decision has been reached.
96 *
97 * The process to produce the decision is up to the implementation of handover
98 * algorithm. It is typically based on the reported UE measurements, which are
99 * received through the LteHandoverManagementSapProvider::ReportUeMeas function.
100 */
101 virtual void TriggerHandover(uint16_t rnti, uint16_t targetCellId) = 0;
102
103}; // end of class LteHandoverManagementSapUser
104
105/**
106 * \brief Template for the implementation of the LteHandoverManagementSapProvider
107 * as a member of an owner class of type C to which all methods are
108 * forwarded.
109 */
110template <class C>
112{
113 public:
114 /**
115 * Constructor
116 *
117 * \param owner the owner class
118 */
120
121 // Delete default constructor to avoid misuse
123
124 // inherited from LteHandoverManagementSapProvider
125 void ReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults) override;
126
127 private:
128 C* m_owner; ///< the owner class
129
130}; // end of class MemberLteHandoverManagementSapProvider
131
132template <class C>
134 : m_owner(owner)
135{
136}
137
138template <class C>
139void
141 LteRrcSap::MeasResults measResults)
142{
143 m_owner->DoReportUeMeas(rnti, measResults);
144}
145
146/**
147 * \brief Template for the implementation of the LteHandoverManagementSapUser
148 * as a member of an owner class of type C to which all methods are
149 * forwarded.
150 */
151template <class C>
153{
154 public:
155 /**
156 * Constructor
157 *
158 * \param owner the owner class
159 */
161
162 // Delete default constructor to avoid misuse
164
165 // inherited from LteHandoverManagementSapUser
166 std::vector<uint8_t> AddUeMeasReportConfigForHandover(
167 LteRrcSap::ReportConfigEutra reportConfig) override;
168 void TriggerHandover(uint16_t rnti, uint16_t targetCellId) override;
169
170 private:
171 C* m_owner; ///< the owner class
172
173}; // end of class MemberLteAnrSapUser
174
175template <class C>
177 : m_owner(owner)
178{
179}
180
181template <class C>
182std::vector<uint8_t>
184 LteRrcSap::ReportConfigEutra reportConfig)
185{
186 return m_owner->DoAddUeMeasReportConfigForHandover(reportConfig);
187}
188
189template <class C>
190void
192{
193 return m_owner->DoTriggerHandover(rnti, targetCellId);
194}
195
196} // end of namespace ns3
197
198#endif /* LTE_HANDOVER_MANAGEMENT_SAP_H */
Service Access Point (SAP) offered by the handover algorithm instance to the eNodeB RRC instance.
virtual void ReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults)=0
Send a UE measurement report to handover algorithm.
Service Access Point (SAP) offered by the eNodeB RRC instance to the handover algorithm instance.
virtual void TriggerHandover(uint16_t rnti, uint16_t targetCellId)=0
Instruct the eNodeB RRC entity to prepare a handover.
virtual std::vector< uint8_t > AddUeMeasReportConfigForHandover(LteRrcSap::ReportConfigEutra reportConfig)=0
Request a certain reporting configuration to be fulfilled by the UEs attached to the eNodeB entity.
Template for the implementation of the LteHandoverManagementSapProvider as a member of an owner class...
void ReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults) override
Send a UE measurement report to handover algorithm.
Template for the implementation of the LteHandoverManagementSapUser as a member of an owner class of ...
void TriggerHandover(uint16_t rnti, uint16_t targetCellId) override
Instruct the eNodeB RRC entity to prepare a handover.
std::vector< uint8_t > AddUeMeasReportConfigForHandover(LteRrcSap::ReportConfigEutra reportConfig) override
Request a certain reporting configuration to be fulfilled by the UEs attached to the eNodeB entity.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
MeasResults structure.
Definition: lte-rrc-sap.h:717
Specifies criteria for triggering of an E-UTRA measurement reporting event.
Definition: lte-rrc-sap.h:373