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
121template <class C>
126
127template <class C>
128void
130 LteRrcSap::MeasResults measResults)
131{
132 m_owner->DoReportUeMeas(rnti, measResults);
133}
134
135/**
136 * \brief Template for the implementation of the LteHandoverManagementSapUser
137 * as a member of an owner class of type C to which all methods are
138 * forwarded.
139 */
140template <class C>
142{
143 public:
144 /**
145 * Constructor
146 *
147 * \param owner the owner class
148 */
150
151 // Delete default constructor to avoid misuse
153
154 // inherited from LteHandoverManagementSapUser
155 std::vector<uint8_t> AddUeMeasReportConfigForHandover(
156 LteRrcSap::ReportConfigEutra reportConfig) override;
157 void TriggerHandover(uint16_t rnti, uint16_t targetCellId) override;
158
159 private:
160 C* m_owner; ///< the owner class
161
162}; // end of class MemberLteAnrSapUser
163
164template <class C>
169
170template <class C>
171std::vector<uint8_t>
173 LteRrcSap::ReportConfigEutra reportConfig)
174{
175 return m_owner->DoAddUeMeasReportConfigForHandover(reportConfig);
176}
177
178template <class C>
179void
181{
182 return m_owner->DoTriggerHandover(rnti, targetCellId);
183}
184
185} // end of namespace ns3
186
187#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.