5G-LENA nr-v3.3-120-gdac69c56
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
nr-mac-scheduler-tdma-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-tdma.h"
8
9namespace ns3
10{
11
29{
30 public:
35 static TypeId GetTypeId();
36
41
46 {
47 }
48
49 protected:
55 std::shared_ptr<NrMacSchedulerUeInfo> CreateUeRepresentation(
56 const NrMacCschedSapProvider::CschedUeConfigReqParameters& params) const override;
57
62 std::function<bool(const NrMacSchedulerNs3::UePtrAndBufferReq& lhs,
64 GetUeCompareDlFn() const override;
65
70 std::function<bool(const NrMacSchedulerNs3::UePtrAndBufferReq& lhs,
72 GetUeCompareUlFn() const override;
73
83 const FTResources& assigned,
84 const FTResources& totAssigned) const override;
85
95 const FTResources& assigned,
96 const FTResources& totAssigned) const override;
97
98 // RR is a simple scheduler: it doesn't do anything in the next
99 // inherited calls.
101 const FTResources& notAssigned,
102 const FTResources& totalAssigned) const override
103 {
104 }
105
107 const FTResources& notAssigned,
108 const FTResources& totalAssigned) const override
109 {
110 }
111
113 const FTResources& assignableInIteration) const override
114 {
115 }
116
118 const FTResources& assignableInIteration) const override
119 {
120 }
121};
122
123} // 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 TDMA schedulers.
Assign entire symbols in a round-robin fashion.
void BeforeDlSched(const UePtrAndBufferReq &ue, const FTResources &assignableInIteration) const override
Prepare UE for the DL scheduling.
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.
std::shared_ptr< NrMacSchedulerUeInfo > CreateUeRepresentation(const NrMacCschedSapProvider::CschedUeConfigReqParameters &params) const override
Create an UE representation of the type NrMacSchedulerUeInfoRR.
NrMacSchedulerTdmaRR()
NrMacSchedulerTdmaRR constructor.
void BeforeUlSched(const UePtrAndBufferReq &ue, const FTResources &assignableInIteration) const override
Prepare UE for the UL scheduling.
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 the UE representation after a symbol (UL) has been assigned to other UE.
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.
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.
static TypeId GetTypeId()
GetTypeId.
~NrMacSchedulerTdmaRR() override
~NrMacSchedulerTdmaRR deconstructor
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.
Point in the Frequency/Time plane.