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 
63  // inherited from Object
64  static TypeId GetTypeId ();
65 
72  virtual void SetLteFfrSapUser (LteFfrSapUser* s) = 0;
73 
80  virtual void SetLteFfrRrcSapUser (LteFfrRrcSapUser* s) = 0;
81 
88 
95 
99  uint8_t GetUlBandwidth () const;
100 
104  void SetUlBandwidth (uint8_t bw);
105 
109  uint8_t GetDlBandwidth () const;
110 
114  void SetDlBandwidth (uint8_t bw);
115 
119  void SetFrCellTypeId (uint8_t cellTypeId);
120 
124  uint8_t GetFrCellTypeId () const;
125 
126 protected:
127 
128  // inherited from Object
129  virtual void DoDispose ();
130 
134  virtual void Reconfigure () = 0;
135 
136  // FFR SAP PROVIDER IMPLEMENTATION
137 
143  virtual std::vector <bool> DoGetAvailableDlRbg () = 0;
144 
152  virtual bool DoIsDlRbgAvailableForUe (int rbId, uint16_t rnti) = 0;
153 
159  virtual std::vector <bool> DoGetAvailableUlRbg () = 0;
160 
168  virtual bool DoIsUlRbgAvailableForUe (int rbId, uint16_t rnti) = 0;
169 
175  virtual void DoReportDlCqiInfo (const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters& params) = 0;
176 
182  virtual void DoReportUlCqiInfo (const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters& params) = 0;
183 
189  virtual void DoReportUlCqiInfo ( std::map <uint16_t, std::vector <double> > ulCqiMap ) = 0;
190 
196  virtual uint8_t DoGetTpc (uint16_t rnti) = 0;
197 
202  virtual uint8_t DoGetMinContinuousUlBandwidth () = 0;
203 
204  // FFR SAP RRC PROVIDER IMPLEMENTATION
205 
210  virtual void DoSetCellId (uint16_t cellId);
211 
217  virtual void DoSetBandwidth (uint8_t ulBandwidth, uint8_t dlBandwidth);
218 
225  virtual void DoReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults) = 0;
226 
232  virtual void DoRecvLoadInformation (EpcX2Sap::LoadInformationParams params) = 0;
233 
239  int GetRbgSize (int dlbandwidth);
240 
241 
242  uint16_t m_cellId;
243 
244  uint8_t m_dlBandwidth;
245  uint8_t m_ulBandwidth;
247  uint8_t m_frCellTypeId;
253 }; // end of class LteFfrAlgorithm
254 
255 
256 } // end of namespace ns3
257 
258 
259 #endif /* LTE_FFR_ALGORITHM_H */
uint8_t GetFrCellTypeId() const
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...
Definition: lte-ffr-sap.h:132
virtual void DoDispose()
Destructor implementation.
uint8_t m_ulBandwidth
uplink bandwidth in RBs
virtual std::vector< bool > DoGetAvailableDlRbg()=0
Implementation of LteFfrSapProvider::GetAvailableDlRbg.
uint8_t GetUlBandwidth() const
virtual bool DoIsDlRbgAvailableForUe(int rbId, uint16_t rnti)=0
Implementation of LteFfrSapProvider::IsDlRbgAvailableForUe.
virtual void DoSetCellId(uint16_t cellId)
SetCellId.
virtual void DoReportDlCqiInfo(const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters &params)=0
DoReportDlCqiInfo.
virtual void DoSetBandwidth(uint8_t ulBandwidth, uint8_t dlBandwidth)
Implementation of LteFfrRrcSapProvider::SetBandwidth.
virtual bool DoIsUlRbgAvailableForUe(int rbId, uint16_t rnti)=0
Implementation of LteFfrSapProvider::IsUlRbgAvailableForUe.
virtual uint8_t DoGetMinContinuousUlBandwidth()=0
DoGetMinContinuousUlBandwidth in number of RB.
virtual void Reconfigure()=0
Automatic FR reconfiguration.
Service Access Point (SAP) offered by the Frequency Reuse algorithm instance to the MAC Scheduler ins...
Definition: lte-ffr-sap.h:39
bool m_enabledInUplink
If true FR algorithm will also work in Uplink.
bool m_needReconfiguration
If true FR algorithm will be reconfigured.
uint8_t m_dlBandwidth
downlink bandwidth in RBs
void SetFrCellTypeId(uint8_t cellTypeId)
virtual LteFfrRrcSapProvider * GetLteFfrRrcSapProvider()=0
Export the "provider" part of the LteFfrRrcSap interface.
static TypeId GetTypeId()
virtual void SetLteFfrRrcSapUser(LteFfrRrcSapUser *s)=0
Set the "user" part of the LteFfrRrcSap interface that this frequency reuse algorithm instance will i...
virtual std::vector< bool > DoGetAvailableUlRbg()=0
Implementation of LteFfrSapProvider::GetAvailableUlRbg.
uint8_t GetDlBandwidth() const
void SetDlBandwidth(uint8_t bw)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
The abstract base class of a Frequency Reuse algorithm.
Service Access Point (SAP) offered by the eNodeB RRC instance to the Frequency Reuse algorithm instan...
Parameters of the SCHED_DL_CQI_INFO_REQ primitive.
uint8_t m_frCellTypeId
FFR cell type ID for automatic configuration.
Parameters of the SCHED_UL_CQI_INFO_REQ primitive.
void SetUlBandwidth(uint8_t bw)
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)=0
Set the "user" part of the LteFfrSap interface that this frequency reuse algorithm instance will inte...
A base class which provides memory management and object aggregation.
Definition: object.h:87
virtual void DoReportUlCqiInfo(const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters &params)=0
DoReportUlCqiInfo.
a unique identifier for an interface.
Definition: type-id.h:58
virtual void DoRecvLoadInformation(EpcX2Sap::LoadInformationParams params)=0
DoRecvLoadInformation.
virtual LteFfrSapProvider * GetLteFfrSapProvider()=0
Export the "provider" part of the LteFfrSap interface.
virtual uint8_t DoGetTpc(uint16_t rnti)=0
DoGetTpc for UE.
virtual void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults)=0
Implementation of LteFfrRrcSapProvider::ReportUeMeas.