A Discrete-Event Network Simulator
API
lte-fr-no-op-algorithm.cc
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2014 Piotr Gawlowicz
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  * Author: Piotr Gawlowicz <gawlowicz.p@gmail.com>
19  *
20  */
21 
22 #include "lte-fr-no-op-algorithm.h"
23 #include <ns3/log.h>
24 
25 namespace ns3 {
26 
27 NS_LOG_COMPONENT_DEFINE ("LteFrNoOpAlgorithm");
28 
29 NS_OBJECT_ENSURE_REGISTERED (LteFrNoOpAlgorithm);
30 
31 
33  : m_ffrSapUser (0), m_ffrRrcSapUser (0)
34 {
35  NS_LOG_FUNCTION (this);
38 }
39 
40 
42 {
43  NS_LOG_FUNCTION (this);
44 }
45 
46 
47 void
49 {
50  NS_LOG_FUNCTION (this);
51  delete m_ffrSapProvider;
52  delete m_ffrRrcSapProvider;
53 }
54 
55 
56 TypeId
58 {
59  static TypeId tid = TypeId ("ns3::LteFrNoOpAlgorithm")
61  .SetGroupName("Lte")
62  .AddConstructor<LteFrNoOpAlgorithm> ()
63  ;
64  return tid;
65 }
66 
67 
68 void
70 {
71  NS_LOG_FUNCTION (this << s);
72  m_ffrSapUser = s;
73 }
74 
75 
78 {
79  NS_LOG_FUNCTION (this);
80  return m_ffrSapProvider;
81 }
82 
83 void
85 {
86  NS_LOG_FUNCTION (this << s);
87  m_ffrRrcSapUser = s;
88 }
89 
90 
93 {
94  NS_LOG_FUNCTION (this);
95  return m_ffrRrcSapProvider;
96 }
97 
98 
99 void
101 {
102  NS_LOG_FUNCTION (this);
104 }
105 
106 void
108 {
109  NS_LOG_FUNCTION (this);
110 }
111 
112 std::vector <bool>
114 {
115  NS_LOG_FUNCTION (this);
116  std::vector <bool> rbgMap;
117  int rbgSize = GetRbgSize (m_dlBandwidth);
118  rbgMap.resize (m_dlBandwidth/rbgSize, false);
119  return rbgMap;
120 }
121 
122 bool
124 {
125  NS_LOG_FUNCTION (this);
126  return true;
127 }
128 
129 std::vector <bool>
131 {
132  NS_LOG_FUNCTION (this);
133  std::vector <bool> rbgMap;
134  rbgMap.resize (m_ulBandwidth, false);
135  return rbgMap;
136 }
137 
138 bool
140 {
141  NS_LOG_FUNCTION (this);
142  return true;
143 }
144 
145 void
147 {
148  NS_LOG_FUNCTION (this);
149  NS_LOG_WARN ("Method should not be called, because it is empty");
150 }
151 
152 void
154 {
155  NS_LOG_FUNCTION (this);
156  NS_LOG_WARN ("Method should not be called, because it is empty");
157 }
158 
159 void
160 LteFrNoOpAlgorithm::DoReportUlCqiInfo (std::map <uint16_t, std::vector <double> > ulCqiMap)
161 {
162  NS_LOG_FUNCTION (this);
163  NS_LOG_WARN ("Method should not be called, because it is empty");
164 }
165 
166 uint8_t
168 {
169  NS_LOG_FUNCTION (this);
170  return 1; // 1 is mapped to 0 for Accumulated mode, and to -1 in Absolute mode TS36.213 Table 5.1.1.1-2
171 }
172 
173 uint8_t
175 {
176  NS_LOG_FUNCTION (this);
177  return m_ulBandwidth;
178 }
179 
180 void
182  LteRrcSap::MeasResults measResults)
183 {
184  NS_LOG_FUNCTION (this << rnti << (uint16_t) measResults.measId);
185  NS_LOG_WARN ("Method should not be called, because it is empty");
186 }
187 
188 void
190 {
191  NS_LOG_FUNCTION (this);
192  NS_LOG_WARN ("Method should not be called, because it is empty");
193 }
194 
195 } // end of namespace ns3
Service Access Point (SAP) offered by the Frequency Reuse algorithm instance to the eNodeB RRC instan...
virtual void DoInitialize(void)
Initialize() implementation.
Definition: object.cc:353
Template for the implementation of the LteFfrRrcSapProvider as a member of an owner class of type C t...
LteFfrRrcSapProvider * m_ffrRrcSapProvider
FFR RRC SAP provider.
Service Access Point (SAP) offered by the eNodeB RRC instance to the Frequency Reuse algorithm instan...
Definition: lte-ffr-sap.h:138
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
virtual bool DoIsDlRbgAvailableForUe(int i, uint16_t rnti)
Implementation of LteFfrSapProvider::IsDlRbgAvailableForUe.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition: object-base.h:45
LteFfrSapUser * m_ffrSapUser
FFR SAP user.
virtual bool DoIsUlRbgAvailableForUe(int i, uint16_t rnti)
Implementation of LteFfrSapProvider::IsUlRbgAvailableForUe.
uint8_t m_ulBandwidth
uplink bandwidth in RBs
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:202
virtual void Reconfigure()
Automatic FR reconfiguration.
virtual LteFfrRrcSapProvider * GetLteFfrRrcSapProvider()
Export the "provider" part of the LteFfrRrcSap interface.
LteFrNoOpAlgorithm()
Creates a NoOP FR algorithm instance.
virtual void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults)
Implementation of LteFfrRrcSapProvider::ReportUeMeas.
FR algorithm implementation which simply does nothing.
virtual void DoRecvLoadInformation(EpcX2Sap::LoadInformationParams params)
DoRecvLoadInformation.
LteFfrRrcSapUser * m_ffrRrcSapUser
FFR RRC SAP user.
virtual void SetLteFfrRrcSapUser(LteFfrRrcSapUser *s)
Set the "user" part of the LteFfrRrcSap interface that this frequency reuse algorithm instance will i...
Template for the implementation of the LteFfrSapProvider as a member of an owner class of type C to w...
Definition: lte-ffr-sap.h:152
virtual uint8_t DoGetTpc(uint16_t rnti)
DoGetTpc for UE.
virtual uint8_t DoGetMinContinuousUlBandwidth()
DoGetMinContinuousUlBandwidth in number of RB.
MeasResults structure.
Definition: lte-rrc-sap.h:671
Service Access Point (SAP) offered by the Frequency Reuse algorithm instance to the MAC Scheduler ins...
Definition: lte-ffr-sap.h:39
uint8_t m_dlBandwidth
downlink bandwidth in RBs
virtual void DoDispose()
Destructor implementation.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
The abstract base class of a Frequency Reuse algorithm.
virtual void DoInitialize()
Initialize() implementation.
Service Access Point (SAP) offered by the eNodeB RRC instance to the Frequency Reuse algorithm instan...
virtual std::vector< bool > DoGetAvailableUlRbg()
Implementation of LteFfrSapProvider::GetAvailableUlRbg.
uint8_t measId
measure ID
Definition: lte-rrc-sap.h:673
Parameters of the SCHED_DL_CQI_INFO_REQ primitive.
Parameters of the SCHED_UL_CQI_INFO_REQ primitive.
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN.
Definition: log.h:262
virtual void DoReportDlCqiInfo(const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters &params)
DoReportDlCqiInfo.
int GetRbgSize(int dlbandwidth)
Get RBG size for DL Bandwidth according to table 7.1.6.1-1 of 36.213.
Parameters of the LOAD INFORMATION message.
Definition: epc-x2-sap.h:303
virtual void SetLteFfrSapUser(LteFfrSapUser *s)
Set the "user" part of the LteFfrSap interface that this frequency reuse algorithm instance will inte...
virtual std::vector< bool > DoGetAvailableDlRbg()
Implementation of LteFfrSapProvider::GetAvailableDlRbg.
virtual LteFfrSapProvider * GetLteFfrSapProvider()
Export the "provider" part of the LteFfrSap interface.
LteFfrSapProvider * m_ffrSapProvider
FFR SAP provider.
a unique identifier for an interface.
Definition: type-id.h:58
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:915
static TypeId GetTypeId()
Get the type ID.
virtual void DoReportUlCqiInfo(const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters &params)
DoReportUlCqiInfo.