5G-LENA nr-v3.1-69-g2dd513a7
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
ns3::NrMacSchedulerNs3 Class Referenceabstract

A general scheduler for nr in NS3. More...

#include "nr-mac-scheduler-ns3.h"

+ Inheritance diagram for ns3::NrMacSchedulerNs3:
+ Collaboration diagram for ns3::NrMacSchedulerNs3:

Classes

struct  PointInFTPlane
 Point in the Frequency/Time plane. More...
 

Public Types

typedef std::unordered_map< BeamId, HarqVectorIteratorList, BeamIdHashActiveHarqMap
 Map between a beamID and the HARQ of that beam.
 
typedef std::unordered_map< BeamId, std::vector< UePtrAndBufferReq >, BeamIdHashActiveUeMap
 Map between a BeamId and a vector of UE (the UE are in that beam)
 
typedef std::unordered_map< BeamId, uint32_t, BeamIdHashBeamSymbolMap
 Map between a BeamId and the symbol assigned to that beam.
 
typedef PointInFTPlane FTResources
 Represent an amount of RBG/symbols that can be, or is, assigned.
 
using HarqVectorIterator = NrMacHarqVector::iterator
 
using HarqVectorIteratorList = std::vector< HarqVectorIterator >
 
typedef std::pair< UePtr, uint32_t > UePtrAndBufferReq
 Pair between a pointer to NrMacSchedulerUeInfo and its buffer occupancy.
 

Public Member Functions

 NrMacSchedulerNs3 ()
 NrMacSchedulerNs3 default constructor.
 
 NrMacSchedulerNs3 (const NrMacSchedulerNs3 &other)=delete
 NrMacSchedulerNs3 copy constructor (deleted)
 
 ~NrMacSchedulerNs3 () override
 NrMacSchedulerNs3 deconstructor.
 
int64_t AssignStreams (int64_t stream) override
 Assign a fixed random variable stream number to the random variables used by this model. Return the number of streams (possibly zero) that have been assigned.
 
void DoCschedCellConfigReq (const NrMacCschedSapProvider::CschedCellConfigReqParameters &params) override
 Cell configuration.
 
void DoCschedLcConfigReq (const NrMacCschedSapProvider::CschedLcConfigReqParameters &params) override
 Configure a logical channel for a UE.
 
void DoCschedLcReleaseReq (const NrMacCschedSapProvider::CschedLcReleaseReqParameters &params) override
 Release a LC.
 
void DoCschedUeConfigReq (const NrMacCschedSapProvider::CschedUeConfigReqParameters &params) override
 Register an UE.
 
void DoCschedUeReleaseReq (const NrMacCschedSapProvider::CschedUeReleaseReqParameters &params) override
 Release an UE.
 
void DoSchedDlCqiInfoReq (const NrMacSchedSapProvider::SchedDlCqiInfoReqParameters &params) override
 Received a DL CQI message.
 
void DoSchedDlRachInfoReq (const NrMacSchedSapProvider::SchedDlRachInfoReqParameters &params) override
 RACH information.
 
void DoSchedDlRlcBufferReq (const NrMacSchedSapProvider::SchedDlRlcBufferReqParameters &params) override
 RLC informs of DL data.
 
void DoSchedDlTriggerReq (const NrMacSchedSapProvider::SchedDlTriggerReqParameters &params) override
 Decide how to fill the frequency/time of a DL slot.
 
void DoSchedSetMcs (uint32_t mcs) override
 Set a fixed MCS.
 
void DoSchedUlCqiInfoReq (const NrMacSchedSapProvider::SchedUlCqiInfoReqParameters &params) override
 Received a UL CQI message.
 
void DoSchedUlMacCtrlInfoReq (const NrMacSchedSapProvider::SchedUlMacCtrlInfoReqParameters &params) override
 Evaluate different types of control messages (only BSR for the moment)
 
void DoSchedUlSrInfoReq (const NrMacSchedSapProvider::SchedUlSrInfoReqParameters &params) override
 Save the SR list into m_srList.
 
void DoSchedUlTriggerReq (const NrMacSchedSapProvider::SchedUlTriggerReqParameters &params) override
 Decide how to fill the frequency/time of a UL slot.
 
void EnableHarqReTx (bool enableFlag)
 Enable HARQ ReTx function.
 
Time GetCqiTimerThreshold () const
 Get the CqiTimerThreshold.
 
Ptr< const NrAmcGetDlAmc () const
 Get the AMC for DL.
 
uint8_t GetDlCtrlSyms () const override
 Retrieve the number of DL ctrl symbols configured in the scheduler.
 
std::vector< uint8_t > GetDlNotchedRbgMask () const
 Get the notched (blank) RBGs Mask for the DL.
 
int8_t GetMaxDlMcs () const
 Get the maximum DL MCS index.
 
uint8_t GetSrsCtrlSyms () const
 Get the configured value for the SRS symbols.
 
uint8_t GetStartMcsDl () const
 Get the DL MCS starting value.
 
uint8_t GetStartMcsUl () const
 Get the DL MCS starting value.
 
Ptr< const NrAmcGetUlAmc () const
 Get the AMC for UL.
 
uint8_t GetUlCtrlSyms () const override
 Retrieve the number of UL ctrl symbols configured in the scheduler.
 
std::vector< uint8_t > GetUlNotchedRbgMask () const
 Get the notched (blank) RBGs Mask for the UL.
 
void InstallDlAmc (const Ptr< NrAmc > &dlAmc)
 Install the AMC for the DL part.
 
void InstallUlAmc (const Ptr< NrAmc > &ulAmc)
 Install the AMC for the DL part.
 
bool IsDlMcsFixed () const
 Check if the MCS in DL is fixed.
 
bool IsHarqReTxEnable () const
 Is HARQ ReTx enable function.
 
bool IsSrsInFSlots () const
 Check if the F slots are allowed for SRS transmission.
 
bool IsSrsInUlSlots () const
 Check if the UL slots are allowed for SRS transmission.
 
bool IsUlMcsFixed () const
 Check if the MCS in UL is fixed.
 
void SetCqiTimerThreshold (const Time &v)
 Set the CqiTimerThreshold.
 
void SetDlCtrlSyms (uint8_t v)
 Set the number of DL ctrl symbols.
 
void SetDlNotchedRbgMask (const std::vector< uint8_t > &dlNotchedRbgsMask)
 Set the notched (blank) RBGs Mask for the DL.
 
void SetFixedDlMcs (bool v)
 Set if the MCS in DL is fixed (in case, it will take the starting value)
 
void SetFixedUlMcs (bool v)
 Set if the MCS in UL is fixed (in case, it will take the starting value)
 
void SetLcSched (const TypeId &type)
 Set LC Scheduler Algorithm model type.
 
void SetMaxDlMcs (int8_t v)
 Set the maximum index for the DL MCS.
 
void SetRachUlGrantMcs (uint8_t v)
 Sets the default RACH UL grant MCS.
 
void SetSrsCtrlSyms (uint8_t v)
 Set the number of UL SRS symbols.
 
void SetSrsInFSlots (bool v)
 Set if the F slots are allowed for SRS transmission.
 
void SetSrsInUlSlots (bool v)
 Set if the UL slots are allowed for SRS transmission (if True, UL and F slots may carry SRS, if False, SRS are transmitted only in F slots)
 
void SetStartMcsDl (uint8_t v)
 Set the starting value for the DL MCS.
 
void SetStartMcsUl (uint8_t v)
 Set the starting value for the UL MCS.
 
void SetUlCtrlSyms (uint8_t v)
 Set the number of UL ctrl symbols.
 
