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 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Manuel Requena <manuel.requena@cttc.es>
7 */
8
9#ifndef FF_MAC_CSCHED_SAP_H
10#define FF_MAC_CSCHED_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 CSCHED 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 SampleFfMacCschedSapProvider and SampleFfMacCschedSapuser classes
33 */
35{
36 public:
38
39 /**
40 * Parameters of the API primitives
41 */
42
43 /**
44 * Parameters of the CSCHED_CELL_CONFIG_REQ primitive.
45 * See section 4.1.1 for a detailed description of the parameters.
46 */
48 {
49 uint8_t m_puschHoppingOffset; ///< pusch hopping offset
50
51 /// Hopping mode enumeration
53 {
56 } m_hoppingMode; ///< hopping mode
57
58 uint8_t m_nSb; ///< unused
59
60 /// PHICH resource enumeration
68
69 NormalExtended_e m_phichDuration; ///< PHICH duration
70
71 uint8_t m_initialNrOfPdcchOfdmSymbols; ///< initial number of PDCCH OFDM symbols
72
73 SiConfiguration_s m_siConfiguration; ///< SI configuration
74
75 uint16_t m_ulBandwidth; ///< UL bandwidth
76 uint16_t m_dlBandwidth; ///< DL bandwidth
77
78 NormalExtended_e m_ulCyclicPrefixLength; ///< UL cyclic prefix length
79 NormalExtended_e m_dlCyclicPrefixLength; ///< DL cyclic prefix length
80
81 uint8_t m_antennaPortsCount; ///< antenna port count
82
83 /// Duplex mode enumeration
85 {
87 DM_FDD
88 } m_duplexMode; ///< duplex mode
89
90 uint8_t m_subframeAssignment; ///< subframe assignment
91 uint8_t m_specialSubframePatterns; ///< special subframe patterns
92 std::vector<uint8_t> m_mbsfnSubframeConfigRfPeriod; ///< MBS subframe config RF period
93 std::vector<uint8_t> m_mbsfnSubframeConfigRfOffset; ///< MBS subframe config RF offset
94 std::vector<uint8_t>
95 m_mbsfnSubframeConfigSfAllocation; ///< MBS subframe config SF allocation
96 uint8_t m_prachConfigurationIndex; ///< prach configuration index
97 uint8_t m_prachFreqOffset; ///< prach frequency offset
98 uint8_t m_raResponseWindowSize; ///< response window size
99 uint8_t m_macContentionResolutionTimer; ///< MAC contention resolution timer
100 uint8_t m_maxHarqMsg3Tx; ///< maximum HARQ message 3 transmit
101 uint16_t m_n1PucchAn; ///< n1pu cch an
102 uint8_t m_deltaPucchShift; ///< delta pu cch shift
103 uint8_t m_nrbCqi; ///< nrb CQI
104 uint8_t m_ncsAn; ///< ncs an
105 uint8_t m_srsSubframeConfiguration; ///< SRS subframe configuration
106 uint8_t m_srsSubframeOffset; ///< SRS subframe offset
107 uint8_t m_srsBandwidthConfiguration; ///< SRS bandwidth configuration
108 bool m_srsMaxUpPts; ///< SRS maximum up pts
109
110 /// Enable64Qam_e enumeration
112 {
115 } m_enable64Qam; ///< enable64Qam
116
117 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
118 };
119
120 /**
121 * Parameters of the CSCHED_UE_CONFIG_REQ primitive.
122 * See section 4.1.3 for a detailed description of the parameters.
123 */
124 /// CschedUeConfigReqParameters structure
126 {
127 uint16_t m_rnti; ///< RNTI
128 bool m_reconfigureFlag; ///< reconfigure flag
129 bool m_drxConfigPresent; ///< drx config present
130 DrxConfig_s m_drxConfig; ///< drx config
131 uint16_t m_timeAlignmentTimer; ///< time alignment timer
132
133 /// MeasGapConfigPattern_e enumeration
135 {
138 OFF
139 } m_measGapConfigPattern; ///< measGapConfigPattern
140
141 uint8_t m_measGapConfigSubframeOffset; ///< measure gap config subframe offset
142 bool m_spsConfigPresent; ///< SPS config present
143 SpsConfig_s m_spsConfig; ///< SPS config
144 bool m_srConfigPresent; ///< SR config present
145 SrConfig_s m_srConfig; ///< SR config
146 bool m_cqiConfigPresent; ///< CQI config present
147 CqiConfig_s m_cqiConfig; ///< CQI config
148 uint8_t m_transmissionMode; ///< transmission mode
149 uint64_t m_ueAggregatedMaximumBitrateUl; ///< UE aggregate maximum bit rate UL
150 uint64_t m_ueAggregatedMaximumBitrateDl; ///< UE aggregate maximum bit rate DL
151 UeCapabilities_s m_ueCapabilities; ///< UE capabilities
152
153 /// OpenClosedLoop_e
155 {
159 } m_ueTransmitAntennaSelection; ///< ueTransmitAntennaSelection
160
161 bool m_ttiBundling; ///< TTI bundling
162 uint8_t m_maxHarqTx; ///< maximum HARQ transmit
163 uint8_t m_betaOffsetAckIndex; ///< beta offset ack index
164 uint8_t m_betaOffsetRiIndex; ///< beta offset ri index
165 uint8_t m_betaOffsetCqiIndex; ///< beta offset CQI index
166 bool m_ackNackSrsSimultaneousTransmission; ///< ack nack SRS simultaneous transmission
167 bool m_simultaneousAckNackAndCqi; ///< simultaneous ack nack and CQI
168
169 /// RepMode_e enumeration
179
180 /// FeedbackMode_e enumeration
182 {
185 } m_tddAckNackFeedbackMode; ///< tddAckNackFeedbackMode
186
187 uint8_t m_ackNackRepetitionFactor; ///< ackNackRepetitionFactor
188
189 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendorSpecificList
190 };
191
192 /**
193 * Parameters of the CSCHED_LC_CONFIG_REQ primitive.
194 * See section 4.1.5 for a detailed description of the parameters.
195 */
197 {
198 uint16_t m_rnti; ///< RNTI
199 bool m_reconfigureFlag; ///< reconfigure flag
200
201 std::vector<LogicalChannelConfigListElement_s>
202 m_logicalChannelConfigList; ///< logicalChannelConfigList
203
204 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendorSpecificList
205 };
206
207 /**
208 * Parameters of the CSCHED_LC_RELEASE_REQ primitive.
209 * See section 4.1.7 for a detailed description of the parameters.
210 */
212 {
213 uint16_t m_rnti; ///< RNTI
214
215 std::vector<uint8_t> m_logicalChannelIdentity; ///< logical channel identity
216
217 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendorSpecificList
218 };
219
220 /**
221 * Parameters of the CSCHED_UE_RELEASE_REQ primitive.
222 * See section 4.1.9 for a detailed description of the parameters.
223 */
225 {
226 uint16_t m_rnti; ///< RNTI
227
228 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendorSpecificList
229 };
230
231 //
232 // CSCHED - MAC Scheduler Control SAP primitives
233 // (See 4.1 for description of the primitives)
234 //
235
236 /**
237 * @brief CSCHED_CELL_CONFIG_REQ
238 *
239 * @param params CschedCellConfigReqParameters
240 */
241 virtual void CschedCellConfigReq(const CschedCellConfigReqParameters& params) = 0;
242
243 /**
244 * @brief CSCHED_UE_CONFIG_REQ
245 *
246 * @param params CschedUeConfigReqParameters
247 */
248 virtual void CschedUeConfigReq(const CschedUeConfigReqParameters& params) = 0;
249
250 /**
251 * @brief CSCHED_LC_CONFIG_REQ
252 *
253 * @param params CschedLcConfigReqParameters
254 */
255 virtual void CschedLcConfigReq(const CschedLcConfigReqParameters& params) = 0;
256
257 /**
258 * @brief CSCHED_LC_RELEASE_REQ
259 *
260 * @param params CschedLcReleaseReqParameters
261 */
262 virtual void CschedLcReleaseReq(const CschedLcReleaseReqParameters& params) = 0;
263
264 /**
265 * @brief CSCHED_UE_RELEASE_REQ
266 *
267 * @param params CschedUeReleaseReqParameters
268 */
269 virtual void CschedUeReleaseReq(const CschedUeReleaseReqParameters& params) = 0;
270
271 private:
272};
273
274/**
275 * FfMacCschedSapUser class
276 */
278{
279 public:
280 virtual ~FfMacCschedSapUser();
281
282 /**
283 * Parameters of the API primitives
284 */
285
286 /**
287 * Parameters of the CSCHED_CELL_CONFIG_CNF primitive.
288 * See section 4.1.2 for a detailed description of the parameters.
289 */
291 {
292 Result_e m_result; ///< result
293
294 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendorSpecificList
295 };
296
297 /**
298 * Parameters of the CSCHED_UE_CONFIG_CNF primitive.
299 * See section 4.1.4 for a detailed description of the parameters.
300 */
302 {
303 uint16_t m_rnti; ///< RNTI
304 Result_e m_result; ///< result
305
306 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendorSpecificList
307 };
308
309 /**
310 * Parameters of the CSCHED_LC_CONFIG_CNF primitive.
311 * See section 4.1.6 for a detailed description of the parameters.
312 */
314 {
315 uint16_t m_rnti; ///< RNTI
316 Result_e m_result; ///< result
317
318 std::vector<uint8_t> m_logicalChannelIdentity; ///< logical channel identity
319
320 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
321 };
322
323 /**
324 * Parameters of the CSCHED_LC_RELEASE_CNF primitive.
325 * See section 4.1.8 for a detailed description of the parameters.
326 */
328 {
329 uint16_t m_rnti; ///< RNTI
330 Result_e m_result; ///< result
331
332 std::vector<uint8_t> m_logicalChannelIdentity; ///< logical channel identity
333
334 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
335 };
336
337 /**
338 * Parameters of the CSCHED_UE_RELEASE_CNF primitive.
339 * See section 4.1.10 for a detailed description of the parameters.
340 */
342 {
343 uint16_t m_rnti; ///< RNTI
344 Result_e m_result; ///< result
345
346 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
347 };
348
349 /**
350 * Parameters of the CSCHED_UE_CONFIG_UPDATE_IND primitive.
351 * See section 4.1.11 for a detailed description of the parameters.
352 */
354 {
355 uint16_t m_rnti; ///< RNTI
356 uint8_t m_transmissionMode; ///< transmission mode
357 bool m_spsConfigPresent; ///< SPS config present
358 SpsConfig_s m_spsConfig; ///< SPS config
359 bool m_srConfigPresent; ///< SR config present
360 SrConfig_s m_srConfig; ///< SR config
361 bool m_cqiConfigPresent; ///< CQI config present
362 CqiConfig_s m_cqiConfig; ///< CQI config
363
364 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
365 };
366
367 /**
368 * Parameters of the CSCHED_CELL_CONFIG_UPDATE_IND primitive.
369 * See section 4.1.12 for a detailed description of the parameters.
370 */
372 {
373 uint8_t m_prbUtilizationDl; ///< DL utilization
374 uint8_t m_prbUtilizationUl; ///< UL utilization
375
376 std::vector<VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
377 };
378
379 //
380 // CSCHED - MAC Scheduler Control SAP primitives
381 // (See 4.1 for description of the primitives)
382 //
383
384 /**
385 * @brief CSCHED_CELL_CONFIG_CNF
386 *
387 * @param params CschedCellConfigCnfParameters
388 */
389 virtual void CschedCellConfigCnf(const CschedCellConfigCnfParameters& params) = 0;
390
391 /**
392 * @brief CSCHED_UE_CONFIG_CNF
393 *
394 * @param params CschedUeConfigCnfParameters
395 */
396 virtual void CschedUeConfigCnf(const CschedUeConfigCnfParameters& params) = 0;
397
398 /**
399 * @brief CSCHED_LC_CONFIG_CNF
400 *
401 * @param params CschedLcConfigCnfParameters
402 */
403 virtual void CschedLcConfigCnf(const CschedLcConfigCnfParameters& params) = 0;
404
405 /**
406 * @brief CSCHED_LC_RELEASE_CNF
407 *
408 * @param params CschedLcReleaseCnfParameters
409 */
410 virtual void CschedLcReleaseCnf(const CschedLcReleaseCnfParameters& params) = 0;
411
412 /**
413 * @brief CSCHED_UE_RELEASE_CNF
414 *
415 * @param params CschedUeReleaseCnfParameters
416 */
417 virtual void CschedUeReleaseCnf(const CschedUeReleaseCnfParameters& params) = 0;
418
419 /**
420 * @brief CSCHED_UE_UPDATE_IND
421 *
422 * @param params CschedUeConfigUpdateIndParameters
423 */
425
426 /**
427 * @brief CSCHED_UE_CONFIG_IND
428 *
429 * @param params CschedCellConfigUpdateIndParameters
430 */
432
433 private:
434};
435
436/// MemberCschedSapProvider class
437template <class C>
439{
440 public:
441 /**
442 * Constructor
443 *
444 * @param scheduler the scheduler class
445 */
446 MemberCschedSapProvider(C* scheduler);
447
448 // Delete default constructor to avoid misuse
450
451 // inherited from FfMacCschedSapProvider
452 void CschedCellConfigReq(const CschedCellConfigReqParameters& params) override;
453 void CschedUeConfigReq(const CschedUeConfigReqParameters& params) override;
454 void CschedLcConfigReq(const CschedLcConfigReqParameters& params) override;
455 void CschedLcReleaseReq(const CschedLcReleaseReqParameters& params) override;
456 void CschedUeReleaseReq(const CschedUeReleaseReqParameters& params) override;
457
458 private:
459 C* m_scheduler; ///< scheduler class
460};
461
462template <class C>
464 : m_scheduler(scheduler)
465{
466}
467
468template <class C>
469void
471{
472 m_scheduler->DoCschedCellConfigReq(params);
473}
474
475template <class C>
476void
478{
479 m_scheduler->DoCschedUeConfigReq(params);
480}
481
482template <class C>
483void
485{
486 m_scheduler->DoCschedLcConfigReq(params);
487}
488
489template <class C>
490void
492{
493 m_scheduler->DoCschedLcReleaseReq(params);
494}
495
496template <class C>
497void
499{
500 m_scheduler->DoCschedUeReleaseReq(params);
501}
502
503} // end namespace ns3
504
505#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.
NormalExtended_e
NormalExtended_e enumeration.
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
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
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.