5G-LENA nr-v3.3-161-gad18933f
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
nr-mac-scheduler-tdma-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
7#include "nr-mac-scheduler-tdma-rr.h"
8
9namespace ns3
10{
11
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& totAssigned) const override;
125
139 const FTResources& assigned,
140 const FTResources& totAssigned) const override;
141
159 const FTResources& notAssigned,
160 const FTResources& totAssigned) 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 entire symbols in a QoS-based fashion.
void NotAssignedUlResources(const UePtrAndBufferReq &ue, const FTResources &notAssigned, const FTResources &totAssigned) const override
Update UL metrics by calling NrMacSchedulerUeInfoQos::UpdateQosUlMetric.
void NotAssignedDlResources(const UePtrAndBufferReq &ue, const FTResources &notAssigned, const FTResources &totAssigned) 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.
static TypeId GetTypeId()
GetTypeId.
NrMacSchedulerTdmaQos()
NrMacSchedulerTdmaQos constructor.
void AssignedUlResources(const UePtrAndBufferReq &ue, const FTResources &assigned, const FTResources &totAssigned) const override
Update UL metrics by calling NrMacSchedulerUeInfoQos::UpdateQosUlMetric.
~NrMacSchedulerTdmaQos() override
~NrMacSchedulerTdmaQos deconstructor
void BeforeDlSched(const UePtrAndBufferReq &ue, const FTResources &assignableInIteration) const override
Calculate the potential throughput for the DL based on the available resources.
std::shared_ptr< NrMacSchedulerUeInfo > CreateUeRepresentation(const NrMacCschedSapProvider::CschedUeConfigReqParameters &params) const override
Create an UE representation of the type NrMacSchedulerUeInfoQos.
void AssignedDlResources(const UePtrAndBufferReq &ue, const FTResources &assigned, const FTResources &totAssigned) const override
Update DL metrics by calling NrMacSchedulerUeInfoQos::UpdateQosDlMetric.
void BeforeUlSched(const UePtrAndBufferReq &ue, const FTResources &assignableInIteration) const override
Calculate the potential throughput for the UL based on the available resources.
double GetTimeWindow() const
Get the attribute "LastAvgTPutWeight".
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 SetTimeWindow(double v)
Set the attribute "LastAvgTPutWeight".
double GetFairnessIndex() const
Get the value of attribute "FairnessIndex".
void SetFairnessIndex(double v)
Set the value of attribute "FairnessIndex".
Assign entire symbols in a round-robin fashion.