void SetUlNotchedRbgMask (const std::vector< uint8_t > &ulNotchedRbgsMask)
 Set the notched (blank) RBGs Mask for the UL.
 
- Public Member Functions inherited from ns3::NrMacScheduler
 NrMacScheduler ()
 NrMacScheduler constructor.
 
 ~NrMacScheduler () override
 NrMacScheduler deconstructor.
 
NrMacCschedSapProviderGetMacCschedSapProvider ()
 Get the MacCschedSapProvider pointer.
 
NrMacSchedSapProviderGetMacSchedSapProvider ()
 Get the MacSchedSapProvider pointer.
 
void SetMacCschedSapUser (NrMacCschedSapUser *sap)
 SetMacCschedSapUser.
 
void SetMacSchedSapUser (NrMacSchedSapUser *sap)
 Set the MacSchedSapUser pointer.
 

Static Public Member Functions

static TypeId GetTypeId ()
 GetTypeId.
 
- Static Public Member Functions inherited from ns3::NrMacScheduler
static TypeId GetTypeId ()
 Get the type id.
 

Protected Member Functions

virtual BeamSymbolMap AssignDLRBG (uint32_t symAvail, const ActiveUeMap &activeDl) const =0
 Assign the DL RBG to the active UE, and return the distribution of symbols per beam.
 
virtual BeamSymbolMap AssignULRBG (uint32_t symAvail, const ActiveUeMap &activeUl) const =0
 Assign the UL RBG to the active UE, and return the distribution of symbols per beam.
 
virtual void ChangeDlBeam (PointInFTPlane *spoint, uint32_t symOfBeam) const =0
 Perform a custom operation on the starting point each time all the UE of a DL beam have been scheduled.
 
virtual void ChangeUlBeam (PointInFTPlane *spoint, uint32_t symOfBeam) const =0
 Perform a custom operation on the starting point each time all the UE of an UL beam have been scheduled.
 
virtual std::shared_ptr< DciInfoElementTdmaCreateDlDci (PointInFTPlane *spoint, const std::shared_ptr< NrMacSchedulerUeInfo > &ueInfo, uint32_t maxSym) const =0
 Create a DCI for the specified UE for DL data.
 
virtual LCPtr CreateLC (const nr::LogicalChannelConfigListElement_s &config) const
 Create a logical channel starting from a configuration.
 
virtual LCGPtr CreateLCG (const nr::LogicalChannelConfigListElement_s &config) const
 Create a logical channel group starting from a configuration.
 
virtual std::shared_ptr< NrMacSchedulerUeInfoCreateUeRepresentation (const NrMacCschedSapProvider::CschedUeConfigReqParameters &params) const =0
 Create an UE representation for the scheduler.
 
virtual std::shared_ptr< DciInfoElementTdmaCreateUlDci (PointInFTPlane *spoint, const std::shared_ptr< NrMacSchedulerUeInfo > &ueInfo, uint32_t maxSym) const =0
 Create a DCI for the specified UE for UL data.
 
uint16_t GetBandwidthInRbg () const
 
uint16_t GetBwpId () const
 Get the bwp id of this MAC.
 
uint16_t GetCellId () const
 Get the cell id of this MAC.
 
uint64_t GetNumRbPerRbg () const
 Private function that is used to get the number of resource blocks per resource block group and also to check whether this value is configured.
 
virtual uint8_t GetTpc () const =0
 Returns TPC command.
 
virtual uint8_t ScheduleDlHarq (NrMacSchedulerNs3::PointInFTPlane *startingPoint, uint8_t symAvail, const ActiveHarqMap &activeDlHarq, const std::unordered_map< uint16_t, UePtr > &ueMap, std::vector< DlHarqInfo > *dlHarqToRetransmit, const std::vector< DlHarqInfo > &dlHarqFeedback, SlotAllocInfo *slotAlloc) const
 Giving the input, append to slotAlloc the allocations for the DL HARQ retransmissions.
 
virtual uint8_t ScheduleUlHarq (NrMacSchedulerNs3::PointInFTPlane *startingPoint, uint8_t symAvail, const std::unordered_map< uint16_t, UePtr > &ueMap, std::vector< UlHarqInfo > *ulHarqToRetransmit, const std::vector< UlHarqInfo > &ulHarqFeedback, SlotAllocInfo *slotAlloc) const
 Giving the input, append to slotAlloc the allocations for the DL HARQ retransmissions.
 
virtual void SortDlHarq (ActiveHarqMap *activeDlHarq) const
 Sort the DL HARQ retransmission.
 
virtual void SortUlHarq (ActiveHarqMap *activeUlHarq) const
 Sort the UL HARQ retransmission.
 

Protected Attributes

Ptr< NrAmcm_dlAmc
 AMC pointer.
 
Ptr< NrAmcm_ulAmc
 AMC pointer.
 
- Protected Attributes inherited from ns3::NrMacScheduler
NrMacCschedSapProviderm_macCschedSapProvider {nullptr}
 SAP Provider.
 
NrMacCschedSapUserm_macCschedSapUser {nullptr}
 SAP User.
 
NrMacSchedSapProviderm_macSchedSapProvider {nullptr}
 SAP Provider.
 
NrMacSchedSapUserm_macSchedSapUser {nullptr}
 SAP user.
 

Detailed Description

A general scheduler for nr in NS3.

This abstract class is taking care of creating a solid base for any schedulers in the nr world. The class implements all the API from the FemtoForum API, but in doing so, it defines a new interface that must be followed when designing and writing a new scheduler type.

The architecture has a unique representation of a UE, that is valid across all the schedulers. Each one can expand the definition, adding values or functions to call while doing the scheduler job. The base class is defined as NrMacSchedulerUeInfo. Please refer to its documentation to know the default values, and how to use or expand it.

The documentation continues by following every step involved in the scheduling. Please refer to the function documentation to see a detailed description of the steps done during all the phases.

Registration and Configuration

The attribute of any scheduler can be set directly calling SetAttribute on the pointer obtained through NrHelper::GetScheduler() or, before it is created, through NrHelper::SetSchedulerAttribute(). The type of the scheduler can be set only before its creation, through the method NrHelper::SetSchedulerTypeId().

User management (creation and removal)

When a user arrives in the cell, it is registered with a call to DoCschedUeConfigReq. When the user leaves, the class is made aware with a call to DoCschedUeReleaseReq. The only important operation is the creation of a UE representation and its storage in the general UE map (m_ueMap).

A UE is represented through the class NrMacSchedulerUeInfo, which is used in the internals of the general base class to store and retrieve information such as Logical Channels, CQI, and other things. Please refer to its documentation for a broader overview of its possibilities.

Cell configuration

The cell configuration, done with a call to DoCschedCellConfigReq, is ignored.

LC creation and removal

After the registration of a UE, the scheduler has to know how many bytes there are in its queue, for both uplink and downlink. Before that, the scheduler has to know how many Logical Channels are present for each UE (DL and UL). Each time an LC is created, the MAC calls the function DoCschedLcConfigReq(). Please refer to the documentation of NrMacSchedulerUeInfo to know the details of the LC and LC Groups representation in the code. The LC can be deleted with a call to DoCschedLcReleaseReq (currently not implemented).

A subclass of NrMacSchedulerNs3 can change the representation of an LC and LCG by merely creating an appropriate subclass of NrMacSchedulerLC or NrMacSchedulerLCG (the classes used by the default implementation to store information about the LC or LCG) and then reimplementing the methods CreateLCG() and CreateLC() to return a pointer to a created instance.

Updating the LC bytes

