A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-fr-no-op-algorithm.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2014 Piotr Gawlowicz
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Author: Piotr Gawlowicz <gawlowicz.p@gmail.com>
18 *
19 */
20
22
23#include <ns3/log.h>
24
25namespace ns3
26{
27
28NS_LOG_COMPONENT_DEFINE("LteFrNoOpAlgorithm");
29
30NS_OBJECT_ENSURE_REGISTERED(LteFrNoOpAlgorithm);
31
33 : m_ffrSapUser(nullptr),
34 m_ffrRrcSapUser(nullptr)
35{
36 NS_LOG_FUNCTION(this);
39}
40
42{
43 NS_LOG_FUNCTION(this);
44}
45
46void
48{
49 NS_LOG_FUNCTION(this);
50 delete m_ffrSapProvider;
52}
53
56{
57 static TypeId tid = TypeId("ns3::LteFrNoOpAlgorithm")
59 .SetGroupName("Lte")
60 .AddConstructor<LteFrNoOpAlgorithm>();
61 return tid;
62}
63
64void
66{
67 NS_LOG_FUNCTION(this << s);
68 m_ffrSapUser = s;
69}
70
73{
74 NS_LOG_FUNCTION(this);
75 return m_ffrSapProvider;
76}
77
78void
80{
81 NS_LOG_FUNCTION(this << s);
83}
84
87{
88 NS_LOG_FUNCTION(this);
90}
91
92void
94{
95 NS_LOG_FUNCTION(this);
97}
98
99void
101{
102 NS_LOG_FUNCTION(this);
103}
104
105std::vector<bool>
107{
108 NS_LOG_FUNCTION(this);
109 std::vector<bool> rbgMap;
110 int rbgSize = GetRbgSize(m_dlBandwidth);
111 rbgMap.resize(m_dlBandwidth / rbgSize, false);
112 return rbgMap;
113}
114
115bool
117{
118 NS_LOG_FUNCTION(this);
119 return true;
120}
121
122std::vector<bool>
124{
125 NS_LOG_FUNCTION(this);
126 std::vector<bool> rbgMap;
127 rbgMap.resize(m_ulBandwidth, false);
128 return rbgMap;
129}
130
131bool
133{
134 NS_LOG_FUNCTION(this);
135 return true;
136}
137
138void
141{
142 NS_LOG_FUNCTION(this);
143 NS_LOG_WARN("Method should not be called, because it is empty");
144}
145
146void
149{
150 NS_LOG_FUNCTION(this);
151 NS_LOG_WARN("Method should not be called, because it is empty");
152}
153
154void
155LteFrNoOpAlgorithm::DoReportUlCqiInfo(std::map<uint16_t, std::vector<double>> ulCqiMap)
156{
157 NS_LOG_FUNCTION(this);
158 NS_LOG_WARN("Method should not be called, because it is empty");
159}
160
161uint8_t
163{
164 NS_LOG_FUNCTION(this);
165 return 1; // 1 is mapped to 0 for Accumulated mode, and to -1 in Absolute mode TS36.213
166 // Table 5.1.1.1-2
167}
168
169uint16_t
171{
172 NS_LOG_FUNCTION(this);
173 return m_ulBandwidth;
174}
175
176void
178{
179 NS_LOG_FUNCTION(this << rnti << (uint16_t)measResults.measId);
180 NS_LOG_WARN("Method should not be called, because it is empty");
181}
182
183void
185{
186 NS_LOG_FUNCTION(this);
187 NS_LOG_WARN("Method should not be called, because it is empty");
188}
189
190} // end of namespace ns3
The abstract base class of a Frequency Reuse algorithm.
int GetRbgSize(int dlbandwidth)
Get RBG size for DL Bandwidth according to table 7.1.6.1-1 of 36.213.
uint8_t m_dlBandwidth
downlink bandwidth in RBs
uint8_t m_ulBandwidth
uplink bandwidth in RBs
Service Access Point (SAP) offered by the Frequency Reuse algorithm instance to the eNodeB RRC instan...
Service Access Point (SAP) offered by the eNodeB RRC instance to the Frequency Reuse algorithm instan...
Service Access Point (SAP) offered by the Frequency Reuse algorithm instance to the MAC Scheduler ins...
Definition: lte-ffr-sap.h:40
Service Access Point (SAP) offered by the eNodeB RRC instance to the Frequency Reuse algorithm instan...
Definition: lte-ffr-sap.h:140
FR algorithm implementation which simply does nothing.
LteFfrSapProvider * m_ffrSapProvider
FFR SAP provider.
friend class MemberLteFfrSapProvider< LteFrNoOpAlgorithm >
let the forwarder class access the protected and private members
std::vector< bool > DoGetAvailableUlRbg() override
Implementation of LteFfrSapProvider::GetAvailableUlRbg.
LteFfrRrcSapUser * m_ffrRrcSapUser
FFR RRC SAP user.
bool DoIsUlRbgAvailableForUe(int i, uint16_t rnti) override
Implementation of LteFfrSapProvider::IsUlRbgAvailableForUe.
friend class MemberLteFfrRrcSapProvider< LteFrNoOpAlgorithm >
let the forwarder class access the protected and private members
void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults) override
Implementation of LteFfrRrcSapProvider::ReportUeMeas.
std::vector< bool > DoGetAvailableDlRbg() override
Implementation of LteFfrSapProvider::GetAvailableDlRbg.
bool DoIsDlRbgAvailableForUe(int i, uint16_t rnti) override
Implementation of LteFfrSapProvider::IsDlRbgAvailableForUe.
LteFfrSapProvider * GetLteFfrSapProvider() override
Export the "provider" part of the LteFfrSap interface.
void DoReportDlCqiInfo(const FfMacSchedSapProvider::SchedDlCqiInfoReqParameters &params) override
DoReportDlCqiInfo.
static TypeId GetTypeId()
Get the type ID.
uint16_t DoGetMinContinuousUlBandwidth() override
DoGetMinContinuousUlBandwidth in number of RB.
LteFfrRrcSapProvider * GetLteFfrRrcSapProvider() override
Export the "provider" part of the LteFfrRrcSap interface.
LteFfrRrcSapProvider * m_ffrRrcSapProvider
FFR RRC SAP provider.
void DoInitialize() override
Initialize() implementation.
void DoRecvLoadInformation(EpcX2Sap::LoadInformationParams params) override
DoRecvLoadInformation.
void DoDispose() override
Destructor implementation.
void Reconfigure() override
Automatic FR reconfiguration.
uint8_t DoGetTpc(uint16_t rnti) override
DoGetTpc for UE.
void SetLteFfrSapUser(LteFfrSapUser *s) override
Set the "user" part of the LteFfrSap interface that this frequency reuse algorithm instance will inte...
void DoReportUlCqiInfo(const FfMacSchedSapProvider::SchedUlCqiInfoReqParameters &params) override
DoReportUlCqiInfo.
LteFrNoOpAlgorithm()
Creates a NoOP FR algorithm instance.
LteFfrSapUser * m_ffrSapUser
FFR SAP user.
void SetLteFfrRrcSapUser(LteFfrRrcSapUser *s) override
Set the "user" part of the LteFfrRrcSap interface that this frequency reuse algorithm instance will i...
virtual void DoInitialize()
Initialize() implementation.
Definition: object.cc:451
a unique identifier for an interface.
Definition: type-id.h:59
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:932
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:202
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN.
Definition: log.h:261
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition: object-base.h:46
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Parameters of the LOAD INFORMATION message.
Definition: epc-x2-sap.h:306
Parameters of the SCHED_DL_CQI_INFO_REQ primitive.
Parameters of the SCHED_UL_CQI_INFO_REQ primitive.
MeasResults structure.
Definition: lte-rrc-sap.h:717
uint8_t measId
measure ID
Definition: lte-rrc-sap.h:718