5G-LENA nr-v3.3-120-gdac69c56
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
nr-mac-scheduler-tdma-mr.cc
1// Copyright (c) 2019 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
2//
3// SPDX-License-Identifier: GPL-2.0-only
4
5#include "nr-mac-scheduler-tdma-mr.h"
6
7#include "nr-mac-scheduler-ue-info-mr.h"
8
9namespace ns3
10{
11NS_LOG_COMPONENT_DEFINE("NrMacSchedulerTdmaMR");
12NS_OBJECT_ENSURE_REGISTERED(NrMacSchedulerTdmaMR);
13
14TypeId
16{
17 static TypeId tid = TypeId("ns3::NrMacSchedulerTdmaMR")
18 .SetParent<NrMacSchedulerTdmaRR>()
19 .AddConstructor<NrMacSchedulerTdmaMR>();
20 return tid;
21}
22
27
28std::shared_ptr<NrMacSchedulerUeInfo>
31{
32 NS_LOG_FUNCTION(this);
33 return std::make_shared<NrMacSchedulerUeInfoMR>(
34 params.m_rnti,
35 params.m_beamId,
36 std::bind(&NrMacSchedulerTdmaMR::GetNumRbPerRbg, this));
37}
38
39std::function<bool(const NrMacSchedulerNs3::UePtrAndBufferReq& lhs,
45
46std::function<bool(const NrMacSchedulerNs3::UePtrAndBufferReq& lhs,
52
53} // namespace ns3
uint64_t GetNumRbPerRbg() const
Private function that is used to get the number of resource blocks per resource block group and also ...
std::pair< UePtr, uint32_t > UePtrAndBufferReq
Pair between a pointer to NrMacSchedulerUeInfo and its buffer occupancy.
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.
std::shared_ptr< NrMacSchedulerUeInfo > CreateUeRepresentation(const NrMacCschedSapProvider::CschedUeConfigReqParameters &params) const override
Create an UE representation of the type NrMacSchedulerUeInfoMR.
static TypeId GetTypeId()
GetTypeId.
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.
NrMacSchedulerTdmaMR()
NrMacSchedulerTdmaMR constructor.
Assign entire symbols in a round-robin fashion.
static bool CompareUeWeightsDl(const NrMacSchedulerNs3::UePtrAndBufferReq &lue, const NrMacSchedulerNs3::UePtrAndBufferReq &rue)
comparison function object (i.e. an object that satisfies the requirements of Compare) which returns ...
static bool CompareUeWeightsUl(const NrMacSchedulerNs3::UePtrAndBufferReq &lue, const NrMacSchedulerNs3::UePtrAndBufferReq &rue)
comparison function object (i.e. an object that satisfies the requirements of Compare) which returns ...