/usr/include/ns3.27/ns3/ff-mac-csched-sap.h is in libns3-dev 3.27+dfsg-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Author: Manuel Requena <manuel.requena@cttc.es>
*/
#ifndef FF_MAC_CSCHED_SAP_H
#define FF_MAC_CSCHED_SAP_H
#include <stdint.h>
#include <vector>
#include "ff-mac-common.h"
namespace ns3 {
/**
* \ingroup ff-api
* \brief Provides the CSCHED SAP
*
* This abstract class defines the MAC Scheduler interface specified in the
* Femto Forum Technical Document:
* - LTE MAC Scheduler Interface Specification v1.11
*
* The Technical Document contains a detailed description of the API.
* The documentation of this class refers to sections of this Technical Document.
*
* You can found an example of the implementation of this interface
* in the SampleFfMacCschedSapProvider and SampleFfMacCschedSapuser classes
*/
class FfMacCschedSapProvider
{
public:
virtual ~FfMacCschedSapProvider ();
/**
* Parameters of the API primitives
*/
/**
* Parameters of the CSCHED_CELL_CONFIG_REQ primitive.
* See section 4.1.1 for a detailed description of the parameters.
*/
struct CschedCellConfigReqParameters
{
uint8_t m_puschHoppingOffset; ///< pusch hopping offset
/// Hopping mode enumeration
enum HoppingMode_e
{
inter,
interintra
} m_hoppingMode; ///< hopping mode
uint8_t m_nSb; ///< unused
/// PHICH resource enumeration
enum PhichResource_e
{
PHICH_R_ONE_SIXTH,
PHICH_R_HALF,
PHICH_R_ONE,
PHICH_R_TWO
} m_phichResource; ///< PHICH resource
enum NormalExtended_e m_phichDuration; ///< PHICH duration
uint8_t m_initialNrOfPdcchOfdmSymbols; ///< initial number of PDCCH OFDM symbols
struct SiConfiguration_s m_siConfiguration; ///< SI configuration
uint8_t m_ulBandwidth; ///< UL bandwidth
uint8_t m_dlBandwidth; ///< DL badnwidth
enum NormalExtended_e m_ulCyclicPrefixLength; ///< UL cyclic prefix length
enum NormalExtended_e m_dlCyclicPrefixLength; ///< DL cyclic prefix length
uint8_t m_antennaPortsCount; ///< antenna port count
/// Duplex mode enumeration
enum DuplexMode_e
{
DM_TDD,
DM_FDD
} m_duplexMode; ///< duplex mode
uint8_t m_subframeAssignment; ///< subframe assignment
uint8_t m_specialSubframePatterns; ///< special subframe patterns
std::vector <uint8_t> m_mbsfnSubframeConfigRfPeriod; ///< MBS subframe config RF period
std::vector <uint8_t> m_mbsfnSubframeConfigRfOffset; ///< MBS subframe config RF offset
std::vector <uint8_t> m_mbsfnSubframeConfigSfAllocation; ///< MBS subframe config SF allocation
uint8_t m_prachConfigurationIndex; ///< prach configuration index
uint8_t m_prachFreqOffset; ///< prach frequency offset
uint8_t m_raResponseWindowSize; ///< response window size
uint8_t m_macContentionResolutionTimer; ///< MAC contention resolution timer
uint8_t m_maxHarqMsg3Tx; ///< maximum HARQ message 3 transmit
uint16_t m_n1PucchAn; ///< n1pu cch an
uint8_t m_deltaPucchShift; ///< delta pu cch shift
uint8_t m_nrbCqi; ///< nrb CQI
uint8_t m_ncsAn; ///< ncs an
uint8_t m_srsSubframeConfiguration; ///< SRS subframe confguration
uint8_t m_srsSubframeOffset; ///< SRS subframe offset
uint8_t m_srsBandwidthConfiguration; ///< SRS bandwidth configuration
bool m_srsMaxUpPts; ///< SRS maximum up pts
/// Enable64Qam_e enumeration
enum Enable64Qam_e
{
MOD_16QAM,
MOD_64QAM
} m_enable64Qam; ///< enable64Qam
std::vector <struct VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
};
/**
* Parameters of the CSCHED_UE_CONFIG_REQ primitive.
* See section 4.1.3 for a detailed description of the parameters.
*/
/// CschedUeConfigReqParameters structure
struct CschedUeConfigReqParameters
{
uint16_t m_rnti; ///< RNTI
bool m_reconfigureFlag; ///< reconfigure flag
bool m_drxConfigPresent; ///< drx config present
struct DrxConfig_s m_drxConfig; ///< drx config
uint16_t m_timeAlignmentTimer; ///< time alignment timer
/// MeasGapConfigPattern_e enumaration
enum MeasGapConfigPattern_e
{
MGP_GP1,
MGP_GP2,
OFF
} m_measGapConfigPattern; ///< measGapConfigPattern
uint8_t m_measGapConfigSubframeOffset; ///< measure gap config subframe offset
bool m_spsConfigPresent; ///< SPS configu present
struct SpsConfig_s m_spsConfig; ///< SPS config
bool m_srConfigPresent; ///< SR config present
struct SrConfig_s m_srConfig; ///< SR config
bool m_cqiConfigPresent; ///< CQI config present
struct CqiConfig_s m_cqiConfig; ///< CQI config
uint8_t m_transmissionMode; ///< transmission mode
uint64_t m_ueAggregatedMaximumBitrateUl; ///< UE aggregate maximum bit rate UL
uint64_t m_ueAggregatedMaximumBitrateDl; ///< UE aggregate maximum bit rate DL
struct UeCapabilities_s m_ueCapabilities; ///< UE capabilities
/// OpenClosedLoop_e
enum OpenClosedLoop_e
{
noneloop,
openloop,
closedloop
} m_ueTransmitAntennaSelection; ///< ueTransmitAntennaSelection
bool m_ttiBundling; ///< TTI bundling
uint8_t m_maxHarqTx; ///< maximum HARQ transmit
uint8_t m_betaOffsetAckIndex; ///< beta offset ack index
uint8_t m_betaOffsetRiIndex; ///< beta offset ri index
uint8_t m_betaOffsetCqiIndex; ///< beta offset CQI index
bool m_ackNackSrsSimultaneousTransmission; ///< ack nack SRS simultaneous transmission
bool m_simultaneousAckNackAndCqi; ///< simultaneous ack nack and CQI
/// RepMode_e enumeration
enum RepMode_e
{
rm12, rm20, rm22, rm30, rm31, nonemode
} m_aperiodicCqiRepMode; ///< aperiodicCqiRepMode
/// FeedbackMode_e enumeration
enum FeedbackMode_e
{
bundling,
multiplexing
} m_tddAckNackFeedbackMode; ///< tddAckNackFeedbackMode
uint8_t m_ackNackRepetitionFactor; ///< ackNackRepetitionFactor
std::vector <struct VendorSpecificListElement_s> m_vendorSpecificList; ///< vendorSpecificList
};
/**
* Parameters of the CSCHED_LC_CONFIG_REQ primitive.
* See section 4.1.5 for a detailed description of the parameters.
*/
struct CschedLcConfigReqParameters
{
uint16_t m_rnti; ///< RNTI
bool m_reconfigureFlag; ///< reconfigure flag
std::vector <struct LogicalChannelConfigListElement_s> m_logicalChannelConfigList; ///< logicalChannelConfigList
std::vector <struct VendorSpecificListElement_s> m_vendorSpecificList; ///< vendorSpecificList
};
/**
* Parameters of the CSCHED_LC_RELEASE_REQ primitive.
* See section 4.1.7 for a detailed description of the parameters.
*/
struct CschedLcReleaseReqParameters
{
uint16_t m_rnti; ///< RNTI
std::vector <uint8_t> m_logicalChannelIdentity; ///< logical channel identity
std::vector <struct VendorSpecificListElement_s> m_vendorSpecificList; ///< vendorSpecificList
};
/**
* Parameters of the CSCHED_UE_RELEASE_REQ primitive.
* See section 4.1.9 for a detailed description of the parameters.
*/
struct CschedUeReleaseReqParameters
{
uint16_t m_rnti; ///< RNTI
std::vector <struct VendorSpecificListElement_s> m_vendorSpecificList; ///< vendorSpecificList
};
//
// CSCHED - MAC Scheduler Control SAP primitives
// (See 4.1 for description of the primitives)
//
/**
* \brief CSCHED_CELL_CONFIG_REQ
*
* \param params CschedCellConfigReqParameters
*/
virtual void CschedCellConfigReq (const struct CschedCellConfigReqParameters& params) = 0;
/**
* \brief CSCHED_UE_CONFIG_REQ
*
* \param params CschedUeConfigReqParameters
*/
virtual void CschedUeConfigReq (const struct CschedUeConfigReqParameters& params) = 0;
/**
* \brief CSCHED_LC_CONFIG_REQ
*
* \param params CschedLcConfigReqParameters
*/
virtual void CschedLcConfigReq (const struct CschedLcConfigReqParameters& params) = 0;
/**
* \brief CSCHED_LC_RELEASE_REQ
*
* \param params CschedLcReleaseReqParameters
*/
virtual void CschedLcReleaseReq (const struct CschedLcReleaseReqParameters& params) = 0;
/**
* \brief CSCHED_UE_RELEASE_REQ
*
* \param params CschedUeReleaseReqParameters
*/
virtual void CschedUeReleaseReq (const struct CschedUeReleaseReqParameters& params) = 0;
private:
};
/**
* FfMacCschedSapUser class
*/
class FfMacCschedSapUser
{
public:
virtual ~FfMacCschedSapUser ();
/**
* Parameters of the API primitives
*/
/**
* Parameters of the CSCHED_CELL_CONFIG_CNF primitive.
* See section 4.1.2 for a detailed description of the parameters.
*/
struct CschedCellConfigCnfParameters
{
enum Result_e m_result; ///< result
std::vector <struct VendorSpecificListElement_s> m_vendorSpecificList; ///< vendorSpecificList
};
/**
* Parameters of the CSCHED_UE_CONFIG_CNF primitive.
* See section 4.1.4 for a detailed description of the parameters.
*/
struct CschedUeConfigCnfParameters
{
uint16_t m_rnti; ///< RNTI
enum Result_e m_result; ///< result
std::vector <struct VendorSpecificListElement_s> m_vendorSpecificList; ///< vendorSpecificList
};
/**
* Parameters of the CSCHED_LC_CONFIG_CNF primitive.
* See section 4.1.6 for a detailed description of the parameters.
*/
struct CschedLcConfigCnfParameters
{
uint16_t m_rnti; ///< RNTI
enum Result_e m_result; ///< result
std::vector <uint8_t> m_logicalChannelIdentity; ///< logical channel identity
std::vector <struct VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
};
/**
* Parameters of the CSCHED_LC_RELEASE_CNF primitive.
* See section 4.1.8 for a detailed description of the parameters.
*/
struct CschedLcReleaseCnfParameters
{
uint16_t m_rnti; ///< RNTI
enum Result_e m_result; ///< result
std::vector <uint8_t> m_logicalChannelIdentity; ///< logical channel identity
std::vector <struct VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
};
/**
* Parameters of the CSCHED_UE_RELEASE_CNF primitive.
* See section 4.1.10 for a detailed description of the parameters.
*/
struct CschedUeReleaseCnfParameters
{
uint16_t m_rnti; ///< RNTI
enum Result_e m_result; ///< result
std::vector <struct VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
};
/**
* Parameters of the CSCHED_UE_CONFIG_UPDATE_IND primitive.
* See section 4.1.11 for a detailed description of the parameters.
*/
struct CschedUeConfigUpdateIndParameters
{
uint16_t m_rnti; ///< RNTI
uint8_t m_transmissionMode; ///< transmission mode
bool m_spsConfigPresent; ///< SPS config present
struct SpsConfig_s m_spsConfig; ///< SPS config
bool m_srConfigPresent; ///< SR config present
struct SrConfig_s m_srConfig; ///< SR config
bool m_cqiConfigPresent; ///< CQI config present
struct CqiConfig_s m_cqiConfig; ///< CQI config
std::vector <struct VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
};
/**
* Parameters of the CSCHED_CELL_CONFIG_UPDATE_IND primitive.
* See section 4.1.12 for a detailed description of the parameters.
*/
struct CschedCellConfigUpdateIndParameters
{
uint8_t m_prbUtilizationDl; ///< DL utilization
uint8_t m_prbUtilizationUl; ///< UL utilization
std::vector <struct VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
};
//
// CSCHED - MAC Scheduler Control SAP primitives
// (See 4.1 for description of the primitives)
//
/**
* \brief CSCHED_CELL_CONFIG_CNF
*
* \param params CschedCellConfigCnfParameters
*/
virtual void CschedCellConfigCnf (const struct CschedCellConfigCnfParameters& params) = 0;
/**
* \brief CSCHED_UE_CONFIG_CNF
*
* \param params CschedUeConfigCnfParameters
*/
virtual void CschedUeConfigCnf (const struct CschedUeConfigCnfParameters& params) = 0;
/**
* \brief CSCHED_LC_CONFIG_CNF
*
* \param params CschedLcConfigCnfParameters
*/
virtual void CschedLcConfigCnf (const struct CschedLcConfigCnfParameters& params) = 0;
/**
* \brief CSCHED_LC_RELEASE_CNF
*
* \param params CschedLcReleaseCnfParameters
*/
virtual void CschedLcReleaseCnf (const struct CschedLcReleaseCnfParameters& params) = 0;
/**
* \brief CSCHED_UE_RELEASE_CNF
*
* \param params CschedUeReleaseCnfParameters
*/
virtual void CschedUeReleaseCnf (const struct CschedUeReleaseCnfParameters& params) = 0;
/**
* \brief CSCHED_UE_UPDATE_IND
*
* \param params CschedUeConfigUpdateIndParameters
*/
virtual void CschedUeConfigUpdateInd (const struct CschedUeConfigUpdateIndParameters& params) = 0;
/**
* \brief CSCHED_UE_CONFIG_IND
*
* \param params CschedCellConfigUpdateIndParameters
*/
virtual void CschedCellConfigUpdateInd (const struct CschedCellConfigUpdateIndParameters& params) = 0;
private:
};
/// MemberCschedSapProvider class
template <class C>
class MemberCschedSapProvider : public FfMacCschedSapProvider
{
public:
/**
* Constructor
*
* \param scheduler the scheduler class
*/
MemberCschedSapProvider (C* scheduler);
// inherited from FfMacCschedSapProvider
virtual void CschedCellConfigReq (const struct CschedCellConfigReqParameters& params);
virtual void CschedUeConfigReq (const struct CschedUeConfigReqParameters& params);
virtual void CschedLcConfigReq (const struct CschedLcConfigReqParameters& params);
virtual void CschedLcReleaseReq (const struct CschedLcReleaseReqParameters& params);
virtual void CschedUeReleaseReq (const struct CschedUeReleaseReqParameters& params);
private:
MemberCschedSapProvider ();
C* m_scheduler; ///< scheduler class
};
template <class C>
MemberCschedSapProvider<C>::MemberCschedSapProvider ()
{
}
template <class C>
MemberCschedSapProvider<C>::MemberCschedSapProvider (C* scheduler) : m_scheduler (scheduler)
{
}
template <class C>
void
MemberCschedSapProvider<C>::CschedCellConfigReq (const struct CschedCellConfigReqParameters& params)
{
m_scheduler->DoCschedCellConfigReq (params);
}
template <class C>
void
MemberCschedSapProvider<C>::CschedUeConfigReq (const struct CschedUeConfigReqParameters& params)
{
m_scheduler->DoCschedUeConfigReq (params);
}
template <class C>
void
MemberCschedSapProvider<C>::CschedLcConfigReq (const struct CschedLcConfigReqParameters& params)
{
m_scheduler->DoCschedLcConfigReq (params);
}
template <class C>
void
MemberCschedSapProvider<C>::CschedLcReleaseReq (const struct CschedLcReleaseReqParameters& params)
{
m_scheduler->DoCschedLcReleaseReq (params);
}
template <class C>
void
MemberCschedSapProvider<C>::CschedUeReleaseReq (const struct CschedUeReleaseReqParameters& params)
{
m_scheduler->DoCschedUeReleaseReq (params);
}
} // end namespace ns3
#endif /* FF_MAC_CSCHED_SAP_H */
|