A Discrete-Event Network Simulator
API
lte-fr-hard-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_HARD_ALGORITHM_H
23 #define LTE_FR_HARD_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 
30 namespace ns3 {
31 
32 
37 {
38 public:
43 
44  virtual ~LteFrHardAlgorithm ();
45 
50  static TypeId GetTypeId ();
51 
52  // inherited from LteFfrAlgorithm
53  virtual void SetLteFfrSapUser (LteFfrSapUser* s);
55 
56  virtual void SetLteFfrRrcSapUser (LteFfrRrcSapUser* s);
58 
63 
64 protected:
65  // inherited from Object
66  virtual void DoInitialize ();
67  virtual void DoDispose ();
68 
69  virtual void Reconfigure ();
70 
71  // FFR SAP PROVIDER IMPLEMENTATION
72  virtual std::vector <bool> DoGetAvailableDlRbg ();
73  virtual bool DoIsDlRbgAvailableForUe (int i, uint16_t rnti);
74  virtual std::vector <bool> DoGetAvailableUlRbg ();
75  virtual bool DoIsUlRbgAvailableForUe (int i, uint16_t rnti);
78  virtual void DoReportUlCqiInfo ( std::map <uint16_t, std::vector <double> > ulCqiMap );
79  virtual uint8_t DoGetTpc (uint16_t rnti);
80  virtual uint8_t DoGetMinContinuousUlBandwidth ();
81 
82  // FFR SAP RRC PROVIDER IMPLEMENTATION
83  virtual void DoReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults);
85 
86 private:
93  void SetDownlinkConfiguration (uint16_t cellId, uint8_t bandwidth);
100  void SetUplinkConfiguration (uint16_t cellId, uint8_t bandwidth);
108  void InitializeUplinkRbgMaps ();
109 
110  // FFR SAP
113 
114  // FFR RRF SAP
117 
118  uint8_t m_dlOffset;
119  uint8_t m_dlSubBand;
120 
121  uint8_t m_ulOffset;
122  uint8_t m_ulSubBand;
123 
124  std::vector <bool> m_dlRbgMap;
125  std::vector <bool> m_ulRbgMap;
126 
127 }; // end of class LteFrHardAlgorithm
128 
129 
130 } // end of namespace ns3
131 
132 
133 #endif /* LTE_FR_HARD_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
uint8_t m_ulSubBand
UL subband.
virtual void DoDispose()
Destructor implementation.
LteFrHardAlgorithm()
Creates a trivial ffr algorithm instance.
virtual bool DoIsDlRbgAvailableForUe(int i, uint16_t rnti)
Implementation of LteFfrSapProvider::IsDlRbgAvailableForUe.
void InitializeDownlinkRbgMaps()
Initialize downlink rbg maps.
uint8_t m_dlSubBand
DL subband.
void SetDownlinkConfiguration(uint16_t cellId, uint8_t bandwidth)
Set downlink configuration.
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
virtual void Reconfigure()
Automatic FR reconfiguration.
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:671
Service Access Point (SAP) offered by the Frequency Reuse algorithm instance to the MAC Scheduler ins...
Definition: lte-ffr-sap.h:39
virtual void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults)
Implementation of LteFfrRrcSapProvider::ReportUeMeas.
Hard Frequency Reuse algorithm implementation which uses only 1 sub-band.
std::vector< bool > m_ulRbgMap
UL RBG Map.
virtual void DoInitialize()
Initialize() implementation.
std::vector< bool > m_dlRbgMap
DL RBG Map.
LteFfrSapProvider * m_ffrSapProvider
FFR SAP provider.
LteFfrRrcSapUser * m_ffrRrcSapUser
FFR RRC SAP user.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
The abstract base class of a Frequency Reuse algorithm.
virtual std::vector< bool > DoGetAvailableDlRbg()
Implementation of LteFfrSapProvider::GetAvailableDlRbg.
virtual uint8_t DoGetMinContinuousUlBandwidth()
DoGetMinContinuousUlBandwidth in number of RB.
virtual void DoReportDlCqiInfo(const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters &params)
DoReportDlCqiInfo.
void InitializeUplinkRbgMaps()
Initialize uplink rbg maps.
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.
virtual void DoRecvLoadInformation(EpcX2Sap::LoadInformationParams params)
DoRecvLoadInformation.
virtual void SetLteFfrSapUser(LteFfrSapUser *s)
Set the "user" part of the LteFfrSap interface that this frequency reuse algorithm instance will inte...
Parameters of the SCHED_UL_CQI_INFO_REQ primitive.
virtual uint8_t DoGetTpc(uint16_t rnti)
DoGetTpc for UE.
virtual LteFfrRrcSapProvider * GetLteFfrRrcSapProvider()
Export the "provider" part of the LteFfrRrcSap interface.
Parameters of the LOAD INFORMATION message.
Definition: epc-x2-sap.h:303
LteFfrRrcSapProvider * m_ffrRrcSapProvider
FFR RRC SAP provider.
virtual bool DoIsUlRbgAvailableForUe(int i, uint16_t rnti)
Implementation of LteFfrSapProvider::IsUlRbgAvailableForUe.
void SetUplinkConfiguration(uint16_t cellId, uint8_t bandwidth)
Set uplink configuration.
LteFfrSapUser * m_ffrSapUser
FFR SAP user.
virtual LteFfrSapProvider * GetLteFfrSapProvider()
Export the "provider" part of the LteFfrSap interface.
a unique identifier for an interface.
Definition: type-id.h:58
static TypeId GetTypeId()
Get the type ID.
virtual void DoReportUlCqiInfo(const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters &params)
DoReportUlCqiInfo.