5G-LENA nr-v3.3-161-gad18933f
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
nr-mac-scheduler-ofdma-qos.h
1// Copyright (c) 2022 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
2//
3// SPDX-License-Identifier: GPL-2.0-only
4
5#pragma once
6#include "nr-mac-scheduler-ofdma-rr.h"
7
8namespace ns3
9{
10
22{
23 public:
28 static TypeId GetTypeId();
33
38 {
39 }
40
45 void SetFairnessIndex(double v);
46
51 double GetFairnessIndex() const;
52
57 void SetTimeWindow(double v);
62 double GetTimeWindow() const;
63
64 protected:
65 // inherit
71 std::shared_ptr<NrMacSchedulerUeInfo> CreateUeRepresentation(
72 const NrMacCschedSapProvider::CschedUeConfigReqParameters& params) const override;
73
78 std::function<bool(const NrMacSchedulerNs3::UePtrAndBufferReq& lhs,
80 GetUeCompareDlFn() const override;
81
86 std::function<bool(const NrMacSchedulerNs3::UePtrAndBufferReq& lhs,
88 GetUeCompareUlFn() const override;
89
103 const FTResources& assigned,
104 const FTResources& totAssigned) const override;
105
123 const FTResources& notAssigned,
124 const FTResources& totalAssigned) const override;
125
139 const FTResources& assigned,
140 const FTResources& totAssigned) const override;
141
159 const FTResources& notAssigned,
160 const FTResources& totalAssigned) const override;
161
170 void BeforeDlSched(const UePtrAndBufferReq& ue,
171 const FTResources& assignableInIteration) const override;
172
181 void BeforeUlSched(const UePtrAndBufferReq& ue,
182 const FTResources& assignableInIteration) const override;
183
184 private:
185 double m_timeWindow{
186 99.0};
187 double m_alpha{0.0};
188};
189
190} // namespace ns3
std::pair< UePtr, uint32_t > UePtrAndBufferReq
Pair between a pointer to NrMacSchedulerUeInfo and its buffer occupancy.
PointInFTPlane FTResources
Represent an amount of RBG/symbols that can be, or is, assigned.
Assign frequencies in QoS-based fashion.
void SetTimeWindow(double v)
Set the attribute "LastAvgTPutWeight".
NrMacSchedulerOfdmaQos()
NrMacSchedulerOfdmaQos constructor.
void BeforeUlSched(const UePtrAndBufferReq &ue, const FTResources &assignableInIteration) const override
Calculate the potential throughput for the UL based on the available resources.
void AssignedDlResources(const UePtrAndBufferReq &ue, const FTResources &assigned, const FTResources &totAssigned) const override
Update the UE representation after a symbol (DL) has been assigned to it.
void SetFairnessIndex(double v)
Set the value of attribute "FairnessIndex".
void NotAssignedDlResources(const UePtrAndBufferReq &ue, const FTResources &notAssigned, const FTResources &totalAssigned) const override
Update DL metrics by calling NrMacSchedulerUeInfoQos::UpdateQosDlMetric.
std::function< bool(const NrMacSchedulerNs3::UePtrAndBufferReq &lhs, const NrMacSchedulerNs3::UePtrAndBufferReq &rhs)> GetUeCompareDlFn() const override
Return the comparison function to sort DL UE according to the scheduler policy.
std::shared_ptr< NrMacSchedulerUeInfo > CreateUeRepresentation(const NrMacCschedSapProvider::CschedUeConfigReqParameters &params) const override
Create an UE representation of the type NrMacSchedulerUeInfoQos.
~NrMacSchedulerOfdmaQos() override
~NrMacSchedulerOfdmaQos deconstructor
void BeforeDlSched(const UePtrAndBufferReq &ue, const FTResources &assignableInIteration) const override
Calculate the potential throughput for the DL based on the available resources.
void AssignedUlResources(const UePtrAndBufferReq &ue, const FTResources &assigned, const FTResources &totAssigned) const override
Update the UE representation after a symbol (UL) has been assigned to it.
double GetTimeWindow() const
Get the attribute "LastAvgTPutWeight".
double GetFairnessIndex() const
Get the value of attribute "FairnessIndex".
std::function< bool(const NrMacSchedulerNs3::UePtrAndBufferReq &lhs, const NrMacSchedulerNs3::UePtrAndBufferReq &rhs)> GetUeCompareUlFn() const override
Return the comparison function to sort UL UE according to the scheduler policy.
void NotAssignedUlResources(const UePtrAndBufferReq &ue, const FTResources &notAssigned, const FTResources &totalAssigned) const override
Update UL metrics by calling NrMacSchedulerUeInfoQos::UpdateQosUlMetric.
Assign frequencies in a round-robin fashion.