7#include "nr-mac-scheduler-ns3.h"
8#include "nr-mac-scheduler-ue-info.h"
9#include "nr-phy-mac-common.h"
69 const std::function<
bool(uint16_t bwpId, uint32_t mcs, uint32_t nRegs, uint8_t dlRank)>&
76 const std::unordered_map<uint16_t, std::shared_ptr<NrMacSchedulerUeInfo>>& ueMap,
77 std::vector<DlHarqInfo>* dlHarqToRetransmit,
78 const std::vector<DlHarqInfo>& dlHarqFeedback,
83 const std::unordered_map<uint16_t, std::shared_ptr<NrMacSchedulerUeInfo>>& ueMap,
84 std::vector<UlHarqInfo>* ulHarqToRetransmit,
85 const std::vector<UlHarqInfo>& ulHarqFeedback,
92 std::vector<DlHarqInfo>* dlHarqToRetransmit,
94 uint8_t harqProcess)
const;
126 std::function<uint16_t()> m_getBwpId;
127 std::function<uint16_t()> m_getCellId;
128 std::function<uint16_t()> m_getBwInRbg;
129 std::function<uint8_t()> m_getFhControlMethod;
130 std::function<bool(uint16_t bwpId, uint32_t mcs, uint32_t nRegs, uint8_t dlRank)>
131 m_getDoesAllocationFit;
Schedule the HARQ retransmission.
virtual uint8_t ScheduleUlHarq(NrMacSchedulerNs3::PointInFTPlane *startingPoint, uint8_t symAvail, const std::unordered_map< uint16_t, std::shared_ptr< NrMacSchedulerUeInfo > > &ueMap, std::vector< UlHarqInfo > *ulHarqToRetransmit, const std::vector< UlHarqInfo > &ulHarqFeedback, SlotAllocInfo *slotAlloc) const
Schedule the UL HARQ.
uint16_t GetBwpId() const
Get the bwp id of this MAC.
uint16_t GetCellId() const
Get the cell id of this MAC.
void InstallGetBwpIdFn(const std::function< uint16_t()> &fn)
Install a function to retrieve the bwp id.
void InstallDoesFhAllocationFitFn(const std::function< bool(uint16_t bwpId, uint32_t mcs, uint32_t nRegs, uint8_t dlRank)> &fn)
Install a function to retrieve whether the allocation fits when FH Control is enabled.
virtual void SortDlHarq(NrMacSchedulerNs3::ActiveHarqMap *activeDlHarq) const
Sort Dl Harq retx based on their symbol requirement.
uint16_t GetBandwidthInRbg() const
Get the bandwidth in RBG.
NrMacSchedulerHarqRr()
NrMacSchedulerHarqRr constructor.
void BufferHARQFeedback(const std::vector< DlHarqInfo > &dlHarqFeedback, std::vector< DlHarqInfo > *dlHarqToRetransmit, uint16_t rnti, uint8_t harqProcess) const
Find the specified HARQ process and buffer it into a vector.
virtual ~NrMacSchedulerHarqRr()=default
Default deconstructor.
void InstallGetCellIdFn(const std::function< uint16_t()> &fn)
Install a function to retrieve the cell id.
bool GetDoesFhAllocationFit(uint16_t bwpId, uint32_t mcs, uint32_t nRegs, uint8_t dlRank) const
Get from sched if the allocation fits when FH Control is enabled.
void InstallGetFhControlMethodFn(const std::function< uint8_t()> &fn)
Install a function to retrieve the FH Control Method (when enabled)
uint8_t GetFromSchedFhControlMethod() const
Get the FH Control method.
virtual void SortUlHarq(NrMacSchedulerNs3::ActiveHarqMap *activeUlHarq) const
(In theory) sort UL HARQ retx
void InstallGetBwInRBG(const std::function< uint16_t()> &fn)
Install a function to retrieve the bandwidth in RBG.
virtual uint8_t ScheduleDlHarq(NrMacSchedulerNs3::PointInFTPlane *startingPoint, uint8_t symAvail, const NrMacSchedulerNs3::ActiveHarqMap &activeDlHarq, const std::unordered_map< uint16_t, std::shared_ptr< NrMacSchedulerUeInfo > > &ueMap, std::vector< DlHarqInfo > *dlHarqToRetransmit, const std::vector< DlHarqInfo > &dlHarqFeedback, SlotAllocInfo *slotAlloc) const
Schedule DL HARQ in RR fashion.
A general scheduler for nr in NS3.
std::unordered_map< BeamId, HarqVectorIteratorList, BeamIdHash > ActiveHarqMap
Map between a beamID and the HARQ of that beam.
Point in the Frequency/Time plane.
The SlotAllocInfo struct.