For the downlink case, the LC is updated with a message between the gNB RLC layer and the MAC. The scheduler receives a call to the method DoSchedDlRlcBufferReq(), and inside this method is updating all the LC amount.

For the uplink case, there are more passages involved. In the scheduler, however, the important this is that is called the method DoSchedUlMacCtrlInfoReq(). Inside this method, the BSR coming from UE is used to update the LC. More details can be found in the documentation of the class NrMacSchedulerLCG and NrMacSchedulerLC.

CQI Management

The CQI is based on a parameter (m_cqiTimersThreshold) that indicates how long a received CQI is valid. Every time that a Dl CQI is received, the MAC calls the function DoSchedDlCqiInfoReq. In here, the CQI list is traversed and each CQI is reported to the class NrMacSchedulerCQIManagement that is responsible for calculating the CQI. The value is then stored inside the UE representation, ready to be read in the future. The CQI is reset to the default value once the validity timer expires. The default value permits only to have an MCS value 0.

For the UL case, the MAC is calling the method DoSchedUlCqiInfoReq(). The CQI and MCS values are then derived by using a vector of SINR (see the documentation of the function for the details).

At the end of these evaluations, inside the UE representation, is available the value of the DL/UL MCS, ready to be used.

Scheduling phase

After gathering the information regarding CQI, active users and flows, it is time to take a look into how the class manages the most important thing, the scheduling. The work is about deciding how to fill the frequency/time space, assigning resources to HARQ retransmission or DL/UL new data transmission. The main scheduling function is NrMacSchedulerNs3::DoSchedTriggerReq.

CQI Management

The refreshing of CQI consists in evaluating the validity timer of the value. If the timer is equal to 0, the valued is expired, and the value is reset to the default (MCS 0). The operation is managed inside the class NrMacSchedulerCQIManagement, with the two functions NrMacSchedulerCQIManagement::RefreshDlCQIMaps and NrMacSchedulerCQIManagement::RefreshUlCQIMaps.

Process HARQ feedbacks

To decide if it is necessary to perform HARQ retransmission, and to decide how many retransmission perform, the first step is to evaluate the HARQ feedback received as input. The UEs are reporting the feedbacks, and these feedbacks are merged with the feedback of the previous slots that could not be transmitted (function MergeDlHARQ()). Then, the code evaluates these feedbacks by resetting HARQ processes with an ACK and preparing for the retransmission of the HARQ processes marked with NACK (ProcessHARQFeedbacks()) for both UL and DL HARQs.

At the end of the process, the code evaluates the HARQ timers, and reset the processes with an expired timer (ResetExpiredHARQ()).

To discover more about how HARQ processes are stored and managed, please take a look at the HarqProcess and NrMacHarqVector documentation.

The concept of scheduling

The scheduling of the resources is a process that should fill the slot time and the slot frequencies with retransmitted or fresh data. To simplify the model, you could think that there is a 2D plan in which the "y" values are the frequencies, and the "x" value is the time that passes. The plan should be filled with data, or better said, with a series of blocks. Each block is the minimum assignable resource, called Resource Block Group. There are constraints on how these RBG can be distributed, and often these constraints follow some limitation in the UE equipment, but also they are in place to limit the complexity of a problem which is computationally hard. The position of each block is defined by a starting point (PointInFTPlane) which is a pair (x,y) (or better said (sym, rb)) that represent a point from which a block should be positioned.

Please refer to the DoScheduling() documentation to know how the scheduling is performed.

Spatial multiplexing

The code does not support Spatial Multiplexing. It means that it is not possible to schedule UEs that are in different beams at the same time. While this has no practical effects on a time-based distribution of resources, it affects the frequency-based distribution. Therefore, to support both operational modes, the scheduler should compute beforehand the number of active UEs, as well as the number of retransmission to be done. These operations are done, respectively, by the methods ComputeActiveUe() and ComputeActiveHarq(). These methods work on data structures that group UE and retransmission by BeamID (ActiveUeMap and ActiveHarqMap).

Scheduling UL

It is worth explaining that the schedulers working on slot x for DL, are working on slot $x + y$ (where y is the value of N2 delay). This delay is implemented to simulate the fact that the UE receives the DCI at time $t$, and then has some time (the delay) to prepare its UL data. So, if the scheduler assigns some symbols for uplink data in slot $x + y$, after y slots have passed (and so the scheduler is preparing the slot $x+y$ for DL data and HARQ retransmission) the scheduler has to remember that there are fewer symbols available. Moreover, it is necessary to not overlap the decisions for DL on top of the (already taken) decision for UL.

All this details are considered in the functions ScheduleUl() and ScheduleDl().

HARQ

The HARQ scheduling is done, if symbols for HARQ are available, before transmitting new data, and this happens for both DL and UL. The detailed documentation is available in the methods ScheduleDlHarq() and ScheduleUlHarq().

Scheduling new data

The scheduling of new data is performed by functions ScheduleUlData() and ScheduleDlData(). The priority is for HARQ retransmission, so if the retransmissions fill the slot time, there will no symbols available for new data. Please refer to the method documentation for more detailed information about the scheduling process of new data.

An interesting operation which is not enforced in the current scheduler version is how to distribute the assigned bytes to the different LC of a UE. Now it is implemented the RR assignment, but it can be modified (method AssignBytesToLC()).

The available schedulers are TDMA and OFDMA version of the Round Robin, Proportional Fair, and Maximum Rate.

See also
NrMacSchedulerOfdmaPF
NrMacSchedulerOfdmaRR
NrMacSchedulerOfdmaMR
NrMacSchedulerTdmaPF
NrMacSchedulerTdmaRR
NrMacSchedulerTdmaMR

Config Paths

ns3::NrMacSchedulerNs3 is accessible through the following paths with Config::Set and Config::Connect:

Attributes

  • CqiTimerThreshold: The time while a CQI is valid
    • Set with class: ns3::TimeValue
    • Underlying type: Time +9.22337e+18ns:+9.22337e+18ns
    • Initial value: +1e+09ns
    • Flags: construct write read
  • FixedMcsDl: Fix MCS to value set in StartingMcsDl
    • Set with class: ns3::BooleanValue
    • Underlying type: bool
    • Initial value: false
    • Flags: construct write read
  • FixedMcsUl: Fix MCS to value set in StartingMcsUl
    • Set with class: ns3::BooleanValue
    • Underlying type: bool
    • Initial value: false
    • Flags: construct write read
  • StartingMcsDl: Starting MCS for DL
    • Set with class: ns3::UintegerValue
    • Underlying type: uint8_t 0:255
    • Initial value: 0
    • Flags: construct write read
  • StartingMcsUl: Starting MCS for UL
    • Set with class: ns3::UintegerValue
    • Underlying type: uint8_t 0:255
    • Initial value: 0
    • Flags: construct write read
  • DlCtrlSymbols: Number of symbols allocated for DL CTRL
    • Set with class: ns3::UintegerValue
    • Underlying type: uint8_t 0:255
    • Initial value: 1
    • Flags: construct write read
  • UlCtrlSymbols: Number of symbols allocated for UL CTRL
    • Set with class: ns3::UintegerValue
    • Underlying type: uint8_t 0:255
    • Initial value: 1
    • Flags: construct write read
  • SrsSymbols: Number of symbols allocated for UL SRS
    • Set with class: ns3::UintegerValue
    • Underlying type: uint8_t 0:255
    • Initial value: 1
    • Flags: construct write read
  • EnableSrsInUlSlots: Denotes whether the SRSs will be transmitted only in F slotsor both in F and UL slots. If False, SRS is transmitted onlyin F slots, if True in both (F/UL)
    • Set with class: ns3::BooleanValue
    • Underlying type: bool
    • Initial value: true
    • Flags: construct write read
  • EnableSrsInFSlots: Denotes whether the SRSs will be transmitted in F slotsIf true, it can be transmitted in F slots, otherwise it cannot.
    • Set with class: ns3::BooleanValue
    • Underlying type: bool
    • Initial value: true
    • Flags: construct write read
  • DlAmc: The DL AMC of this scheduler
    • Set with class: ns3::PointerValue
    • Underlying type: ns3::Ptr< ns3::NrAmc>
    • Initial value: 0
    • Flags: construct write read
  • UlAmc: The UL AMC of this scheduler
    • Set with class: ns3::PointerValue
    • Underlying type: ns3::Ptr< ns3::NrAmc>
    • Initial value: 0
    • Flags: construct write read
  • MaxDlMcs: Maximum MCS index for DL
    • Set with class: ns3::IntegerValue
    • Underlying type: int8_t -1:30
    • Initial value: -1
    • Flags: construct write read
  • EnableHarqReTx: If true, it would set the max HARQ ReTx to 3; otherwise it set it to 0
    • Set with class: ns3::BooleanValue
    • Underlying type: bool
    • Initial value: true
    • Flags: construct write read
  • SchedLcAlgorithmType: Type of the scheduling algorithm that assigns bytes to the different LCs.
    • Set with class: ns3::TypeIdValue
    • Underlying type: TypeId
    • Initial value: ns3::NrMacSchedulerLcRR
    • Flags: construct write
  • RachUlGrantMcs: The MCS of the RACH UL grant, must be [0..15] (default 0)
    • Set with class: ns3::UintegerValue
    • Underlying type: uint8_t 0:255
    • Initial value: 0
    • Flags: construct write

