A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-anr-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_ANR_SAP_H
22#define LTE_ANR_SAP_H
23
24#include "lte-rrc-sap.h"
25
26namespace ns3
27{
28
29/**
30 * \brief Service Access Point (SAP) offered by the ANR instance to the eNodeB
31 * RRC instance.
32 *
33 * This is the *ANR SAP Provider*, i.e., the part of the SAP that contains the
34 * ANR (Automatic Neighbour Relation) methods called by the eNodeB RRC instance.
35 */
37{
38 public:
39 virtual ~LteAnrSapProvider();
40
41 /**
42 * \brief Send a UE measurement report to the ANC instance.
43 * \param measResults a single report of one measurement identity
44 *
45 * The received measurement report is a result of the UE measurement
46 * configuration previously configured by calling
47 * LteAnrSapUser::AddUeMeasReportConfigForAnr. The report may be stored and
48 * utilized for the purpose of maintaining Neighbour Relation Table (NRT).
49 */
50 virtual void ReportUeMeas(LteRrcSap::MeasResults measResults) = 0;
51
52 /**
53 * \brief Add a new Neighbour Relation entry.
54 * \param cellId the Physical Cell ID of the new neighbouring cell
55 */
56 virtual void AddNeighbourRelation(uint16_t cellId) = 0;
57
58 /**
59 * \brief Get the value of *No Remove* field of a neighbouring cell from the
60 * Neighbour Relation Table (NRT).
61 * \param cellId the Physical Cell ID of the neighbouring cell of interest
62 * \return if true, the Neighbour Relation shall *not* be removed from the NRT
63 */
64 virtual bool GetNoRemove(uint16_t cellId) const = 0;
65
66 /**
67 * \brief Get the value of *No HO* field of a neighbouring cell from the
68 * Neighbour Relation Table (NRT).
69 * \param cellId the Physical Cell ID of the neighbouring cell of interest
70 * \return if true, the Neighbour Relation shall *not* be used by the eNodeB
71 * for handover reasons
72 */
73 virtual bool GetNoHo(uint16_t cellId) const = 0;
74
75 /**
76 * \brief Get the value of *No X2* field of a neighbouring cell from the
77 * Neighbour Relation Table (NRT).
78 * \param cellId the Physical Cell ID of the neighbouring cell of interest
79 * \return if true, the Neighbour Relation shall *not* use an X2 interface in
80 * order to initiate procedures towards the eNodeB parenting the
81 * target cell
82 */
83 virtual bool GetNoX2(uint16_t cellId) const = 0;
84
85}; // end of class LteAnrSapProvider
86
87/**
88 * \brief Service Access Point (SAP) offered by the eNodeB RRC instance to the
89 * ANR instance.
90 *
91 * This is the *ANR SAP User*, i.e., the part of the SAP that contains the
92 * eNodeB RRC methods called by the ANR (Automatic Neighbour Relation) instance.
93 */
95{
96 public:
97 virtual ~LteAnrSapUser();
98
99 /**
100 * \brief Request a certain reporting configuration to be fulfilled by the UEs
101 * attached to the eNodeB entity.
102 * \param reportConfig the UE measurement reporting configuration
103 * \return the measurement identity associated with this newly added
104 * reporting configuration
105 *
106 * The eNodeB RRC entity is expected to configure the same reporting
107 * configuration in each of the attached UEs. When later in the simulation a
108 * UE measurement report is received from a UE as a result of this
109 * configuration, the eNodeB RRC entity shall forward this report to the ANC
110 * instance through the LteAnrSapProvider::ReportUeMeas SAP function.
111 *
112 * \note This function is only valid before the simulation begins.
113 */
115
116}; // end of class LteAnrSapUser
117
118/**
119 * \brief Template for the implementation of the LteAnrSapProvider as a member
120 * of an owner class of type C to which all methods are forwarded.
121 */
122template <class C>
124{
125 public:
126 /**
127 * Constructor
128 *
129 * \param owner the owner class
130 */
131 MemberLteAnrSapProvider(C* owner);
132
133 // Delete default constructor to avoid misuse
135
136 // inherited from LteAnrSapProvider
137 void ReportUeMeas(LteRrcSap::MeasResults measResults) override;
138 void AddNeighbourRelation(uint16_t cellId) override;
139 bool GetNoRemove(uint16_t cellId) const override;
140 bool GetNoHo(uint16_t cellId) const override;
141 bool GetNoX2(uint16_t cellId) const override;
142
143 private:
144 C* m_owner; ///< the owner class
145
146}; // end of class MemberLteAnrSapProvider
147
148template <class C>
150 : m_owner(owner)
151{
152}
153
154template <class C>
155void
157{
158 m_owner->DoReportUeMeas(measResults);
159}
160
161template <class C>
162void
164{
165 m_owner->DoAddNeighbourRelation(cellId);
166}
167
168template <class C>
169bool
171{
172 return m_owner->DoGetNoRemove(cellId);
173}
174
175template <class C>
176bool
178{
179 return m_owner->DoGetNoHo(cellId);
180}
181
182template <class C>
183bool
185{
186 return m_owner->DoGetNoX2(cellId);
187}
188
189/**
190 * \brief Template for the implementation of the LteAnrSapUser as a member of an
191 * owner class of type C to which all methods are forwarded.
192 */
193template <class C>
195{
196 public:
197 /**
198 * Constructor
199 *
200 * \param owner the owner class
201 */
202 MemberLteAnrSapUser(C* owner);
203
204 // Delete default constructor to avoid misuse
206
207 // inherited from LteAnrSapUser
208 uint8_t AddUeMeasReportConfigForAnr(LteRrcSap::ReportConfigEutra reportConfig) override;
209
210 private:
211 C* m_owner; ///< the owner class
212
213}; // end of class MemberLteAnrSapUser
214
215template <class C>
217 : m_owner(owner)
218{
219}
220
221template <class C>
222uint8_t
224{
225 return m_owner->DoAddUeMeasReportConfigForAnr(reportConfig);
226}
227
228} // end of namespace ns3
229
230#endif /* LTE_ANR_SAP_H */
Service Access Point (SAP) offered by the ANR instance to the eNodeB RRC instance.
Definition: lte-anr-sap.h:37
virtual void AddNeighbourRelation(uint16_t cellId)=0
Add a new Neighbour Relation entry.
virtual bool GetNoX2(uint16_t cellId) const =0
Get the value of No X2 field of a neighbouring cell from the Neighbour Relation Table (NRT).
virtual bool GetNoHo(uint16_t cellId) const =0
Get the value of No HO field of a neighbouring cell from the Neighbour Relation Table (NRT).
virtual ~LteAnrSapProvider()
Definition: lte-anr-sap.cc:26
virtual void ReportUeMeas(LteRrcSap::MeasResults measResults)=0
Send a UE measurement report to the ANC instance.
virtual bool GetNoRemove(uint16_t cellId) const =0
Get the value of No Remove field of a neighbouring cell from the Neighbour Relation Table (NRT).
Service Access Point (SAP) offered by the eNodeB RRC instance to the ANR instance.
Definition: lte-anr-sap.h:95
virtual uint8_t AddUeMeasReportConfigForAnr(LteRrcSap::ReportConfigEutra reportConfig)=0
Request a certain reporting configuration to be fulfilled by the UEs attached to the eNodeB entity.
virtual ~LteAnrSapUser()
Definition: lte-anr-sap.cc:30
Template for the implementation of the LteAnrSapProvider as a member of an owner class of type C to w...
Definition: lte-anr-sap.h:124
void ReportUeMeas(LteRrcSap::MeasResults measResults) override
Send a UE measurement report to the ANC instance.
Definition: lte-anr-sap.h:156
bool GetNoX2(uint16_t cellId) const override
Get the value of No X2 field of a neighbouring cell from the Neighbour Relation Table (NRT).
Definition: lte-anr-sap.h:184
C * m_owner
the owner class
Definition: lte-anr-sap.h:144
void AddNeighbourRelation(uint16_t cellId) override
Add a new Neighbour Relation entry.
Definition: lte-anr-sap.h:163
bool GetNoRemove(uint16_t cellId) const override
Get the value of No Remove field of a neighbouring cell from the Neighbour Relation Table (NRT).
Definition: lte-anr-sap.h:170
bool GetNoHo(uint16_t cellId) const override
Get the value of No HO field of a neighbouring cell from the Neighbour Relation Table (NRT).
Definition: lte-anr-sap.h:177
Template for the implementation of the LteAnrSapUser as a member of an owner class of type C to which...
Definition: lte-anr-sap.h:195
uint8_t AddUeMeasReportConfigForAnr(LteRrcSap::ReportConfigEutra reportConfig) override
Request a certain reporting configuration to be fulfilled by the UEs attached to the eNodeB entity.
Definition: lte-anr-sap.h:223
C * m_owner
the owner class
Definition: lte-anr-sap.h:211
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