A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-fr-soft-algorithm.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2014 Piotr Gawlowicz
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Author: Piotr Gawlowicz <gawlowicz.p@gmail.com>
18 *
19 */
20
21#ifndef LTE_FR_SOFT_ALGORITHM_H
22#define LTE_FR_SOFT_ALGORITHM_H
23
24#include "lte-ffr-algorithm.h"
25#include "lte-ffr-rrc-sap.h"
26#include "lte-ffr-sap.h"
27#include "lte-rrc-sap.h"
28
29#include <map>
30
31namespace ns3
32{
33
34/**
35 * \brief Soft Frequency Reuse algorithm implementation
36 */
38{
39 public:
40 /**
41 * \brief Creates a trivial ffr algorithm instance.
42 */
44
45 ~LteFrSoftAlgorithm() override;
46
47 /**
48 * \brief Get the type ID.
49 * \return the object TypeId
50 */
51 static TypeId GetTypeId();
52
53 // inherited from LteFfrAlgorithm
54 void SetLteFfrSapUser(LteFfrSapUser* s) override;
56
57 void SetLteFfrRrcSapUser(LteFfrRrcSapUser* s) override;
59
60 /// let the forwarder class access the protected and private members
62 /// let the forwarder class access the protected and private members
64
65 protected:
66 // inherited from Object
67 void DoInitialize() override;
68 void DoDispose() override;
69
70 void Reconfigure() override;
71
72 // FFR SAP PROVIDER IMPLEMENTATION
73 std::vector<bool> DoGetAvailableDlRbg() override;
74 bool DoIsDlRbgAvailableForUe(int i, uint16_t rnti) override;
75 std::vector<bool> DoGetAvailableUlRbg() override;
76 bool DoIsUlRbgAvailableForUe(int i, uint16_t rnti) override;
81 void DoReportUlCqiInfo(std::map<uint16_t, std::vector<double>> ulCqiMap) override;
82 uint8_t DoGetTpc(uint16_t rnti) override;
83 uint16_t DoGetMinContinuousUlBandwidth() override;
84
85 // FFR SAP RRC PROVIDER IMPLEMENTATION
86 void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults) override;
88
89 private:
90 /**
91 * Set downlink configuration
92 *
93 * \param cellId the cell ID
94 * \param bandwidth the bandwidth
95 */
96 void SetDownlinkConfiguration(uint16_t cellId, uint8_t bandwidth);
97 /**
98 * Set uplink configuration
99 *
100 * \param cellId the cell ID
101 * \param bandwidth the bandwidth
102 */
103 void SetUplinkConfiguration(uint16_t cellId, uint8_t bandwidth);
104 /**
105 * Initialize downlink RBG maps
106 */
108 /**
109 * Initialize uplink RBG maps
110 */
112
113 // FFR SAP
114 LteFfrSapUser* m_ffrSapUser; ///< FFR SAP user
115 LteFfrSapProvider* m_ffrSapProvider; ///< FFR SAP provider
116
117 // FFR RRF SAP
118 LteFfrRrcSapUser* m_ffrRrcSapUser; ///< FFR RRC SAP user
119 LteFfrRrcSapProvider* m_ffrRrcSapProvider; ///< FFR RRC SAP provider
120
121 bool m_isEdgeSubBandForCenterUe; ///< is edge subband for center UE?
122
123 uint8_t m_dlEdgeSubBandOffset; ///< DL edge subband offset
124 uint8_t m_dlEdgeSubBandwidth; ///< DL edge subbandwidth
125
126 uint8_t m_ulEdgeSubBandOffset; ///< UL edge subband offset
127 uint8_t m_ulEdgeSubBandwidth; ///< UL edge subbandwidth
128
129 std::vector<bool> m_dlRbgMap; ///< DL RBG map
130 std::vector<bool> m_ulRbgMap; ///< UL RBG map
131
132 std::vector<bool> m_dlEdgeRbgMap; ///< DL edge RBG map
133 std::vector<bool> m_ulEdgeRbgMap; ///< UL edge RBG map
134
135 /// SubBand enumeration
137 {
141 };
142
143 std::map<uint16_t, uint8_t> m_ues; ///< UEs
144 std::vector<uint16_t> m_edgeUes; ///< Edge UEs
145
146 uint8_t m_edgeSubBandThreshold; ///< Edge subband threshold
147
148 uint8_t m_centerPowerOffset; ///< center power offset
149 uint8_t m_edgePowerOffset; ///< edge power offset
150
151 uint8_t m_centerAreaTpc; ///< center area tpc
152 uint8_t m_edgeAreaTpc; ///< edge area tpc
153
154 /// The expected measurement identity
155 uint8_t m_measId;
156
157}; // end of class LteFrSoftAlgorithm
158
159} // end of namespace ns3
160
161#endif /* LTE_FR_SOFT_ALGORITHM_H */
The abstract base class of a Frequency Reuse algorithm.
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...
Service Access Point (SAP) offered by the Frequency Reuse algorithm instance to the MAC Scheduler ins...
Definition: lte-ffr-sap.h:40
Service Access Point (SAP) offered by the eNodeB RRC instance to the Frequency Reuse algorithm instan...
Definition: lte-ffr-sap.h:140
Soft Frequency Reuse algorithm implementation.
uint8_t m_dlEdgeSubBandwidth
DL edge subbandwidth.
void Reconfigure() override
Automatic FR reconfiguration.
uint8_t m_centerPowerOffset
center power offset
LteFfrSapProvider * GetLteFfrSapProvider() override
Export the "provider" part of the LteFfrSap interface.
void DoDispose() override
Destructor implementation.
uint8_t m_ulEdgeSubBandOffset
UL edge subband offset.
bool DoIsUlRbgAvailableForUe(int i, uint16_t rnti) override
Implementation of LteFfrSapProvider::IsUlRbgAvailableForUe.
std::vector< bool > m_dlRbgMap
DL RBG map.
uint8_t m_edgeAreaTpc
edge area tpc
static TypeId GetTypeId()
Get the type ID.
uint8_t m_dlEdgeSubBandOffset
DL edge subband offset.
void SetUplinkConfiguration(uint16_t cellId, uint8_t bandwidth)
Set uplink configuration.
void SetDownlinkConfiguration(uint16_t cellId, uint8_t bandwidth)
Set downlink configuration.
LteFfrSapUser * m_ffrSapUser
FFR SAP user.
std::vector< bool > m_ulEdgeRbgMap
UL edge RBG map.
uint8_t m_ulEdgeSubBandwidth
UL edge subbandwidth.
std::vector< uint16_t > m_edgeUes
Edge UEs.
LteFfrRrcSapProvider * GetLteFfrRrcSapProvider() override
Export the "provider" part of the LteFfrRrcSap interface.
std::vector< bool > DoGetAvailableDlRbg() override
Implementation of LteFfrSapProvider::GetAvailableDlRbg.
void InitializeUplinkRbgMaps()
Initialize uplink RBG maps.
uint16_t DoGetMinContinuousUlBandwidth() override
DoGetMinContinuousUlBandwidth in number of RB.
uint8_t m_edgeSubBandThreshold
Edge subband threshold.
uint8_t m_centerAreaTpc
center area tpc
LteFfrRrcSapProvider * m_ffrRrcSapProvider
FFR RRC SAP provider.
std::map< uint16_t, uint8_t > m_ues
UEs.
void InitializeDownlinkRbgMaps()
Initialize downlink RBG maps.
void SetLteFfrSapUser(LteFfrSapUser *s) override
Set the "user" part of the LteFfrSap interface that this frequency reuse algorithm instance will inte...
uint8_t m_edgePowerOffset
edge power offset
void DoReportDlCqiInfo(const FfMacSchedSapProvider::SchedDlCqiInfoReqParameters &params) override
DoReportDlCqiInfo.
void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults) override
Implementation of LteFfrRrcSapProvider::ReportUeMeas.
void DoInitialize() override
Initialize() implementation.
uint8_t DoGetTpc(uint16_t rnti) override
DoGetTpc for UE.
void DoReportUlCqiInfo(const FfMacSchedSapProvider::SchedUlCqiInfoReqParameters &params) override
DoReportUlCqiInfo.
LteFfrRrcSapUser * m_ffrRrcSapUser
FFR RRC SAP user.
LteFrSoftAlgorithm()
Creates a trivial ffr algorithm instance.
std::vector< bool > m_ulRbgMap
UL RBG map.
bool DoIsDlRbgAvailableForUe(int i, uint16_t rnti) override
Implementation of LteFfrSapProvider::IsDlRbgAvailableForUe.
void DoRecvLoadInformation(EpcX2Sap::LoadInformationParams params) override
DoRecvLoadInformation.
void SetLteFfrRrcSapUser(LteFfrRrcSapUser *s) override
Set the "user" part of the LteFfrRrcSap interface that this frequency reuse algorithm instance will i...
std::vector< bool > m_dlEdgeRbgMap
DL edge RBG map.
uint8_t m_measId
The expected measurement identity.
std::vector< bool > DoGetAvailableUlRbg() override
Implementation of LteFfrSapProvider::GetAvailableUlRbg.
bool m_isEdgeSubBandForCenterUe
is edge subband for center UE?
LteFfrSapProvider * m_ffrSapProvider
FFR SAP provider.
Template for the implementation of the LteFfrRrcSapProvider as a member of an owner class of type C t...
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
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Parameters of the LOAD INFORMATION message.
Definition: epc-x2-sap.h:306
Parameters of the SCHED_DL_CQI_INFO_REQ primitive.
Parameters of the SCHED_UL_CQI_INFO_REQ primitive.
MeasResults structure.
Definition: lte-rrc-sap.h:717