No TraceSources are defined for this type.
Size of this type is 616 bytes (on a 64-bit architecture).

Definition at line 226 of file nr-mac-scheduler-ns3.h.

Member Typedef Documentation

◆ ActiveHarqMap

typedef std::unordered_map<BeamId, HarqVectorIteratorList, BeamIdHash> ns3::NrMacSchedulerNs3::ActiveHarqMap

Map between a beamID and the HARQ of that beam.

Definition at line 364 of file nr-mac-scheduler-ns3.h.

◆ ActiveUeMap

typedef std::unordered_map<BeamId, std::vector<UePtrAndBufferReq>, BeamIdHash> ns3::NrMacSchedulerNs3::ActiveUeMap

Map between a BeamId and a vector of UE (the UE are in that beam)

Definition at line 356 of file nr-mac-scheduler-ns3.h.

◆ BeamSymbolMap

typedef std::unordered_map<BeamId, uint32_t, BeamIdHash> ns3::NrMacSchedulerNs3::BeamSymbolMap

Map between a BeamId and the symbol assigned to that beam.

Definition at line 360 of file nr-mac-scheduler-ns3.h.

◆ FTResources

Represent an amount of RBG/symbols that can be, or is, assigned.

Definition at line 304 of file nr-mac-scheduler-ns3.h.

◆ HarqVectorIterator

using ns3::NrMacSchedulerNs3::HarqVectorIterator = NrMacHarqVector::iterator

Definition at line 346 of file nr-mac-scheduler-ns3.h.

◆ HarqVectorIteratorList

using ns3::NrMacSchedulerNs3::HarqVectorIteratorList = std::vector<HarqVectorIterator>

Definition at line 347 of file nr-mac-scheduler-ns3.h.

◆ UePtrAndBufferReq

typedef std::pair<UePtr, uint32_t> ns3::NrMacSchedulerNs3::UePtrAndBufferReq

Pair between a pointer to NrMacSchedulerUeInfo and its buffer occupancy.

Definition at line 352 of file nr-mac-scheduler-ns3.h.

Constructor & Destructor Documentation

◆ NrMacSchedulerNs3() [1/2]

ns3::NrMacSchedulerNs3::NrMacSchedulerNs3 ( )

◆ NrMacSchedulerNs3() [2/2]

ns3::NrMacSchedulerNs3::NrMacSchedulerNs3 ( const NrMacSchedulerNs3 other)
delete

NrMacSchedulerNs3 copy constructor (deleted)

Parameters
otherinstance of NrMacSchedulerNs3 to be copied

◆ ~NrMacSchedulerNs3()

ns3::NrMacSchedulerNs3::~NrMacSchedulerNs3 ( )
override

NrMacSchedulerNs3 deconstructor.

Definition at line 56 of file nr-mac-scheduler-ns3.cc.

Member Function Documentation

◆ AssignDLRBG()

virtual BeamSymbolMap ns3::NrMacSchedulerNs3::AssignDLRBG ( uint32_t  symAvail,
const ActiveUeMap activeDl 
) const
protectedpure virtual

Assign the DL RBG to the active UE, and return the distribution of symbols per beam.

Parameters
symAvailavailable symbols for DL
activeDlMap of Beam and active UE per beam
Returns
a map of symbols dedicated to each beam

The function should assign RBG to each UE, modifying the value m_dlRBG for each UE in the activeDl map. In doing so, it has to calculate the number of symbols assigned to each beam, and return it to the caller.

The creation of DCI will be performed by calling CreateDlDci with the appropriate input parameters.

Implemented in ns3::NrMacSchedulerOfdma, and ns3::NrMacSchedulerTdma.

◆ AssignStreams()

int64_t ns3::NrMacSchedulerNs3::AssignStreams ( int64_t  stream)
overridevirtual

Assign a fixed random variable stream number to the random variables used by this model. Return the number of streams (possibly zero) that have been assigned.

Parameters
streamfirst stream index to use
Returns
the number of stream indices assigned by this model

Implements ns3::NrMacScheduler.

Definition at line 90 of file nr-mac-scheduler-ns3.cc.

◆ AssignULRBG()

virtual BeamSymbolMap ns3::NrMacSchedulerNs3::AssignULRBG ( uint32_t  symAvail,
const ActiveUeMap activeUl 
) const
protectedpure virtual

Assign the UL RBG to the active UE, and return the distribution of symbols per beam.

Parameters
symAvailavailable symbols for UL
activeUlMap of Beam and active UE per beam
Returns
a map of symbols dedicated to each beam

The function should assign RBG to each UE, modifying the value m_ulRBG for each UE in the activeUl map. In doing so, it has to calculate the number of symbols assigned to each UE, and return it to the caller.

The creation of DCI will be performed by calling CreateDlDci with the appropriate input parameters.

Implemented in ns3::NrMacSchedulerOfdma, and ns3::NrMacSchedulerTdma.

◆ ChangeDlBeam()

virtual void ns3::NrMacSchedulerNs3::ChangeDlBeam ( PointInFTPlane spoint,
uint32_t  symOfBeam 
) const
protectedpure virtual

Perform a custom operation on the starting point each time all the UE of a DL beam have been scheduled.

Parameters
spointstarting point for the next beam to modify
symOfBeamnumber the symbol used for the beam

Implemented in ns3::NrMacSchedulerOfdma, and ns3::NrMacSchedulerTdma.

◆ ChangeUlBeam()

virtual void ns3::NrMacSchedulerNs3::ChangeUlBeam ( PointInFTPlane spoint,
uint32_t  symOfBeam 
) const
protectedpure virtual

Perform a custom operation on the starting point each time all the UE of an UL beam have been scheduled.

Parameters
spointstarting point for the next beam to modify
symOfBeamnumber the symbol used for the beam

Implemented in ns3::NrMacSchedulerOfdma, and ns3::NrMacSchedulerTdma.

