A Discrete-Event Network Simulator
API
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 
21 #include "lte-fr-no-op-algorithm.h"
22 
23 #include <ns3/log.h>
24 
25 namespace ns3
26 {
27 
28 NS_LOG_COMPONENT_DEFINE("LteFrNoOpAlgorithm");
29 
30 NS_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 
46 void
48 {
49  NS_LOG_FUNCTION(this);
50  delete m_ffrSapProvider;
51  delete m_ffrRrcSapProvider;
52 }
53 
54 TypeId
56 {
57  static TypeId tid = TypeId("ns3::LteFrNoOpAlgorithm")
59  .SetGroupName("Lte")
60  .AddConstructor<LteFrNoOpAlgorithm>();
61  return tid;
62 }
63 
64 void
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 
78 void
80 {
81  NS_LOG_FUNCTION(this << s);
82  m_ffrRrcSapUser = s;
83 }
84 
87 {
88  NS_LOG_FUNCTION(this);
89  return m_ffrRrcSapProvider;
90 }
91 
92 void
94 {
95  NS_LOG_FUNCTION(this);
97 }
98 
99 void
101 {
102  NS_LOG_FUNCTION(this);
103 }
104 
105 std::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 
115 bool
117 {
118  NS_LOG_FUNCTION(this);
119  return true;
120 }
121 
122 std::vector<bool>
124 {
125  NS_LOG_FUNCTION(this);
126  std::vector<bool> rbgMap;
127  rbgMap.resize(m_ulBandwidth, false);
128  return rbgMap;
129 }
130 
131 bool
133 {
134  NS_LOG_FUNCTION(this);
135  return true;
136 }
137 
138 void
141 {
142  NS_LOG_FUNCTION(this);
143  NS_LOG_WARN("Method should not be called, because it is empty");
144 }
145 
146 void
149 {
150  NS_LOG_FUNCTION(this);
151  NS_LOG_WARN("Method should not be called, because it is empty");
152 }
153 
154 void
155 LteFrNoOpAlgorithm::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 
161 uint8_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 
169 uint16_t
171 {
172  NS_LOG_FUNCTION(this);
173  return m_ulBandwidth;
174 }
175 
176 void
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 
183 void
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:359
a unique identifier for an interface.
Definition: type-id.h:59
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:931
#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.
params
Fit Fluctuating Two Ray model to the 3GPP TR 38.901 using the Anderson-Darling goodness-of-fit ##.
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