5G-LENA
nr-v3.0-29-g83cc959
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. More... | |
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. More... | |
uint32_t | GetStartingPeriodicity () const |
Get the periodicity. More... | |
bool | IncreasePeriodicity (std::unordered_map< uint16_t, std::shared_ptr< NrMacSchedulerUeInfo >> *ueMap) override |
Increase the periodicity and assign to all UEs a different offset. More... | |
void | RemoveUe (uint32_t offset) override |
Function called when the scheduler has to release a previously owned periodicity and offset. More... | |
void | SetStartingPeriodicity (uint32_t start) |
Set the Periodicity for all the UEs. More... | |
Public Member Functions inherited from ns3::NrMacSchedulerSrs | |
virtual | ~NrMacSchedulerSrs ()=default |
Default. | |
Static Public Member Functions | |
static TypeId | GetTypeId () |
GetTypeId. More... | |
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.
Definition at line 27 of file nr-mac-scheduler-srs-default.h.
|
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 57 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 28 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 103 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 40 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 83 of file nr-mac-scheduler-srs-default.cc.
References SetStartingPeriodicity().
|
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 76 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 122 of file nr-mac-scheduler-srs-default.cc.
Referenced by DecreasePeriodicity(), GetTypeId(), and IncreasePeriodicity().