◆ CreateDlDci()

virtual std::shared_ptr< DciInfoElementTdma > ns3::NrMacSchedulerNs3::CreateDlDci ( PointInFTPlane spoint,
const std::shared_ptr< NrMacSchedulerUeInfo > &  ueInfo,
uint32_t  maxSym 
) const
protectedpure virtual

Create a DCI for the specified UE for DL data.

Parameters
spointStarting point
ueInfoUE specified
maxSymmaximum amount of symbols that can be assigned
Returns
a pointer to the DciInfoElementTdma

The function should create a block in the 2D frequency-time plane in which the specified UE will receive the DL data.

Implemented in ns3::NrMacSchedulerOfdma, and ns3::NrMacSchedulerTdma.

◆ CreateLC()

LCPtr ns3::NrMacSchedulerNs3::CreateLC ( const nr::LogicalChannelConfigListElement_s config) const
protectedvirtual

Create a logical channel starting from a configuration.

Parameters
configconfiguration of the logical channel

A subclass can return its own representation of a logical channel by implementing a proper subclass of NrMacSchedulerLC and returning a pointer to a newly created instance.

Returns
a pointer to the representation of a logical channel

Definition at line 614 of file nr-mac-scheduler-ns3.cc.

Referenced by DoCschedLcConfigReq().

+ Here is the caller graph for this function:

◆ CreateLCG()

LCGPtr ns3::NrMacSchedulerNs3::CreateLCG ( const nr::LogicalChannelConfigListElement_s config) const
protectedvirtual

Create a logical channel group starting from a configuration.

Parameters
configconfiguration of the logical channel group

A subclass can return its own representation of a logical channel by implementing a proper subclass of NrMacSchedulerLCG and returning a pointer to a newly created instance.

Returns
a pointer to the representation of a logical channel group

Definition at line 631 of file nr-mac-scheduler-ns3.cc.

References ns3::nr::LogicalChannelConfigListElement_s::m_logicalChannelGroup.

Referenced by DoCschedLcConfigReq().

+ Here is the caller graph for this function:

◆ CreateUeRepresentation()

virtual std::shared_ptr< NrMacSchedulerUeInfo > ns3::NrMacSchedulerNs3::CreateUeRepresentation ( const NrMacCschedSapProvider::CschedUeConfigReqParameters params) const
protectedpure virtual

Create an UE representation for the scheduler.

The representation must save any important UE-specific value, and it is shared across all the subclasses. A scheduler which want to save any additional value per-UE, must subclass the class NrMacSchedulerUeInfo and return a pointer to an instance of the new type.

Parameters
paramsConfigure parameters for the UE
Returns
a pointer to the UE representation to save in the UE map (m_ueMap).

Implemented in ns3::NrMacSchedulerOfdmaMR, ns3::NrMacSchedulerOfdmaPF, ns3::NrMacSchedulerOfdmaQos, ns3::NrMacSchedulerOfdmaRR, ns3::NrMacSchedulerTdmaMR, ns3::NrMacSchedulerTdmaPF, ns3::NrMacSchedulerTdmaQos, and ns3::NrMacSchedulerTdmaRR.

Referenced by DoCschedUeConfigReq().

+ Here is the caller graph for this function:

◆ CreateUlDci()

virtual std::shared_ptr< DciInfoElementTdma > ns3::NrMacSchedulerNs3::CreateUlDci ( PointInFTPlane spoint,
const std::shared_ptr< NrMacSchedulerUeInfo > &  ueInfo,
uint32_t  maxSym 
) const
protectedpure virtual

Create a DCI for the specified UE for UL data.

Parameters
spointStarting point
ueInfoUE specified
maxSymmaximum amount of symbols that can be assigned
Returns
a pointer to the DciInfoElementTdma

The function should create a block in the 2D frequency-time plane in which the specified UE will receive the UL data.

Implemented in ns3::NrMacSchedulerOfdma, and ns3::NrMacSchedulerTdma.

◆ DoCschedCellConfigReq()

void ns3::NrMacSchedulerNs3::DoCschedCellConfigReq ( const NrMacCschedSapProvider::CschedCellConfigReqParameters params)
overridevirtual

◆ DoCschedLcConfigReq()

void ns3::NrMacSchedulerNs3::DoCschedLcConfigReq ( const NrMacCschedSapProvider::CschedLcConfigReqParameters params)
overridevirtual

Configure a logical channel for a UE.

Parameters
paramsthe params of the LC

The UE should be previously registered in the UE map. Then, for each logical channel to configure, the UE representation is updated, creating an empty LC. When the direction is set to DIR_BOTH, both UL and DL are created.

Each LC is assigned to a LC group (LCG). If the group does not exists, then it is created through the method CreateLCG, and then saved in the UE representation. If the LCG exists or has been created, then the LC creation is done through the method CreateLC and then saved in the UE representation.

Implements ns3::NrMacScheduler.

Definition at line 651 of file nr-mac-scheduler-ns3.cc.

References CreateLC(), and CreateLCG().

+ Here is the call graph for this function:

◆ DoCschedLcReleaseReq()

void ns3::NrMacSchedulerNs3::DoCschedLcReleaseReq ( const NrMacCschedSapProvider::CschedLcReleaseReqParameters params)
overridevirtual

Release a LC.

Parameters
paramsparams of the LC to release.

Implements ns3::NrMacScheduler.

Definition at line 719 of file nr-mac-scheduler-ns3.cc.

◆ DoCschedUeConfigReq()

void ns3::NrMacSchedulerNs3::DoCschedUeConfigReq ( const NrMacCschedSapProvider::CschedUeConfigReqParameters params)
overridevirtual

Register an UE.

Parameters
paramsparams of the UE

If the UE is not registered, then create its representation with a call to CreateUeRepresentation, and then save its pointer in the m_ueMap map.

If the UE is registered, update its corresponding beam.

Implements ns3::NrMacScheduler.

Definition at line 526 of file nr-mac-scheduler-ns3.cc.

References CreateUeRepresentation(), ns3::NrMacSchedSapUser::GetNumHarqProcess(), ns3::NrMacCschedSapProvider::CschedUeConfigReqParameters::m_beamId, ns3::NrMacSchedulerSrs::SrsPeriodicityAndOffset::m_isValid, ns3::NrMacScheduler::m_macSchedSapUser, ns3::NrMacSchedulerSrs::SrsPeriodicityAndOffset::m_offset, and ns3::NrMacSchedulerSrs::SrsPeriodicityAndOffset::m_periodicity.

+ Here is the call graph for this function:

◆ DoCschedUeReleaseReq()

void ns3::NrMacSchedulerNs3::DoCschedUeReleaseReq ( const NrMacCschedSapProvider::CschedUeReleaseReqParameters params)
overridevirtual

Release an UE.

Parameters
paramsparams of the UE to release

Remove the UE from the ueMap (m_ueMap) and release its SRS offset for later usage.

Implements ns3::NrMacScheduler.

Definition at line 580 of file nr-mac-scheduler-ns3.cc.

◆ DoSchedDlCqiInfoReq()

void ns3::NrMacSchedulerNs3::DoSchedDlCqiInfoReq ( const NrMacSchedSapProvider::SchedDlCqiInfoReqParameters params)
overridevirtual

Received a DL CQI message.

Parameters
paramsDL CQI message

For each message in the list, calculate the expiration time in number of slots, and then pass all the information to the NrMacSchedulerCQIManagement class.

If the CQI is sub-band, the method NrMacSchedulerCQIManagement::SBCQIReported will be called, otherwise NrMacSchedulerCQIManagement::WBCQIReported.

