author | Budiarto Herman <budiarto.herman@magister.fi> |
Thu, 26 Sep 2013 12:21:45 +0300 | |
changeset 10372 | c334a429efaa |
parent 10368 | 0a6adb7e304d |
child 10374 | bad9fbe96995 |
permissions | -rw-r--r-- |
10320
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
1 |
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
2 |
/* |
10353
938b6e44ab95
Updated GPL header of GSoC files
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10322
diff
changeset
|
3 |
* Copyright (c) 2013 Budiarto Herman |
10320
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
4 |
* |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
5 |
* This program is free software; you can redistribute it and/or modify |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
6 |
* it under the terms of the GNU General Public License version 2 as |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation; |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
8 |
* |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
9 |
* This program is distributed in the hope that it will be useful, |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
12 |
* GNU General Public License for more details. |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
13 |
* |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
14 |
* You should have received a copy of the GNU General Public License |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
15 |
* along with this program; if not, write to the Free Software |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
16 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
17 |
* |
10353
938b6e44ab95
Updated GPL header of GSoC files
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10322
diff
changeset
|
18 |
* Author: Budiarto Herman <budiarto.herman@magister.fi> |
10320
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
19 |
* |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
20 |
*/ |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
21 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
22 |
#include "lte-anr.h" |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
23 |
#include <ns3/log.h> |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
24 |
#include <ns3/uinteger.h> |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
25 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
26 |
NS_LOG_COMPONENT_DEFINE ("LteAnr"); |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
27 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
28 |
namespace ns3 { |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
29 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
30 |
NS_OBJECT_ENSURE_REGISTERED (LteAnr); |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
31 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
32 |
|
10321
5fe362c75d69
Fixed a bug with LTE ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10320
diff
changeset
|
33 |
LteAnr::LteAnr (uint16_t servingCellId) |
10320
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
34 |
: m_anrSapUser (0), |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
35 |
m_threshold (0), |
10321
5fe362c75d69
Fixed a bug with LTE ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10320
diff
changeset
|
36 |
m_measId (0), |
5fe362c75d69
Fixed a bug with LTE ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10320
diff
changeset
|
37 |
m_servingCellId (servingCellId) |
10320
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
38 |
{ |
10321
5fe362c75d69
Fixed a bug with LTE ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10320
diff
changeset
|
39 |
NS_LOG_FUNCTION (this << servingCellId); |
10320
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
40 |
m_anrSapProvider = new MemberLteAnrSapProvider<LteAnr> (this); |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
41 |
} |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
42 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
43 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
44 |
LteAnr::~LteAnr () |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
45 |
{ |
10321
5fe362c75d69
Fixed a bug with LTE ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10320
diff
changeset
|
46 |
NS_LOG_FUNCTION (this << m_servingCellId); |
10320
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
47 |
} |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
48 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
49 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
50 |
void |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
51 |
LteAnr::DoDispose () |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
52 |
{ |
10372
c334a429efaa
Added missing NS_LOG_FUNCTION to some LTE module files
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10368
diff
changeset
|
53 |
NS_LOG_FUNCTION (this); |
10320
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
54 |
delete m_anrSapProvider; |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
55 |
m_neighbourRelationTable.clear (); |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
56 |
} |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
57 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
58 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
59 |
TypeId |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
60 |
LteAnr::GetTypeId (void) |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
61 |
{ |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
62 |
static TypeId tid = TypeId ("ns3::LteAnr") |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
63 |
.SetParent<Object> () |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
64 |
.AddAttribute ("Threshold", |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
65 |
"Minimum RSRQ range value required for detecting a neighbour cell", |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
66 |
UintegerValue (0), |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
67 |
MakeUintegerAccessor (&LteAnr::m_threshold), |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
68 |
MakeUintegerChecker<uint8_t> (0, 34)) // RSRQ range is [0..34] as per Section 9.1.7 of 3GPP TS 36.133 |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
69 |
; |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
70 |
return tid; |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
71 |
} |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
72 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
73 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
74 |
void |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
75 |
LteAnr::AddNeighbourRelation (uint16_t cellId) |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
76 |
{ |
10321
5fe362c75d69
Fixed a bug with LTE ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10320
diff
changeset
|
77 |
NS_LOG_FUNCTION (this << m_servingCellId << cellId); |
5fe362c75d69
Fixed a bug with LTE ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10320
diff
changeset
|
78 |
|
5fe362c75d69
Fixed a bug with LTE ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10320
diff
changeset
|
79 |
if (cellId == m_servingCellId) |
5fe362c75d69
Fixed a bug with LTE ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10320
diff
changeset
|
80 |
{ |
5fe362c75d69
Fixed a bug with LTE ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10320
diff
changeset
|
81 |
NS_FATAL_ERROR ("Serving cell ID " << cellId << " may not be added into NRT"); |
5fe362c75d69
Fixed a bug with LTE ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10320
diff
changeset
|
82 |
} |
10320
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
83 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
84 |
if (m_neighbourRelationTable.find (cellId) != m_neighbourRelationTable.end ()) |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
85 |
{ |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
86 |
NS_FATAL_ERROR ("There is already an entry in the NRT for cell ID " << cellId); |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
87 |
} |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
88 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
89 |
NeighbourRelation_t neighbourRelation; |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
90 |
neighbourRelation.noRemove = true; |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
91 |
neighbourRelation.noHo = true; |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
92 |
neighbourRelation.noX2 = false; |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
93 |
neighbourRelation.detectedAsNeighbour = false; |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
94 |
m_neighbourRelationTable[cellId] = neighbourRelation; |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
95 |
} |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
96 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
97 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
98 |
void |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
99 |
LteAnr::RemoveNeighbourRelation (uint16_t cellId) |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
100 |
{ |
10321
5fe362c75d69
Fixed a bug with LTE ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10320
diff
changeset
|
101 |
NS_LOG_FUNCTION (this << m_servingCellId << cellId); |
10320
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
102 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
103 |
NeighbourRelationTable_t::iterator it = m_neighbourRelationTable.find (cellId); |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
104 |
if (it != m_neighbourRelationTable.end ()) |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
105 |
{ |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
106 |
NS_FATAL_ERROR ("Cell ID " << cellId << " cannot be found in NRT"); |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
107 |
} |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
108 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
109 |
m_neighbourRelationTable.erase (it); |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
110 |
} |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
111 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
112 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
113 |
void |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
114 |
LteAnr::SetLteAnrSapUser (LteAnrSapUser* s) |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
115 |
{ |
10372
c334a429efaa
Added missing NS_LOG_FUNCTION to some LTE module files
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10368
diff
changeset
|
116 |
NS_LOG_FUNCTION (this << s); |
10320
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
117 |
m_anrSapUser = s; |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
118 |
} |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
119 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
120 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
121 |
LteAnrSapProvider* |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
122 |
LteAnr::GetLteAnrSapProvider () |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
123 |
{ |
10372
c334a429efaa
Added missing NS_LOG_FUNCTION to some LTE module files
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10368
diff
changeset
|
124 |
NS_LOG_FUNCTION (this); |
10320
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
125 |
return m_anrSapProvider; |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
126 |
} |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
127 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
128 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
129 |
void |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
130 |
LteAnr::DoInitialize () |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
131 |
{ |
10372
c334a429efaa
Added missing NS_LOG_FUNCTION to some LTE module files
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10368
diff
changeset
|
132 |
NS_LOG_FUNCTION (this); |
10321
5fe362c75d69
Fixed a bug with LTE ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10320
diff
changeset
|
133 |
NS_LOG_LOGIC (this << " requesting Event A4 measurements" |
10322
54f2e33137a3
Using template for forwarding classes and new names for Handover Management SAP
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10321
diff
changeset
|
134 |
<< " (threshold=" << (uint16_t) m_threshold << ")"); |
10320
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
135 |
LteRrcSap::ReportConfigEutra reportConfig; |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
136 |
reportConfig.eventId = LteRrcSap::ReportConfigEutra::EVENT_A4; |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
137 |
reportConfig.threshold1.choice = LteRrcSap::ThresholdEutra::THRESHOLD_RSRQ; |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
138 |
reportConfig.threshold1.range = m_threshold; |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
139 |
reportConfig.triggerQuantity = LteRrcSap::ReportConfigEutra::RSRQ; |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
140 |
reportConfig.reportInterval = LteRrcSap::ReportConfigEutra::MS480; |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
141 |
m_measId = m_anrSapUser->AddUeMeasReportConfigForAnr (reportConfig); |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
142 |
} |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
143 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
144 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
145 |
void |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
146 |
LteAnr::DoReportUeMeas (LteRrcSap::MeasResults measResults) |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
147 |
{ |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
148 |
uint8_t measId = measResults.measId; |
10321
5fe362c75d69
Fixed a bug with LTE ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10320
diff
changeset
|
149 |
NS_LOG_FUNCTION (this << m_servingCellId << (uint16_t) measId); |
10320
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
150 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
151 |
if (measId != m_measId) |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
152 |
{ |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
153 |
NS_LOG_WARN (this << " Skipping unexpected measurement identity " << (uint16_t) measId); |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
154 |
} |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
155 |
else |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
156 |
{ |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
157 |
if (measResults.haveMeasResultNeighCells |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
158 |
&& !(measResults.measResultListEutra.empty ())) |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
159 |
{ |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
160 |
for (std::list <LteRrcSap::MeasResultEutra>::iterator it = measResults.measResultListEutra.begin (); |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
161 |
it != measResults.measResultListEutra.end (); |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
162 |
++it) |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
163 |
{ |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
164 |
// Keep new RSRQ value reported for the neighbour cell |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
165 |
NS_ASSERT_MSG (it->haveRsrqResult == true, |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
166 |
"RSRQ measure missing for cellId " << it->physCellId); |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
167 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
168 |
// Update Neighbour Relation Table |
10321
5fe362c75d69
Fixed a bug with LTE ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10320
diff
changeset
|
169 |
NeighbourRelationTable_t::iterator itNrt = m_neighbourRelationTable.find (it->physCellId); |
5fe362c75d69
Fixed a bug with LTE ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10320
diff
changeset
|
170 |
if (itNrt != m_neighbourRelationTable.end ()) |
10320
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
171 |
{ |
10321
5fe362c75d69
Fixed a bug with LTE ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10320
diff
changeset
|
172 |
// Update neighbour relation entry |
5fe362c75d69
Fixed a bug with LTE ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10320
diff
changeset
|
173 |
NS_LOG_LOGIC (this << " updating NRT of cell " << m_servingCellId |
5fe362c75d69
Fixed a bug with LTE ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10320
diff
changeset
|
174 |
<< " with entry of cell " << it->physCellId); |
5fe362c75d69
Fixed a bug with LTE ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10320
diff
changeset
|
175 |
if (itNrt->second.noX2 == false) |
10320
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
176 |
{ |
10321
5fe362c75d69
Fixed a bug with LTE ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10320
diff
changeset
|
177 |
NS_LOG_LOGIC (this << " enabling handover" |
5fe362c75d69
Fixed a bug with LTE ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10320
diff
changeset
|
178 |
<< " from cell " << m_servingCellId |
5fe362c75d69
Fixed a bug with LTE ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10320
diff
changeset
|
179 |
<< " to cell " << it->physCellId); |
5fe362c75d69
Fixed a bug with LTE ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10320
diff
changeset
|
180 |
itNrt->second.noHo = false; |
10320
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
181 |
} |
10321
5fe362c75d69
Fixed a bug with LTE ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10320
diff
changeset
|
182 |
itNrt->second.detectedAsNeighbour = true; |
10320
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
183 |
} |
10321
5fe362c75d69
Fixed a bug with LTE ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10320
diff
changeset
|
184 |
else |
10320
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
185 |
{ |
10321
5fe362c75d69
Fixed a bug with LTE ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10320
diff
changeset
|
186 |
// Discovered new neighbour |
5fe362c75d69
Fixed a bug with LTE ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10320
diff
changeset
|
187 |
NS_LOG_LOGIC (this << " inserting NRT of cell " << m_servingCellId |
5fe362c75d69
Fixed a bug with LTE ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10320
diff
changeset
|
188 |
<< " with newly discovered neighbouring cell " |
5fe362c75d69
Fixed a bug with LTE ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10320
diff
changeset
|
189 |
<< it->physCellId); |
10320
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
190 |
NeighbourRelation_t neighbourRelation; |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
191 |
neighbourRelation.noRemove = false; |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
192 |
neighbourRelation.noHo = true; |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
193 |
neighbourRelation.noX2 = true; |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
194 |
neighbourRelation.detectedAsNeighbour = true; |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
195 |
m_neighbourRelationTable[it->physCellId] = neighbourRelation; |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
196 |
} |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
197 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
198 |
} // end of for (it = measResults.measResultListEutra.begin ()) |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
199 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
200 |
} // end of if (measResults.haveMeasResultNeighCells && !(measResults.measResultListEutra.empty ())) |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
201 |
else |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
202 |
{ |
10321
5fe362c75d69
Fixed a bug with LTE ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10320
diff
changeset
|
203 |
NS_LOG_WARN (this << " Event A4 received without measurement results from neighbouring cells"); |
10368
0a6adb7e304d
Updated TODO tags to Doxygen format
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10353
diff
changeset
|
204 |
/// \todo Remove neighbours in the NRT. |
10320
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
205 |
} |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
206 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
207 |
} // end of else of if (measId != m_measId) |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
208 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
209 |
} // end of DoReportUeMeas |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
210 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
211 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
212 |
void |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
213 |
LteAnr::DoAddNeighbourRelation (uint16_t cellId) |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
214 |
{ |
10372
c334a429efaa
Added missing NS_LOG_FUNCTION to some LTE module files
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10368
diff
changeset
|
215 |
NS_LOG_FUNCTION (this << cellId); |
10320
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
216 |
AddNeighbourRelation (cellId); |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
217 |
} |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
218 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
219 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
220 |
bool |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
221 |
LteAnr::DoGetNoRemove (uint16_t cellId) |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
222 |
{ |
10321
5fe362c75d69
Fixed a bug with LTE ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10320
diff
changeset
|
223 |
NS_LOG_FUNCTION (this << m_servingCellId << cellId); |
10320
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
224 |
return Find (cellId)->noRemove; |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
225 |
} |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
226 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
227 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
228 |
bool |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
229 |
LteAnr::DoGetNoHo (uint16_t cellId) |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
230 |
{ |
10321
5fe362c75d69
Fixed a bug with LTE ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10320
diff
changeset
|
231 |
NS_LOG_FUNCTION (this << m_servingCellId << cellId); |
10320
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
232 |
return Find (cellId)->noHo; |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
233 |
} |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
234 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
235 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
236 |
bool |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
237 |
LteAnr::DoGetNoX2 (uint16_t cellId) |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
238 |
{ |
10321
5fe362c75d69
Fixed a bug with LTE ANR
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10320
diff
changeset
|
239 |
NS_LOG_FUNCTION (this << m_servingCellId << cellId); |
10320
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
240 |
return Find (cellId)->noX2; |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
241 |
} |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
242 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
243 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
244 |
LteAnr::NeighbourRelation_t * |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
245 |
LteAnr::Find (uint16_t cellId) |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
246 |
{ |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
247 |
NeighbourRelationTable_t::iterator it = m_neighbourRelationTable.find (cellId); |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
248 |
if (it == m_neighbourRelationTable.end ()) |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
249 |
{ |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
250 |
NS_FATAL_ERROR ("Cell ID " << cellId << " cannot be found in NRT"); |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
251 |
} |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
252 |
return &(it->second); |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
253 |
} |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
254 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
255 |
|
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
256 |
} // end of namespace ns3 |
0fca10d6d044
LTE Automatic Neighbour Relation (ANR) function
Budiarto Herman <budiarto.herman@magister.fi>
parents:
diff
changeset
|
257 |