A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-ffr-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_FFR_SOFT_ALGORITHM_H
22#define LTE_FFR_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 Fractional Frequency Reuse algorithm implementation
36 */
38{
39 public:
40 /**
41 * \brief Creates a trivial ffr algorithm instance.
42 */
44
45 ~LteFfrSoftAlgorithm() 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 function
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 function
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 function
106 */
108 /**
109 * Initialize uplink RBG maps function
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 uint8_t m_dlCommonSubBandwidth; ///< DL common subbandwidth
122 uint8_t m_dlEdgeSubBandOffset; ///< DL edge subband offset
123 uint8_t m_dlEdgeSubBandwidth; ///< DL edge subbandwidth
124
125 uint8_t m_ulCommonSubBandwidth; ///< UL common subbandwidth
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_dlCenterRbgMap; ///< DL center RBG map
133 std::vector<bool> m_ulCenterRbgMap; ///< UL center RBG map
134
135 std::vector<bool> m_dlMediumRbgMap; ///< DL medium RBG map
136 std::vector<bool> m_ulMediumRbgMap; ///< UL medium RBG map
137
138 std::vector<bool> m_dlEdgeRbgMap; ///< DL edge RBG map
139 std::vector<bool> m_ulEdgeRbgMap; ///< UL edge RBG map
140
141 /// UE position enumeration
143 {
148 };
149
150 std::map<uint16_t, uint8_t> m_ues; ///< UEs
151
152 uint8_t m_centerSubBandThreshold; ///< center subband threshold
153 uint8_t m_edgeSubBandThreshold; ///< edge subband threshold
154
155 uint8_t m_centerAreaPowerOffset; ///< center area power offset
156 uint8_t m_mediumAreaPowerOffset; ///< medium area power offset
157 uint8_t m_edgeAreaPowerOffset; ///< edge area power offset
158
159 uint8_t m_centerAreaTpc; ///< center area tpc
160 uint8_t m_mediumAreaTpc; ///< medium area tpc
161 uint8_t m_edgeAreaTpc; ///< edge area tpc
162
163 /// The expected measurement identity
164 uint8_t m_measId;
165
166}; // end of class LteFfrSoftAlgorithm
167
168} // end of namespace ns3
169
170#endif /* LTE_FFR_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 Fractional Frequency Reuse algorithm implementation.
void SetUplinkConfiguration(uint16_t cellId, uint8_t bandwidth)
Set uplink configuration function.
std::vector< bool > m_dlRbgMap
DL RBG Map.
LteFfrSoftAlgorithm()
Creates a trivial ffr algorithm instance.
void DoReportUlCqiInfo(const FfMacSchedSapProvider::SchedUlCqiInfoReqParameters &params) override
DoReportUlCqiInfo.
void DoInitialize() override
Initialize() implementation.
LteFfrRrcSapProvider * GetLteFfrRrcSapProvider() override
Export the "provider" part of the LteFfrRrcSap interface.
uint8_t m_dlEdgeSubBandOffset
DL edge subband offset.
LteFfrSapProvider * m_ffrSapProvider
FFR SAP provider.
std::vector< bool > m_ulMediumRbgMap
UL medium RBG map.
uint8_t m_ulEdgeSubBandwidth
UL edge subbandwidth.
LteFfrSapProvider * GetLteFfrSapProvider() override
Export the "provider" part of the LteFfrSap interface.
uint8_t m_centerAreaTpc
center area tpc
std::vector< bool > m_ulRbgMap
UL RBG map.
void DoDispose() override
Destructor implementation.
std::vector< bool > m_dlMediumRbgMap
DL medium RBG map.
void SetLteFfrSapUser(LteFfrSapUser *s) override
Set the "user" part of the LteFfrSap interface that this frequency reuse algorithm instance will inte...
std::vector< bool > DoGetAvailableDlRbg() override
Implementation of LteFfrSapProvider::GetAvailableDlRbg.
std::vector< bool > m_dlEdgeRbgMap
DL edge RBG map.
bool DoIsUlRbgAvailableForUe(int i, uint16_t rnti) override
Implementation of LteFfrSapProvider::IsUlRbgAvailableForUe.
uint8_t m_mediumAreaPowerOffset
medium area power offset
void SetLteFfrRrcSapUser(LteFfrRrcSapUser *s) override
Set the "user" part of the LteFfrRrcSap interface that this frequency reuse algorithm instance will i...
void DoReportDlCqiInfo(const FfMacSchedSapProvider::SchedDlCqiInfoReqParameters &params) override
DoReportDlCqiInfo.
uint8_t m_edgeAreaPowerOffset
edge area power offset
std::vector< bool > m_dlCenterRbgMap
DL center RBG map.
uint8_t m_mediumAreaTpc
medium area tpc
void InitializeUplinkRbgMaps()
Initialize uplink RBG maps function.
uint8_t m_ulEdgeSubBandOffset
UL edge subband offset.
uint8_t m_dlEdgeSubBandwidth
DL edge subbandwidth.
uint8_t m_edgeSubBandThreshold
edge subband threshold
LteFfrSapUser * m_ffrSapUser
FFR SAP user.
std::vector< bool > m_ulCenterRbgMap
UL center RBG map.
void SetDownlinkConfiguration(uint16_t cellId, uint8_t bandwidth)
Set downlink configuration function.
std::vector< bool > m_ulEdgeRbgMap
UL edge RBG map.
uint8_t m_ulCommonSubBandwidth
UL common subbandwidth.
void Reconfigure() override
Automatic FR reconfiguration.
UePosition
UE position enumeration.
uint16_t DoGetMinContinuousUlBandwidth() override
DoGetMinContinuousUlBandwidth in number of RB.
uint8_t m_centerAreaPowerOffset
center area power offset
uint8_t m_centerSubBandThreshold
center subband threshold
uint8_t m_measId
The expected measurement identity.
std::vector< bool > DoGetAvailableUlRbg() override
Implementation of LteFfrSapProvider::GetAvailableUlRbg.
LteFfrRrcSapProvider * m_ffrRrcSapProvider
FFR RRC SAP provider.
LteFfrRrcSapUser * m_ffrRrcSapUser
FFR RRC SAP user.
bool DoIsDlRbgAvailableForUe(int i, uint16_t rnti) override
Implementation of LteFfrSapProvider::IsDlRbgAvailableForUe.
uint8_t m_dlCommonSubBandwidth
DL common subbandwidth.
void InitializeDownlinkRbgMaps()
Initialize downlink RBG maps function.
std::map< uint16_t, uint8_t > m_ues
UEs.
void DoRecvLoadInformation(EpcX2Sap::LoadInformationParams params) override
DoRecvLoadInformation.
uint8_t m_edgeAreaTpc
edge area tpc
uint8_t DoGetTpc(uint16_t rnti) override
DoGetTpc for UE.
void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults) override
Implementation of LteFfrRrcSapProvider::ReportUeMeas.
static TypeId GetTypeId()
Get the type ID.
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