A Discrete-Event Network Simulator
API
lte-fr-strict-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_FR_STRICT_ALGORITHM_H
23 #define LTE_FR_STRICT_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 ~LteFrStrictAlgorithm ();
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  // FFR SAP
114 
115  // FFR RRF SAP
118 
119 
123 
127 
128  std::vector <bool> m_dlRbgMap;
129  std::vector <bool> m_ulRbgMap;
130 
131  std::vector <bool> m_dlEdgeRbgMap;
132  std::vector <bool> m_ulEdgeRbgMap;
133 
135  enum SubBand
136  {
140  };
141 
142  std::map< uint16_t, uint8_t > m_ues;
143  std::vector<uint16_t> m_egdeUes;
144 
146 
149 
150  uint8_t m_centerAreaTpc;
151  uint8_t m_edgeAreaTpc;
152 
154  uint8_t m_measId;
155 
156 }; // end of class LteFrStrictAlgorithm
157 
158 
159 } // end of namespace ns3
160 
161 
162 #endif /* LTE_FR_STRICT_ALGORITHM_H */
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...
Service Access Point (SAP) offered by the eNodeB RRC instance to the Frequency Reuse algorithm instan...
Definition: lte-ffr-sap.h:138
LteFfrSapUser * m_ffrSapUser
FFR SAP user.
virtual uint8_t DoGetTpc(uint16_t rnti)
DoGetTpc for UE.
virtual void DoRecvLoadInformation(EpcX2Sap::LoadInformationParams params)
DoRecvLoadInformation.
uint8_t m_measId
The expected measurement identity.
LteFfrRrcSapUser * m_ffrRrcSapUser
FFR RRC SAP user.
uint8_t m_ulEdgeSubBandwidth
UL edge subbandwidth.
uint8_t m_centerAreaTpc
center area tpc
virtual std::vector< bool > DoGetAvailableUlRbg()
Implementation of LteFfrSapProvider::GetAvailableUlRbg.
void SetUplinkConfiguration(uint16_t cellId, uint8_t bandwidth)
Set uplink configuration.
virtual bool DoIsUlRbgAvailableForUe(int i, uint16_t rnti)
Implementation of LteFfrSapProvider::IsUlRbgAvailableForUe.
Strict Frequency Reuse algorithm implementation.
virtual void DoReportDlCqiInfo(const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters &params)
DoReportDlCqiInfo.
uint8_t m_edgeAreaPowerOffset
edge area power offset
LteFrStrictAlgorithm()
Creates a trivial ffr algorithm instance.
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
LteFfrSapProvider * m_ffrSapProvider
FFR SAP provider.
uint8_t m_ulCommonSubBandwidth
UL common subbandwidth.
static TypeId GetTypeId()
Get the type ID.
virtual void SetLteFfrRrcSapUser(LteFfrRrcSapUser *s)
Set the "user" part of the LteFfrRrcSap interface that this frequency reuse algorithm instance will i...
MeasResults structure.
Definition: lte-rrc-sap.h:678
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_edgeSubBandThreshold
Edge subband threshold.
uint8_t m_dlEdgeSubBandwidth
DL edge subbandwidth.
uint8_t m_centerAreaPowerOffset
center area power offset
virtual void DoDispose()
Destructor implementation.
virtual void Reconfigure()
Automatic FR reconfiguration.
virtual LteFfrSapProvider * GetLteFfrSapProvider()
Export the "provider" part of the LteFfrSap interface.
void InitializeDownlinkRbgMaps()
Initialize downlink RBG maps.
virtual LteFfrRrcSapProvider * GetLteFfrRrcSapProvider()
Export the "provider" part of the LteFfrRrcSap interface.
uint8_t m_dlCommonSubBandwidth
DL common subbandwidth.
virtual void DoInitialize()
Initialize() implementation.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
The abstract base class of a Frequency Reuse algorithm.
uint8_t m_edgeAreaTpc
edge area tpc
virtual uint16_t DoGetMinContinuousUlBandwidth()
DoGetMinContinuousUlBandwidth in number of RB.
uint8_t m_ulEdgeSubBandOffset
UL edge subband offset.
std::map< uint16_t, uint8_t > m_ues
UEs.
Service Access Point (SAP) offered by the eNodeB RRC instance to the Frequency Reuse algorithm instan...
std::vector< uint16_t > m_egdeUes
Edge UEs.
Parameters of the SCHED_DL_CQI_INFO_REQ primitive.
Parameters of the SCHED_UL_CQI_INFO_REQ primitive.
std::vector< bool > m_ulRbgMap
UL RBG map.
void SetDownlinkConfiguration(uint16_t cellId, uint8_t bandwidth)
Set downlink configuration.
std::vector< bool > m_ulEdgeRbgMap
UL edge RBG map.
Parameters of the LOAD INFORMATION message.
Definition: epc-x2-sap.h:303
virtual void DoReportUlCqiInfo(const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters &params)
DoReportUlCqiInfo.
std::vector< bool > m_dlRbgMap
DL RBG map.
virtual std::vector< bool > DoGetAvailableDlRbg()
Implementation of LteFfrSapProvider::GetAvailableDlRbg.
uint8_t m_dlEdgeSubBandOffset
DL edge subband offset.
virtual bool DoIsDlRbgAvailableForUe(int i, uint16_t rnti)
Implementation of LteFfrSapProvider::IsDlRbgAvailableForUe.
virtual void SetLteFfrSapUser(LteFfrSapUser *s)
Set the "user" part of the LteFfrSap interface that this frequency reuse algorithm instance will inte...
a unique identifier for an interface.
Definition: type-id.h:58
std::vector< bool > m_dlEdgeRbgMap
DL edge RBG map.
virtual void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults)
Implementation of LteFfrRrcSapProvider::ReportUeMeas.
void InitializeUplinkRbgMaps()
Initialize uplink RBG maps.
LteFfrRrcSapProvider * m_ffrRrcSapProvider
FFR RRC SAP provider.