-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlte-fr-no-op-algorithm.cc
195 lines (161 loc) · 4.33 KB
/
lte-fr-no-op-algorithm.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014 Piotr Gawlowicz
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Author: Piotr Gawlowicz <gawlowicz.p@gmail.com>
*
*/
#include "lte-fr-no-op-algorithm.h"
#include <ns3/log.h>
namespace ns3 {
NS_LOG_COMPONENT_DEFINE ("LteFrNoOpAlgorithm");
NS_OBJECT_ENSURE_REGISTERED (LteFrNoOpAlgorithm);
LteFrNoOpAlgorithm::LteFrNoOpAlgorithm ()
: m_ffrSapUser (0), m_ffrRrcSapUser (0)
{
NS_LOG_FUNCTION (this);
m_ffrSapProvider = new MemberLteFfrSapProvider<LteFrNoOpAlgorithm> (this);
m_ffrRrcSapProvider = new MemberLteFfrRrcSapProvider<LteFrNoOpAlgorithm> (this);
}
LteFrNoOpAlgorithm::~LteFrNoOpAlgorithm ()
{
NS_LOG_FUNCTION (this);
}
void
LteFrNoOpAlgorithm::DoDispose ()
{
NS_LOG_FUNCTION (this);
delete m_ffrSapProvider;
delete m_ffrRrcSapProvider;
}
TypeId
LteFrNoOpAlgorithm::GetTypeId ()
{
static TypeId tid = TypeId ("ns3::LteFrNoOpAlgorithm")
.SetParent<LteFfrAlgorithm> ()
.SetGroupName("Lte")
.AddConstructor<LteFrNoOpAlgorithm> ()
;
return tid;
}
void
LteFrNoOpAlgorithm::SetLteFfrSapUser (LteFfrSapUser* s)
{
NS_LOG_FUNCTION (this << s);
m_ffrSapUser = s;
}
LteFfrSapProvider*
LteFrNoOpAlgorithm::GetLteFfrSapProvider ()
{
NS_LOG_FUNCTION (this);
return m_ffrSapProvider;
}
void
LteFrNoOpAlgorithm::SetLteFfrRrcSapUser (LteFfrRrcSapUser* s)
{
NS_LOG_FUNCTION (this << s);
m_ffrRrcSapUser = s;
}
LteFfrRrcSapProvider*
LteFrNoOpAlgorithm::GetLteFfrRrcSapProvider ()
{
NS_LOG_FUNCTION (this);
return m_ffrRrcSapProvider;
}
void
LteFrNoOpAlgorithm::DoInitialize ()
{
NS_LOG_FUNCTION (this);
LteFfrAlgorithm::DoInitialize ();
}
void
LteFrNoOpAlgorithm::Reconfigure ()
{
NS_LOG_FUNCTION (this);
}
std::vector <bool>
LteFrNoOpAlgorithm::DoGetAvailableDlRbg ()
{
NS_LOG_FUNCTION (this);
std::vector <bool> rbgMap;
int rbgSize = GetRbgSize (m_dlBandwidth);
rbgMap.resize (m_dlBandwidth/rbgSize, false);
return rbgMap;
}
bool
LteFrNoOpAlgorithm::DoIsDlRbgAvailableForUe (int i, uint16_t rnti)
{
NS_LOG_FUNCTION (this);
return true;
}
std::vector <bool>
LteFrNoOpAlgorithm::DoGetAvailableUlRbg ()
{
NS_LOG_FUNCTION (this);
std::vector <bool> rbgMap;
rbgMap.resize (m_ulBandwidth, false);
return rbgMap;
}
bool
LteFrNoOpAlgorithm::DoIsUlRbgAvailableForUe (int i, uint16_t rnti)
{
NS_LOG_FUNCTION (this);
return true;
}
void
LteFrNoOpAlgorithm::DoReportDlCqiInfo (const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters& params)
{
NS_LOG_FUNCTION (this);
NS_LOG_WARN ("Method should not be called, because it is empty");
}
void
LteFrNoOpAlgorithm::DoReportUlCqiInfo (const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters& params)
{
NS_LOG_FUNCTION (this);
NS_LOG_WARN ("Method should not be called, because it is empty");
}
void
LteFrNoOpAlgorithm::DoReportUlCqiInfo (std::map <uint16_t, std::vector <double> > ulCqiMap)
{
NS_LOG_FUNCTION (this);
NS_LOG_WARN ("Method should not be called, because it is empty");
}
uint8_t
LteFrNoOpAlgorithm::DoGetTpc (uint16_t rnti)
{
NS_LOG_FUNCTION (this);
return 1; // 1 is mapped to 0 for Accumulated mode, and to -1 in Absolute mode TS36.213 Table 5.1.1.1-2
}
uint8_t
LteFrNoOpAlgorithm::DoGetMinContinuousUlBandwidth ()
{
NS_LOG_FUNCTION (this);
return m_ulBandwidth;
}
void
LteFrNoOpAlgorithm::DoReportUeMeas (uint16_t rnti,
LteRrcSap::MeasResults measResults)
{
NS_LOG_FUNCTION (this << rnti << (uint16_t) measResults.measId);
NS_LOG_WARN ("Method should not be called, because it is empty");
}
void
LteFrNoOpAlgorithm::DoRecvLoadInformation (EpcX2Sap::LoadInformationParams params)
{
NS_LOG_FUNCTION (this);
NS_LOG_WARN ("Method should not be called, because it is empty");
}
} // end of namespace ns3