A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-anr.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2011, 2012 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
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 * Original work authors (from lte-enb-rrc.cc):
19 * - Nicola Baldo <nbaldo@cttc.es>
20 * - Marco Miozzo <mmiozzo@cttc.es>
21 * - Manuel Requena <manuel.requena@cttc.es>
22 *
23 * Converted to ANR interface by:
24 * - Budiarto Herman <budiarto.herman@magister.fi>
25 */
26
27#ifndef LTE_ANR_H
28#define LTE_ANR_H
29
30#include <ns3/lte-anr-sap.h>
31#include <ns3/lte-rrc-sap.h>
32#include <ns3/object.h>
33
34#include <map>
35
36namespace ns3
37{
38
39class LteAnrSapProvider;
40class LteAnrSapUser;
41class LteNeighbourRelation;
42
80class LteAnr : public Object
81{
82 public:
88 LteAnr(uint16_t servingCellId);
89 ~LteAnr() override;
90
95 static TypeId GetTypeId();
96
111 void AddNeighbourRelation(uint16_t cellId);
112
121 void RemoveNeighbourRelation(uint16_t cellId);
122
129 virtual void SetLteAnrSapUser(LteAnrSapUser* s);
130
137
139 friend class MemberLteAnrSapProvider<LteAnr>;
140
141 protected:
142 // inherited from Object
143 void DoInitialize() override;
144 void DoDispose() override;
145
146 private:
147 // ANR SAP PROVIDER IMPLEMENTATION
148
153 void DoReportUeMeas(LteRrcSap::MeasResults measResults);
154
159 void DoAddNeighbourRelation(uint16_t cellId);
160
166 bool DoGetNoRemove(uint16_t cellId) const;
167
174 bool DoGetNoHo(uint16_t cellId) const;
175
183 bool DoGetNoX2(uint16_t cellId) const;
184
185 // ANR SAP
186
192
198
199 // ATTRIBUTE
200
202 uint8_t m_threshold;
203
209 {
210 bool noRemove;
211 bool noHo;
212 bool noX2;
214 };
215
217 typedef std::map<uint16_t, NeighbourRelation_t> NeighbourRelationTable_t;
218
221
227 const NeighbourRelation_t* Find(uint16_t cellId) const;
228
230 uint8_t m_measId;
231
234
235}; // end of class LteAnr
236
237} // end of namespace ns3
238
239#endif /* LTE_ANR_H */
Automatic Neighbour Relation function.
Definition: lte-anr.h:81
~LteAnr() override
Definition: lte-anr.cc:49
void DoInitialize() override
Initialize() implementation.
Definition: lte-anr.cc:124
virtual LteAnrSapProvider * GetLteAnrSapProvider()
Export the "provider" part of the ANR SAP interface.
Definition: lte-anr.cc:117
void DoReportUeMeas(LteRrcSap::MeasResults measResults)
Implementation of LteAnrSapProvider::ReportUeMeas.
Definition: lte-anr.cc:147
bool DoGetNoHo(uint16_t cellId) const
Implementation of LteAnrSapProvider::GetNoHo.
Definition: lte-anr.cc:230
LteAnrSapProvider * m_anrSapProvider
Reference to the "provider" part of the ANR SAP interface, which is automatically created when this c...
Definition: lte-anr.h:191
uint8_t m_measId
The expected measurement identity.
Definition: lte-anr.h:230
LteAnrSapUser * m_anrSapUser
Reference to the "user" part of the ANR SAP interface, which is provided by the eNodeB RRC instance.
Definition: lte-anr.h:197
static TypeId GetTypeId()
Get the type ID.
Definition: lte-anr.cc:55
void RemoveNeighbourRelation(uint16_t cellId)
Remove an existing Neighbour Relation entry.
Definition: lte-anr.cc:96
bool DoGetNoRemove(uint16_t cellId) const
Implementation of LteAnrSapProvider::GetNoRemove.
Definition: lte-anr.cc:223
const NeighbourRelation_t * Find(uint16_t cellId) const
Definition: lte-anr.cc:244
uint8_t m_threshold
The attribute Threshold.
Definition: lte-anr.h:202
NeighbourRelationTable_t m_neighbourRelationTable
neighbor relation table
Definition: lte-anr.h:220
void DoAddNeighbourRelation(uint16_t cellId)
Implementation of LteAnrSapProvider::AddNeighbourRelation.
Definition: lte-anr.cc:216
void AddNeighbourRelation(uint16_t cellId)
Provide an advance information about a related neighbouring cell and add it as a new Neighbour Relati...
Definition: lte-anr.cc:73
uint16_t m_servingCellId
Serving cell ID.
Definition: lte-anr.h:233
std::map< uint16_t, NeighbourRelation_t > NeighbourRelationTable_t
cellId
Definition: lte-anr.h:217
bool DoGetNoX2(uint16_t cellId) const
Implementation of LteAnrSapProvider::GetNoX2.
Definition: lte-anr.cc:237
virtual void SetLteAnrSapUser(LteAnrSapUser *s)
Set the "user" part of the ANR SAP interface that this ANR instance will interact with.
Definition: lte-anr.cc:110
void DoDispose() override
Destructor implementation.
Definition: lte-anr.cc:139
Service Access Point (SAP) offered by the ANR instance to the eNodeB RRC instance.
Definition: lte-anr-sap.h:37
Service Access Point (SAP) offered by the eNodeB RRC instance to the ANR instance.
Definition: lte-anr-sap.h:95
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
A base class which provides memory management and object aggregation.
Definition: object.h:89
a unique identifier for an interface.
Definition: type-id.h:60
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Neighbour Relation between two eNodeBs (serving eNodeB and neighbour eNodeB).
Definition: lte-anr.h:209
bool detectedAsNeighbour
detected as neighbor
Definition: lte-anr.h:213
MeasResults structure.
Definition: lte-rrc-sap.h:717