OLD | NEW |
(Empty) | |
| 1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
| 2 /* |
| 3 * Copyright (c) 2013 Budiarto Herman |
| 4 * |
| 5 * This program is free software; you can redistribute it and/or modify |
| 6 * it under the terms of the GNU General Public License version 2 as |
| 7 * published by the Free Software Foundation; |
| 8 * |
| 9 * This program is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 * GNU General Public License for more details. |
| 13 * |
| 14 * You should have received a copy of the GNU General Public License |
| 15 * along with this program; if not, write to the Free Software |
| 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 17 * |
| 18 * Author: Budiarto Herman <budiarto.herman@magister.fi> |
| 19 * |
| 20 */ |
| 21 |
| 22 #ifndef NIST_LTE_HANDOVER_MANAGEMENT_SAP_H |
| 23 #define NIST_LTE_HANDOVER_MANAGEMENT_SAP_H |
| 24 |
| 25 #include <ns3/nist-lte-rrc-sap.h> |
| 26 |
| 27 namespace ns3 { |
| 28 |
| 29 |
| 30 /** |
| 31 * \brief Service Access Point (SAP) offered by the handover algorithm instance |
| 32 * to the eNodeB RRC instance. |
| 33 * |
| 34 * This is the *Handover Management SAP Provider*, i.e., the part of the SAP |
| 35 * that contains the handover algorithm methods called by the eNodeB RRC |
| 36 * instance. |
| 37 */ |
| 38 class NistLteHandoverManagementSapProvider |
| 39 { |
| 40 public: |
| 41 virtual ~NistLteHandoverManagementSapProvider (); |
| 42 |
| 43 /** |
| 44 * \brief Send a UE measurement report to handover algorithm. |
| 45 * \param rnti Radio Network Temporary Identity, an integer identifying the UE |
| 46 * where the report originates from |
| 47 * \param measResults a single report of one measurement identity |
| 48 * |
| 49 * The received measurement report is a result of the UE measurement |
| 50 * configuration previously configured by calling |
| 51 * NistLteHandoverManagementSapUser::AddUeMeasReportConfigForHandover. The rep
ort |
| 52 * may be stored and utilised for the purpose of making handover decision. |
| 53 */ |
| 54 virtual void ReportUeMeas (uint16_t rnti, |
| 55 NistLteRrcSap::NistMeasResults measResults) = 0; |
| 56 |
| 57 }; // end of class NistLteHandoverManagementSapProvider |
| 58 |
| 59 |
| 60 /** |
| 61 * \brief Service Access Point (SAP) offered by the eNodeB RRC instance to the |
| 62 * handover algorithm instance. |
| 63 * |
| 64 * This is the *Handover Management SAP User*, i.e., the part of the SAP that |
| 65 * contains the eNodeB RRC methods called by the handover algorithm instance. |
| 66 */ |
| 67 class NistLteHandoverManagementSapUser |
| 68 { |
| 69 public: |
| 70 virtual ~NistLteHandoverManagementSapUser (); |
| 71 |
| 72 /** |
| 73 * \brief Request a certain reporting configuration to be fulfilled by the UEs |
| 74 * attached to the eNodeB entity. |
| 75 * \param reportConfig the UE measurement reporting configuration |
| 76 * \return the measurement identity associated with this newly added |
| 77 * reporting configuration |
| 78 * |
| 79 * The eNodeB RRC entity is expected to configure the same reporting |
| 80 * configuration in each of the attached UEs. When later in the simulation a |
| 81 * UE measurement report is received from a UE as a result of this |
| 82 * configuration, the eNodeB RRC entity shall forward this report to the |
| 83 * handover algorithm through the NistLteHandoverManagementSapProvider::Report
UeMeas |
| 84 * SAP function. |
| 85 * |
| 86 * \note This function is only valid before the simulation begins. |
| 87 */ |
| 88 virtual uint8_t AddUeMeasReportConfigForHandover (NistLteRrcSap::NistReportCon
figEutra reportConfig) = 0; |
| 89 |
| 90 /** |
| 91 * \brief Instruct the eNodeB RRC entity to prepare a handover. |
| 92 * \param rnti Radio Network Temporary Identity, an integer identifying the |
| 93 * UE which shall perform the handover |
| 94 * \param targetCellId the cell ID of the target eNodeB |
| 95 * |
| 96 * This function is used by the handover algorithm entity when a handover |
| 97 * decision has been reached. |
| 98 * |
| 99 * The process to produce the decision is up to the implementation of handover |
| 100 * algorithm. It is typically based on the reported UE measurements, which are |
| 101 * received through the NistLteHandoverManagementSapProvider::ReportUeMeas fun
ction. |
| 102 */ |
| 103 virtual void TriggerHandover (uint16_t rnti, uint16_t targetCellId) = 0; |
| 104 |
| 105 }; // end of class NistLteHandoverManagementSapUser |
| 106 |
| 107 |
| 108 |
| 109 /** |
| 110 * \brief Template for the implementation of the NistLteHandoverManagementSapPro
vider |
| 111 * as a member of an owner class of type C to which all methods are |
| 112 * forwarded. |
| 113 */ |
| 114 template <class C> |
| 115 class MemberNistLteHandoverManagementSapProvider : public NistLteHandoverManagem
entSapProvider |
| 116 { |
| 117 public: |
| 118 MemberNistLteHandoverManagementSapProvider (C* owner); |
| 119 |
| 120 // inherited from LteHandoverManagemenrSapProvider |
| 121 virtual void ReportUeMeas (uint16_t rnti, NistLteRrcSap::NistMeasResults measR
esults); |
| 122 |
| 123 private: |
| 124 MemberNistLteHandoverManagementSapProvider (); |
| 125 C* m_owner; |
| 126 |
| 127 }; // end of class MemberNistLteHandoverManagementSapProvider |
| 128 |
| 129 |
| 130 template <class C> |
| 131 MemberNistLteHandoverManagementSapProvider<C>::MemberNistLteHandoverManagementSa
pProvider (C* owner) |
| 132 : m_owner (owner) |
| 133 { |
| 134 } |
| 135 |
| 136 |
| 137 template <class C> |
| 138 void |
| 139 MemberNistLteHandoverManagementSapProvider<C>::ReportUeMeas (uint16_t rnti, Nist
LteRrcSap::NistMeasResults measResults) |
| 140 { |
| 141 m_owner->DoReportUeMeas (rnti, measResults); |
| 142 } |
| 143 |
| 144 |
| 145 |
| 146 /** |
| 147 * \brief Template for the implementation of the NistLteHandoverManagementSapUse
r |
| 148 * as a member of an owner class of type C to which all methods are |
| 149 * forwarded. |
| 150 */ |
| 151 template <class C> |
| 152 class MemberNistLteHandoverManagementSapUser : public NistLteHandoverManagementS
apUser |
| 153 { |
| 154 public: |
| 155 MemberNistLteHandoverManagementSapUser (C* owner); |
| 156 |
| 157 // inherited from NistLteHandoverManagementSapUser |
| 158 virtual uint8_t AddUeMeasReportConfigForHandover (NistLteRrcSap::NistReportCon
figEutra reportConfig); |
| 159 virtual void TriggerHandover (uint16_t rnti, uint16_t targetCellId); |
| 160 |
| 161 private: |
| 162 MemberNistLteHandoverManagementSapUser (); |
| 163 C* m_owner; |
| 164 |
| 165 }; // end of class MemberNistLteAnrSapUser |
| 166 |
| 167 |
| 168 template <class C> |
| 169 MemberNistLteHandoverManagementSapUser<C>::MemberNistLteHandoverManagementSapUse
r (C* owner) |
| 170 : m_owner (owner) |
| 171 { |
| 172 } |
| 173 |
| 174 |
| 175 template <class C> |
| 176 uint8_t |
| 177 MemberNistLteHandoverManagementSapUser<C>::AddUeMeasReportConfigForHandover (Nis
tLteRrcSap::NistReportConfigEutra reportConfig) |
| 178 { |
| 179 return m_owner->DoAddUeMeasReportConfigForHandover (reportConfig); |
| 180 } |
| 181 |
| 182 |
| 183 template <class C> |
| 184 void |
| 185 MemberNistLteHandoverManagementSapUser<C>::TriggerHandover (uint16_t rnti, uint1
6_t targetCellId) |
| 186 { |
| 187 return m_owner->DoTriggerHandover (rnti, targetCellId); |
| 188 } |
| 189 |
| 190 |
| 191 } // end of namespace ns3 |
| 192 |
| 193 |
| 194 #endif /* NIST_LTE_HANDOVER_MANAGEMENT_SAP_H */ |
OLD | NEW |