A Discrete-Event Network Simulator
API
lte-ffr-soft-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_SOFT_ALGORITHM_H
23 #define LTE_FFR_SOFT_ALGORITHM_H
24 
25 #include <ns3/lte-ffr-algorithm.h>
26 #include <ns3/lte-ffr-sap.h>
27 #include <ns3/lte-ffr-rrc-sap.h>
28 #include <ns3/lte-rrc-sap.h>
29 #include <map>
30 
31 namespace ns3 {
32 
33 
38 {
39 public:
44 
45  virtual ~LteFfrSoftAlgorithm ();
46 
51  static TypeId GetTypeId ();
52 
53  // inherited from LteFfrAlgorithm
54  virtual void SetLteFfrSapUser (LteFfrSapUser* s);
56 
57  virtual void SetLteFfrRrcSapUser (LteFfrRrcSapUser* s);
59 
64 
65 protected:
66  // inherited from Object
67  virtual void DoInitialize ();
68  virtual void DoDispose ();
69 
70  virtual void Reconfigure ();
71 
72  // FFR SAP PROVIDER IMPLEMENTATION
73  virtual std::vector <bool> DoGetAvailableDlRbg ();
74  virtual bool DoIsDlRbgAvailableForUe (int i, uint16_t rnti);
75  virtual std::vector <bool> DoGetAvailableUlRbg ();
76  virtual bool DoIsUlRbgAvailableForUe (int i, uint16_t rnti);
79  virtual void DoReportUlCqiInfo ( std::map <uint16_t, std::vector <double> > ulCqiMap );
80  virtual uint8_t DoGetTpc (uint16_t rnti);
81  virtual uint16_t DoGetMinContinuousUlBandwidth ();
82 
83  // FFR SAP RRC PROVIDER IMPLEMENTATION
84  virtual void DoReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults);
86 
87 private:
94  void SetDownlinkConfiguration (uint16_t cellId, uint8_t bandwidth);
101  void SetUplinkConfiguration (uint16_t cellId, uint8_t bandwidth);
109  void InitializeUplinkRbgMaps ();
110 
111 
112  // FFR SAP
115 
116  // FFR RRF SAP
119 
123 
127 
128  std::vector <bool> m_dlRbgMap;
129  std::vector <bool> m_ulRbgMap;
130 
131  std::vector <bool> m_dlCenterRbgMap;
132  std::vector <bool> m_ulCenterRbgMap;
133 
134  std::vector <bool> m_dlMediumRbgMap;
135  std::vector <bool> m_ulMediumRbgMap;
136 
137  std::vector <bool> m_dlEdgeRbgMap;
138  std::vector <bool> m_ulEdgeRbgMap;
139 
142  {
146  EdgeArea
147  };
148 
149  std::map< uint16_t, uint8_t > m_ues;
150 
153 
157 
158  uint8_t m_centerAreaTpc;
159  uint8_t m_mediumAreaTpc;
160  uint8_t m_edgeAreaTpc;
161 
163  uint8_t m_measId;
164 
165 }; // end of class LteFfrSoftAlgorithm
166 
167 
168 } // end of namespace ns3
169 
170 
171 #endif /* LTE_FFR_SOFT_ALGORITHM_H */
ns3::LteFfrSoftAlgorithm::m_ffrRrcSapProvider
LteFfrRrcSapProvider * m_ffrRrcSapProvider
FFR RRC SAP provider.
Definition: lte-ffr-soft-algorithm.h:118
ns3::TypeId
a unique identifier for an interface.
Definition: type-id.h:59
ns3::LteFfrSoftAlgorithm::m_edgeSubBandThreshold
uint8_t m_edgeSubBandThreshold
edge subband threshold
Definition: lte-ffr-soft-algorithm.h:152
ns3::LteFfrSoftAlgorithm::SetDownlinkConfiguration
void SetDownlinkConfiguration(uint16_t cellId, uint8_t bandwidth)
Set downlink configuration function.
Definition: lte-ffr-soft-algorithm.cc:280
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::LteFfrSoftAlgorithm::DoInitialize
virtual void DoInitialize()
Initialize() implementation.
Definition: lte-ffr-soft-algorithm.cc:240
ns3::FfMacSchedSapProvider::SchedDlCqiInfoReqParameters
Parameters of the SCHED_DL_CQI_INFO_REQ primitive.
Definition: ff-mac-sched-sap.h:125
ns3::LteFfrSoftAlgorithm::m_edgeAreaTpc
uint8_t m_edgeAreaTpc
edge area tpc
Definition: lte-ffr-soft-algorithm.h:160
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::LteFfrSoftAlgorithm::m_ffrSapProvider
LteFfrSapProvider * m_ffrSapProvider
FFR SAP provider.
Definition: lte-ffr-soft-algorithm.h:114
ns3::LteFfrSoftAlgorithm::Reconfigure
virtual void Reconfigure()
Automatic FR reconfiguration.
Definition: lte-ffr-soft-algorithm.cc:266
ns3::LteFfrSoftAlgorithm::DoReportUeMeas
virtual void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults)
Implementation of LteFfrRrcSapProvider::ReportUeMeas.
Definition: lte-ffr-soft-algorithm.cc:627
ns3::LteFfrSoftAlgorithm::m_ulEdgeSubBandOffset
uint8_t m_ulEdgeSubBandOffset
UL edge subband offset.
Definition: lte-ffr-soft-algorithm.h:125
ns3::LteFfrSoftAlgorithm::AreaUnset
@ AreaUnset
Definition: lte-ffr-soft-algorithm.h:143
ns3::LteFfrSoftAlgorithm::DoDispose
virtual void DoDispose()
Destructor implementation.
Definition: lte-ffr-soft-algorithm.cc:112
ns3::LteFfrSoftAlgorithm::SetUplinkConfiguration
void SetUplinkConfiguration(uint16_t cellId, uint8_t bandwidth)
Set uplink configuration function.
Definition: lte-ffr-soft-algorithm.cc:296
ns3::LteFfrSoftAlgorithm::m_dlMediumRbgMap
std::vector< bool > m_dlMediumRbgMap
DL medium RBG map.
Definition: lte-ffr-soft-algorithm.h:134
ns3::LteFfrSoftAlgorithm::SetLteFfrSapUser
virtual void SetLteFfrSapUser(LteFfrSapUser *s)
Set the "user" part of the LteFfrSap interface that this frequency reuse algorithm instance will inte...
Definition: lte-ffr-soft-algorithm.cc:209
ns3::LteFfrSoftAlgorithm::DoIsDlRbgAvailableForUe
virtual bool DoIsDlRbgAvailableForUe(int i, uint16_t rnti)
Implementation of LteFfrSapProvider::IsDlRbgAvailableForUe.
Definition: lte-ffr-soft-algorithm.cc:404
ns3::LteFfrSoftAlgorithm::MediumArea
@ MediumArea
Definition: lte-ffr-soft-algorithm.h:145
ns3::LteFfrSoftAlgorithm::GetLteFfrRrcSapProvider
virtual LteFfrRrcSapProvider * GetLteFfrRrcSapProvider()
Export the "provider" part of the LteFfrRrcSap interface.
Definition: lte-ffr-soft-algorithm.cc:232
ns3::LteFfrSoftAlgorithm::~LteFfrSoftAlgorithm
virtual ~LteFfrSoftAlgorithm()
Definition: lte-ffr-soft-algorithm.cc:105
ns3::LteFfrSoftAlgorithm::m_edgeAreaPowerOffset
uint8_t m_edgeAreaPowerOffset
edge area power offset
Definition: lte-ffr-soft-algorithm.h:156
ns3::LteFfrSoftAlgorithm::m_centerSubBandThreshold
uint8_t m_centerSubBandThreshold
center subband threshold
Definition: lte-ffr-soft-algorithm.h:151
ns3::LteFfrSoftAlgorithm::InitializeDownlinkRbgMaps
void InitializeDownlinkRbgMaps()
Initialize downlink RBG maps function.
Definition: lte-ffr-soft-algorithm.cc:312
ns3::MemberLteFfrRrcSapProvider
Template for the implementation of the LteFfrRrcSapProvider as a member of an owner class of type C t...
Definition: lte-ffr-rrc-sap.h:144
ns3::LteFfrSoftAlgorithm::DoIsUlRbgAvailableForUe
virtual bool DoIsUlRbgAvailableForUe(int i, uint16_t rnti)
Implementation of LteFfrSapProvider::IsUlRbgAvailableForUe.
Definition: lte-ffr-soft-algorithm.cc:461
ns3::LteFfrSoftAlgorithm::DoGetAvailableUlRbg
virtual std::vector< bool > DoGetAvailableUlRbg()
Implementation of LteFfrSapProvider::GetAvailableUlRbg.
Definition: lte-ffr-soft-algorithm.cc:448
ns3::LteFfrSoftAlgorithm::m_dlEdgeSubBandOffset
uint8_t m_dlEdgeSubBandOffset
DL edge subband offset.
Definition: lte-ffr-soft-algorithm.h:121
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::LteFfrSoftAlgorithm::m_ulRbgMap
std::vector< bool > m_ulRbgMap
UL RBG map.
Definition: lte-ffr-soft-algorithm.h:129
ns3::LteFfrSoftAlgorithm::m_ulEdgeRbgMap
std::vector< bool > m_ulEdgeRbgMap
UL edge RBG map.
Definition: lte-ffr-soft-algorithm.h:138
ns3::LteFfrSoftAlgorithm::DoGetTpc
virtual uint8_t DoGetTpc(uint16_t rnti)
DoGetTpc for UE.
Definition: lte-ffr-soft-algorithm.cc:531
ns3::LteFfrSoftAlgorithm::EdgeArea
@ EdgeArea
Definition: lte-ffr-soft-algorithm.h:146
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::LteFfrSoftAlgorithm
Soft Fractional Frequency Reuse algorithm implementation.
Definition: lte-ffr-soft-algorithm.h:38
ns3::LteFfrSoftAlgorithm::DoReportDlCqiInfo
virtual void DoReportDlCqiInfo(const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters &params)
DoReportDlCqiInfo.
Definition: lte-ffr-soft-algorithm.cc:510
ns3::LteFfrSoftAlgorithm::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition: lte-ffr-soft-algorithm.cc:121
ns3::LteFfrSoftAlgorithm::m_ulEdgeSubBandwidth
uint8_t m_ulEdgeSubBandwidth
UL edge subbandwidth.
Definition: lte-ffr-soft-algorithm.h:126
ns3::LteFfrSoftAlgorithm::m_dlCommonSubBandwidth
uint8_t m_dlCommonSubBandwidth
DL common subbandwidth.
Definition: lte-ffr-soft-algorithm.h:120
ns3::LteFfrSoftAlgorithm::DoReportUlCqiInfo
virtual void DoReportUlCqiInfo(const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters &params)
DoReportUlCqiInfo.
Definition: lte-ffr-soft-algorithm.cc:517
ns3::LteFfrSoftAlgorithm::DoGetMinContinuousUlBandwidth
virtual uint16_t DoGetMinContinuousUlBandwidth()
DoGetMinContinuousUlBandwidth in number of RB.
Definition: lte-ffr-soft-algorithm.cc:573
ns3::LteFfrSoftAlgorithm::UePosition
UePosition
UE position enumeration.
Definition: lte-ffr-soft-algorithm.h:142
ns3::LteFfrSoftAlgorithm::m_centerAreaTpc
uint8_t m_centerAreaTpc
center area tpc
Definition: lte-ffr-soft-algorithm.h:158
ns3::LteFfrSoftAlgorithm::m_mediumAreaPowerOffset
uint8_t m_mediumAreaPowerOffset
medium area power offset
Definition: lte-ffr-soft-algorithm.h:155
ns3::LteFfrSoftAlgorithm::m_ues
std::map< uint16_t, uint8_t > m_ues
UEs.
Definition: lte-ffr-soft-algorithm.h:149
ns3::LteFfrSoftAlgorithm::m_centerAreaPowerOffset
uint8_t m_centerAreaPowerOffset
center area power offset
Definition: lte-ffr-soft-algorithm.h:154
ns3::LteFfrSoftAlgorithm::m_ulCenterRbgMap
std::vector< bool > m_ulCenterRbgMap
UL center RBG map.
Definition: lte-ffr-soft-algorithm.h:132
ns3::LteRrcSap::MeasResults
MeasResults structure.
Definition: lte-rrc-sap.h:679
ns3::EpcX2Sap::LoadInformationParams
Parameters of the LOAD INFORMATION message.
Definition: epc-x2-sap.h:304
ns3::LteFfrSoftAlgorithm::m_dlEdgeRbgMap
std::vector< bool > m_dlEdgeRbgMap
DL edge RBG map.
Definition: lte-ffr-soft-algorithm.h:137
ns3::LteFfrSoftAlgorithm::m_dlRbgMap
std::vector< bool > m_dlRbgMap
DL RBG Map.
Definition: lte-ffr-soft-algorithm.h:128
ns3::LteFfrAlgorithm
The abstract base class of a Frequency Reuse algorithm.
Definition: lte-ffr-algorithm.h:58
ns3::LteFfrSoftAlgorithm::m_dlEdgeSubBandwidth
uint8_t m_dlEdgeSubBandwidth
DL edge subbandwidth.
Definition: lte-ffr-soft-algorithm.h:122
ns3::LteFfrSoftAlgorithm::m_dlCenterRbgMap
std::vector< bool > m_dlCenterRbgMap
DL center RBG map.
Definition: lte-ffr-soft-algorithm.h:131
ns3::LteFfrSoftAlgorithm::m_ulCommonSubBandwidth
uint8_t m_ulCommonSubBandwidth
UL common subbandwidth.
Definition: lte-ffr-soft-algorithm.h:124
ns3::LteFfrSoftAlgorithm::SetLteFfrRrcSapUser
virtual void SetLteFfrRrcSapUser(LteFfrRrcSapUser *s)
Set the "user" part of the LteFfrRrcSap interface that this frequency reuse algorithm instance will i...
Definition: lte-ffr-soft-algorithm.cc:224
ns3::LteFfrSoftAlgorithm::CenterArea
@ CenterArea
Definition: lte-ffr-soft-algorithm.h:144
ns3::MemberLteFfrSapProvider
Template for the implementation of the LteFfrSapProvider as a member of an owner class of type C to w...
Definition: lte-ffr-sap.h:153
ns3::LteFfrSoftAlgorithm::DoRecvLoadInformation
virtual void DoRecvLoadInformation(EpcX2Sap::LoadInformationParams params)
DoRecvLoadInformation.
Definition: lte-ffr-soft-algorithm.cc:692
ns3::LteFfrSoftAlgorithm::GetLteFfrSapProvider
virtual LteFfrSapProvider * GetLteFfrSapProvider()
Export the "provider" part of the LteFfrSap interface.
Definition: lte-ffr-soft-algorithm.cc:217
ns3::LteFfrSoftAlgorithm::m_measId
uint8_t m_measId
The expected measurement identity.
Definition: lte-ffr-soft-algorithm.h:163
ns3::LteFfrSoftAlgorithm::m_ulMediumRbgMap
std::vector< bool > m_ulMediumRbgMap
UL medium RBG map.
Definition: lte-ffr-soft-algorithm.h:135
ns3::LteFfrSoftAlgorithm::InitializeUplinkRbgMaps
void InitializeUplinkRbgMaps()
Initialize uplink RBG maps function.
Definition: lte-ffr-soft-algorithm.cc:350
ns3::LteFfrSoftAlgorithm::LteFfrSoftAlgorithm
LteFfrSoftAlgorithm()
Creates a trivial ffr algorithm instance.
Definition: lte-ffr-soft-algorithm.cc:90
ns3::LteFfrSoftAlgorithm::m_mediumAreaTpc
uint8_t m_mediumAreaTpc
medium area tpc
Definition: lte-ffr-soft-algorithm.h:159
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::LteFfrSoftAlgorithm::m_ffrSapUser
LteFfrSapUser * m_ffrSapUser
FFR SAP user.
Definition: lte-ffr-soft-algorithm.h:113
ns3::LteFfrSoftAlgorithm::DoGetAvailableDlRbg
virtual std::vector< bool > DoGetAvailableDlRbg()
Implementation of LteFfrSapProvider::GetAvailableDlRbg.
Definition: lte-ffr-soft-algorithm.cc:386
ns3::LteFfrSoftAlgorithm::m_ffrRrcSapUser
LteFfrRrcSapUser * m_ffrRrcSapUser
FFR RRC SAP user.
Definition: lte-ffr-soft-algorithm.h:117