![]() |
5G-LENA nr-v4.0
The 5G/NR module for the ns-3 simulator
|
Default algorithm for assigning offset and periodicity. More...
#include "nr-mac-scheduler-srs-default.h"
Public Member Functions | |
NrMacSchedulerSrsDefault () | |
NrMacSchedulerSrsDefault. | |
~NrMacSchedulerSrsDefault () override | |
~NrMacSchedulerSrsDefault | |
SrsPeriodicityAndOffset | AddUe () override |
Function called when the scheduler needs to know what is the offset and periodicy of a newly added ue. | |
int64_t | AssignStreams (int64_t stream) |
bool | DecreasePeriodicity (std::unordered_map< uint16_t, std::shared_ptr< NrMacSchedulerUeInfo > > *ueMap) override |
Decrease the periodicity and assign to all UEs a different offset. | |
uint32_t | GetStartingPeriodicity () const |
Get the periodicity. | |
bool | IncreasePeriodicity (std::unordered_map< uint16_t, std::shared_ptr< NrMacSchedulerUeInfo > > *ueMap) override |
Increase the periodicity and assign to all UEs a different offset. | |
bool | IsMaxSrsReached () const override |
Check if all SRS periodicity is at the maximum allowed and all offsets have been used. | |
void | RemoveUe (uint32_t offset) override |
Function called when the scheduler has to release a previously owned periodicity and offset. | |
void | SetStartingPeriodicity (uint32_t start) |
Set the Periodicity for all the UEs. | |
![]() | |
virtual | ~NrMacSchedulerSrs ()=default |
Default. | |
Static Public Member Functions | |
static TypeId | GetTypeId () |
GetTypeId. | |
Default algorithm for assigning offset and periodicity.
The algorithm assign the same periodicity to all the UEs. When a new periodicity is asked, it is returned a value between 1 and the configured periodicity (minus 1).
The returned values will never be the same; instead, when this must happen, an invalid value is returned and (hopefully) an increase of periodicity is invoked.
Introspection did not find any typical Config paths.
No TraceSources are defined for this type.
Size of this type is 120 bytes (on a 64-bit architecture).
Definition at line 25 of file nr-mac-scheduler-srs-default.h.
ns3::NrMacSchedulerSrsDefault::NrMacSchedulerSrsDefault | ( | ) |
Definition at line 21 of file nr-mac-scheduler-srs-default.cc.
|
override |
~NrMacSchedulerSrsDefault
Definition at line 34 of file nr-mac-scheduler-srs-default.cc.
|
overridevirtual |
Function called when the scheduler needs to know what is the offset and periodicy of a newly added ue.
Implements ns3::NrMacSchedulerSrs.
Definition at line 56 of file nr-mac-scheduler-srs-default.cc.
References ns3::NrMacSchedulerSrs::SrsPeriodicityAndOffset::m_isValid, ns3::NrMacSchedulerSrs::SrsPeriodicityAndOffset::m_offset, and ns3::NrMacSchedulerSrs::SrsPeriodicityAndOffset::m_periodicity.
int64_t ns3::NrMacSchedulerSrsDefault::AssignStreams | ( | int64_t | stream | ) |
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.
stream | first stream index to use |
Definition at line 27 of file nr-mac-scheduler-srs-default.cc.
|
overridevirtual |
Decrease the periodicity and assign to all UEs a different offset.
ueMap | the UE map |
The method decreases the periodicity, and then re-assign offsets and periodicity to all the UEs to avoid conflicts.
Implements ns3::NrMacSchedulerSrs.
Definition at line 102 of file nr-mac-scheduler-srs-default.cc.
References SetStartingPeriodicity().
uint32_t ns3::NrMacSchedulerSrsDefault::GetStartingPeriodicity | ( | ) | const |
Get the periodicity.
Definition at line 155 of file nr-mac-scheduler-srs-default.cc.
Referenced by GetTypeId().
|
static |
GetTypeId.
Definition at line 39 of file nr-mac-scheduler-srs-default.cc.
References GetStartingPeriodicity(), and SetStartingPeriodicity().
|
overridevirtual |
Increase the periodicity and assign to all UEs a different offset.
ueMap | the UE map |
The method increases the periodicity, and then re-assign offsets and periodicity to all the UEs to avoid conflicts.
Implements ns3::NrMacSchedulerSrs.
Definition at line 82 of file nr-mac-scheduler-srs-default.cc.
References SetStartingPeriodicity().
|
overridevirtual |
Check if all SRS periodicity is at the maximum allowed and all offsets have been used.
Implements ns3::NrMacSchedulerSrs.
Definition at line 186 of file nr-mac-scheduler-srs-default.cc.
|
overridevirtual |
Function called when the scheduler has to release a previously owned periodicity and offset.
offset | The offset used by the UE |
Note: This interface assumes that all the UEs will share the same periodicity. If that's not the case, the API would have to be updated.
Implements ns3::NrMacSchedulerSrs.
Definition at line 75 of file nr-mac-scheduler-srs-default.cc.
void ns3::NrMacSchedulerSrsDefault::SetStartingPeriodicity | ( | uint32_t | start | ) |
Set the Periodicity for all the UEs.
start | the periodicity |
Definition at line 121 of file nr-mac-scheduler-srs-default.cc.
Referenced by DecreasePeriodicity(), GetTypeId(), and IncreasePeriodicity().