LteSchedulerEnbUl.h Source File

Simu5G: LteSchedulerEnbUl.h Source File
Simu5G
LteSchedulerEnbUl.h
1//
2// Simu5G
3//
4// Copyright (C) 2012-2021 Giovanni Nardini, Giovanni Stea, Antonio Virdis et al. (University of Pisa)
5// Copyright (C) 2022-2026 Giovanni Nardini, Giovanni Stea et al. (University of Pisa)
6//
7// This file is part of a software released under the license included in file
8// "license.pdf". Please read LICENSE and README files before using it.
9// The above files and the present reference are part of the software itself,
10// and cannot be removed from it.
11//
12
13#ifndef _LTE_LTE_SCHEDULER_ENB_UL_H_
14#define _LTE_LTE_SCHEDULER_ENB_UL_H_
15
16#include "simu5g/stack/mac/scheduler/LteSchedulerEnb.h"
17
18namespace simu5g {
19
23class LteSchedulerEnbUl : public LteSchedulerEnb
24{
25 protected:
26
27 Direction getDirection() const override { return UL; }
28
29 typedef std::map<MacNodeId, unsigned char> HarqStatus;
30 typedef std::map<MacNodeId, bool> RacStatus;
31
32
34 std::map<GHz, HarqStatus> harqStatus_;
35
37 std::map<GHz, RacStatus> racStatus_;
38
39 void initialize(int stage) override;
40
41 protected:
42
50 bool checkEligibility(MacNodeId id, Codeword& cw, GHz carrierFrequency) override;
51
55 virtual unsigned int scheduleAdditionalRetransmissions(GHz carrierFrequency, BandLimitVector *bandLim = nullptr);
56
57 public:
58
60 virtual void updateHarqDescs();
61
66 bool racschedule(GHz carrierFrequency, BandLimitVector *bandLim = nullptr) override;
67 virtual void racscheduleBackground(unsigned int& racAllocatedBlocks, GHz carrierFrequency, BandLimitVector *bandLim = nullptr);
68
73 bool rtxschedule(GHz carrierFrequency, BandLimitVector *bandLim = nullptr) override;
74
79
83 virtual void signalRac(MacNodeId nodeId, GHz carrierFrequency)
84 {
85 if (racStatus_.find(carrierFrequency) == racStatus_.end()) {
86 RacStatus newMap;
87 racStatus_[carrierFrequency] = newMap;
88 }
89 racStatus_.at(carrierFrequency)[nodeId] = true;
90 }
91
104 unsigned int schedulePerAcidRtx(MacNodeId nodeId, GHz carrierFrequency, Codeword cw, unsigned char acid,
105 std::vector<BandLimit> *bandLim = nullptr, Remote antenna = MACRO, bool limitBl = false) override;
106
107
108 virtual void removePendingRac(MacNodeId nodeId);
109};
110
111} //namespace
112
113#endif // _LTE_LTE_SCHEDULER_ENB_UL_H_
Definition LteSchedulerEnbUl.h:24
bool racschedule(GHz carrierFrequency, BandLimitVector *bandLim=nullptr) override
bool rtxschedule(GHz carrierFrequency, BandLimitVector *bandLim=nullptr) override
std::map< GHz, RacStatus > racStatus_
RAC request flags: signals whether a UE shall be granted the RAC allocation.
Definition LteSchedulerEnbUl.h:37
virtual void updateHarqDescs()
Updates HARQ descriptor current process pointer (to be called every TTI by main loop).
bool checkEligibility(MacNodeId id, Codeword &cw, GHz carrierFrequency) override
unsigned int schedulePerAcidRtx(MacNodeId nodeId, GHz carrierFrequency, Codeword cw, unsigned char acid, std::vector< BandLimit > *bandLim=nullptr, Remote antenna=MACRO, bool limitBl=false) override
virtual void signalRac(MacNodeId nodeId, GHz carrierFrequency)
Definition LteSchedulerEnbUl.h:83
std::map< GHz, HarqStatus > harqStatus_
Uplink Synchronous H-ARQ process counter - keeps track of currently active process on connected UEs.
Definition LteSchedulerEnbUl.h:34
virtual unsigned int scheduleAdditionalRetransmissions(GHz carrierFrequency, BandLimitVector *bandLim=nullptr)
Definition AlertReceiver.h:24
unsigned short Codeword
Codeword.
Definition LteCommon.h:202