A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-ffr-distributed-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_DISTRIBUTED_ALGORITHM_H
22#define LTE_FFR_DISTRIBUTED_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
29namespace ns3
30{
31
36{
37 public:
40
45 static TypeId GetTypeId();
46
47 // inherited from LteFfrAlgorithm
48 void SetLteFfrSapUser(LteFfrSapUser* s) override;
50
51 void SetLteFfrRrcSapUser(LteFfrRrcSapUser* s) override;
53
58
59 protected:
60 // inherited from Object
61 void DoInitialize() override;
62 void DoDispose() override;
63
64 void Reconfigure() override;
65
66 // FFR SAP PROVIDER IMPLEMENTATION
67 std::vector<bool> DoGetAvailableDlRbg() override;
68 bool DoIsDlRbgAvailableForUe(int i, uint16_t rnti) override;
69 std::vector<bool> DoGetAvailableUlRbg() override;
70 bool DoIsUlRbgAvailableForUe(int i, uint16_t rnti) override;
75 void DoReportUlCqiInfo(std::map<uint16_t, std::vector<double>> ulCqiMap) override;
76 uint8_t DoGetTpc(uint16_t rnti) override;
77 uint16_t DoGetMinContinuousUlBandwidth() override;
78
79 // FFR SAP RRC PROVIDER IMPLEMENTATION
80 void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults) override;
82
83 private:
90 void SetDownlinkConfiguration(uint16_t cellId, uint8_t bandwidth);
97 void SetUplinkConfiguration(uint16_t cellId, uint8_t bandwidth);
106
115 void UpdateNeighbourMeasurements(uint16_t rnti, uint16_t cellId, uint8_t rsrp, uint8_t rsrq);
116
118 void Calculate();
124 void SendLoadInformation(uint16_t targetCellId);
125
126 // FFR SAP
129
130 // FFR RRF SAP
133
134 std::vector<bool> m_dlRbgMap;
135 std::vector<bool> m_ulRbgMap;
136
137 uint8_t m_edgeRbNum;
138 std::vector<bool> m_dlEdgeRbgMap;
139 std::vector<bool> m_ulEdgeRbgMap;
140
143 {
147 };
148
149 std::map<uint16_t, uint8_t> m_ues;
150
152
155
158
161
162 // The expected measurement identity
163 uint8_t m_rsrqMeasId;
164 uint8_t m_rsrpMeasId;
165
171 class UeMeasure : public SimpleRefCount<UeMeasure>
172 {
173 public:
174 uint16_t m_cellId;
175 uint8_t m_rsrp;
176 uint8_t m_rsrq;
177 };
178
180 typedef std::map<uint16_t, Ptr<UeMeasure>> MeasurementRow_t;
182 typedef std::map<uint16_t, MeasurementRow_t> MeasurementTable_t;
184
185 std::vector<uint16_t> m_neighborCell;
186
188
189 std::map<uint16_t, uint32_t> m_cellWeightMap;
190
191 std::map<uint16_t, std::vector<bool>> m_rntp;
192
193}; // end of class LteFfrDistributedAlgorithm
194
195} // end of namespace ns3
196
197#endif /* LTE_FR_DISTRIBUTED_ALGORITHM_H */
An identifier for simulation events.
Definition: event-id.h:55
The abstract base class of a Frequency Reuse algorithm.
Measurements reported by a UE for a cell ID.
Distributed Fractional Frequency Reuse algorithm implementation.
std::map< uint16_t, Ptr< UeMeasure > > MeasurementRow_t
Cell Id is used as the key for the following map.
void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults) override
Implementation of LteFfrRrcSapProvider::ReportUeMeas.
uint8_t DoGetTpc(uint16_t rnti) override
DoGetTpc for UE.
LteFfrSapProvider * m_ffrSapProvider
FFR SAP Provider.
LteFfrRrcSapProvider * m_ffrRrcSapProvider
FFR RRC SAP Provider.
std::map< uint16_t, uint8_t > m_ues
UEs map.
void UpdateNeighbourMeasurements(uint16_t rnti, uint16_t cellId, uint8_t rsrp, uint8_t rsrq)
Initialize up link RGB maps function.
uint8_t m_rsrpDifferenceThreshold
RSRP difference threshold.
void DoDispose() override
Destructor implementation.
LteFfrRrcSapUser * m_ffrRrcSapUser
FFR RRC SAP User.
std::map< uint16_t, uint32_t > m_cellWeightMap
cell weight map
bool DoIsDlRbgAvailableForUe(int i, uint16_t rnti) override
Implementation of LteFfrSapProvider::IsDlRbgAvailableForUe.
void SetUplinkConfiguration(uint16_t cellId, uint8_t bandwidth)
Set up link configuration function.
void DoInitialize() override
Initialize() implementation.
void DoReportDlCqiInfo(const FfMacSchedSapProvider::SchedDlCqiInfoReqParameters &params) override
DoReportDlCqiInfo.
uint16_t DoGetMinContinuousUlBandwidth() override
DoGetMinContinuousUlBandwidth in number of RB.
void SetLteFfrSapUser(LteFfrSapUser *s) override
Set the "user" part of the LteFfrSap interface that this frequency reuse algorithm instance will inte...
void DoRecvLoadInformation(EpcX2Sap::LoadInformationParams params) override
DoRecvLoadInformation.
MeasurementTable_t m_ueMeasures
UE measures.
std::vector< bool > DoGetAvailableDlRbg() override
Implementation of LteFfrSapProvider::GetAvailableDlRbg.
std::map< uint16_t, std::vector< bool > > m_rntp
RNTP.
void SetDownlinkConfiguration(uint16_t cellId, uint8_t bandwidth)
Set down link configuration function.
std::vector< uint16_t > m_neighborCell
neighbor cell
std::vector< bool > m_ulRbgMap
UL RBG map.
std::vector< bool > m_ulEdgeRbgMap
UL edge RBG map.
uint8_t m_edgeSubBandRsrqThreshold
edge sub band RSRQ threshold
std::vector< bool > DoGetAvailableUlRbg() override
Implementation of LteFfrSapProvider::GetAvailableUlRbg.
bool DoIsUlRbgAvailableForUe(int i, uint16_t rnti) override
Implementation of LteFfrSapProvider::IsUlRbgAvailableForUe.
static TypeId GetTypeId()
Get the type ID.
LteFfrSapProvider * GetLteFfrSapProvider() override
Export the "provider" part of the LteFfrSap interface.
std::map< uint16_t, MeasurementRow_t > MeasurementTable_t
RNTI is used as the key for the following map.
LteFfrRrcSapProvider * GetLteFfrRrcSapProvider() override
Export the "provider" part of the LteFfrRrcSap interface.
std::vector< bool > m_dlRbgMap
DL RBG map.
void SetLteFfrRrcSapUser(LteFfrRrcSapUser *s) override
Set the "user" part of the LteFfrRrcSap interface that this frequency reuse algorithm instance will i...
void Reconfigure() override
Automatic FR reconfiguration.
uint8_t m_centerPowerOffset
center power offset
void InitializeUplinkRbgMaps()
Initialize up link RGB maps function.
std::vector< bool > m_dlEdgeRbgMap
DL edge RBG map.
void DoReportUlCqiInfo(const FfMacSchedSapProvider::SchedUlCqiInfoReqParameters &params) override
DoReportUlCqiInfo.
void SendLoadInformation(uint16_t targetCellId)
Send load information function.
void InitializeDownlinkRbgMaps()
Initialize down link RGB maps function.
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
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 template-based reference counting class.
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
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