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 "lte-anr-sap.h"
31#include "lte-rrc-sap.h"
32
33#include <ns3/object.h>
34
35#include <map>
36
37namespace ns3
38{
39
40class LteAnrSapProvider;
41class LteAnrSapUser;
42class LteNeighbourRelation;
43
81class LteAnr : public Object
82{
83 public:
89 LteAnr(uint16_t servingCellId);
90 ~LteAnr() override;
91
96 static TypeId GetTypeId();
97
112 void AddNeighbourRelation(uint16_t cellId);
113
122 void RemoveNeighbourRelation(uint16_t cellId);
123
130 virtual void SetLteAnrSapUser(LteAnrSapUser* s);
131
138
140 friend class MemberLteAnrSapProvider<LteAnr>;
141
142 protected:
143 // inherited from Object
144 void DoInitialize() override;
145 void DoDispose() override;
146
147 private:
148 // ANR SAP PROVIDER IMPLEMENTATION
149
154 void DoReportUeMeas(LteRrcSap::MeasResults measResults);
155
160 void DoAddNeighbourRelation(uint16_t cellId);
161
167 bool DoGetNoRemove(uint16_t cellId) const;
168
175 bool DoGetNoHo(uint16_t cellId) const;
176
184 bool DoGetNoX2(uint16_t cellId) const;
185
186 // ANR SAP
187
193
199
200 // ATTRIBUTE
201
203 uint8_t m_threshold;
204
210 {
211 bool noRemove;
212 bool noHo;
213 bool noX2;
215 };
216
218 typedef std::map<uint16_t, NeighbourRelation_t> NeighbourRelationTable_t;
219
222
228 const NeighbourRelation_t* Find(uint16_t cellId) const;
229
231 uint8_t m_measId;
232
235
236}; // end of class LteAnr
237
238} // end of namespace ns3
239
240#endif /* LTE_ANR_H */
Automatic Neighbour Relation function.
Definition: lte-anr.h:82
~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:192
uint8_t m_measId
The expected measurement identity.
Definition: lte-anr.h:231
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:198
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:203
NeighbourRelationTable_t m_neighbourRelationTable
neighbor relation table
Definition: lte-anr.h:221
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:234
std::map< uint16_t, NeighbourRelation_t > NeighbourRelationTable_t
cellId
Definition: lte-anr.h:218
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:59
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:210
bool detectedAsNeighbour
detected as neighbor
Definition: lte-anr.h:214
MeasResults structure.
Definition: lte-rrc-sap.h:717