5G-LENA nr-v3.3-159-ga6832aa7
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
nr-mac-scheduler-ofdma-rr.h
1// Copyright (c) 2019 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-ofdma.h"
8
9namespace ns3
10{
11
30{
31 public:
36 static TypeId GetTypeId();
37
42
47 {
48 }
49
50 protected:
56 std::shared_ptr<NrMacSchedulerUeInfo> CreateUeRepresentation(
57 const NrMacCschedSapProvider::CschedUeConfigReqParameters& params) const override;
58
63 std::function<bool(const NrMacSchedulerNs3::UePtrAndBufferReq& lhs,
65 GetUeCompareDlFn() const override;
66
71 std::function<bool(const NrMacSchedulerNs3::UePtrAndBufferReq& lhs,
73 GetUeCompareUlFn() const override;
74
84 const FTResources& assigned,
85 const FTResources& totAssigned) const override;
86
96 const FTResources& assigned,
97 const FTResources& totAssigned) const override;
98
99 // RR is a simple scheduler: it doesn't do anything in the next
100 // inherited calls.
102 const FTResources& notAssigned,
103 const FTResources& totalAssigned) const override
104 {
105 }
106
108 const FTResources& notAssigned,
109 const FTResources& totalAssigned) const override
110 {
111 }
112
114 const FTResources& assignableInIteration) const override
115 {
116 }
117
119 const FTResources& assignableInIteration) const override
120 {
121 }
122};
123
124} // 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.
The base for all the OFDMA schedulers.
Assign frequencies in a round-robin fashion.
static TypeId GetTypeId()
GetTypeId.
void NotAssignedDlResources(const UePtrAndBufferReq &ue, const FTResources &notAssigned, const FTResources &totalAssigned) const override
Update the UE representation after a symbol (DL) has been assigned to other UE.
~NrMacSchedulerOfdmaRR() override
~NrMacSchedulerTdmaRR deconstructor
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 NrMacSchedulerUeInfoRR.
void AssignedUlResources(const UePtrAndBufferReq &ue, const FTResources &assigned, const FTResources &totAssigned) const override
Update the UE representation after a symbol (DL) has been assigned to it.
NrMacSchedulerOfdmaRR()
NrMacSchedulerTdmaRR constructor.
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 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 NotAssignedUlResources(const UePtrAndBufferReq &ue, const FTResources &notAssigned, const FTResources &totalAssigned) const override
Update the UE representation after a symbol (UL) has been assigned to other UE.
void BeforeDlSched(const UePtrAndBufferReq &ue, const FTResources &assignableInIteration) const override
Prepare UE for the DL scheduling.
void BeforeUlSched(const UePtrAndBufferReq &ue, const FTResources &assignableInIteration) const override
Prepare UE for the UL scheduling.
Point in the Frequency/Time plane.