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