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 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Piotr Gawlowicz <gawlowicz.p@gmail.com>
7 *
8 */
9
10#ifndef LTE_FR_SOFT_ALGORITHM_H
11#define LTE_FR_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 Frequency Reuse algorithm implementation
25 */
27{
28 public:
29 /**
30 * \brief Creates a trivial ffr algorithm instance.
31 */
33
34 ~LteFrSoftAlgorithm() 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
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
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
95 */
97 /**
98 * Initialize uplink RBG maps
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 bool m_isEdgeSubBandForCenterUe; ///< is edge subband for center UE?
111
112 uint8_t m_dlEdgeSubBandOffset; ///< DL edge subband offset
113 uint8_t m_dlEdgeSubBandwidth; ///< DL edge subbandwidth
114
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_dlEdgeRbgMap; ///< DL edge RBG map
122 std::vector<bool> m_ulEdgeRbgMap; ///< UL edge RBG map
123
124 /// SubBand enumeration
131
132 std::map<uint16_t, uint8_t> m_ues; ///< UEs
133 std::vector<uint16_t> m_edgeUes; ///< Edge UEs
134
135 uint8_t m_edgeSubBandThreshold; ///< Edge subband threshold
136
137 uint8_t m_centerPowerOffset; ///< center power offset
138 uint8_t m_edgePowerOffset; ///< edge power offset
139
140 uint8_t m_centerAreaTpc; ///< center area tpc
141 uint8_t m_edgeAreaTpc; ///< edge area tpc
142
143 /// The expected measurement identity
144 uint8_t m_measId;
145
146}; // end of class LteFrSoftAlgorithm
147
148} // end of namespace ns3
149
150#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:29
Service Access Point (SAP) offered by the eNodeB RRC instance to the Frequency Reuse algorithm instan...
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...
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.