ff-mac-sched-sap.h 8.34 KB
Newer Older
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
/*******************************************************************************
    OpenAirInterface
    Copyright(c) 1999 - 2015 Eurecom

    OpenAirInterface is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.


    OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
    included in this distribution in the file called "COPYING". If not,
    see <http://www.gnu.org/licenses/>.

  Contact Information
  OpenAirInterface Admin: openair_admin@eurecom.fr
  OpenAirInterface Tech : openair_tech@eurecom.fr
  OpenAirInterface Dev  : openair4g-devel@eurecom.fr

  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE

*******************************************************************************/
/*! \file ff-mac-sched-sap.h
 * \brief this is the implementation of the Femto Forum LTE MAC Scheduler Interface Specification v1.11 
 * \author Florian Kaltenberger
 * \date March 2015
 * \version 1.0
 * \email: florian.kaltenberger@eurecom.fr
35
 * @ingroup _fapi
36 37 38 39 40 41 42 43 44 45
 */

#ifndef FF_MAC_SCHED_SAP_H
#define FF_MAC_SCHED_SAP_H

#include <stdint.h>
#include <stdbool.h>

#include "ff-mac-common.h"

46 47 48
#if defined (__cplusplus)
extern "C" {
#endif
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

/**
 * Parameters of the API primitives
 */

/**
 * Parameters of the SCHED_DL_RLC_BUFFER_REQ primitive.
 * See section 4.2.1 for a detailed description of the parameters.
 */
struct SchedDlRlcBufferReqParameters
{
  uint16_t  rnti;
  uint8_t   logicalChannelIdentity;
  uint32_t  rlcTransmissionQueueSize;
  uint16_t  rlcTransmissionQueueHolDelay;
  uint32_t  rlcRetransmissionQueueSize;
  uint16_t  rlcRetransmissionHolDelay;
  uint16_t  rlcStatusPduSize;
  uint8_t   nr_vendorSpecificList;
  struct VendorSpecificListElement_s *vendorSpecificList;
};

/**
 * Parameters of the SCHED_DL_PAGING_BUFFER_REQ primitive.
 * See section 4.2.2 for a detailed description of the parameters.
 */
struct SchedDlPagingBufferReqParameters
{
  uint16_t  rnti;
  uint8_t   nr_pagingInfoList;
  struct PagingInfoListElement_s *pagingInfoList;
  uint8_t   nr_vendorSpecificList;
  struct VendorSpecificListElement_s *vendorSpecificList;
};

/**
 * Parameters of the SCHED_DL_MAC_BUFFER_REQ primitive.
 * See section 4.2.3 for a detailed description of the parameters.
 */
struct SchedDlMacBufferReqParameters
{
  uint16_t  rnti;
  uint8_t   nr_macCEDL_List;
  struct MacCeDlListElement_s *macCeDlList;
  uint8_t   nr_vendorSpecificList;
  struct VendorSpecificListElement_s *vendorSpecificList;
};

/**
 * Parameters of the SCHED_DL_TRIGGER_REQ primitive.
 * See section 4.2.4 for a detailed description of the parameters.
 */
struct SchedDlTriggerReqParameters
{
  uint16_t  sfnSf;
  uint8_t   nr_dlInfoList;
  struct DlInfoListElement_s *dlInfoList;
  uint8_t   nr_vendorSpecificList;
  struct VendorSpecificListElement_s *vendorSpecificList;
};

/**
 * Parameters of the SCHED_DL_RACH_INFO_REQ primitive.
 * See section 4.2.5 for a detailed description of the parameters.
 */
struct SchedDlRachInfoReqParameters
{
  uint16_t  sfnSf;
  uint8_t   nrrachList;
  struct RachListElement_s *rachList;
  uint8_t   nr_vendorSpecificList;
  struct VendorSpecificListElement_s *vendorSpecificList;
};

/**
 * Parameters of the SCHED_DL_CQI_INFO_REQ primitive.
 * See section 4.2.6 for a detailed description of the parameters.
 */
struct SchedDlCqiInfoReqParameters
{
  uint16_t  sfnSf;
  uint8_t   nrcqiList;
  struct CqiListElement_s *cqiList;
  uint8_t   nr_vendorSpecificList;
  struct VendorSpecificListElement_s *vendorSpecificList;
};

/**
 * Parameters of the SCHED_UL_TRIGGER_REQ primitive.
 * See section 4.2.8 for a detailed description of the parameters.
 */
struct SchedUlTriggerReqParameters
{
  uint16_t  sfnSf;
  uint8_t   nr_ulInfoList;
  struct UlInfoListElement_s *ulInfoList;
  uint8_t   nr_vendorSpecificList;
  struct VendorSpecificListElement_s *vendorSpecificList;
};

/**
 * Parameters of the SCHED_UL_NOISE_INTERFERENCE_REQ primitive.
 * See section 4.2.9 for a detailed description of the parameters.
 */
struct SchedUlNoiseInterferenceReqParameters
{
  uint8_t	carrierIndex;
  uint16_t  sfnSf;
  uint16_t  rip;
  uint16_t  tnp;
  uint8_t   nr_vendorSpecificList;
  struct VendorSpecificListElement_s *vendorSpecificList;
};

/**
 * Parameters of the SCHED_UL_SR_INFO_REQ primitive.
 * See section 4.2.10 for a detailed description of the parameters.
 */
struct SchedUlSrInfoReqParameters
{
  uint16_t  sfnSf;
  uint8_t   nr_srList;
  struct SrListElement_s *srList;
  uint8_t   nr_vendorSpecificList;
  struct VendorSpecificListElement_s *vendorSpecificList;
};

/**
 * Parameters of the SCHED_UL_MAC_CTRL_INFO_REQ primitive.
 * See section 4.2.11 for a detailed description of the parameters.
 */
struct SchedUlMacCtrlInfoReqParameters
{
  uint16_t  sfnSf;
  uint8_t   nr_macCEUL_List;
184
  struct MacCeUlListElement_s *macCeUlList;
185 186 187 188 189 190 191 192 193 194 195
  uint8_t   nr_vendorSpecificList;
  struct VendorSpecificListElement_s *vendorSpecificList;
};

/**
 * Parameters of the SCHED_UL_CQI_INFO_REQ primitive.
 * See section 4.2.12 for a detailed description of the parameters.
 */
struct SchedUlCqiInfoReqParameters
{
  uint16_t  sfnSf;
196 197
  uint8_t	nr_ulCqiList;
  struct UlCqi_s* ulCqiList;
198 199 200 201 202 203 204 205 206
  uint8_t   nr_vendorSpecificList;
  struct VendorSpecificListElement_s *vendorSpecificList;
};

//
// SCHED - MAC Scheduler SAP primitives
// (See 4.2 for description of the primitives)
//

207 208 209 210 211 212 213 214 215 216 217
void SchedDlRlcBufferReq(void *, const struct SchedDlRlcBufferReqParameters *params);
void SchedDlPagingBufferReq(void *, const struct SchedDlPagingBufferReqParameters *params);
void SchedDlMacBufferReq(void *, const struct SchedDlMacBufferReqParameters *params);
void SchedDlTriggerReq(void *, const struct SchedDlTriggerReqParameters *params);
void SchedDlRachInfoReq(void *, const struct SchedDlRachInfoReqParameters *params);
void SchedDlCqiInfoReq(void *, const struct SchedDlCqiInfoReqParameters *params);
void SchedUlTriggerReq(void *, const struct SchedUlTriggerReqParameters *params);
void SchedUlNoiseInterferenceReq(void *, const struct SchedUlNoiseInterferenceReqParameters *params);
void SchedUlSrInfoReq(void *, const struct SchedUlSrInfoReqParameters *params);
void SchedUlMacCtrlInfoReq(void *, const struct SchedUlMacCtrlInfoReqParameters *params);
void SchedUlCqiInfoReq(void *, const struct SchedUlCqiInfoReqParameters *params);
218 219 220 221 222 223 224 225 226 227 228 229 230 231

/**
 * Parameters of the API primitives
 */

/**
 * Parameters of the SCHED_DL_CONFIG_IND primitive.
 * See section 4.2.7 for a detailed description of the parameters.
 */
struct SchedDlConfigIndParameters
{
  uint8_t nr_buildDataList;
  uint8_t nr_buildRARList;
  uint8_t nr_buildBroadcastList;
232
  struct BuildDataListElement_s      *buildDataList;
233 234 235 236 237
  struct BuildRarListElement_s       *buildRarList;
  struct BuildBroadcastListElement_s *buildBroadcastList;

  /* mind: this is just number of elems in the next array (not actual number of PDCCH OFDM symbols) */
  uint8_t nr_ofdmSymbolsCount;
238 239
#warning MAX_NUM_CCs forced to 2 in structure SchedDlConfigIndParameters!!
  struct PdcchOfdmSymbolCountListElement_s* nrOfPdcchOfdmSymbols[2 /* MAX_NUM_CCs */];
240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263

  uint8_t   nr_vendorSpecificList;
  struct VendorSpecificListElement_s *vendorSpecificList;
};

/**
 * Parameters of the SCHED_UL_CONFIG_IND primitive.
 * See section 4.2.13 for a detailed description of the parameters.
 */
struct SchedUlConfigIndParameters
{
  uint8_t nr_dciList;
  uint8_t nr_phichList;
  struct UlDciListElement_s *dciList;
  struct PhichListElement_s *phichList;

  uint8_t   nr_vendorSpecificList;
  struct VendorSpecificListElement_s *vendorSpecificList;
};

//
// SCHED - MAC Scheduler SAP primitives
// (See 4.2 for description of the primitives)
//
Cedric Roux's avatar
Cedric Roux committed
264
// Primitives defined as callbacks in separate file ff-mac-callback.h
265

266 267 268 269 270
#if 0
/* not used - the scheduler has callbacks for those */
void SchedDlConfigInd(const struct SchedDlConfigIndParameters* params);
void SchedUlConfigInd(const struct SchedUlConfigIndParameters* params);
#endif
271

272 273 274 275
#if defined (__cplusplus)
}
#endif

276
#endif /* FF_MAC_SCHED_SAP_H */