A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-fr-strict-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_STRICT_ALGORITHM_H
11#define LTE_FR_STRICT_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 Strict Frequency Reuse algorithm implementation
25 */
27{
28 public:
29 /**
30 * \brief Creates a trivial ffr algorithm instance.
31 */
33
34 ~LteFrStrictAlgorithm() 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 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_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_centerAreaPowerOffset; ///< center area power offset
138 uint8_t m_edgeAreaPowerOffset; ///< edge area 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 LteFrStrictAlgorithm
147
148} // end of namespace ns3
149
150#endif /* LTE_FR_STRICT_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...
Strict Frequency Reuse algorithm implementation.
LteFfrSapProvider * GetLteFfrSapProvider() override
Export the "provider" part of the LteFfrSap interface.
uint8_t m_centerAreaPowerOffset
center area power offset
std::vector< bool > m_ulRbgMap
UL RBG map.
uint8_t m_ulCommonSubBandwidth
UL common subbandwidth.
void DoInitialize() override
Initialize() implementation.
uint16_t DoGetMinContinuousUlBandwidth() override
DoGetMinContinuousUlBandwidth in number of RB.
void DoRecvLoadInformation(EpcX2Sap::LoadInformationParams params) override
DoRecvLoadInformation.
void DoReportDlCqiInfo(const FfMacSchedSapProvider::SchedDlCqiInfoReqParameters &params) override
DoReportDlCqiInfo.
void DoReportUlCqiInfo(const FfMacSchedSapProvider::SchedUlCqiInfoReqParameters &params) override
DoReportUlCqiInfo.
uint8_t m_dlCommonSubBandwidth
DL common subbandwidth.
LteFfrRrcSapProvider * m_ffrRrcSapProvider
FFR RRC SAP provider.
LteFfrSapUser * m_ffrSapUser
FFR SAP user.
uint8_t m_ulEdgeSubBandwidth
UL edge subbandwidth.
uint8_t m_dlEdgeSubBandOffset
DL edge subband offset.
void InitializeUplinkRbgMaps()
Initialize uplink RBG maps.
void DoDispose() override
Destructor implementation.
uint8_t m_dlEdgeSubBandwidth
DL edge subbandwidth.
uint8_t m_edgeAreaPowerOffset
edge area power offset
std::vector< bool > DoGetAvailableUlRbg() override
Implementation of LteFfrSapProvider::GetAvailableUlRbg.
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.
static TypeId GetTypeId()
Get the type ID.
bool DoIsUlRbgAvailableForUe(int i, uint16_t rnti) override
Implementation of LteFfrSapProvider::IsUlRbgAvailableForUe.
void SetUplinkConfiguration(uint16_t cellId, uint8_t bandwidth)
Set uplink configuration.
void Reconfigure() override
Automatic FR reconfiguration.
bool DoIsDlRbgAvailableForUe(int i, uint16_t rnti) override
Implementation of LteFfrSapProvider::IsDlRbgAvailableForUe.
LteFfrRrcSapProvider * GetLteFfrRrcSapProvider() override
Export the "provider" part of the LteFfrRrcSap interface.
LteFfrRrcSapUser * m_ffrRrcSapUser
FFR RRC SAP user.
uint8_t m_centerAreaTpc
center area tpc
uint8_t m_measId
The expected measurement identity.
std::vector< bool > m_dlEdgeRbgMap
DL edge RBG map.
void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults) override
Implementation of LteFfrRrcSapProvider::ReportUeMeas.
void SetDownlinkConfiguration(uint16_t cellId, uint8_t bandwidth)
Set downlink configuration.
LteFrStrictAlgorithm()
Creates a trivial ffr algorithm instance.
std::vector< uint16_t > m_edgeUes
Edge UEs.
uint8_t m_ulEdgeSubBandOffset
UL edge subband offset.
uint8_t DoGetTpc(uint16_t rnti) override
DoGetTpc for UE.
uint8_t m_edgeSubBandThreshold
Edge subband threshold.
std::vector< bool > m_ulEdgeRbgMap
UL edge RBG map.
std::vector< bool > m_dlRbgMap
DL RBG map.
void InitializeDownlinkRbgMaps()
Initialize downlink RBG maps.
LteFfrSapProvider * m_ffrSapProvider
FFR SAP provider.
void SetLteFfrRrcSapUser(LteFfrRrcSapUser *s) override
Set the "user" part of the LteFfrRrcSap interface that this frequency reuse algorithm instance will i...
std::map< uint16_t, uint8_t > m_ues
UEs.
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.