Implements ns3::NrMacScheduler.

Definition at line 847 of file nr-mac-scheduler-ns3.cc.

References ns3::NrMacSchedulerCQIManagement::DlSBCQIReported(), ns3::NrMacSchedulerCQIManagement::DlWBCQIReported(), ns3::NrMacSchedSapUser::GetSlotPeriod(), ns3::NrMacSchedSapProvider::SchedDlCqiInfoReqParameters::m_cqiList, ns3::NrMacScheduler::m_macSchedSapUser, and ns3::DlCqiInfo::WB.

+ Here is the call graph for this function:

◆ DoSchedDlRachInfoReq()

void ns3::NrMacSchedulerNs3::DoSchedDlRachInfoReq ( const NrMacSchedSapProvider::SchedDlRachInfoReqParameters params)
overridevirtual

RACH information.

Parameters
paramsSchedDlRachInfoReqParameters

Implements ns3::NrMacScheduler.

Definition at line 222 of file nr-mac-scheduler-ns3.cc.

References ns3::NrMacSchedSapProvider::SchedDlRachInfoReqParameters::m_rachList.

◆ DoSchedDlRlcBufferReq()

void ns3::NrMacSchedulerNs3::DoSchedDlRlcBufferReq ( const NrMacSchedSapProvider::SchedDlRlcBufferReqParameters params)
overridevirtual

RLC informs of DL data.

Parameters
paramsparameters of the function

The message contains the LC and the amount of data buffered. Therefore, in this method we cycle through all the UE LCG to find the LC, and once it is found, it is updated with the new amount of data.

Implements ns3::NrMacScheduler.

Definition at line 741 of file nr-mac-scheduler-ns3.cc.

References ns3::NrMacSchedSapProvider::SchedDlRlcBufferReqParameters::m_logicalChannelIdentity, and ns3::NrMacSchedSapProvider::SchedDlRlcBufferReqParameters::m_rnti.

◆ DoSchedDlTriggerReq()

void ns3::NrMacSchedulerNs3::DoSchedDlTriggerReq ( const NrMacSchedSapProvider::SchedDlTriggerReqParameters params)
overridevirtual

Decide how to fill the frequency/time of a DL slot.

Parameters
paramsparameters for the scheduler

The function starts by refreshing the CQI received, and eventually resetting the expired values. Then, the HARQ feedback are processed (ProcessHARQFeedbacks), and finally the expired HARQs are canceled (ResetExpiredHARQ).

See also
ScheduleDl

Implements ns3::NrMacScheduler.

Definition at line 2326 of file nr-mac-scheduler-ns3.cc.

References ns3::NrMacSchedulerUeInfo::GetDlHarqVector(), ns3::NrMacSchedSapProvider::SchedDlTriggerReqParameters::m_dlHarqInfoList, and ns3::NrMacSchedulerCQIManagement::RefreshDlCqiMaps().

+ Here is the call graph for this function:

◆ DoSchedSetMcs()

void ns3::NrMacSchedulerNs3::DoSchedSetMcs ( uint32_t  mcs)
overridevirtual

Set a fixed MCS.

Parameters
mcsThe MCS.

Set a fixed MCS for all UE that will be registered AFTER the call to this function.

Implements ns3::NrMacScheduler.

Definition at line 212 of file nr-mac-scheduler-ns3.cc.

◆ DoSchedUlCqiInfoReq()

void ns3::NrMacSchedulerNs3::DoSchedUlCqiInfoReq ( const NrMacSchedSapProvider::SchedUlCqiInfoReqParameters params)
overridevirtual

Received a UL CQI message.

Parameters
paramsUL CQI message

Calculate the expiration time in number of slots, and then pass all the information to the NrMacSchedulerCQIManagement class.

In UL, we have to know the previously allocated symbols and the total TBS to be able to calculate CQI and MCS, so a special stack is maintained (m_ulAllocationMap).

Only UlCqiInfo::PUSCH is currently supported.

Implements ns3::NrMacScheduler.

Definition at line 893 of file nr-mac-scheduler-ns3.cc.

References ns3::SfnSf::GetEncoding(), ns3::NrMacSchedSapUser::GetNumRbPerRbg(), ns3::NrMacSchedSapUser::GetSlotPeriod(), ns3::NrMacSchedSapUser::GetSpectrumModel(), ns3::NrMacScheduler::m_macSchedSapUser, ns3::NrMacSchedSapProvider::SchedUlCqiInfoReqParameters::m_sfnSf, ns3::NrMacSchedSapProvider::SchedUlCqiInfoReqParameters::m_symStart, ns3::NrMacSchedSapProvider::SchedUlCqiInfoReqParameters::m_ulCqi, and ns3::NrMacSchedulerCQIManagement::UlSBCQIReported().

+ Here is the call graph for this function:

◆ DoSchedUlMacCtrlInfoReq()

void ns3::NrMacSchedulerNs3::DoSchedUlMacCtrlInfoReq ( const NrMacSchedSapProvider::SchedUlMacCtrlInfoReqParameters params)
overridevirtual

Evaluate different types of control messages (only BSR for the moment)

Parameters
paramsparameters of the control message

For each BSR received, calls BSRReceivedFromUe. Ignore all the others control messages.

Implements ns3::NrMacScheduler.

Definition at line 818 of file nr-mac-scheduler-ns3.cc.

References ns3::NrMacSchedSapProvider::SchedUlMacCtrlInfoReqParameters::m_macCeList.

◆ DoSchedUlSrInfoReq()

void ns3::NrMacSchedulerNs3::DoSchedUlSrInfoReq ( const NrMacSchedSapProvider::SchedUlSrInfoReqParameters params)
overridevirtual

Save the SR list into m_srList.

Parameters
paramsSR list

m_srList will be evaluated in DoScheduleUlSr()

Implements ns3::NrMacScheduler.

Definition at line 2482 of file nr-mac-scheduler-ns3.cc.

References ns3::NrMacSchedSapProvider::SchedUlSrInfoReqParameters::m_srList.

◆ DoSchedUlTriggerReq()

void ns3::NrMacSchedulerNs3::DoSchedUlTriggerReq ( const NrMacSchedSapProvider::SchedUlTriggerReqParameters params)
overridevirtual

Decide how to fill the frequency/time of a UL slot.

Parameters
paramsparameters for the scheduler

The function starts by refreshing the CQI received, and eventually resetting the expired values. Then, the HARQ feedback are processed (ProcessHARQFeedbacks), and finally the expired HARQs are canceled (ResetExpiredHARQ).

See also
ScheduleUl

Implements ns3::NrMacScheduler.

Definition at line 2422 of file nr-mac-scheduler-ns3.cc.

References ns3::NrMacSchedulerUeInfo::GetUlHarqVector(), ns3::NrMacSchedSapProvider::SchedUlTriggerReqParameters::m_ulHarqInfoList, and ns3::NrMacSchedulerCQIManagement::RefreshUlCqiMaps().

+ Here is the call graph for this function:

◆ EnableHarqReTx()

void ns3::NrMacSchedulerNs3::EnableHarqReTx ( bool  enableFlag)

Enable HARQ ReTx function.

Remember we introduced the EnableHarqReTx attribute only for FB calibration example. We want to disable HARQ ReTx because ReTx are scheduled in OFDMA fashion. In a TDMA simulation, such retransmissions change the SINR trends in a scenario. Also, REMEMBER that this solution of disabling the HARQ ReTx not very optimized because gNB MAC will still buffer the packet and UE would still transmit the HARQ feedback for the first transmission.

