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 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Budiarto Herman <budiarto.herman@magister.fi>
7 *
8 */
9
10#ifndef LTE_HANDOVER_MANAGEMENT_SAP_H
11#define LTE_HANDOVER_MANAGEMENT_SAP_H
12
13#include "lte-rrc-sap.h"
14
15namespace ns3
16{
17
18/**
19 * @brief Service Access Point (SAP) offered by the handover algorithm instance
20 * to the eNodeB RRC instance.
21 *
22 * This is the *Handover Management SAP Provider*, i.e., the part of the SAP
23 * that contains the handover algorithm methods called by the eNodeB RRC
24 * instance.
25 */
27{
28 public:
30
31 /**
32 * @brief Send a UE measurement report to handover algorithm.
33 * @param rnti Radio Network Temporary Identity, an integer identifying the UE
34 * where the report originates from
35 * @param measResults a single report of one measurement identity
36 *
37 * The received measurement report is a result of the UE measurement
38 * configuration previously configured by calling
39 * LteHandoverManagementSapUser::AddUeMeasReportConfigForHandover. The report
40 * may be stored and utilised for the purpose of making handover decision.
41 */
42 virtual void ReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults) = 0;
43
44}; // end of class LteHandoverManagementSapProvider
45
46/**
47 * @brief Service Access Point (SAP) offered by the eNodeB RRC instance to the
48 * handover algorithm instance.
49 *
50 * This is the *Handover Management SAP User*, i.e., the part of the SAP that
51 * contains the eNodeB RRC methods called by the handover algorithm instance.
52 */
54{
55 public:
57
58 /**
59 * @brief Request a certain reporting configuration to be fulfilled by the UEs
60 * attached to the eNodeB entity.
61 * @param reportConfig the UE measurement reporting configuration
62 * @return the measurement identities associated with this newly added
63 * reporting configuration
64 *
65 * The eNodeB RRC entity is expected to configure the same reporting
66 * configuration in each of the attached UEs. When later in the simulation a
67 * UE measurement report is received from a UE as a result of this
68 * configuration, the eNodeB RRC entity shall forward this report to the
69 * handover algorithm through the LteHandoverManagementSapProvider::ReportUeMeas
70 * SAP function.
71 *
72 * @note This function is only valid before the simulation begins.
73 */
74 virtual std::vector<uint8_t> AddUeMeasReportConfigForHandover(
75 LteRrcSap::ReportConfigEutra reportConfig) = 0;
76
77 /**
78 * @brief Instruct the eNodeB RRC entity to prepare a handover.
79 * @param rnti Radio Network Temporary Identity, an integer identifying the
80 * UE which shall perform the handover
81 * @param targetCellId the cell ID of the target eNodeB
82 *
83 * This function is used by the handover algorithm entity when a handover
84 * decision has been reached.
85 *
86 * The process to produce the decision is up to the implementation of handover
87 * algorithm. It is typically based on the reported UE measurements, which are
88 * received through the LteHandoverManagementSapProvider::ReportUeMeas function.
89 */
90 virtual void TriggerHandover(uint16_t rnti, uint16_t targetCellId) = 0;
91
92}; // end of class LteHandoverManagementSapUser
93
94/**
95 * @brief Template for the implementation of the LteHandoverManagementSapProvider
96 * as a member of an owner class of type C to which all methods are
97 * forwarded.
98 */
99template <class C>
101{
102 public:
103 /**
104 * Constructor
105 *
106 * @param owner the owner class
107 */
109
110 // Delete default constructor to avoid misuse
112
113 // inherited from LteHandoverManagementSapProvider
114 void ReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults) override;
115
116 private:
117 C* m_owner; ///< the owner class
118
119 // end of class MemberLteHandoverManagementSapProvider
120};
121
122template <class C>
127
128template <class C>
129void
131 LteRrcSap::MeasResults measResults)
132{
133 m_owner->DoReportUeMeas(rnti, measResults);
134}
135
136/**
137 * @brief Template for the implementation of the LteHandoverManagementSapUser
138 * as a member of an owner class of type C to which all methods are
139 * forwarded.
140 */
141template <class C>
143{
144 public:
145 /**
146 * Constructor
147 *
148 * @param owner the owner class
149 */
151
152 // Delete default constructor to avoid misuse
154
155 // inherited from LteHandoverManagementSapUser
156 std::vector<uint8_t> AddUeMeasReportConfigForHandover(
157 LteRrcSap::ReportConfigEutra reportConfig) override;
158 void TriggerHandover(uint16_t rnti, uint16_t targetCellId) override;
159
160 private:
161 C* m_owner; ///< the owner class
162
163 // end of class MemberLteAnrSapUser
164};
165
166template <class C>
171
172template <class C>
173std::vector<uint8_t>
175 LteRrcSap::ReportConfigEutra reportConfig)
176{
177 return m_owner->DoAddUeMeasReportConfigForHandover(reportConfig);
178}
179
180template <class C>
181void
183{
184 return m_owner->DoTriggerHandover(rnti, targetCellId);
185}
186
187} // end of namespace ns3
188
189#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.
Specifies criteria for triggering of an E-UTRA measurement reporting event.