A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ff-mac-sched-sap.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Manuel Requena <manuel.requena@cttc.es>
7 */
8
9#ifndef FF_MAC_SCHED_SAP_H
10#define FF_MAC_SCHED_SAP_H
11
12#include "ff-mac-common.h"
13
14#include <stdint.h>
15#include <vector>
16
17namespace ns3
18{
19
20/**
21 * \ingroup ff-api
22 * \brief Provides the SCHED SAP
23 *
24 * This abstract class defines the MAC Scheduler interface specified in the
25 * Femto Forum Technical Document:
26 * - LTE MAC Scheduler Interface Specification v1.11
27 *
28 * The Technical Document contains a detailed description of the API.
29 * The documentation of this class refers to sections of this Technical Document.
30 *
31 * You can found an example of the implementation of this interface
32 * in the SampleFfMacSchedSapProvider and SampleFfMacSchedSapUser classes
33 */
35{
36 public:
37 virtual ~FfMacSchedSapProvider();
38
39 /**
40 * Parameters of the API primitives
41 */
42
43 /**
44 * Parameters of the SCHED_DL_RLC_BUFFER_REQ primitive.
45 * See section 4.2.1 for a detailed description of the parameters.
46 */
48 {
49 uint16_t m_rnti; ///< RNTI
50 uint8_t m_logicalChannelIdentity; ///< logical channel identity
51 uint32_t m_rlcTransmissionQueueSize; ///< RLC transmission queue size
52 uint16_t m_rlcTransmissionQueueHolDelay; ///< RLC transmission queue HOL delay
53 uint32_t m_rlcRetransmissionQueueSize; ///< RLC retransmission queue size
54 uint16_t m_rlcRetransmissionHolDelay; ///< RLC retransmission HOL delay
55 uint16_t m_rlcStatusPduSize; ///< RLC status PDU size
56
57 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
58 };
59
60 /**
61 * Parameters of the SCHED_DL_PAGING_BUFFER_REQ primitive.
62 * See section 4.2.2 for a detailed description of the parameters.
63 */
65 {
66 uint16_t m_rnti; ///< RNTI
67 std::vector<PagingInfoListElement_s> m_pagingInfoList; ///< paging info list
68
69 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
70 };
71
72 /**
73 * Parameters of the SCHED_DL_MAC_BUFFER_REQ primitive.
74 * See section 4.2.3 for a detailed description of the parameters.
75 */
77 {
78 uint16_t m_rnti; ///< RNTI
79 CeBitmap_e m_ceBitmap; ///< CE bitmap
80
81 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
82 };
83
84 /**
85 * Parameters of the SCHED_DL_TRIGGER_REQ primitive.
86 * See section 4.2.4 for a detailed description of the parameters.
87 */
89 {
90 uint16_t m_sfnSf; ///< sfn SF
91 std::vector<DlInfoListElement_s> m_dlInfoList; ///< DL info list
92
93 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
94 };
95
96 /**
97 * Parameters of the SCHED_DL_RACH_INFO_REQ primitive.
98 * See section 4.2.5 for a detailed description of the parameters.
99 */
101 {
102 uint16_t m_sfnSf; ///< sfn SF
103 std::vector<RachListElement_s> m_rachList; ///< RACH list
104
105 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
106 };
107
108 /**
109 * Parameters of the SCHED_DL_CQI_INFO_REQ primitive.
110 * See section 4.2.6 for a detailed description of the parameters.
111 */
113 {
114 uint16_t m_sfnSf; ///< sfn SF
115 std::vector<CqiListElement_s> m_cqiList; ///< CQI list
116
117 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
118 };
119
120 /**
121 * Parameters of the SCHED_UL_TRIGGER_REQ primitive.
122 * See section 4.2.8 for a detailed description of the parameters.
123 */
125 {
126 uint16_t m_sfnSf; ///< sfn SF
127 std::vector<UlInfoListElement_s> m_ulInfoList; ///< UL info list
128
129 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
130 };
131
132 /**
133 * Parameters of the SCHED_UL_NOISE_INTERFERENCE_REQ primitive.
134 * See section 4.2.9 for a detailed description of the parameters.
135 */
137 {
138 uint16_t m_sfnSf; ///< sfn SF
139 uint16_t m_rip; ///< RIP
140 uint16_t m_tnp; ///< TNP
141
142 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
143 };
144
145 /**
146 * Parameters of the SCHED_UL_SR_INFO_REQ primitive.
147 * See section 4.2.10 for a detailed description of the parameters.
148 */
150 {
151 uint16_t m_sfnSf; ///< sfn SF
152 std::vector<SrListElement_s> m_srList; ///< SR list
153
154 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
155 };
156
157 /**
158 * Parameters of the SCHED_UL_MAC_CTRL_INFO_REQ primitive.
159 * See section 4.2.11 for a detailed description of the parameters.
160 */
162 {
163 uint16_t m_sfnSf; ///< sfn SF
164 std::vector<MacCeListElement_s> m_macCeList; ///< MAC CE list
165
166 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
167 };
168
169 /**
170 * Parameters of the SCHED_UL_CQI_INFO_REQ primitive.
171 * See section 4.2.12 for a detailed description of the parameters.
172 */
174 {
175 uint16_t m_sfnSf; ///< sfn SF
176 UlCqi_s m_ulCqi; ///< UL CQI
177
178 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
179 };
180
181 //
182 // SCHED - MAC Scheduler SAP primitives
183 // (See 4.2 for description of the primitives)
184 //
185
186 /**
187 * \brief SCHED_DL_RLC_BUFFER_REQ
188 *
189 * \param params SchedDlRlcBufferReqParameters
190 */
191 virtual void SchedDlRlcBufferReq(const SchedDlRlcBufferReqParameters& params) = 0;
192
193 /**
194 * \brief SCHED_DL_PAGING_BUFFER_REQ
195 *
196 * \param params SchedDlPagingBufferReqParameters
197 */
199
200 /**
201 * \brief SCHED_DL_MAC_BUFFER_REQ
202 *
203 * \param params SchedDlMacBufferReqParameters
204 */
205 virtual void SchedDlMacBufferReq(const SchedDlMacBufferReqParameters& params) = 0;
206
207 /**
208 * \brief SCHED_DL_TRIGGER_REQ
209 *
210 * \param params SchedDlTriggerReqParameters
211 */
212 virtual void SchedDlTriggerReq(const SchedDlTriggerReqParameters& params) = 0;
213
214 /**
215 * \brief SCHED_DL_RACH_INFO_REQ
216 *
217 * \param params SchedDlRachInfoReqParameters
218 */
219 virtual void SchedDlRachInfoReq(const SchedDlRachInfoReqParameters& params) = 0;
220
221 /**
222 * \brief SCHED_DL_CQI_INFO_REQ
223 *
224 * \param params SchedDlCqiInfoReqParameters
225 */
226 virtual void SchedDlCqiInfoReq(const SchedDlCqiInfoReqParameters& params) = 0;
227
228 /**
229 * \brief SCHED_UL_TRIGGER_REQ
230 *
231 * \param params SchedUlTriggerReqParameters
232 */
233 virtual void SchedUlTriggerReq(const SchedUlTriggerReqParameters& params) = 0;
234
235 /**
236 * \brief SCHED_UL_NOISE_INTERFERENCE_REQ
237 *
238 * \param params SchedUlNoiseInterferenceReqParameters
239 */
241 const SchedUlNoiseInterferenceReqParameters& params) = 0;
242
243 /**
244 * \brief SCHED_UL_SR_INFO_REQ
245 *
246 * \param params SchedUlSrInfoReqParameters
247 */
248 virtual void SchedUlSrInfoReq(const SchedUlSrInfoReqParameters& params) = 0;
249
250 /**
251 * \brief SCHED_UL_MAC_CTRL_INFO_REQ
252 *
253 * \param params SchedUlMacCtrlInfoReqParameters
254 */
256
257 /**
258 * \brief SCHED_UL_CQI_INFO_REQ
259 *
260 * \param params SchedUlCqiInfoReqParameters
261 */
262 virtual void SchedUlCqiInfoReq(const SchedUlCqiInfoReqParameters& params) = 0;
263
264 private:
265};
266
267/// FfMacSchedSapUser class
269{
270 public:
271 virtual ~FfMacSchedSapUser();
272
273 /**
274 * Parameters of the API primitives
275 */
276
277 /**
278 * Parameters of the SCHED_DL_CONFIG_IND primitive.
279 * See section 4.2.7 for a detailed description of the parameters.
280 */
282 {
283 std::vector<BuildDataListElement_s> m_buildDataList; ///< build data list
284 std::vector<BuildRarListElement_s> m_buildRarList; ///< build rar list
285 std::vector<BuildBroadcastListElement_s> m_buildBroadcastList; ///< build broadcast list
286
287 uint8_t m_nrOfPdcchOfdmSymbols; ///< number of PDCCH OFDM symbols
288
289 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
290 };
291
292 /**
293 * Parameters of the SCHED_UL_CONFIG_IND primitive.
294 * See section 4.2.13 for a detailed description of the parameters.
295 */
297 {
298 std::vector<UlDciListElement_s> m_dciList; ///< DCI list
299 std::vector<PhichListElement_s> m_phichList; ///< PHICH list
300
301 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
302 };
303
304 //
305 // SCHED - MAC Scheduler SAP primitives
306 // (See 4.2 for description of the primitives)
307 //
308
309 /**
310 * \brief SCHED_DL_CONFIG_IND
311 *
312 * \param params SchedDlConfigIndParameters
313 */
314 virtual void SchedDlConfigInd(const SchedDlConfigIndParameters& params) = 0;
315
316 /**
317 * \brief SCHED_UL_CONFIG_IND
318 *
319 * \param params SchedUlConfigIndParameters
320 */
321 virtual void SchedUlConfigInd(const SchedUlConfigIndParameters& params) = 0;
322
323 private:
324};
325
326/// MemberSchedSapProvider class
327template <class C>
329{
330 public:
331 /**
332 * Constructor
333 *
334 * \param scheduler the scheduler class
335 */
336 MemberSchedSapProvider(C* scheduler);
337
338 // Delete default constructor to avoid misuse
340
341 // inherited from FfMacSchedSapProvider
342 void SchedDlRlcBufferReq(const SchedDlRlcBufferReqParameters& params) override;
343 void SchedDlPagingBufferReq(const SchedDlPagingBufferReqParameters& params) override;
344 void SchedDlMacBufferReq(const SchedDlMacBufferReqParameters& params) override;
345 void SchedDlTriggerReq(const SchedDlTriggerReqParameters& params) override;
346 void SchedDlRachInfoReq(const SchedDlRachInfoReqParameters& params) override;
347 void SchedDlCqiInfoReq(const SchedDlCqiInfoReqParameters& params) override;
348 void SchedUlTriggerReq(const SchedUlTriggerReqParameters& params) override;
350 void SchedUlSrInfoReq(const SchedUlSrInfoReqParameters& params) override;
351 void SchedUlMacCtrlInfoReq(const SchedUlMacCtrlInfoReqParameters& params) override;
352 void SchedUlCqiInfoReq(const SchedUlCqiInfoReqParameters& params) override;
353
354 private:
355 C* m_scheduler; ///< the scheduler class
356};
357
358template <class C>
360 : m_scheduler(scheduler)
361{
362}
363
364template <class C>
365void
367{
368 m_scheduler->DoSchedDlRlcBufferReq(params);
369}
370
371template <class C>
372void
374{
375 m_scheduler->DoSchedDlPagingBufferReq(params);
376}
377
378template <class C>
379void
381{
382 m_scheduler->DoSchedDlMacBufferReq(params);
383}
384
385template <class C>
386void
388{
389 m_scheduler->DoSchedDlTriggerReq(params);
390}
391
392template <class C>
393void
395{
396 m_scheduler->DoSchedDlRachInfoReq(params);
397}
398
399template <class C>
400void
402{
403 m_scheduler->DoSchedDlCqiInfoReq(params);
404}
405
406template <class C>
407void
409{
410 m_scheduler->DoSchedUlTriggerReq(params);
411}
412
413template <class C>
414void
417{
418 m_scheduler->DoSchedUlNoiseInterferenceReq(params);
419}
420
421template <class C>
422void
424{
425 m_scheduler->DoSchedUlSrInfoReq(params);
426}
427
428template <class C>
429void
431{
432 m_scheduler->DoSchedUlMacCtrlInfoReq(params);
433}
434
435template <class C>
436void
438{
439 m_scheduler->DoSchedUlCqiInfoReq(params);
440}
441
442} // namespace ns3
443
444#endif /* FF_MAC_SCHED_SAP_H */
Provides the SCHED SAP.
virtual void SchedDlTriggerReq(const SchedDlTriggerReqParameters &params)=0
SCHED_DL_TRIGGER_REQ.
virtual void SchedDlRachInfoReq(const SchedDlRachInfoReqParameters &params)=0
SCHED_DL_RACH_INFO_REQ.
virtual void SchedUlMacCtrlInfoReq(const SchedUlMacCtrlInfoReqParameters &params)=0
SCHED_UL_MAC_CTRL_INFO_REQ.
virtual void SchedUlCqiInfoReq(const SchedUlCqiInfoReqParameters &params)=0
SCHED_UL_CQI_INFO_REQ.
virtual void SchedUlTriggerReq(const SchedUlTriggerReqParameters &params)=0
SCHED_UL_TRIGGER_REQ.
virtual void SchedDlRlcBufferReq(const SchedDlRlcBufferReqParameters &params)=0
SCHED_DL_RLC_BUFFER_REQ.
virtual void SchedUlNoiseInterferenceReq(const SchedUlNoiseInterferenceReqParameters &params)=0
SCHED_UL_NOISE_INTERFERENCE_REQ.
virtual void SchedDlCqiInfoReq(const SchedDlCqiInfoReqParameters &params)=0
SCHED_DL_CQI_INFO_REQ.
virtual void SchedDlMacBufferReq(const SchedDlMacBufferReqParameters &params)=0
SCHED_DL_MAC_BUFFER_REQ.
virtual void SchedUlSrInfoReq(const SchedUlSrInfoReqParameters &params)=0
SCHED_UL_SR_INFO_REQ.
virtual void SchedDlPagingBufferReq(const SchedDlPagingBufferReqParameters &params)=0
SCHED_DL_PAGING_BUFFER_REQ.
FfMacSchedSapUser class.
virtual void SchedUlConfigInd(const SchedUlConfigIndParameters &params)=0
SCHED_UL_CONFIG_IND.
virtual void SchedDlConfigInd(const SchedDlConfigIndParameters &params)=0
SCHED_DL_CONFIG_IND.
MemberSchedSapProvider class.
void SchedUlMacCtrlInfoReq(const SchedUlMacCtrlInfoReqParameters &params) override
SCHED_UL_MAC_CTRL_INFO_REQ.
void SchedUlTriggerReq(const SchedUlTriggerReqParameters &params) override
SCHED_UL_TRIGGER_REQ.
void SchedDlRachInfoReq(const SchedDlRachInfoReqParameters &params) override
SCHED_DL_RACH_INFO_REQ.
C * m_scheduler
the scheduler class
void SchedDlCqiInfoReq(const SchedDlCqiInfoReqParameters &params) override
SCHED_DL_CQI_INFO_REQ.
void SchedUlNoiseInterferenceReq(const SchedUlNoiseInterferenceReqParameters &params) override
SCHED_UL_NOISE_INTERFERENCE_REQ.
void SchedUlCqiInfoReq(const SchedUlCqiInfoReqParameters &params) override
SCHED_UL_CQI_INFO_REQ.
void SchedDlTriggerReq(const SchedDlTriggerReqParameters &params) override
SCHED_DL_TRIGGER_REQ.
void SchedDlRlcBufferReq(const SchedDlRlcBufferReqParameters &params) override
SCHED_DL_RLC_BUFFER_REQ.
void SchedDlMacBufferReq(const SchedDlMacBufferReqParameters &params) override
SCHED_DL_MAC_BUFFER_REQ.
void SchedUlSrInfoReq(const SchedUlSrInfoReqParameters &params) override
SCHED_UL_SR_INFO_REQ.
void SchedDlPagingBufferReq(const SchedDlPagingBufferReqParameters &params) override
SCHED_DL_PAGING_BUFFER_REQ.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
CeBitmap_e
CeBitmap_e.
Parameters of the SCHED_DL_CQI_INFO_REQ primitive.
std::vector< CqiListElement_s > m_cqiList
CQI list.
std::vector< VendorSpecificListElement_s > m_vendorSpecificList
vendor specific list
Parameters of the SCHED_DL_MAC_BUFFER_REQ primitive.
std::vector< VendorSpecificListElement_s > m_vendorSpecificList
vendor specific list
Parameters of the SCHED_DL_PAGING_BUFFER_REQ primitive.
std::vector< VendorSpecificListElement_s > m_vendorSpecificList
vendor specific list
std::vector< PagingInfoListElement_s > m_pagingInfoList
paging info list
Parameters of the SCHED_DL_RACH_INFO_REQ primitive.
std::vector< VendorSpecificListElement_s > m_vendorSpecificList
vendor specific list
std::vector< RachListElement_s > m_rachList
RACH list.
uint16_t m_rlcRetransmissionHolDelay
RLC retransmission HOL delay.
uint32_t m_rlcRetransmissionQueueSize
RLC retransmission queue size.
uint16_t m_rlcTransmissionQueueHolDelay
RLC transmission queue HOL delay.
uint32_t m_rlcTransmissionQueueSize
RLC transmission queue size.
std::vector< VendorSpecificListElement_s > m_vendorSpecificList
vendor specific list
Parameters of the SCHED_DL_TRIGGER_REQ primitive.
std::vector< VendorSpecificListElement_s > m_vendorSpecificList
vendor specific list
std::vector< DlInfoListElement_s > m_dlInfoList
DL info list.
Parameters of the SCHED_UL_CQI_INFO_REQ primitive.
std::vector< VendorSpecificListElement_s > m_vendorSpecificList
vendor specific list
Parameters of the SCHED_UL_MAC_CTRL_INFO_REQ primitive.
std::vector< MacCeListElement_s > m_macCeList
MAC CE list.
std::vector< VendorSpecificListElement_s > m_vendorSpecificList
vendor specific list
Parameters of the SCHED_UL_NOISE_INTERFERENCE_REQ primitive.
std::vector< VendorSpecificListElement_s > m_vendorSpecificList
vendor specific list
Parameters of the SCHED_UL_SR_INFO_REQ primitive.
std::vector< VendorSpecificListElement_s > m_vendorSpecificList
vendor specific list
std::vector< SrListElement_s > m_srList
SR list.
Parameters of the SCHED_UL_TRIGGER_REQ primitive.
std::vector< UlInfoListElement_s > m_ulInfoList
UL info list.
std::vector< VendorSpecificListElement_s > m_vendorSpecificList
vendor specific list
std::vector< BuildDataListElement_s > m_buildDataList
build data list
std::vector< VendorSpecificListElement_s > m_vendorSpecificList
vendor specific list
std::vector< BuildRarListElement_s > m_buildRarList
build rar list
uint8_t m_nrOfPdcchOfdmSymbols
number of PDCCH OFDM symbols
std::vector< BuildBroadcastListElement_s > m_buildBroadcastList
build broadcast list
Parameters of the SCHED_UL_CONFIG_IND primitive.
std::vector< UlDciListElement_s > m_dciList
DCI list.
std::vector< PhichListElement_s > m_phichList
PHICH list.
std::vector< VendorSpecificListElement_s > m_vendorSpecificList
vendor specific list
See section 4.3.29 ulCQI.