5G-LENA nr-v3.0-32-g83aee33
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
ns3::NrMacSchedulerOfdmaMR Class Reference

Assign frequencies in a maximum-rate fashion. More...

#include "nr-mac-scheduler-ofdma-mr.h"

+ Inheritance diagram for ns3::NrMacSchedulerOfdmaMR:
+ Collaboration diagram for ns3::NrMacSchedulerOfdmaMR:

Public Member Functions

 NrMacSchedulerOfdmaMR ()
 NrMacSchedulerOfdmaMR constructor.
 
 ~NrMacSchedulerOfdmaMR () override
 ~NrMacSchedulerOfdmaMR deconstructor
 
- Public Member Functions inherited from ns3::NrMacSchedulerOfdmaRR
 NrMacSchedulerOfdmaRR ()
 NrMacSchedulerTdmaRR constructor.
 
 ~NrMacSchedulerOfdmaRR () override
 ~NrMacSchedulerTdmaRR deconstructor
 
- Public Member Functions inherited from ns3::NrMacSchedulerOfdma
 NrMacSchedulerOfdma ()
 NrMacSchedulerOfdma constructor.
 
 ~NrMacSchedulerOfdma () override
 Deconstructor.
 
- Public Member Functions inherited from ns3::NrMacSchedulerTdma
 NrMacSchedulerTdma ()
 NrMacSchedulerTdma constructor.
 
 ~NrMacSchedulerTdma () override
 NrMacSchedulerTdma deconstructor.
 
- Public Member Functions inherited from ns3::NrMacSchedulerNs3
 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 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::NrMacSchedulerOfdmaRR
static TypeId GetTypeId ()
 GetTypeId.
 
- Static Public Member Functions inherited from ns3::NrMacSchedulerOfdma
static TypeId GetTypeId ()
 GetTypeId.
 
- Static Public Member Functions inherited from ns3::NrMacSchedulerTdma
static TypeId GetTypeId ()
 GetTypeId.
 
- Static Public Member Functions inherited from ns3::NrMacSchedulerNs3
static TypeId GetTypeId ()
 GetTypeId.
 
- Static Public Member Functions inherited from ns3::NrMacScheduler
static TypeId GetTypeId ()
 Get the type id.
 

Protected Member Functions

std::shared_ptr< NrMacSchedulerUeInfoCreateUeRepresentation (const NrMacCschedSapProvider::CschedUeConfigReqParameters &params) const override
 Create an UE representation of the type NrMacSchedulerUeInfoMR.
 
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::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.
 
- Protected Member Functions inherited from ns3::NrMacSchedulerOfdmaRR
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 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.
 
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.
 
std::shared_ptr< NrMacSchedulerUeInfoCreateUeRepresentation (const NrMacCschedSapProvider::CschedUeConfigReqParameters &params) const override
 Create an UE representation of the type NrMacSchedulerUeInfoRR.
 
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::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 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.
 
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.
 
- Protected Member Functions inherited from ns3::NrMacSchedulerOfdma
BeamSymbolMap AssignDLRBG (uint32_t symAvail, const ActiveUeMap &activeDl) const override
 Assign the available DL RBG to the UEs.
 
BeamSymbolMap AssignULRBG (uint32_t symAvail, const ActiveUeMap &activeUl) const override
 Assign the UL RBG to the active UE, and return the distribution of symbols per beam.
 
void ChangeDlBeam (PointInFTPlane *spoint, uint32_t symOfBeam) const override
 Advance the starting point by the number of symbols specified, resetting the RB count to 0.
 
void ChangeUlBeam (PointInFTPlane *spoint, uint32_t symOfBeam) const override
 Perform a custom operation on the starting point each time all the UE of an UL beam have been scheduled.
 
std::shared_ptr< DciInfoElementTdmaCreateDlDci (PointInFTPlane *spoint, const std::shared_ptr< NrMacSchedulerUeInfo > &ueInfo, uint32_t maxSym) const override
 Create the DL DCI in OFDMA mode.
 
std::shared_ptr< DciInfoElementTdmaCreateUlDci (PointInFTPlane *spoint, const std::shared_ptr< NrMacSchedulerUeInfo > &ueInfo, uint32_t maxSym) const override
 Create a DCI for the specified UE for UL data.
 
NrMacSchedulerOfdma::BeamSymbolMap GetSymPerBeam (uint32_t symAvail, const ActiveUeMap &activeDl) const
 Calculate the number of symbols to assign to each beam.
 
uint8_t GetTpc () const override
 Returns TPC command.
 
- Protected Member Functions inherited from ns3::NrMacSchedulerTdma
BeamSymbolMap AssignDLRBG (uint32_t symAvail, const ActiveUeMap &activeDl) const override
 Assign the available DL RBG to the UEs.
 
BeamSymbolMap AssignULRBG (uint32_t symAvail, const ActiveUeMap &activeUl) const override
 Assign the available UL RBG to the UEs.
 
void ChangeDlBeam (PointInFTPlane *spoint, uint32_t symOfBeam) const override
 Not doing anything, moving forward the spoint is done by CreateDci.
 
void ChangeUlBeam (PointInFTPlane *spoint, uint32_t symOfBeam) const override
 Not doing anything, moving forward the spoint is done by CreateDci.
 
std::shared_ptr< DciInfoElementTdmaCreateDlDci (PointInFTPlane *spoint, const std::shared_ptr< NrMacSchedulerUeInfo > &ueInfo, uint32_t maxSym) const override
 Create a DL DCI starting from spoint and spanning maxSym symbols.
 
