A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ff-mac-csched-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_CSCHED_SAP_H
21#define FF_MAC_CSCHED_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 CSCHED 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 SampleFfMacCschedSapProvider and SampleFfMacCschedSapuser classes
44 */
46{
47 public:
49
50 /**
51 * Parameters of the API primitives
52 */
53
54 /**
55 * Parameters of the CSCHED_CELL_CONFIG_REQ primitive.
56 * See section 4.1.1 for a detailed description of the parameters.
57 */
59 {
60 uint8_t m_puschHoppingOffset; ///< pusch hopping offset
61
62 /// Hopping mode enumeration
64 {
67 } m_hoppingMode; ///< hopping mode
68
69 uint8_t m_nSb; ///< unused
70
71 /// PHICH resource enumeration
73 {
78 } m_phichResource; ///< PHICH resource
79
80 NormalExtended_e m_phichDuration; ///< PHICH duration
81
82 uint8_t m_initialNrOfPdcchOfdmSymbols; ///< initial number of PDCCH OFDM symbols
83
84 SiConfiguration_s m_siConfiguration; ///< SI configuration
85
86 uint16_t m_ulBandwidth; ///< UL bandwidth
87 uint16_t m_dlBandwidth; ///< DL bandwidth
88
89 NormalExtended_e m_ulCyclicPrefixLength; ///< UL cyclic prefix length
90 NormalExtended_e m_dlCyclicPrefixLength; ///< DL cyclic prefix length
91
92 uint8_t m_antennaPortsCount; ///< antenna port count
93
94 /// Duplex mode enumeration
96 {
98 DM_FDD
99 } m_duplexMode; ///< duplex mode
100
101 uint8_t m_subframeAssignment; ///< subframe assignment
102 uint8_t m_specialSubframePatterns; ///< special subframe patterns
103 std::vector<uint8_t> m_mbsfnSubframeConfigRfPeriod; ///< MBS subframe config RF period
104 std::vector<uint8_t> m_mbsfnSubframeConfigRfOffset; ///< MBS subframe config RF offset
105 std::vector<uint8_t>
106 m_mbsfnSubframeConfigSfAllocation; ///< MBS subframe config SF allocation
107 uint8_t m_prachConfigurationIndex; ///< prach configuration index
108 uint8_t m_prachFreqOffset; ///< prach frequency offset
109 uint8_t m_raResponseWindowSize; ///< response window size
110 uint8_t m_macContentionResolutionTimer; ///< MAC contention resolution timer
111 uint8_t m_maxHarqMsg3Tx; ///< maximum HARQ message 3 transmit
112 uint16_t m_n1PucchAn; ///< n1pu cch an
113 uint8_t m_deltaPucchShift; ///< delta pu cch shift
114 uint8_t m_nrbCqi; ///< nrb CQI
115 uint8_t m_ncsAn; ///< ncs an
116 uint8_t m_srsSubframeConfiguration; ///< SRS subframe configuration
117 uint8_t m_srsSubframeOffset; ///< SRS subframe offset
118 uint8_t m_srsBandwidthConfiguration; ///< SRS bandwidth configuration
119 bool m_srsMaxUpPts; ///< SRS maximum up pts
120
121 /// Enable64Qam_e enumeration
123 {
126 } m_enable64Qam; ///< enable64Qam
127
128 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
129 };
130
131 /**
132 * Parameters of the CSCHED_UE_CONFIG_REQ primitive.
133 * See section 4.1.3 for a detailed description of the parameters.
134 */
135 /// CschedUeConfigReqParameters structure
137 {
138 uint16_t m_rnti; ///< RNTI
139 bool m_reconfigureFlag; ///< reconfigure flag
140 bool m_drxConfigPresent; ///< drx config present
141 DrxConfig_s m_drxConfig; ///< drx config
142 uint16_t m_timeAlignmentTimer; ///< time alignment timer
143
144 /// MeasGapConfigPattern_e enumeration
146 {
149 OFF
150 } m_measGapConfigPattern; ///< measGapConfigPattern
151
152 uint8_t m_measGapConfigSubframeOffset; ///< measure gap config subframe offset
153 bool m_spsConfigPresent; ///< SPS config present
154 SpsConfig_s m_spsConfig; ///< SPS config
155 bool m_srConfigPresent; ///< SR config present
156 SrConfig_s m_srConfig; ///< SR config
157 bool m_cqiConfigPresent; ///< CQI config present
158 CqiConfig_s m_cqiConfig; ///< CQI config
159 uint8_t m_transmissionMode; ///< transmission mode
160 uint64_t m_ueAggregatedMaximumBitrateUl; ///< UE aggregate maximum bit rate UL
161 uint64_t m_ueAggregatedMaximumBitrateDl; ///< UE aggregate maximum bit rate DL
162 UeCapabilities_s m_ueCapabilities; ///< UE capabilities
163
164 /// OpenClosedLoop_e
166 {
170 } m_ueTransmitAntennaSelection; ///< ueTransmitAntennaSelection
171
172 bool m_ttiBundling; ///< TTI bundling
173 uint8_t m_maxHarqTx; ///< maximum HARQ transmit
174 uint8_t m_betaOffsetAckIndex; ///< beta offset ack index
175 uint8_t m_betaOffsetRiIndex; ///< beta offset ri index
176 uint8_t m_betaOffsetCqiIndex; ///< beta offset CQI index
177 bool m_ackNackSrsSimultaneousTransmission; ///< ack nack SRS simultaneous transmission
178 bool m_simultaneousAckNackAndCqi; ///< simultaneous ack nack and CQI
179
180 /// RepMode_e enumeration
182 {
189 } m_aperiodicCqiRepMode; ///< aperiodicCqiRepMode
190
191 /// FeedbackMode_e enumeration
193 {
196 } m_tddAckNackFeedbackMode; ///< tddAckNackFeedbackMode
197
198 uint8_t m_ackNackRepetitionFactor; ///< ackNackRepetitionFactor
199
200 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendorSpecificList
201 };
202
203 /**
204 * Parameters of the CSCHED_LC_CONFIG_REQ primitive.
205 * See section 4.1.5 for a detailed description of the parameters.
206 */
208 {
209 uint16_t m_rnti; ///< RNTI
210 bool m_reconfigureFlag; ///< reconfigure flag
211
212 std::vector<LogicalChannelConfigListElement_s>
213 m_logicalChannelConfigList; ///< logicalChannelConfigList
214
215 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendorSpecificList
216 };
217
218 /**
219 * Parameters of the CSCHED_LC_RELEASE_REQ primitive.
220 * See section 4.1.7 for a detailed description of the parameters.
221 */
223 {
224 uint16_t m_rnti; ///< RNTI
225
226 std::vector<uint8_t> m_logicalChannelIdentity; ///< logical channel identity
227
228 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendorSpecificList
229 };
230
231 /**
232 * Parameters of the CSCHED_UE_RELEASE_REQ primitive.
233 * See section 4.1.9 for a detailed description of the parameters.
234 */
236 {
237 uint16_t m_rnti; ///< RNTI
238
239 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendorSpecificList
240 };
241
242 //
243 // CSCHED - MAC Scheduler Control SAP primitives
244 // (See 4.1 for description of the primitives)
245 //
246
247 /**
248 * \brief CSCHED_CELL_CONFIG_REQ
249 *
250 * \param params CschedCellConfigReqParameters
251 */
252 virtual void CschedCellConfigReq(const CschedCellConfigReqParameters& params) = 0;
253
254 /**
255 * \brief CSCHED_UE_CONFIG_REQ
256 *
257 * \param params CschedUeConfigReqParameters
258 */
259 virtual void CschedUeConfigReq(const CschedUeConfigReqParameters& params) = 0;
260
261 /**
262 * \brief CSCHED_LC_CONFIG_REQ
263 *
264 * \param params CschedLcConfigReqParameters
265 */
266 virtual void CschedLcConfigReq(const CschedLcConfigReqParameters& params) = 0;
267
268 /**
269 * \brief CSCHED_LC_RELEASE_REQ
270 *
271 * \param params CschedLcReleaseReqParameters
272 */
273 virtual void CschedLcReleaseReq(const CschedLcReleaseReqParameters& params) = 0;
274
275 /**
276 * \brief CSCHED_UE_RELEASE_REQ
277 *
278 * \param params CschedUeReleaseReqParameters
279 */
280 virtual void CschedUeReleaseReq(const CschedUeReleaseReqParameters& params) = 0;
281
282 private:
283};
284
285/**
286 * FfMacCschedSapUser class
287 */
289{
290 public:
291 virtual ~FfMacCschedSapUser();
292
293 /**
294 * Parameters of the API primitives
295 */
296
297 /**
298 * Parameters of the CSCHED_CELL_CONFIG_CNF primitive.
299 * See section 4.1.2 for a detailed description of the parameters.
300 */
302 {
303 Result_e m_result; ///< result
304
305 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendorSpecificList
306 };
307
308 /**
309 * Parameters of the CSCHED_UE_CONFIG_CNF primitive.
310 * See section 4.1.4 for a detailed description of the parameters.
311 */
313 {
314 uint16_t m_rnti; ///< RNTI
315 Result_e m_result; ///< result
316
317 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendorSpecificList
318 };
319
320 /**
321 * Parameters of the CSCHED_LC_CONFIG_CNF primitive.
322 * See section 4.1.6 for a detailed description of the parameters.
323 */
325 {
326 uint16_t m_rnti; ///< RNTI
327 Result_e m_result; ///< result
328
329 std::vector<uint8_t> m_logicalChannelIdentity; ///< logical channel identity
330
331 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
332 };
333
334 /**
335 * Parameters of the CSCHED_LC_RELEASE_CNF primitive.
336 * See section 4.1.8 for a detailed description of the parameters.
337 */
339 {
340 uint16_t m_rnti; ///< RNTI
341 Result_e m_result; ///< result
342
343 std::vector<uint8_t> m_logicalChannelIdentity; ///< logical channel identity
344
345 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
346 };
347
348 /**
349 * Parameters of the CSCHED_UE_RELEASE_CNF primitive.
350 * See section 4.1.10 for a detailed description of the parameters.
351 */
353 {
354 uint16_t m_rnti; ///< RNTI
355 Result_e m_result; ///< result
356
357 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
358 };
359
360 /**
361 * Parameters of the CSCHED_UE_CONFIG_UPDATE_IND primitive.
362 * See section 4.1.11 for a detailed description of the parameters.
363 */
365 {
366 uint16_t m_rnti; ///< RNTI
367 uint8_t m_transmissionMode; ///< transmission mode
368 bool m_spsConfigPresent; ///< SPS config present
369 SpsConfig_s m_spsConfig; ///< SPS config
370 bool m_srConfigPresent; ///< SR config present
371 SrConfig_s m_srConfig; ///< SR config
372 bool m_cqiConfigPresent; ///< CQI config present
373 CqiConfig_s m_cqiConfig; ///< CQI config
374
375 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
376 };
377
378 /**
379 * Parameters of the CSCHED_CELL_CONFIG_UPDATE_IND primitive.
380 * See section 4.1.12 for a detailed description of the parameters.
381 */
383 {
384 uint8_t m_prbUtilizationDl; ///< DL utilization
385 uint8_t m_prbUtilizationUl; ///< UL utilization
386
387 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
388 };
389
390 //
391 // CSCHED - MAC Scheduler Control SAP primitives
392 // (See 4.1 for description of the primitives)
393 //
394
395 /**
396 * \brief CSCHED_CELL_CONFIG_CNF
397 *
398 * \param params CschedCellConfigCnfParameters
399 */
400 virtual void CschedCellConfigCnf(const CschedCellConfigCnfParameters& params) = 0;
401
402 /**
403 * \brief CSCHED_UE_CONFIG_CNF
404 *
405 * \param params CschedUeConfigCnfParameters
406 */
407 virtual void CschedUeConfigCnf(const CschedUeConfigCnfParameters& params) = 0;
408
409 /**
410 * \brief CSCHED_LC_CONFIG_CNF
411 *
412 * \param params CschedLcConfigCnfParameters
413 */
414 virtual void CschedLcConfigCnf(const CschedLcConfigCnfParameters& params) = 0;
415
416 /**
417 * \brief CSCHED_LC_RELEASE_CNF
418 *
419 * \param params CschedLcReleaseCnfParameters
420 */
421 virtual void CschedLcReleaseCnf(const CschedLcReleaseCnfParameters& params) = 0;
422
423 /**
424 * \brief CSCHED_UE_RELEASE_CNF
425 *
426 * \param params CschedUeReleaseCnfParameters
427 */
428 virtual void CschedUeReleaseCnf(const CschedUeReleaseCnfParameters& params) = 0;
429
430 /**
431 * \brief CSCHED_UE_UPDATE_IND
432 *
433 * \param params CschedUeConfigUpdateIndParameters
434 */
436
437 /**
438 * \brief CSCHED_UE_CONFIG_IND
439 *
440 * \param params CschedCellConfigUpdateIndParameters
441 */
443
444 private:
445};
446
447/// MemberCschedSapProvider class
448template <class C>
450{
451 public:
452 /**
453 * Constructor
454 *
455 * \param scheduler the scheduler class
456 */
457 MemberCschedSapProvider(C* scheduler);
458
459 // Delete default constructor to avoid misuse
461
462 // inherited from FfMacCschedSapProvider
463 void CschedCellConfigReq(const CschedCellConfigReqParameters& params) override;
464 void CschedUeConfigReq(const CschedUeConfigReqParameters& params) override;
465 void CschedLcConfigReq(const CschedLcConfigReqParameters& params) override;
466 void CschedLcReleaseReq(const CschedLcReleaseReqParameters& params) override;
467 void CschedUeReleaseReq(const CschedUeReleaseReqParameters& params) override;
468
469 private:
470 C* m_scheduler; ///< scheduler class
471};
472
473template <class C>
475 : m_scheduler(scheduler)
476{
477}
478
479template <class C>
480void
482{
483 m_scheduler->DoCschedCellConfigReq(params);
484}
485
486template <class C>
487void
489{
490 m_scheduler->DoCschedUeConfigReq(params);
491}
492
493template <class C>
494void
496{
497 m_scheduler->DoCschedLcConfigReq(params);
498}
499
500template <class C>
501void
503{
504 m_scheduler->DoCschedLcReleaseReq(params);
505}
506
507template <class C>
508void
510{
511 m_scheduler->DoCschedUeReleaseReq(params);
512}
513
514} // end namespace ns3
515
516#endif /* FF_MAC_CSCHED_SAP_H */
Provides the CSCHED SAP.
virtual void CschedLcConfigReq(const CschedLcConfigReqParameters &params)=0
CSCHED_LC_CONFIG_REQ.
virtual void CschedLcReleaseReq(const CschedLcReleaseReqParameters &params)=0
CSCHED_LC_RELEASE_REQ.
virtual void CschedUeConfigReq(const CschedUeConfigReqParameters &params)=0
CSCHED_UE_CONFIG_REQ.
virtual void CschedUeReleaseReq(const CschedUeReleaseReqParameters &params)=0
CSCHED_UE_RELEASE_REQ.
virtual void CschedCellConfigReq(const CschedCellConfigReqParameters &params)=0
CSCHED_CELL_CONFIG_REQ.
FfMacCschedSapUser class.
virtual void CschedUeConfigCnf(const CschedUeConfigCnfParameters &params)=0
CSCHED_UE_CONFIG_CNF.
virtual void CschedUeReleaseCnf(const CschedUeReleaseCnfParameters &params)=0
CSCHED_UE_RELEASE_CNF.
virtual void CschedCellConfigCnf(const CschedCellConfigCnfParameters &params)=0
CSCHED_CELL_CONFIG_CNF.
virtual void CschedLcReleaseCnf(const CschedLcReleaseCnfParameters &params)=0
CSCHED_LC_RELEASE_CNF.
virtual void CschedUeConfigUpdateInd(const CschedUeConfigUpdateIndParameters &params)=0
CSCHED_UE_UPDATE_IND.
virtual void CschedCellConfigUpdateInd(const CschedCellConfigUpdateIndParameters &params)=0
CSCHED_UE_CONFIG_IND.
virtual void CschedLcConfigCnf(const CschedLcConfigCnfParameters &params)=0
CSCHED_LC_CONFIG_CNF.
MemberCschedSapProvider class.
void CschedUeConfigReq(const CschedUeConfigReqParameters &params) override
CSCHED_UE_CONFIG_REQ.
void CschedUeReleaseReq(const CschedUeReleaseReqParameters &params) override
CSCHED_UE_RELEASE_REQ.
void CschedCellConfigReq(const CschedCellConfigReqParameters &params) override
CSCHED_CELL_CONFIG_REQ.
void CschedLcConfigReq(const CschedLcConfigReqParameters &params) override
CSCHED_LC_CONFIG_REQ.
void CschedLcReleaseReq(const CschedLcReleaseReqParameters &params) override
CSCHED_LC_RELEASE_REQ.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Result_e
Result_e enumeration.
Definition: ff-mac-common.h:61
NormalExtended_e
NormalExtended_e enumeration.
Definition: ff-mac-common.h:83
See section 4.3.19 cqiConfig.
See section 4.3.16 drxConfig.
enum ns3::FfMacCschedSapProvider::CschedCellConfigReqParameters::PhichResource_e m_phichResource
PHICH resource.
uint8_t m_initialNrOfPdcchOfdmSymbols
initial number of PDCCH OFDM symbols
enum ns3::FfMacCschedSapProvider::CschedCellConfigReqParameters::DuplexMode_e m_duplexMode
duplex mode
uint8_t m_srsSubframeConfiguration
SRS subframe configuration.
uint8_t m_maxHarqMsg3Tx
maximum HARQ message 3 transmit
std::vector< uint8_t > m_mbsfnSubframeConfigRfOffset
MBS subframe config RF offset.
enum ns3::FfMacCschedSapProvider::CschedCellConfigReqParameters::HoppingMode_e m_hoppingMode
hopping mode
std::vector< uint8_t > m_mbsfnSubframeConfigSfAllocation
MBS subframe config SF allocation.
uint8_t m_srsBandwidthConfiguration
SRS bandwidth configuration.
NormalExtended_e m_dlCyclicPrefixLength
DL cyclic prefix length.
std::vector< uint8_t > m_mbsfnSubframeConfigRfPeriod
MBS subframe config RF period.
enum ns3::FfMacCschedSapProvider::CschedCellConfigReqParameters::Enable64Qam_e m_enable64Qam
enable64Qam
uint8_t m_macContentionResolutionTimer
MAC contention resolution timer.
NormalExtended_e m_ulCyclicPrefixLength
UL cyclic prefix length.
std::vector< VendorSpecificListElement_s > m_vendorSpecificList
vendor specific list
Parameters of the CSCHED_LC_CONFIG_REQ primitive.
std::vector< VendorSpecificListElement_s > m_vendorSpecificList
vendorSpecificList
std::vector< LogicalChannelConfigListElement_s > m_logicalChannelConfigList
logicalChannelConfigList
Parameters of the CSCHED_LC_RELEASE_REQ primitive.
std::vector< VendorSpecificListElement_s > m_vendorSpecificList
vendorSpecificList
std::vector< uint8_t > m_logicalChannelIdentity
logical channel identity
Parameters of the CSCHED_UE_CONFIG_REQ primitive.
std::vector< VendorSpecificListElement_s > m_vendorSpecificList
vendorSpecificList
enum ns3::FfMacCschedSapProvider::CschedUeConfigReqParameters::OpenClosedLoop_e m_ueTransmitAntennaSelection
ueTransmitAntennaSelection
bool m_simultaneousAckNackAndCqi
simultaneous ack nack and CQI
MeasGapConfigPattern_e
MeasGapConfigPattern_e enumeration.
uint8_t m_measGapConfigSubframeOffset
measure gap config subframe offset
enum ns3::FfMacCschedSapProvider::CschedUeConfigReqParameters::RepMode_e m_aperiodicCqiRepMode
aperiodicCqiRepMode
bool m_ackNackSrsSimultaneousTransmission
ack nack SRS simultaneous transmission
enum ns3::FfMacCschedSapProvider::CschedUeConfigReqParameters::FeedbackMode_e m_tddAckNackFeedbackMode
tddAckNackFeedbackMode
uint64_t m_ueAggregatedMaximumBitrateDl
UE aggregate maximum bit rate DL.
uint64_t m_ueAggregatedMaximumBitrateUl
UE aggregate maximum bit rate UL.
enum ns3::FfMacCschedSapProvider::CschedUeConfigReqParameters::MeasGapConfigPattern_e m_measGapConfigPattern
measGapConfigPattern
Parameters of the CSCHED_UE_RELEASE_REQ primitive.
std::vector< VendorSpecificListElement_s > m_vendorSpecificList
vendorSpecificList
std::vector< VendorSpecificListElement_s > m_vendorSpecificList
vendorSpecificList
Parameters of the CSCHED_CELL_CONFIG_UPDATE_IND primitive.
std::vector< VendorSpecificListElement_s > m_vendorSpecificList
vendor specific list
Parameters of the CSCHED_LC_CONFIG_CNF primitive.
std::vector< VendorSpecificListElement_s > m_vendorSpecificList
vendor specific list
std::vector< uint8_t > m_logicalChannelIdentity
logical channel identity
Parameters of the CSCHED_LC_RELEASE_CNF primitive.
std::vector< VendorSpecificListElement_s > m_vendorSpecificList
vendor specific list
std::vector< uint8_t > m_logicalChannelIdentity
logical channel identity
Parameters of the CSCHED_UE_CONFIG_CNF primitive.
std::vector< VendorSpecificListElement_s > m_vendorSpecificList
vendorSpecificList
Parameters of the CSCHED_UE_CONFIG_UPDATE_IND primitive.
std::vector< VendorSpecificListElement_s > m_vendorSpecificList
vendor specific list
Parameters of the CSCHED_UE_RELEASE_CNF primitive.
std::vector< VendorSpecificListElement_s > m_vendorSpecificList
vendor specific list
See section 4.3.21 siConfiguration.
See section 4.3.17 spsConfig.
See section 4.3.18 srConfig.
See section 4.3.20 ueCapabilities.