Parameters
enableFlagIf true, it would set the max HARQ ReTx to 3; otherwise it set it to 0

Definition at line 429 of file nr-mac-scheduler-ns3.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetBandwidthInRbg()

uint16_t ns3::NrMacSchedulerNs3::GetBandwidthInRbg ( ) const
protected

◆ GetBwpId()

uint16_t ns3::NrMacSchedulerNs3::GetBwpId ( ) const
protected

Get the bwp id of this MAC.

Returns
the bwp id

Definition at line 2182 of file nr-mac-scheduler-ns3.cc.

References ns3::NrMacSchedSapUser::GetBwpId(), and ns3::NrMacScheduler::m_macSchedSapUser.

Referenced by NrMacSchedulerNs3(), ns3::NrMacSchedulerOfdma::CreateDlDci(), and ns3::NrMacSchedulerOfdma::CreateUlDci().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetCellId()

uint16_t ns3::NrMacSchedulerNs3::GetCellId ( ) const
protected

Get the cell id of this MAC.

Returns
the cell id

Definition at line 2195 of file nr-mac-scheduler-ns3.cc.

References ns3::NrMacSchedSapUser::GetCellId(), and ns3::NrMacScheduler::m_macSchedSapUser.

Referenced by NrMacSchedulerNs3().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetCqiTimerThreshold()

Time ns3::NrMacSchedulerNs3::GetCqiTimerThreshold ( ) const

Get the CqiTimerThreshold.

Returns
the value

Definition at line 238 of file nr-mac-scheduler-ns3.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetDlAmc()

Ptr< const NrAmc > ns3::NrMacSchedulerNs3::GetDlAmc ( ) const

Get the AMC for DL.

Returns
the DL AMC

Definition at line 83 of file nr-mac-scheduler-ns3.cc.

References m_dlAmc.

◆ GetDlCtrlSyms()

uint8_t ns3::NrMacSchedulerNs3::GetDlCtrlSyms ( ) const
overridevirtual

Retrieve the number of DL ctrl symbols configured in the scheduler.

Returns
the number of DL ctrl symbols

Implements ns3::NrMacScheduler.

Definition at line 339 of file nr-mac-scheduler-ns3.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetDlNotchedRbgMask()

std::vector< uint8_t > ns3::NrMacSchedulerNs3::GetDlNotchedRbgMask ( ) const

Get the notched (blank) RBGs Mask for the DL.

Returns
The mask of notched RBGs

Definition at line 366 of file nr-mac-scheduler-ns3.cc.

Referenced by ns3::NrMacSchedulerOfdma::AssignDLRBG(), ns3::NrMacSchedulerOfdma::CreateDlDci(), and ns3::NrMacSchedulerTdma::CreateDlDci().

+ Here is the caller graph for this function:

◆ GetMaxDlMcs()

int8_t ns3::NrMacSchedulerNs3::GetMaxDlMcs ( ) const

Get the maximum DL MCS index.

Returns
the value

Definition at line 294 of file nr-mac-scheduler-ns3.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetNumRbPerRbg()

◆ GetSrsCtrlSyms()

uint8_t ns3::NrMacSchedulerNs3::GetSrsCtrlSyms ( ) const

Get the configured value for the SRS symbols.

Returns
the number of SRS symbols that will be allocated

Definition at line 399 of file nr-mac-scheduler-ns3.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetStartMcsDl()

uint8_t ns3::NrMacSchedulerNs3::GetStartMcsDl ( ) const

Get the DL MCS starting value.

Returns
the value

Definition at line 280 of file nr-mac-scheduler-ns3.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetStartMcsUl()

uint8_t ns3::NrMacSchedulerNs3::GetStartMcsUl ( ) const

Get the DL MCS starting value.

Returns
the value

Definition at line 326 of file nr-mac-scheduler-ns3.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetTpc()

virtual uint8_t ns3::NrMacSchedulerNs3::GetTpc ( ) const
protectedpure virtual

Returns TPC command.

Implemented in ns3::NrMacSchedulerOfdma, and ns3::NrMacSchedulerTdma.

◆ GetTypeId()

◆ GetUlAmc()

Ptr< const NrAmc > ns3::NrMacSchedulerNs3::GetUlAmc ( ) const

Get the AMC for UL.

Returns
the UL AMC

Definition at line 76 of file nr-mac-scheduler-ns3.cc.

References m_ulAmc.

◆ GetUlCtrlSyms()

uint8_t ns3::NrMacSchedulerNs3::GetUlCtrlSyms ( ) const
overridevirtual

Retrieve the number of UL ctrl symbols configured in the scheduler.

Returns
the number of UL ctrl symbols

Implements ns3::NrMacScheduler.

Definition at line 491 of file nr-mac-scheduler-ns3.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetUlNotchedRbgMask()

std::vector< uint8_t > ns3::NrMacSchedulerNs3::GetUlNotchedRbgMask ( ) const

Get the notched (blank) RBGs Mask for the UL.

Returns
The mask of notched RBGs

Definition at line 387 of file nr-mac-scheduler-ns3.cc.

Referenced by ns3::NrMacSchedulerOfdma::AssignULRBG(), ns3::NrMacSchedulerOfdma::CreateUlDci(), and ns3::NrMacSchedulerTdma::CreateUlDci().

+ Here is the caller graph for this function:

◆ InstallDlAmc()

void ns3::NrMacSchedulerNs3::InstallDlAmc ( const Ptr< NrAmc > &  dlAmc)

Install the AMC for the DL part.

Parameters
dlAmcDL AMC

Usually called by the helper

Definition at line 62 of file nr-mac-scheduler-ns3.cc.

References m_dlAmc.

◆ InstallUlAmc()

void ns3::NrMacSchedulerNs3::InstallUlAmc ( const Ptr< NrAmc > &  ulAmc)

Install the AMC for the DL part.

Parameters
ulAmcDL AMC

Usually called by the helper

Definition at line 69 of file nr-mac-scheduler-ns3.cc.

References m_ulAmc.

◆ IsDlMcsFixed()

bool ns3::NrMacSchedulerNs3::IsDlMcsFixed ( ) const

Check if the MCS in DL is fixed.

Returns
true if the DL MCS is fixed, false otherwise

Definition at line 252 of file nr-mac-scheduler-ns3.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ IsHarqReTxEnable()

bool ns3::NrMacSchedulerNs3::IsHarqReTxEnable ( ) const

Is HARQ ReTx enable function.

Returns
Returns true if HARQ ReTx are enabled; otherwise false

Definition at line 435 of file nr-mac-scheduler-ns3.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ IsSrsInFSlots()

bool ns3::NrMacSchedulerNs3::IsSrsInFSlots ( ) const

Check if the F slots are allowed for SRS transmission.

Returns
true if F slots are available for SRS, false otherwise

Definition at line 423 of file nr-mac-scheduler-ns3.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ IsSrsInUlSlots()

bool ns3::NrMacSchedulerNs3::IsSrsInUlSlots ( ) const

Check if the UL slots are allowed for SRS transmission.

Returns
true if UL slots are available for SRS (UL and F slots available for SRS), false otherwise (only F slots available for SRS)

Definition at line 411 of file nr-mac-scheduler-ns3.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ IsUlMcsFixed()

bool ns3::NrMacSchedulerNs3::IsUlMcsFixed ( ) const

Check if the MCS in UL is fixed.

Returns
true if the UL MCS is fixed, false otherwise

Definition at line 266 of file nr-mac-scheduler-ns3.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ ScheduleDlHarq()

