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 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Author: Manuel Requena <manuel.requena@cttc.es>
18 */
19
20#ifndef FF_MAC_SCHED_SAP_H
21#define FF_MAC_SCHED_SAP_H
22
23#include "ff-mac-common.h"
24
25#include <stdint.h>
26#include <vector>
27
28namespace ns3
29{
30
31/**
32 * \ingroup ff-api
33 * \brief Provides the SCHED SAP
34 *
35 * This abstract class defines the MAC Scheduler interface specified in the
36 * Femto Forum Technical Document:
37 * - LTE MAC Scheduler Interface Specification v1.11
38 *
39 * The Technical Document contains a detailed description of the API.
40 * The documentation of this class refers to sections of this Technical Document.
41 *
42 * You can found an example of the implementation of this interface
43 * in the SampleFfMacSchedSapProvider and SampleFfMacSchedSapUser classes
44 */
46{
47 public:
48 virtual ~FfMacSchedSapProvider();
49
50 /**
51 * Parameters of the API primitives
52 */
53
54 /**
55 * Parameters of the SCHED_DL_RLC_BUFFER_REQ primitive.
56 * See section 4.2.1 for a detailed description of the parameters.
57 */
59 {
60 uint16_t m_rnti; ///< RNTI
61 uint8_t m_logicalChannelIdentity; ///< logical channel identity
62 uint32_t m_rlcTransmissionQueueSize; ///< RLC transmission queue size
63 uint16_t m_rlcTransmissionQueueHolDelay; ///< RLC transmission queue HOL delay
64 uint32_t m_rlcRetransmissionQueueSize; ///< RLC retransmission queue size
65 uint16_t m_rlcRetransmissionHolDelay; ///< RLC retransmission HOL delay
66 uint16_t m_rlcStatusPduSize; ///< RLC status PDU size
67
68 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
69 };
70
71 /**
72 * Parameters of the SCHED_DL_PAGING_BUFFER_REQ primitive.
73 * See section 4.2.2 for a detailed description of the parameters.
74 */
76 {
77 uint16_t m_rnti; ///< RNTI
78 std::vector<PagingInfoListElement_s> m_pagingInfoList; ///< paging info list
79
80 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
81 };
82
83 /**
84 * Parameters of the SCHED_DL_MAC_BUFFER_REQ primitive.
85 * See section 4.2.3 for a detailed description of the parameters.
86 */
88 {
89 uint16_t m_rnti; ///< RNTI
90 CeBitmap_e m_ceBitmap; ///< CE bitmap
91
92 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
93 };
94
95 /**
96 * Parameters of the SCHED_DL_TRIGGER_REQ primitive.
97 * See section 4.2.4 for a detailed description of the parameters.
98 */
100 {
101 uint16_t m_sfnSf; ///< sfn SF
102 std::vector<DlInfoListElement_s> m_dlInfoList; ///< DL info list
103
104 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
105 };
106
107 /**
108 * Parameters of the SCHED_DL_RACH_INFO_REQ primitive.
109 * See section 4.2.5 for a detailed description of the parameters.
110 */
112 {
113 uint16_t m_sfnSf; ///< sfn SF
114 std::vector<RachListElement_s> m_rachList; ///< RACH list
115
116 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
117 };
118
119 /**
120 * Parameters of the SCHED_DL_CQI_INFO_REQ primitive.
121 * See section 4.2.6 for a detailed description of the parameters.
122 */
124 {
125 uint16_t m_sfnSf; ///< sfn SF
126 std::vector<CqiListElement_s> m_cqiList; ///< CQI list
127
128 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
129 };
130
131 /**
132 * Parameters of the SCHED_UL_TRIGGER_REQ primitive.
133 * See section 4.2.8 for a detailed description of the parameters.
134 */
136 {
137 uint16_t m_sfnSf; ///< sfn SF
138 std::vector<UlInfoListElement_s> m_ulInfoList; ///< UL info list
139
140 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
141 };
142
143 /**
144 * Parameters of the SCHED_UL_NOISE_INTERFERENCE_REQ primitive.
145 * See section 4.2.9 for a detailed description of the parameters.
146 */
148 {
149 uint16_t m_sfnSf; ///< sfn SF
150 uint16_t m_rip; ///< RIP
151 uint16_t m_tnp; ///< TNP
152
153 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
154 };
155
156 /**
157 * Parameters of the SCHED_UL_SR_INFO_REQ primitive.
158 * See section 4.2.10 for a detailed description of the parameters.
159 */
161 {
162 uint16_t m_sfnSf; ///< sfn SF
163 std::vector<SrListElement_s> m_srList; ///< SR list
164
165 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
166 };
167
168 /**
169 * Parameters of the SCHED_UL_MAC_CTRL_INFO_REQ primitive.
170 * See section 4.2.11 for a detailed description of the parameters.
171 */
173 {
174 uint16_t m_sfnSf; ///< sfn SF
175 std::vector<MacCeListElement_s> m_macCeList; ///< MAC CE list
176
177 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
178 };
179
180 /**
181 * Parameters of the SCHED_UL_CQI_INFO_REQ primitive.
182 * See section 4.2.12 for a detailed description of the parameters.
183 */
185 {
186 uint16_t m_sfnSf; ///< sfn SF
187 UlCqi_s m_ulCqi; ///< UL CQI
188
189 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
190 };
191
192 //
193 // SCHED - MAC Scheduler SAP primitives
194 // (See 4.2 for description of the primitives)
195 //
196
197 /**
198 * \brief SCHED_DL_RLC_BUFFER_REQ
199 *
200 * \param params SchedDlRlcBufferReqParameters
201 */
202 virtual void SchedDlRlcBufferReq(const SchedDlRlcBufferReqParameters& params) = 0;
203
204 /**
205 * \brief SCHED_DL_PAGING_BUFFER_REQ
206 *
207 * \param params SchedDlPagingBufferReqParameters
208 */
210
211 /**
212 * \brief SCHED_DL_MAC_BUFFER_REQ
213 *
214 * \param params SchedDlMacBufferReqParameters
215 */
216 virtual void SchedDlMacBufferReq(const SchedDlMacBufferReqParameters& params) = 0;
217
218 /**
219 * \brief SCHED_DL_TRIGGER_REQ
220 *
221 * \param params SchedDlTriggerReqParameters
222 */
223 virtual void SchedDlTriggerReq(const SchedDlTriggerReqParameters& params) = 0;
224
225 /**
226 * \brief SCHED_DL_RACH_INFO_REQ
227 *
228 * \param params SchedDlRachInfoReqParameters
229 */
230 virtual void SchedDlRachInfoReq(const SchedDlRachInfoReqParameters& params) = 0;
231
232 /**
233 * \brief SCHED_DL_CQI_INFO_REQ
234 *
235 * \param params SchedDlCqiInfoReqParameters
236 */
237 virtual void SchedDlCqiInfoReq(const SchedDlCqiInfoReqParameters& params) = 0;
238
239 /**
240 * \brief SCHED_UL_TRIGGER_REQ
241 *
242 * \param params SchedUlTriggerReqParameters
243 */
244 virtual void SchedUlTriggerReq(const SchedUlTriggerReqParameters& params) = 0;
245
246 /**
247 * \brief SCHED_UL_NOISE_INTERFERENCE_REQ
248 *
249 * \param params SchedUlNoiseInterferenceReqParameters
250 */
252 const SchedUlNoiseInterferenceReqParameters& params) = 0;
253
254 /**
255 * \brief SCHED_UL_SR_INFO_REQ
256 *
257 * \param params SchedUlSrInfoReqParameters
258 */
259 virtual void SchedUlSrInfoReq(const SchedUlSrInfoReqParameters& params) = 0;
260
261 /**
262 * \brief SCHED_UL_MAC_CTRL_INFO_REQ
263 *
264 * \param params SchedUlMacCtrlInfoReqParameters
265 */
267
268 /**
269 * \brief SCHED_UL_CQI_INFO_REQ
270 *
271 * \param params SchedUlCqiInfoReqParameters
272 */
273 virtual void SchedUlCqiInfoReq(const SchedUlCqiInfoReqParameters& params) = 0;
274
275 private:
276};
277
278/// FfMacSchedSapUser class
280{
281 public:
282 virtual ~FfMacSchedSapUser();
283
284 /**
285 * Parameters of the API primitives
286 */
287
288 /**
289 * Parameters of the SCHED_DL_CONFIG_IND primitive.
290 * See section 4.2.7 for a detailed description of the parameters.
291 */
293 {
294 std::vector<BuildDataListElement_s> m_buildDataList; ///< build data list
295 std::vector<BuildRarListElement_s> m_buildRarList; ///< build rar list
296 std::vector<BuildBroadcastListElement_s> m_buildBroadcastList; ///< build broadcast list
297
298 uint8_t m_nrOfPdcchOfdmSymbols; ///< number of PDCCH OFDM symbols
299
300 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
301 };
302
303 /**
304 * Parameters of the SCHED_UL_CONFIG_IND primitive.
305 * See section 4.2.13 for a detailed description of the parameters.
306 */
308 {
309 std::vector<UlDciListElement_s> m_dciList; ///< DCI list
310 std::vector<PhichListElement_s> m_phichList; ///< PHICH list
311
312 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
313 };
314
315 //
316 // SCHED - MAC Scheduler SAP primitives
317 // (See 4.2 for description of the primitives)
318 //
319
320 /**
321 * \brief SCHED_DL_CONFIG_IND
322 *
323 * \param params SchedDlConfigIndParameters
324 */
325 virtual void SchedDlConfigInd(const SchedDlConfigIndParameters& params) = 0;
326
327 /**
328 * \brief SCHED_UL_CONFIG_IND
329 *
330 * \param params SchedUlConfigIndParameters
331 */
332 virtual void SchedUlConfigInd(const SchedUlConfigIndParameters& params) = 0;
333
334 private:
335};
336
337/// MemberSchedSapProvider class
338template <class C>
340{
341 public:
342 /**
343 * Constructor
344 *
345 * \param scheduler the scheduler class
346 */
347 MemberSchedSapProvider(C* scheduler);
348
349 // Delete default constructor to avoid misuse
351
352 // inherited from FfMacSchedSapProvider
353 void SchedDlRlcBufferReq(const SchedDlRlcBufferReqParameters& params) override;
354 void SchedDlPagingBufferReq(const SchedDlPagingBufferReqParameters& params) override;
355 void SchedDlMacBufferReq(const SchedDlMacBufferReqParameters& params) override;
356 void SchedDlTriggerReq(const SchedDlTriggerReqParameters& params) override;
357 void SchedDlRachInfoReq(const SchedDlRachInfoReqParameters& params) override;
358 void SchedDlCqiInfoReq(const SchedDlCqiInfoReqParameters& params) override;
359 void SchedUlTriggerReq(const SchedUlTriggerReqParameters& params) override;
361 void SchedUlSrInfoReq(const SchedUlSrInfoReqParameters& params) override;
362 void SchedUlMacCtrlInfoReq(const SchedUlMacCtrlInfoReqParameters& params) override;
363 void SchedUlCqiInfoReq(const SchedUlCqiInfoReqParameters& params) override;
364
365 private:
366 C* m_scheduler; ///< the scheduler class
367};
368
369template <class C>
371 : m_scheduler(scheduler)
372{
373}
374
375template <class C>
376void
378{
379 m_scheduler->DoSchedDlRlcBufferReq(params);
380}
381
382template <class C>
383void
385{
386 m_scheduler->DoSchedDlPagingBufferReq(params);
387}
388
389template <class C>
390void
392{
393 m_scheduler->DoSchedDlMacBufferReq(params);
394}
395
396template <class C>
397void
399{
400 m_scheduler->DoSchedDlTriggerReq(params);
401}
402
403template <class C>
404void
406{
407 m_scheduler->DoSchedDlRachInfoReq(params);
408}
409
410template <class C>
411void
413{
414 m_scheduler->DoSchedDlCqiInfoReq(params);
415}
416
417template <class C>
418void
420{
421 m_scheduler->DoSchedUlTriggerReq(params);
422}
423
424template <class C>
425void
428{
429 m_scheduler->DoSchedUlNoiseInterferenceReq(params);
430}
431
432template <class C>
433void
435{
436 m_scheduler->DoSchedUlSrInfoReq(params);
437}
438
439template <class C>
440void
442{
443 m_scheduler->DoSchedUlMacCtrlInfoReq(params);
444}
445
446template <class C>
447void
449{
450 m_scheduler->DoSchedUlCqiInfoReq(params);
451}
452
453} // namespace ns3
454
455#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.
Definition: ff-mac-common.h:75
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.