A Discrete-Event Network Simulator
API
lte-ffr-algorithm.h
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 #ifndef LTE_FFR_ALGORITHM_H
23 #define LTE_FFR_ALGORITHM_H
24 
25 #include <ns3/object.h>
26 #include <ns3/lte-rrc-sap.h>
27 #include <ns3/epc-x2-sap.h>
28 #include <ns3/ff-mac-sched-sap.h>
29 #include <map>
30 
31 namespace ns3 {
32 
33 class LteFfrSapUser;
34 class LteFfrSapProvider;
35 
36 class LteFfrRrcSapUser;
37 class LteFfrRrcSapProvider;
38 
57 class LteFfrAlgorithm : public Object
58 {
59 public:
60  LteFfrAlgorithm ();
61  virtual ~LteFfrAlgorithm ();
62 
67  static TypeId GetTypeId ();
68 
75  virtual void SetLteFfrSapUser (LteFfrSapUser* s) = 0;
76 
83  virtual void SetLteFfrRrcSapUser (LteFfrRrcSapUser* s) = 0;
84 
91 
98 
102  uint16_t GetUlBandwidth () const;
103 
107  void SetUlBandwidth (uint16_t bw);
108 
112  uint16_t GetDlBandwidth () const;
113 
117  void SetDlBandwidth (uint16_t bw);
118 
122  void SetFrCellTypeId (uint8_t cellTypeId);
123 
127  uint8_t GetFrCellTypeId () const;
128 
129 protected:
130 
131  // inherited from Object
132  virtual void DoDispose ();
133 
137  virtual void Reconfigure () = 0;
138 
139  // FFR SAP PROVIDER IMPLEMENTATION
140 
146  virtual std::vector <bool> DoGetAvailableDlRbg () = 0;
147 
155  virtual bool DoIsDlRbgAvailableForUe (int rbId, uint16_t rnti) = 0;
156 
162  virtual std::vector <bool> DoGetAvailableUlRbg () = 0;
163 
171  virtual bool DoIsUlRbgAvailableForUe (int rbId, uint16_t rnti) = 0;
172 
179 
186 
192  virtual void DoReportUlCqiInfo ( std::map <uint16_t, std::vector <double> > ulCqiMap ) = 0;
193 
199  virtual uint8_t DoGetTpc (uint16_t rnti) = 0;
200 
205  virtual uint16_t DoGetMinContinuousUlBandwidth () = 0;
206 
207  // FFR SAP RRC PROVIDER IMPLEMENTATION
208 
213  virtual void DoSetCellId (uint16_t cellId);
214 
220  virtual void DoSetBandwidth (uint16_t ulBandwidth, uint16_t dlBandwidth);
221 
228  virtual void DoReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults) = 0;
229 
236 
242  int GetRbgSize (int dlbandwidth);
243 
244 
245  uint16_t m_cellId;
247  uint8_t m_dlBandwidth;
248  uint8_t m_ulBandwidth;
250  uint8_t m_frCellTypeId;
256 }; // end of class LteFfrAlgorithm
257 
258 
259 } // end of namespace ns3
260 
261 
262 #endif /* LTE_FFR_ALGORITHM_H */
ns3::TypeId
a unique identifier for an interface.
Definition: type-id.h:59
ns3::LteFfrAlgorithm::m_cellId
uint16_t m_cellId
cell ID
Definition: lte-ffr-algorithm.h:245
ns3::LteFfrSapUser
Service Access Point (SAP) offered by the eNodeB RRC instance to the Frequency Reuse algorithm instan...
Definition: lte-ffr-sap.h:139
ns3::FfMacSchedSapProvider::SchedDlCqiInfoReqParameters
Parameters of the SCHED_DL_CQI_INFO_REQ primitive.
Definition: ff-mac-sched-sap.h:125
ns3::LteFfrAlgorithm::DoDispose
virtual void DoDispose()
Destructor implementation.
Definition: lte-ffr-algorithm.cc:77
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::FfMacSchedSapProvider::SchedUlCqiInfoReqParameters
Parameters of the SCHED_UL_CQI_INFO_REQ primitive.
Definition: ff-mac-sched-sap.h:186
ns3::LteFfrAlgorithm::SetLteFfrRrcSapUser
virtual void SetLteFfrRrcSapUser(LteFfrRrcSapUser *s)=0
Set the "user" part of the LteFfrRrcSap interface that this frequency reuse algorithm instance will i...
ns3::LteFfrAlgorithm::SetLteFfrSapUser
virtual void SetLteFfrSapUser(LteFfrSapUser *s)=0
Set the "user" part of the LteFfrSap interface that this frequency reuse algorithm instance will inte...
ns3::LteFfrAlgorithm::m_needReconfiguration
bool m_needReconfiguration
If true FR algorithm will be reconfigured.
Definition: lte-ffr-algorithm.h:254
ns3::LteFfrAlgorithm::m_ulBandwidth
uint8_t m_ulBandwidth
uplink bandwidth in RBs
Definition: lte-ffr-algorithm.h:248
ns3::LteFfrAlgorithm::DoGetMinContinuousUlBandwidth
virtual uint16_t DoGetMinContinuousUlBandwidth()=0
DoGetMinContinuousUlBandwidth in number of RB.
ns3::LteFfrAlgorithm::DoIsUlRbgAvailableForUe
virtual bool DoIsUlRbgAvailableForUe(int rbId, uint16_t rnti)=0
Implementation of LteFfrSapProvider::IsUlRbgAvailableForUe.
ns3::LteFfrAlgorithm::~LteFfrAlgorithm
virtual ~LteFfrAlgorithm()
Definition: lte-ffr-algorithm.cc:48
ns3::LteFfrAlgorithm::GetDlBandwidth
uint16_t GetDlBandwidth() const
Definition: lte-ffr-algorithm.cc:111
ns3::LteFfrAlgorithm::DoIsDlRbgAvailableForUe
virtual bool DoIsDlRbgAvailableForUe(int rbId, uint16_t rnti)=0
Implementation of LteFfrSapProvider::IsDlRbgAvailableForUe.
ns3::LteFfrAlgorithm::SetDlBandwidth
void SetDlBandwidth(uint16_t bw)
Definition: lte-ffr-algorithm.cc:118
ns3::LteFfrAlgorithm::SetUlBandwidth
void SetUlBandwidth(uint16_t bw)
Definition: lte-ffr-algorithm.cc:90
ns3::LteFfrRrcSapUser
Service Access Point (SAP) offered by the eNodeB RRC instance to the Frequency Reuse algorithm instan...
Definition: lte-ffr-rrc-sap.h:89
ns3::Object
A base class which provides memory management and object aggregation.
Definition: object.h:88
ns3::LteFfrAlgorithm::m_frCellTypeId
uint8_t m_frCellTypeId
FFR cell type ID for automatic configuration.
Definition: lte-ffr-algorithm.h:250
ns3::LteFfrSapProvider
Service Access Point (SAP) offered by the Frequency Reuse algorithm instance to the MAC Scheduler ins...
Definition: lte-ffr-sap.h:40
ns3::LteFfrAlgorithm::LteFfrAlgorithm
LteFfrAlgorithm()
Definition: lte-ffr-algorithm.cc:42
ns3::LteFfrAlgorithm::SetFrCellTypeId
void SetFrCellTypeId(uint8_t cellTypeId)
Definition: lte-ffr-algorithm.cc:139
ns3::LteFfrAlgorithm::Reconfigure
virtual void Reconfigure()=0
Automatic FR reconfiguration.
ns3::LteFfrAlgorithm::m_dlBandwidth
uint8_t m_dlBandwidth
downlink bandwidth in RBs
Definition: lte-ffr-algorithm.h:247
ns3::LteFfrAlgorithm::DoGetAvailableDlRbg
virtual std::vector< bool > DoGetAvailableDlRbg()=0
Implementation of LteFfrSapProvider::GetAvailableDlRbg.
ns3::LteFfrAlgorithm::GetFrCellTypeId
uint8_t GetFrCellTypeId() const
Definition: lte-ffr-algorithm.cc:147
ns3::LteRrcSap::MeasResults
MeasResults structure.
Definition: lte-rrc-sap.h:679
ns3::LteFfrAlgorithm::GetUlBandwidth
uint16_t GetUlBandwidth() const
Definition: lte-ffr-algorithm.cc:83
ns3::EpcX2Sap::LoadInformationParams
Parameters of the LOAD INFORMATION message.
Definition: epc-x2-sap.h:304
ns3::LteFfrAlgorithm::DoSetBandwidth
virtual void DoSetBandwidth(uint16_t ulBandwidth, uint16_t dlBandwidth)
Implementation of LteFfrRrcSapProvider::SetBandwidth.
Definition: lte-ffr-algorithm.cc:175
ns3::LteFfrAlgorithm::DoGetAvailableUlRbg
virtual std::vector< bool > DoGetAvailableUlRbg()=0
Implementation of LteFfrSapProvider::GetAvailableUlRbg.
ns3::LteFfrAlgorithm::DoSetCellId
virtual void DoSetCellId(uint16_t cellId)
SetCellId.
Definition: lte-ffr-algorithm.cc:168
ns3::LteFfrAlgorithm::DoGetTpc
virtual uint8_t DoGetTpc(uint16_t rnti)=0
DoGetTpc for UE.
ns3::LteFfrAlgorithm::GetRbgSize
int GetRbgSize(int dlbandwidth)
Get RBG size for DL Bandwidth according to table 7.1.6.1-1 of 36.213.
Definition: lte-ffr-algorithm.cc:154
ns3::LteFfrAlgorithm
The abstract base class of a Frequency Reuse algorithm.
Definition: lte-ffr-algorithm.h:58
ns3::LteFfrAlgorithm::DoReportDlCqiInfo
virtual void DoReportDlCqiInfo(const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters &params)=0
DoReportDlCqiInfo.
ns3::LteFfrAlgorithm::DoReportUlCqiInfo
virtual void DoReportUlCqiInfo(const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters &params)=0
DoReportUlCqiInfo.
ns3::LteFfrAlgorithm::GetLteFfrSapProvider
virtual LteFfrSapProvider * GetLteFfrSapProvider()=0
Export the "provider" part of the LteFfrSap interface.
ns3::LteFfrAlgorithm::DoReportUlCqiInfo
virtual void DoReportUlCqiInfo(std::map< uint16_t, std::vector< double > > ulCqiMap)=0
DoReportUlCqiInfo.
ns3::LteFfrAlgorithm::m_enabledInUplink
bool m_enabledInUplink
If true FR algorithm will also work in Uplink.
Definition: lte-ffr-algorithm.h:252
ns3::LteFfrAlgorithm::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition: lte-ffr-algorithm.cc:54
ns3::LteFfrAlgorithm::DoReportUeMeas
virtual void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults)=0
Implementation of LteFfrRrcSapProvider::ReportUeMeas.
ns3::LteFfrAlgorithm::GetLteFfrRrcSapProvider
virtual LteFfrRrcSapProvider * GetLteFfrRrcSapProvider()=0
Export the "provider" part of the LteFfrRrcSap interface.
ns3::LteFfrRrcSapProvider
Service Access Point (SAP) offered by the Frequency Reuse algorithm instance to the eNodeB RRC instan...
Definition: lte-ffr-rrc-sap.h:39
ns3::LteFfrAlgorithm::DoRecvLoadInformation
virtual void DoRecvLoadInformation(EpcX2Sap::LoadInformationParams params)=0
DoRecvLoadInformation.