uint8_t ns3::NrMacSchedulerNs3::ScheduleDlHarq ( NrMacSchedulerNs3::PointInFTPlane startingPoint,
uint8_t  symAvail,
const ActiveHarqMap activeDlHarq,
const std::unordered_map< uint16_t, UePtr > &  ueMap,
std::vector< DlHarqInfo > *  dlHarqToRetransmit,
const std::vector< DlHarqInfo > &  dlHarqFeedback,
SlotAllocInfo slotAlloc 
) const
protectedvirtual

Giving the input, append to slotAlloc the allocations for the DL HARQ retransmissions.

Parameters
startingPointstarting point of the first retransmission. It should be set to the next available starting point
symAvailAvailable symbols
activeDlHarqMap of the active HARQ processes
ueMapMap of the UEs
dlHarqToRetransmitHARQ feedbacks that could not be transmitted (to fill)
dlHarqFeedbackall the HARQ feedbacks
slotAllocSlot allocation info
Returns
the VarTtiSlotAlloc ID to use next

Definition at line 441 of file nr-mac-scheduler-ns3.cc.

◆ ScheduleUlHarq()

uint8_t ns3::NrMacSchedulerNs3::ScheduleUlHarq ( NrMacSchedulerNs3::PointInFTPlane startingPoint,
uint8_t  symAvail,
const std::unordered_map< uint16_t, UePtr > &  ueMap,
std::vector< UlHarqInfo > *  ulHarqToRetransmit,
const std::vector< UlHarqInfo > &  ulHarqFeedback,
SlotAllocInfo slotAlloc 
) const
protectedvirtual

Giving the input, append to slotAlloc the allocations for the DL HARQ retransmissions.

Parameters
startingPointstarting point of the first retransmission. It should be set to the next available starting point
symAvailAvailable symbols
ueMapMap of the UEs
ulHarqToRetransmitHARQ feedbacks that could not be transmitted (to fill)
ulHarqFeedbackall the HARQ feedbacks
slotAllocSlot allocation info
Returns
the VarTtiSlotAlloc ID to use next

Definition at line 460 of file nr-mac-scheduler-ns3.cc.

◆ SetCqiTimerThreshold()

void ns3::NrMacSchedulerNs3::SetCqiTimerThreshold ( const Time &  v)

Set the CqiTimerThreshold.

Parameters
vthe value to set

Definition at line 231 of file nr-mac-scheduler-ns3.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetDlCtrlSyms()

void ns3::NrMacSchedulerNs3::SetDlCtrlSyms ( uint8_t  v)

Set the number of DL ctrl symbols.

Parameters
vnumber of DL ctrl symbols

Definition at line 333 of file nr-mac-scheduler-ns3.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetDlNotchedRbgMask()

void ns3::NrMacSchedulerNs3::SetDlNotchedRbgMask ( const std::vector< uint8_t > &  dlNotchedRbgsMask)

Set the notched (blank) RBGs Mask for the DL.

Parameters
dlNotchedRbgsMaskThe mask of notched RBGs

Definition at line 351 of file nr-mac-scheduler-ns3.cc.

◆ SetFixedDlMcs()

void ns3::NrMacSchedulerNs3::SetFixedDlMcs ( bool  v)

Set if the MCS in DL is fixed (in case, it will take the starting value)

Parameters
vthe value
See also
SetStartMcsDl

Definition at line 245 of file nr-mac-scheduler-ns3.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetFixedUlMcs()

void ns3::NrMacSchedulerNs3::SetFixedUlMcs ( bool  v)

Set if the MCS in UL is fixed (in case, it will take the starting value)

Parameters
vthe value
See also
SetStartMcsUl

Definition at line 259 of file nr-mac-scheduler-ns3.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetLcSched()

void ns3::NrMacSchedulerNs3::SetLcSched ( const TypeId &  type)

Set LC Scheduler Algorithm model type.

Parameters
typethe LC Scheduler Algorithm Error model type

Definition at line 307 of file nr-mac-scheduler-ns3.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetMaxDlMcs()

void ns3::NrMacSchedulerNs3::SetMaxDlMcs ( int8_t  v)

Set the maximum index for the DL MCS.

Parameters
vthe value

Definition at line 287 of file nr-mac-scheduler-ns3.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetRachUlGrantMcs()

void ns3::NrMacSchedulerNs3::SetRachUlGrantMcs ( uint8_t  v)

Sets the default RACH UL grant MCS.

Parameters
vthe MCS to be used for RACH UL grant

Definition at line 301 of file nr-mac-scheduler-ns3.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetSrsCtrlSyms()

void ns3::NrMacSchedulerNs3::SetSrsCtrlSyms ( uint8_t  v)

Set the number of UL SRS symbols.

Parameters
vnumber of SRS symbols

Definition at line 393 of file nr-mac-scheduler-ns3.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetSrsInFSlots()

void ns3::NrMacSchedulerNs3::SetSrsInFSlots ( bool  v)

Set if the F slots are allowed for SRS transmission.

Parameters
vthe value

Definition at line 417 of file nr-mac-scheduler-ns3.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetSrsInUlSlots()

void ns3::NrMacSchedulerNs3::SetSrsInUlSlots ( bool  v)

Set if the UL slots are allowed for SRS transmission (if True, UL and F slots may carry SRS, if False, SRS are transmitted only in F slots)

Parameters
vthe value

Definition at line 405 of file nr-mac-scheduler-ns3.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetStartMcsDl()

void ns3::NrMacSchedulerNs3::SetStartMcsDl ( uint8_t  v)

Set the starting value for the DL MCS.

Parameters
vthe value

Definition at line 273 of file nr-mac-scheduler-ns3.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetStartMcsUl()

void ns3::NrMacSchedulerNs3::SetStartMcsUl ( uint8_t  v)

Set the starting value for the UL MCS.

Parameters
vthe value

Definition at line 319 of file nr-mac-scheduler-ns3.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetUlCtrlSyms()

void ns3::NrMacSchedulerNs3::SetUlCtrlSyms ( uint8_t  v)

Set the number of UL ctrl symbols.

Parameters
vnumber of UL ctrl symbols

Definition at line 345 of file nr-mac-scheduler-ns3.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetUlNotchedRbgMask()

void ns3::NrMacSchedulerNs3::SetUlNotchedRbgMask ( const std::vector< uint8_t > &  ulNotchedRbgsMask)

Set the notched (blank) RBGs Mask for the UL.

Parameters
ulNotchedRbgsMaskThe mask of notched RBGs

Definition at line 372 of file nr-mac-scheduler-ns3.cc.

◆ SortDlHarq()

void ns3::NrMacSchedulerNs3::SortDlHarq ( NrMacSchedulerNs3::ActiveHarqMap activeDlHarq) const
protectedvirtual

Sort the DL HARQ retransmission.

Parameters
activeDlHarqHARQ DL to retransmit

The HARQ are divided by beams. In each beam, the HARQ should be ordered in a way that the first element should be the first to transmit, and then (if there is space) the second, the third, and so on.

Definition at line 477 of file nr-mac-scheduler-ns3.cc.

◆ SortUlHarq()

void ns3::NrMacSchedulerNs3::SortUlHarq ( NrMacSchedulerNs3::ActiveHarqMap activeUlHarq) const
protectedvirtual

Sort the UL HARQ retransmission.

Parameters
activeUlHarqHARQ UL to retransmit

The HARQ are divided by beams. In each beam, the HARQ should be ordered in a way that the first element should be the first to transmit, and then (if there is space) the second, the third, and so on.

Definition at line 484 of file nr-mac-scheduler-ns3.cc.

Member Data Documentation

◆ m_dlAmc

◆ m_ulAmc


The documentation for this class was generated from the following files: