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 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Piotr Gawlowicz <gawlowicz.p@gmail.com>
7 *
8 */
9
10#ifndef LTE_FFR_SOFT_ALGORITHM_H
11#define LTE_FFR_SOFT_ALGORITHM_H
12
13#include "lte-ffr-algorithm.h"
14#include "lte-ffr-rrc-sap.h"
15#include "lte-ffr-sap.h"
16#include "lte-rrc-sap.h"
17
18#include <map>
19
20namespace ns3
21{
22
23/**
24 * \brief Soft Fractional Frequency Reuse algorithm implementation
25 */
27{
28 public:
29 /**
30 * \brief Creates a trivial ffr algorithm instance.
31 */
33
34 ~LteFfrSoftAlgorithm() override;
35
36 /**
37 * \brief Get the type ID.
38 * \return the object TypeId
39 */
40 static TypeId GetTypeId();
41
42 // inherited from LteFfrAlgorithm
43 void SetLteFfrSapUser(LteFfrSapUser* s) override;
45
46 void SetLteFfrRrcSapUser(LteFfrRrcSapUser* s) override;
48
49 /// let the forwarder class access the protected and private members
51 /// let the forwarder class access the protected and private members
53
54 protected:
55 // inherited from Object
56 void DoInitialize() override;
57 void DoDispose() override;
58
59 void Reconfigure() override;
60
61 // FFR SAP PROVIDER IMPLEMENTATION
62 std::vector<bool> DoGetAvailableDlRbg() override;
63 bool DoIsDlRbgAvailableForUe(int i, uint16_t rnti) override;
64 std::vector<bool> DoGetAvailableUlRbg() override;
65 bool DoIsUlRbgAvailableForUe(int i, uint16_t rnti) override;
70 void DoReportUlCqiInfo(std::map<uint16_t, std::vector<double>> ulCqiMap) override;
71 uint8_t DoGetTpc(uint16_t rnti) override;
72 uint16_t DoGetMinContinuousUlBandwidth() override;
73
74 // FFR SAP RRC PROVIDER IMPLEMENTATION
75 void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults) override;
77
78 private:
79 /**
80 * Set downlink configuration function
81 *
82 * \param cellId the cell ID
83 * \param bandwidth the bandwidth
84 */
85 void SetDownlinkConfiguration(uint16_t cellId, uint8_t bandwidth);
86 /**
87 * Set uplink configuration function
88 *
89 * \param cellId the cell ID
90 * \param bandwidth the bandwidth
91 */
92 void SetUplinkConfiguration(uint16_t cellId, uint8_t bandwidth);
93 /**
94 * Initialize downlink RBG maps function
95 */
97 /**
98 * Initialize uplink RBG maps function
99 */
101
102 // FFR SAP
103 LteFfrSapUser* m_ffrSapUser; ///< FFR SAP user
104 LteFfrSapProvider* m_ffrSapProvider; ///< FFR SAP provider
105
106 // FFR RRF SAP
107 LteFfrRrcSapUser* m_ffrRrcSapUser; ///< FFR RRC SAP user
108 LteFfrRrcSapProvider* m_ffrRrcSapProvider; ///< FFR RRC SAP provider
109
110 uint8_t m_dlCommonSubBandwidth; ///< DL common subbandwidth
111 uint8_t m_dlEdgeSubBandOffset; ///< DL edge subband offset
112 uint8_t m_dlEdgeSubBandwidth; ///< DL edge subbandwidth
113
114 uint8_t m_ulCommonSubBandwidth; ///< UL common subbandwidth
115 uint8_t m_ulEdgeSubBandOffset; ///< UL edge subband offset
116 uint8_t m_ulEdgeSubBandwidth; ///< UL edge subbandwidth
117
118 std::vector<bool> m_dlRbgMap; ///< DL RBG Map
119 std::vector<bool> m_ulRbgMap; ///< UL RBG map
120
121 std::vector<bool> m_dlCenterRbgMap; ///< DL center RBG map
122 std::vector<bool> m_ulCenterRbgMap; ///< UL center RBG map
123
124 std::vector<bool> m_dlMediumRbgMap; ///< DL medium RBG map
125 std::vector<bool> m_ulMediumRbgMap; ///< UL medium RBG map
126
127 std::vector<bool> m_dlEdgeRbgMap; ///< DL edge RBG map
128 std::vector<bool> m_ulEdgeRbgMap; ///< UL edge RBG map
129
130 /// UE position enumeration
138
139 std::map<uint16_t, uint8_t> m_ues; ///< UEs
140
141 uint8_t m_centerSubBandThreshold; ///< center subband threshold
142 uint8_t m_edgeSubBandThreshold; ///< edge subband threshold
143
144 uint8_t m_centerAreaPowerOffset; ///< center area power offset
145 uint8_t m_mediumAreaPowerOffset; ///< medium area power offset
146 uint8_t m_edgeAreaPowerOffset; ///< edge area power offset
147
148 uint8_t m_centerAreaTpc; ///< center area tpc
149 uint8_t m_mediumAreaTpc; ///< medium area tpc
150 uint8_t m_edgeAreaTpc; ///< edge area tpc
151
152 /// The expected measurement identity
153 uint8_t m_measId;
154
155}; // end of class LteFfrSoftAlgorithm
156
157} // end of namespace ns3
158
159#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:29
Service Access Point (SAP) offered by the eNodeB RRC instance to the Frequency Reuse algorithm instan...
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...
a unique identifier for an interface.
Definition type-id.h:48
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Parameters of the LOAD INFORMATION message.
Definition epc-x2-sap.h:295
Parameters of the SCHED_DL_CQI_INFO_REQ primitive.
Parameters of the SCHED_UL_CQI_INFO_REQ primitive.
MeasResults structure.