5G-LENA nr-v4.0
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
nr-mac-sched-sap.h
1// Copyright (c) 2018 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
2//
3// SPDX-License-Identifier: GPL-2.0-only
4
5#ifndef NR_MAC_SCHED_SAP_PROVIDER_H
6#define NR_MAC_SCHED_SAP_PROVIDER_H
7
8#include "nr-control-messages.h"
9#include "nr-phy-mac-common.h"
10
11namespace ns3
12{
13
14class SpectrumModel;
15
21{
22 public:
32
36 virtual ~NrMacSchedSapProvider() = default;
37
53
58 {
60 std::vector<struct DlCqiInfo> m_cqiList;
61 };
62
67 {
69 std::vector<struct MacCeElement> m_macCeList;
70 };
71
81
91
101
110 {
112 std::vector<uint16_t> m_srList;
113 };
114
120 {
121 uint16_t m_sfnSf;
122 std::vector<struct nr::RachListElement_s> m_rachList;
123
124 std::vector<struct nr::VendorSpecificListElement_s>
126 };
127
128 virtual void SchedDlRlcBufferReq(const struct SchedDlRlcBufferReqParameters& params) = 0;
129
130 virtual void SchedDlCqiInfoReq(const SchedDlCqiInfoReqParameters& params) = 0;
131
136 virtual void SchedDlTriggerReq(const struct SchedDlTriggerReqParameters& params) = 0;
137
138 virtual void SchedUlCqiInfoReq(const struct SchedUlCqiInfoReqParameters& params) = 0;
139
144 virtual void SchedUlTriggerReq(const struct SchedUlTriggerReqParameters& params) = 0;
145
150 virtual void SchedUlSrInfoReq(const SchedUlSrInfoReqParameters& params) = 0;
151
152 virtual void SchedUlMacCtrlInfoReq(const struct SchedUlMacCtrlInfoReqParameters& params) = 0;
153
154 virtual void SchedSetMcs(uint32_t mcs) = 0;
155
161 virtual void SchedDlRachInfoReq(const SchedDlRachInfoReqParameters& params) = 0;
162
167 virtual uint8_t GetDlCtrlSyms() const = 0;
168
173 virtual uint8_t GetUlCtrlSyms() const = 0;
174
175 virtual bool IsHarqReTxEnable() const = 0;
176
177 virtual bool IsMaxSrsReached() const = 0;
178
179 private:
180};
181
187{
188 public:
192 virtual ~NrMacSchedSapUser() = default;
193
198 {
204 : m_sfnSf(sfnSf),
205 m_slotAllocInfo(sfnSf)
206 {
207 }
208
211 };
212
217 virtual void SchedConfigInd(const struct SchedConfigIndParameters& params) = 0;
218
223 virtual Ptr<const SpectrumModel> GetSpectrumModel() const = 0;
224
229 virtual uint32_t GetNumRbPerRbg() const = 0;
230
235 virtual uint8_t GetNumHarqProcess() const = 0;
236
241 virtual uint16_t GetBwpId() const = 0;
242
247 virtual uint16_t GetCellId() const = 0;
248
253 virtual uint32_t GetSymbolsPerSlot() const = 0;
254
259 virtual Time GetSlotPeriod() const = 0;
260
265 virtual void BuildRarList(SlotAllocInfo& slotAllocInfo) = 0;
266};
267
268inline std::ostream&
269operator<<(std::ostream& os, const NrMacSchedSapProvider::SchedDlRlcBufferReqParameters& p)
270{
271 os << "RNTI: " << p.m_rnti << " LCId: " << static_cast<uint32_t>(p.m_logicalChannelIdentity)
272 << " RLCTxQueueSize: " << p.m_rlcTransmissionQueueSize
273 << " B, RLCTXHolDel: " << p.m_rlcTransmissionQueueHolDelay
274 << " ms, RLCReTXQueueSize: " << p.m_rlcRetransmissionQueueSize
275 << " B, RLCReTXHolDel: " << p.m_rlcRetransmissionHolDelay
276 << " ms, RLCStatusPduSize: " << p.m_rlcStatusPduSize << " B.";
277 return os;
278}
279
280} // namespace ns3
281
282#endif /* NR_MAC_SCHED_SAP_PROVIDER_H */
The SAP interface between MAC and scheduler.
virtual void SchedDlRachInfoReq(const SchedDlRachInfoReqParameters &params)=0
SCHED_DL_RACH_INFO_REQ.
virtual uint8_t GetDlCtrlSyms() const =0
Retrieve the number of DL ctrl symbols configured in the scheduler.
virtual ~NrMacSchedSapProvider()=default
virtual void SchedUlSrInfoReq(const SchedUlSrInfoReqParameters &params)=0
Provides scheduling request reception information to the scheduler.
virtual void SchedUlTriggerReq(const struct SchedUlTriggerReqParameters &params)=0
Starts the UL MAC scheduler for this subframe.
virtual void SchedDlTriggerReq(const struct SchedDlTriggerReqParameters &params)=0
Starts the DL MAC scheduler for this subframe.
NrMacSchedSapProvider(const NrMacSchedSapProvider &o)=delete
NrMacSchedSapProvider copy constructor (deleted)
virtual uint8_t GetUlCtrlSyms() const =0
Retrieve the number of UL ctrl symbols configured in the scheduler.
NrMacSchedSapProvider()=default
constructor
The Interface between Scheduler and MAC.
virtual uint32_t GetNumRbPerRbg() const =0
Get the number of RB per RBG.
virtual Time GetSlotPeriod() const =0
Get the slot period.
virtual uint16_t GetBwpId() const =0
Get the BWP ID.
virtual uint32_t GetSymbolsPerSlot() const =0
Get the Symbol per slot.
virtual ~NrMacSchedSapUser()=default
~NrMacSchedSapUser
virtual void SchedConfigInd(const struct SchedConfigIndParameters &params)=0
Install a scheduling decision.
virtual uint16_t GetCellId() const =0
Get the Cell ID.
virtual Ptr< const SpectrumModel > GetSpectrumModel() const =0
Get the SpectrumModel.
virtual void BuildRarList(SlotAllocInfo &slotAllocInfo)=0
Build RAR list from allocations and assign preamble IDs.
virtual uint8_t GetNumHarqProcess() const =0
Get the number of HARQ process.
The SfnSf class.
Definition sfnsf.h:32
LteNrTddSlotType
Available TDD slot types. Ordering is important.
@ F
DL CTRL + DL DATA + UL DATA + UL CTRL.
std::vector< struct DlCqiInfo > m_cqiList
cqi list
std::vector< struct nr::VendorSpecificListElement_s > m_vendorSpecificList
vendor specific list
std::vector< struct nr::RachListElement_s > m_rachList
RACH list.
uint16_t m_rlcTransmissionQueueHolDelay
Head of line delay of new transmissions in ms.
uint8_t m_logicalChannelIdentity
The logical channel ID, range: 0..10.
uint16_t m_rlcRetransmissionHolDelay
Head of line delay of retransmissions in ms.
uint32_t m_rlcRetransmissionQueueSize
The current size of the retransmission queue in byte.
uint16_t m_rlcStatusPduSize
The current size of the pending STATUS message in byte.
uint32_t m_rlcTransmissionQueueSize
The current size of the new transmission queue in byte.
DL HARQ information to be used when scheduling UL data.
std::vector< struct DlHarqInfo > m_dlHarqInfoList
DL HARQ info list.
LteNrTddSlotType m_slotType
Indicate the type of slot requested.
uint8_t m_symStart
Sym start of the transmission to which this CQI refers to.
The SchedUlMacCtrlInfoReqParameters struct.
std::vector< struct MacCeElement > m_macCeList
MacCeElement list.
SR received from MAC, to pass to schedulers.
std::vector< uint16_t > m_srList
List of RNTI which asked for a SR.
SfnSf m_snfSf
SnfSf in which the sr where received.
UL HARQ information to be used when scheduling UL data.
std::vector< struct UlHarqInfo > m_ulHarqInfoList
UL HARQ info list.
LteNrTddSlotType m_slotType
Indicate the type of slot requested.
The SchedConfigIndParameters struct.
SchedConfigIndParameters(const SfnSf sfnSf)
SchedConfigIndParameters.
SlotAllocInfo m_slotAllocInfo
The allocation info.
The SlotAllocInfo struct.
The UlCqiInfo struct.