std::shared_ptr< DciInfoElementTdmaCreateUlDci (PointInFTPlane *spoint, const std::shared_ptr< NrMacSchedulerUeInfo > &ueInfo, uint32_t maxSym) const override
 Create a UL DCI starting from spoint and spanning maxSym symbols.
 
uint8_t GetTpc () const override
 Returns TPC command.
 
- Protected Member Functions inherited from ns3::NrMacSchedulerNs3
virtual LCPtr CreateLC (const LogicalChannelConfigListElement_s &config) const
 Create a logical channel starting from a configuration.
 
virtual LCGPtr CreateLCG (const LogicalChannelConfigListElement_s &config) const
 Create a logical channel group starting from a configuration.
 
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 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.
 

Additional Inherited Members

- Public Types inherited from ns3::NrMacSchedulerNs3
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.
 
- Protected Attributes inherited from ns3::NrMacSchedulerNs3
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

Assign frequencies in a maximum-rate fashion.

The UEs will be sorted by their MCS. Higher MCS will always be scheduled before lower MCS, until they do not have any more bytes to transmit.

See also
NrMacSchedulerUeInfoMR

Introspection did not find any typical Config paths.
No Attributes are defined for this type.

Attributes defined in parent class ns3::NrMacSchedulerNs3

  • CqiTimerThreshold: The time while a CQI is valid
    • Set with class: ns3::TimeValue
    • Underlying type: Time –9223372036854775808.0ns:+9223372036854775807.0ns
    • Initial value: +1000000000.0ns
    • Flags: construct write read
  • FixedMcsDl: Fix MCS to value set in StartingMcsDl
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: false
    • Flags: construct write read
  • FixedMcsUl: Fix MCS to value set in StartingMcsUl
    • Set with class: 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
  • 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

No TraceSources are defined for this type.

TraceSources defined in parent class ns3::NrMacSchedulerOfdma

  • SymPerBeam: Number of assigned symbol per beam. Gets called every time an assignment is made
    Callback signature: ns3::TracedValueCallback::Uint32

Size of this type is 536 bytes (on a 64-bit architecture).

Definition at line 23 of file nr-mac-scheduler-ofdma-mr.h.

Constructor & Destructor Documentation

◆ NrMacSchedulerOfdmaMR()

ns3::NrMacSchedulerOfdmaMR::NrMacSchedulerOfdmaMR ( )

NrMacSchedulerOfdmaMR constructor.

Definition at line 28 of file nr-mac-scheduler-ofdma-mr.cc.

◆ ~NrMacSchedulerOfdmaMR()

ns3::NrMacSchedulerOfdmaMR::~NrMacSchedulerOfdmaMR ( )
inlineoverride

~NrMacSchedulerOfdmaMR deconstructor

Definition at line 40 of file nr-mac-scheduler-ofdma-mr.h.

Member Function Documentation

◆ CreateUeRepresentation()

std::shared_ptr< NrMacSchedulerUeInfo > ns3::NrMacSchedulerOfdmaMR::CreateUeRepresentation ( const NrMacCschedSapProvider::CschedUeConfigReqParameters params) const
overrideprotectedvirtual

Create an UE representation of the type NrMacSchedulerUeInfoMR.

Parameters
paramsparameters
Returns
NrMacSchedulerUeInfoRR instance

Implements ns3::NrMacSchedulerNs3.

Definition at line 34 of file nr-mac-scheduler-ofdma-mr.cc.

References ns3::NrMacSchedulerNs3::GetNumRbPerRbg(), and ns3::NrMacCschedSapProvider::CschedUeConfigReqParameters::m_beamId.

+ Here is the call graph for this function:

◆ GetTypeId()

TypeId ns3::NrMacSchedulerOfdmaMR::GetTypeId ( )
static

GetTypeId.

Returns
The TypeId of the class

Definition at line 20 of file nr-mac-scheduler-ofdma-mr.cc.

◆ GetUeCompareDlFn()

std::function< bool(const NrMacSchedulerNs3::UePtrAndBufferReq &lhs, const NrMacSchedulerNs3::UePtrAndBufferReq &rhs)> ns3::NrMacSchedulerOfdmaMR::GetUeCompareDlFn ( ) const
overrideprotectedvirtual

Return the comparison function to sort DL UE according to the scheduler policy.

Returns
a pointer to NrMacSchedulerUeInfoMR::CompareUeWeightsDl

Implements ns3::NrMacSchedulerTdma.

Definition at line 46 of file nr-mac-scheduler-ofdma-mr.cc.

References ns3::NrMacSchedulerUeInfoMR::CompareUeWeightsDl().

+ Here is the call graph for this function:

◆ GetUeCompareUlFn()

std::function< bool(const NrMacSchedulerNs3::UePtrAndBufferReq &lhs, const NrMacSchedulerNs3::UePtrAndBufferReq &rhs)> ns3::NrMacSchedulerOfdmaMR::GetUeCompareUlFn ( ) const
overrideprotectedvirtual

Return the comparison function to sort UL UE according to the scheduler policy.

Returns
a pointer to NrMacSchedulerUeInfoMR::CompareUeWeightsUl

Implements ns3::NrMacSchedulerTdma.

Definition at line 53 of file nr-mac-scheduler-ofdma-mr.cc.

References ns3::NrMacSchedulerUeInfoMR::CompareUeWeightsUl().

+ Here is the call graph for this function:

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