A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 NS_LOG_COMPONENT_DEFINE ("LteFrNoOpAlgorithm");
26 
27 namespace ns3 {
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  .AddConstructor<LteFrNoOpAlgorithm> ()
62  ;
63  return tid;
64 }
65 
66 
67 void
69 {
70  NS_LOG_FUNCTION (this << s);
71  m_ffrSapUser = s;
72 }
73 
74 
77 {
78  NS_LOG_FUNCTION (this);
79  return m_ffrSapProvider;
80 }
81 
82 void
84 {
85  NS_LOG_FUNCTION (this << s);
87 }
88 
89 
92 {
93  NS_LOG_FUNCTION (this);
94  return m_ffrRrcSapProvider;
95 }
96 
97 
98 void
100 {
101  NS_LOG_FUNCTION (this);
103 }
104 
105 void
107 {
108  NS_LOG_FUNCTION (this);
109 }
110 
111 std::vector <bool>
113 {
114  NS_LOG_FUNCTION (this);
115  std::vector <bool> rbgMap;
116  int rbgSize = GetRbgSize (m_dlBandwidth);
117  rbgMap.resize (m_dlBandwidth/rbgSize, false);
118  return rbgMap;
119 }
120 
121 bool
123 {
124  NS_LOG_FUNCTION (this);
125  return true;
126 }
127 
128 std::vector <bool>
130 {
131  NS_LOG_FUNCTION (this);
132  std::vector <bool> rbgMap;
133  rbgMap.resize (m_ulBandwidth, false);
134  return rbgMap;
135 }
136 
137 bool
139 {
140  NS_LOG_FUNCTION (this);
141  return true;
142 }
143 
144 void
146 {
147  NS_LOG_FUNCTION (this);
148  NS_LOG_WARN ("Method should not be called, because it is empty");
149 }
150 
151 void
153 {
154  NS_LOG_FUNCTION (this);
155  NS_LOG_WARN ("Method should not be called, because it is empty");
156 }
157 
158 void
159 LteFrNoOpAlgorithm::DoReportUlCqiInfo (std::map <uint16_t, std::vector <double> > ulCqiMap)
160 {
161  NS_LOG_FUNCTION (this);
162  NS_LOG_WARN ("Method should not be called, because it is empty");
163 }
164 
165 uint8_t
167 {
168  NS_LOG_FUNCTION (this);
169  return 1; // 1 is mapped to 0 for Accumulated mode, and to -1 in Absolute mode TS36.213 Table 5.1.1.1-2
170 }
171 
172 uint8_t
174 {
175  NS_LOG_FUNCTION (this);
176  return m_ulBandwidth;
177 }
178 
179 void
181  LteRrcSap::MeasResults measResults)
182 {
183  NS_LOG_FUNCTION (this << rnti << (uint16_t) measResults.measId);
184  NS_LOG_WARN ("Method should not be called, because it is empty");
185 }
186 
187 void
189 {
190  NS_LOG_FUNCTION (this);
191  NS_LOG_WARN ("Method should not be called, because it is empty");
192 }
193 
194 } // end of namespace ns3
Service Access Point (SAP) offered by the Frequency Reuse algorithm instance to the eNodeB RRC instan...
Template for the implementation of the LteFfrRrcSapProvider as a member of an owner class of type C t...
LteFfrRrcSapProvider * m_ffrRrcSapProvider
Service Access Point (SAP) offered by the eNodeB RRC instance to the Frequency Reuse algorithm instan...
Definition: lte-ffr-sap.h:132
#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 the class in the ns-3 factory.
Definition: object-base.h:38
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:170
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.
virtual void DoRecvLoadInformation(EpcX2Sap::LoadInformationParams params)
DoRecvLoadInformation.
LteFfrRrcSapUser * m_ffrRrcSapUser
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:146
virtual uint8_t DoGetTpc(uint16_t rnti)
DoGetTpc for UE.
virtual uint8_t DoGetMinContinuousUlBandwidth()
DoGetMinContinuousUlBandwidth in number of RB.
Service Access Point (SAP) offered by the Frequency Reuse algorithm instance to the MAC Scheduler ins...
Definition: lte-ffr-sap.h:39
Ptr< SampleEmitter > s
uint8_t m_dlBandwidth
downlink bandwidth in RBs
virtual void DoDispose()
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
The abstract base class of a Frequency Reuse algorithm.
virtual void DoInitialize()
This method is called only once by Object::Initialize.
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.
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:203
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:300
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
a unique identifier for an interface.
Definition: type-id.h:49
TypeId SetParent(TypeId tid)
Definition: type-id.cc:610
virtual void DoInitialize(void)
This method is called only once by Object::Initialize.
Definition: object.cc:342
virtual void DoReportUlCqiInfo(const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters &params)
DoReportUlCqiInfo.