Commit 131acccf authored by Cedric Roux's avatar Cedric Roux

FAPI 1.0.0 integrated

From IS-wireless, plus modifications to the code.
Note that MAX_NUM_CCs is forced to 2 in the ff-* files.
parent fbaf89af
......@@ -261,7 +261,6 @@ void rx_sdu(
#if FAPI
fapi_interface_t *fapi = eNB->fapi;
struct SchedDlMacBufferReqParameters p;
struct MacCeDlListElement_s ce;
#if 0
struct CschedLcConfigReqParameters lc;
struct LogicalChannelConfigListElement_s lc0;
......@@ -270,12 +269,9 @@ void rx_sdu(
/* inform FAPI that we want to send contention resolution Control Element */
p.rnti = eNB->common_channels[CC_idP].RA_template[ii].rnti;
p.nr_macCEDL_List = 1;
p.macCeDlList = &ce;
p.ceBitmap = ff_CR;
p.nr_vendorSpecificList = 0;
p.vendorSpecificList = NULL;
ce.rnti = eNB->common_channels[CC_idP].RA_template[ii].rnti;
ce.macCeType = ff_CR;
SchedDlMacBufferReq(fapi->sched, &p);
#if 0
......
#ifndef FF_MAC_CALLBACK_H
#define FF_MAC_CALLBACK_H
/*!
* @ingroup _fapi
/**
* @file ff-mac-callback.h
* @brief Implementation of the Femto Forum LTE MAC Scheduler Interface Specification v1.11 with extensions.
* @details Contains definitions of function callback types, that the scheduler may call upon the MAC.
* @author Florian Kaltenberger, Maciej Wewior
* @date March 2015
* @email: florian.kaltenberger@eurecom.fr, m.wewior@is-wireless.com
* @ingroup _mac
*/
#ifndef FF_MAC_CALLBACK_H
#define FF_MAC_CALLBACK_H
#if defined (__cplusplus)
extern "C" {
#endif
/* these are the callback function types from the scheduler to openair */
/* sched */
typedef void (SchedDlConfigInd_callback_t)(void *callback_data, const struct SchedDlConfigIndParameters *params);
typedef void (SchedUlConfigInd_callback_t)(void *callback_data, const struct SchedUlConfigIndParameters *params);
//CSCHED SAP scheduler->MAC primitives
/* csched */
/**
* Cell configuration and scheduler configuration applied.
* @param callback_data Callback data pointer provided in SchedInit()
* @param params Cell configuration result
*/
typedef void (CschedCellConfigCnf_callback_t)(void *callback_data, const struct CschedCellConfigCnfParameters *params);
/**
* UE specific configuration applied.
* @param callback_data Callback data pointer provided in SchedInit()
* @param params UE configuration result
*/
typedef void (CschedUeConfigCnf_callback_t)(void *callback_data, const struct CschedUeConfigCnfParameters *params);
/**
* Logical channel configuration applied.
* @param callback_data Callback data pointer provided in SchedInit()
* @param params LC configuration result
*/
typedef void (CschedLcConfigCnf_callback_t)(void *callback_data, const struct CschedLcConfigCnfParameters *params);
/**
* Logical Channel specific configuration removed.
* @param callback_data Callback data pointer provided in SchedInit()
* @param params Logical channel release result
*/
typedef void (CschedLcReleaseCnf_callback_t)(void *callback_data, const struct CschedLcReleaseCnfParameters *params);
/**
* UE specific configuration removed.
* @param callback_data Callback data pointer provided in SchedInit()
* @param params UE release result
*/
typedef void (CschedUeReleaseCnf_callback_t)(void *callback_data, const struct CschedUeReleaseCnfParameters *params);
/**
* Update of UE specific parameters from MAC scheduler to RRC.
* @param callback_data Callback data pointer provided in SchedInit()
* @param params UE configuration update parameters
*/
typedef void (CschedUeConfigUpdateInd_callback_t)(void *callback_data, const struct CschedUeConfigUpdateIndParameters *params);
/**
* Update of cell configuration from MAC scheduler to RRC.
* @param callback_data Callback data pointer provided in SchedInit()
* @param params Cell configuration update parameters
*/
typedef void (CschedCellConfigUpdateInd_callback_t)(void *callback_data, const struct CschedCellConfigUpdateIndParameters *params);
//SCHED SAP scheduler->MAC primitives
/**
* Passes the DL scheduling decision to MAC, triggers building of DL MAC PDUs and Subframe Configuration.
* @param callback_data Callback data pointer provided in SchedInit()
* @param params DL scheduling decision
*/
typedef void (SchedDlConfigInd_callback_t)(void *callback_data, const struct SchedDlConfigIndParameters *params);
/**
* Passes the UL scheduling decision (Format 0 DCIs)to MAC.
* @param callback_data Callback data pointer provided in SchedInit()
* @param params UL scheduling decision
*/
typedef void (SchedUlConfigInd_callback_t)(void *callback_data, const struct SchedUlConfigIndParameters *params);
#if defined (__cplusplus)
}
#endif
......
/*******************************************************************************
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-common.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
* @ingroup _fapi
/**
* @file ff-mac-common.h
* @brief Implementation of the Femto Forum LTE MAC Scheduler Interface Specification v1.11 with extensions.
* @details Contains definitions of common FAPI constants and structures.
* @author Florian Kaltenberger, Maciej Wewior
* @date March 2015
* @email: florian.kaltenberger@eurecom.fr, m.wewior@is-wireless.com
* @ingroup _mac
*/
#ifndef FF_MAC_COMMON_H
#define FF_MAC_COMMON_H
......@@ -46,150 +18,473 @@
extern "C" {
#endif
/** @defgroup _fapi FAPI
* @ingroup _mac
* @{
/**
* MAX_SCHED_CFG_LIST
*/
#define MAX_SCHED_CFG_LIST 10
/**
* Constants. See section 4.4
* MAX_LC_LIST
*/
#define MAX_SCHED_CFG_LIST 10
#define MAX_LC_LIST 10
/**
* MAX_RACH_LIST
*/
#define MAX_RACH_LIST 30
/**
* MAX_DL_INFO_LIST
*/
#define MAX_DL_INFO_LIST 30
/**
* MAX_BUILD_DATA_LIST
*/
#define MAX_BUILD_DATA_LIST 30
/**
* MAX_BUILD_RAR_LIST
*/
#define MAX_BUILD_RAR_LIST 10
/**
* MAX_BUILD_BC_LIST
*/
#define MAX_BUILD_BC_LIST 3
/**
* MAX_UL_INFO_LIST
*/
#define MAX_UL_INFO_LIST 30
/**
* MAX_DCI_LIST
*/
#define MAX_DCI_LIST 30
/**
* MAX_PHICH_LIST
*/
#define MAX_PHICH_LIST 30
/**
* MAX_TB_LIST
*/
#define MAX_TB_LIST 2
/**
* MAX_RLC_PDU_LIST
*/
#define MAX_RLC_PDU_LIST 30
/**
* MAX_NR_LCG
*/
#define MAX_NR_LCG 4
/**
* MAX_MBSFN_CONFIG
*/
#define MAX_MBSFN_CONFIG 5
/**
* MAX_SI_MSG_LIST
*/
#define MAX_SI_MSG_LIST 32
/**
* MAX_SI_MSG_SIZE
*/
#define MAX_SI_MSG_SIZE 65535
/**
* MAX_PAGING_LIST
*/
#define MAX_PAGING_LIST 30
/**
* MAX_CQI_LIST
*/
#define MAX_CQI_LIST 30
#define MAX_UE_SELECTED_SB 6 //comes from Table 7.2.1-5, 36.213
#define MAX_HL_SB 13 //comes from Table 7.2.1-3, 36.213
/**
* MAX_UE_SELECTED_SB
* comes from Table 7.2.1-5 in \ref ref4 "[4]"
*/
#define MAX_UE_SELECTED_SB 6
/**
* MAX_HL_SB
* comes from Table 7.2.1-3 in \ref ref4 "[4]"
*/
#define MAX_HL_SB 13
/**
* MAX_SINR_RB_LIST
*/
#define MAX_SINR_RB_LIST 100
/**
* MAX_SR_LIST
*/
#define MAX_SR_LIST 30
/**
* MAX_MAC_CE_LIST
*/
#define MAX_MAC_CE_LIST 30
/**
* MAX_NUM_CCs
*/
#ifndef MAX_NUM_CCs
#error MAX_NUM_CCs not defined
#endif
//#define MAX_NUM_CCs 2
/**
* Result of operation.
*/
enum Result_e
{
ff_SUCCESS,
ff_FAILURE
ff_SUCCESS,//!< operation successful
ff_FAILURE //!< operation failed
};
/**
* Type of action.
*/
enum SetupRelease_e
{
ff_setup,
ff_release
ff_setup, //!< setup
ff_release//!< release
};
/**
* Type of MAC CE transmitted from eNB.
*/
enum CeBitmap_e
{
ff_TA = 1 << 0,
ff_DRX = 1 << 1,
ff_CR = 1 << 2,
/// activation/deactivation of CCs
ff_AD = 1 << 3
ff_TA = 1 << 0,//!< Timing Advance Command MAC Control Element
ff_DRX = 1 << 1,//!< DRX Command MAC Control Element
ff_CR = 1 << 2,//!< UE Contention Resolution Identity MAC Control Element
ff_AD = 1 << 3 //!< Activation/Deactivation MAC Control Element
};
/**
* Cyclic prefix length.
*/
enum NormalExtended_e
{
ff_normal,
ff_extended
ff_normal, //!< Normal cyclic prefix
ff_extended//!< Extended cyclic prefix
};
/**
* \brief See section 4.3.1 dlDciListElement
* DL DCI representation.
*/
struct DlDciListElement_s
{
/**
* The RNTI identifying the UE.
*/
uint16_t rnti;
/**
* The RBs allocated to the UE.
*/
uint32_t rbBitmap;
/**
* Resource allocation type1 field, see \ref ref4 "[4]", section 7.1.6.2.
* \n Range: 0,1
*/
uint8_t rbShift;
uint8_t rbgSubset; //resource allocation type1 field
/**
* Selected resource blocks subset for DL resource allocation type 1, see \ref ref4 "[4]", section 7.1.6.2.
* \n Range: 0..3
*/
uint8_t rbgSubset;
/**
* Type of resource allocation.
* \n Range: 0,1,2
*/
uint8_t resAlloc;
/**
* The number of transport blocks.
* \n Range: 1..#MAX_TB_LIST
*/
uint8_t nr_of_tbs;
/**
* The size of the transport blocks in byte.
*/
uint16_t tbsSize[MAX_TB_LIST];
/**
* The modulation and coding scheme of each TB, see \ref ref4 "[4]" section 7.1.7.
* \n Range: 0..31
*/
uint8_t mcs[MAX_TB_LIST];
/**
* New data Indicator.
* \n Range: 0..1
*/
uint8_t ndi[MAX_TB_LIST];
/**
* Redundancy version.
* \n Range: 0..3
*/
uint8_t rv[MAX_TB_LIST];
/**
* CCE index used to send the DCI.
* \n Range: 0.88
*/
uint8_t cceIndex;
/**
* The aggregation level.
* \n Range: 1,2,4,8
*/
uint8_t aggrLevel;
/**
* Precoding information.
* \n Range:
* - 2 antenna_ports: 0..6
* - 4 antenna_ports: 0..50
*/
uint8_t precodingInfo;
/**
* Format of the DCI.
*/
enum Format_e
{
ONE, ONE_A, ONE_B, ONE_C, ONE_D, TWO, TWO_A, TWO_B
} format;
/**
* See \ref ref4 "[4]", section 5.1.1.1.
* \n Range: -4,-1,0,1,3,4
*/
int8_t tpc;
/**
* HARQ process number.
* \n Range: 0..7
*/
uint8_t harqProcess;
/**
* Only for TDD.
* \n Range: 1,2,3,4
*/
uint8_t dai;
/**
* See \ref ref4 "[4]", section 7.1.6.3.
*/
enum VrbFormat_e
{
VRB_DISTRIBUTED,
VRB_LOCALIZED
VRB_DISTRIBUTED,//!< VRBs of distributed type
VRB_LOCALIZED //!< VRBs of localized type
} vrbFormat;
/**
* TB to CW swap flag, see \ref ref3 "[3]", section 5.3.3.1.5.
*/
bool tbSwap;
/**
*
*/
bool spsRelease;
/**
* Indicates if PDCCH is for PDCCH order.
*/
bool pdcchOrder;
/**
* Preamble index. Only valid if \ref pdcchOrder == TRUE.
* \n Range: 0..63
*/
uint8_t preambleIndex;
/**
* PRACH Mask index. Only valid if \ref pdcchOrder == TRUE.
* \n Range: 0..15
*/
uint8_t prachMaskIndex;
/**
* The value for N_GAP.
*/
enum Ngap_e
{
GAP1, GAP2
} nGap;
/**
* The TBS index for Format 1A.
* \n Range: 2,3
*/
uint8_t tbsIdx;
/**
* For Format 1D, see \ref ref4 "[4]" section 7.1.5.
* \n Range: 0,1
*/
uint8_t dlPowerOffset;
uint8_t pdcchPowerOffset;
/// this is the DCI field (for potential cross carrier scheduling)
/**
* DL PDCCH power boosting in dB.
* \n Range: -6..4
*/
int8_t pdcchPowerOffset;
/**
* Indicates if Carrier Indicator Field shall be present in DCI (for cross carrier scheduling).
*/
bool cifPresent;
/**
* Carrier Indicator Field value.
* \n Range: 0..7
*/
uint8_t cif;
};
/**
* \brief See section 4.3.2 ulDciListElement
* UL DCI (DCI type0) representation.
*/
struct UlDciListElement_s
{
/**
* The RNTI identifying the UE.
*/
uint16_t rnti;
/**
* The start RB allocated to the UE, see \ref ref4 "[4]", section 8.1.
* \n Range: 0..99
*/
uint8_t rbStart;
/**
* The number of RBs allocated to the UE. see \ref ref4 "[4]", section 8.1.
* \n Range: 1..100
*/
uint8_t rbLen;
/**
* The size of the transport block in byte.
*/
uint16_t tbSize;
/**
* The modulation and coding scheme of each TB, see \ref ref4 "[4]" section 8.6.
* \n Range: 0..32
*/
uint8_t mcs;
/**
* New data Indicator.
* \n Range: 0..1
*/
uint8_t ndi;
/**
* CCE index used to send the DCI.
* \n Range: 0..88
*/
uint8_t cceIndex;
/**
* The aggregation level.
* \n Range: 1,2,4,8
*/
uint8_t aggrLevel;
/**
* See \ref ref3 "[3]", section 5.3.3.2. 3 means antenna selection is off.
* \n Range: 0,1,3
*/
uint8_t ueTxAntennaSelection;
/**
* Hopping enabled flag, see \ref ref4 "[4]" section 8.4.
*/
bool hopping;
/**
* Cyclic shift.
* \n Range: 0..7
*/
uint8_t n2Dmrs;
/**
* Tx power control command, see \ref ref4 "[4]" section 5.1.1.1.
* \n Range: -4,-1,0,1,3,4
*/
int8_t tpc;
/**
* Aperiodic CQI request flag. see\ref ref4 "[4]" section 7.2.1.
*/
bool cqiRequest;
/**
* UL index, only for TDD.
* \n Range: 0,1,2,3
*/
uint8_t ulIndex;
/**
* DL assignment index, only for TDD.
* \n Range: 1,2,3,4
*/
uint8_t dai;
/**
* The frequency hopping bits, see \ref ref4 "[4]" section 8.4.
* \n Range: 0..4
*/
uint8_t freqHopping;
/**
* DL PDCCH power boosting in dB.
* \n Range: -6..4
*/
int8_t pdcchPowerOffset;
/// this is the DCI field (for potential cross carrier scheduling)
/**
* Indicates if Carrier Indicator Field shall be present in DCI (for cross carrier scheduling).
*/
bool cifPresent;
/**
* Carrier Indicator Field value.
* \n Range: 0..7
*/
uint8_t cif;
/// this is the carrier index where the DCI will be transmitted on
uint8_t servCellIndex; //definition according to 36.331 'ServCellIndex'
/**
* Component carrier identifier, uniquely identifies carrier within the UE, see \ref fapiExtDoc_indices_sec "PcellIndex/ScellIndex’ing".
*/
uint8_t servCellIndex;
};
/**
* \brief Base class for storing the values of vendor specific parameters
* Base class for storing the values of vendor specific parameters.
*/
struct VendorSpecificValue
{
......@@ -198,23 +493,49 @@ struct VendorSpecificValue
};
/**
* \brief See section 4.3.3 vendorSpecifiListElement
* Vendor specific parameter in TLV format.
*/
struct VendorSpecificListElement_s
{
/**
* Indicating the type of the value. This types are examples, real types are implementation specific, examples are:
* PF_WEIGHT1 – The first weight used by a proportional fair scheduler
* PF_WEIGHT2 – The second weight used by a proportional fair scheduler
* CQI_AVG_FACTOR – The factor used for averaging CQIs in the scheduler.
*/
uint32_t type;
/**
* The length of the actual value.
*/
uint32_t length;
/**
* The actual value which will be set.
*/
struct VendorSpecificValue *value;
};
/**
* \brief See section 4.3.4 logicalChannelConfigListElement
* Logical channel configuration.
*/
struct LogicalChannelConfigListElement_s
{
/**
* The logical channel id, see \ref ref1 "[1]". Note: CCCH is preconfigured.
* \n Range: 1..10
*/
uint8_t logicalChannelIdentity;
/**
* The LC group the LC is mapped to. 4 means no LCG is associated with the logical channel.
* \n Range: 0..3, 4
*/
uint8_t logicalChannelGroup;
/**
* The direction of the logical channel.
*/
enum Direction_e
{
DIR_UL,
......@@ -222,272 +543,589 @@ struct LogicalChannelConfigListElement_s
DIR_BOTH
} direction;
/**
* Guaranteed or non-guaranteed bit rate bearer.
* \n Range:
*/
enum QosBearerType_e
{
QBT_NON_GBR,
QBT_GBR
} qosBearerType;
/**
* The QCI defined in \ref ref10 "[10]". The QCI is coded as defined in \ref ref7 "[7]", i.e the value indicates one less than the actual QCI value.
*/
uint8_t qci;
/**
* In bit/s. For QBT_GBR only.
* \n Range: 0..10000000000
*/
uint64_t eRabMaximulBitrateUl;
/**
* In bit/s. For QBT_GBR only.
* \n Range: 0..10000000000
*/
uint64_t eRabMaximulBitrateDl;
/**
* In bit/s. For QBT_GBR only.
* \n Range: 0..10000000000
*/
uint64_t eRabGuaranteedBitrateUl;
/**
* In bit/s. For QBT_GBR only.
* \n Range: 0..10000000000
*/
uint64_t eRabGuaranteedBitrateDl;
};
/**
* \brief See section 4.3.6 rachListElement
* RACH information.
*/
struct RachListElement_s
{
/**
* The newly allocated t-c-rnti.
*/
uint16_t rnti;
/**
* Estimated minimum size of first UL message in bits, based on received RACH preamble.
* \n Range: 56,144,208,256
*/
uint16_t estimatedSize;
/**
* Component carrier identifier, uniquely identifies carrier within the eNB, see \ref fapiExtDoc_indices_sec "PcellIndex/ScellIndex’ing".
*/
uint8_t carrierIndex;
};
/**
* \brief See section 4.3.7 phichListElement
* PHICH information.
*/
struct PhichListElement_s
{
/**
* The RNTI identifying the UE.
*/
uint16_t rnti;
/**
* ACK or NACK to be passed to the UE in the PHICH.
*/
enum Phich_e
{
ACK, NACK
} phich;
uint8_t servCellIndex; //definition according to 36.331 'ServCellIndex'
/**
* Component carrier identifier, uniquely identifies carrier within the UE, see \ref fapiExtDoc_indices_sec "PcellIndex/ScellIndex’ing".
*/
uint8_t servCellIndex;
};
/**
* \brief See section 4.3.9 rlcPDU_ListElement
* RLC PDU information.
*/
struct RlcPduListElement_s
{
/**
* The logical channel ID, see \ref ref1 "[1]".
* \n Range: 0..10
*/
uint8_t logicalChannelIdentity;
/**
* Maximum length of RLC PDU in bytes.
* \n Range: 1..9420
*/
uint16_t size;
};
/**
* \brief See section 4.3.8 builDataListElement
* DL user data scheduling decision element.
*/
struct BuildDataListElement_s
{
/**
* The RNTI identifying the UE.
*/
uint16_t rnti;
/**
* The DL DCI configured for this UE. This may also indicate PDCCH order or SPS release or format 3/3A, in which case there is no associated PDSCH.
*/
struct DlDciListElement_s dci;
/* This is an array of CeBitmap_e enum flags. If one wants for example to signal TA in 1st TB and DRX and AD in 2nd one should:
* ceBitmap[0] = ff_TA; ceBitmap[1] = ff_DRX | ff_AD; */
/**
* The CEs scheduled for transmission for this TB. This is array of \ref CeBitmap_e enum flags. (TA-Timing Advance Command, DRX-DRX Command, CR-Contention Resolution, AD-Activation/Deactivation)
* \n Range: TA, DRX, CR, AD
*/
uint8_t ceBitmap[MAX_TB_LIST];
/**
* The number of RLC PDUs to be built for each Transport Block.
* \n Range: 1..#MAX_RLC_PDU_LIST
*/
uint8_t nr_rlcPDU_List[MAX_TB_LIST];
/**
* List of parameters for RLC PDU creation.
*/
struct RlcPduListElement_s* rlcPduList[MAX_TB_LIST];
uint8_t servCellIndex; //definition according to 36.331 'ServCellIndex'
/* Hex content of Activation/Deactivation MAC CE */
/**
* Component carrier identifier, uniquely identifies carrier within the UE, see \ref fapiExtDoc_indices_sec "PcellIndex/ScellIndex’ing".
*/
uint8_t servCellIndex;
/**
* Activation/Deactivation MAC Control Element value built by the scheduler, to be sent in this TTI.
*/
uint8_t activationDeactivationCE;
};
/**
* \brief See section 4.3.10 buildRARListElement
* RAR scheduling decision element.
*/
struct BuildRarListElement_s
{
/**
* The RNTI identifying the UE (in this case it is the Temporary C-RNTI).
*/
uint16_t rnti;
/**
* 20 bit UL grant, see \ref ref4 "[4]" section 6.2.
*/
uint32_t grant;
/**
* The DL DCI configured for this RAR.
*/
struct DlDciListElement_s dci;
/**
* Component carrier identifier, uniquely identifies carrier within the eNB, see \ref fapiExtDoc_indices_sec "PcellIndex/ScellIndex’ing".
*/
uint8_t carrierIndex;
};
/**
* \brief See section 4.3.11 buildBroadcastListElement
* Broadcast scheduling decision element.
*/
struct BuildBroadcastListElement_s
{
/**
* The type identifying the broadcast message.
*/
enum BroadcastType_e
{
ff_BCCH, ff_PCCH
} type;
/**
* The index of the broadcast message. This identifies which broadcast message (either SIB1, SIx or PCCH) should be transmitted.
* 0 – SIB1
* 1..31 – SIx
* 32..63 - PCCH
*/
uint8_t index;
/**
* The DL DCI configured for BCCH and PCCH.
*/
struct DlDciListElement_s dci;
/**
* Component carrier identifier, uniquely identifies carrier within the eNB, see \ref fapiExtDoc_indices_sec "PcellIndex/ScellIndex’ing".
*/
uint8_t carrierIndex;
};
/**
* \brief See section 4.3.12 ulInfoListElement
* PUSCH data reception information.
*/
struct UlInfoListElement_s
{
uint16_t puschTransmissionTimestamp; //this timestamp identifies PUSCH transmission
//to which below information relates to
//format is frame*16+subframe
/**
* Timestamp identifying PUSCH transmission to which this information relates to.
*/
uint16_t puschTransmissionTimestamp;
/**
* The RNTI identifying the UE.
*/
uint16_t rnti;
/**
* The amount of data in bytes in the MAC SDU received in subframe identified by \ref puschTransmissionTimestamp for the given logical channel.
*/
uint16_t ulReception[MAX_LC_LIST+1];
/**
* NotValid is used when no TB is expected. Ok/notOk indicates successful/unsuccessful reception of UL TB.
*/
enum ReceptionStatus_e
{
Ok, NotOk, NotValid
} receptionStatus;
/**
* Tx power control command, see \ref ref4 "[4]" section 5.1.1.1.
* \n Range: -4,-1,0,1,3,4
*/
int8_t tpc;
uint8_t servCellIndex; //definition according to 36.331 'ServCellIndex'
/**
* Component carrier identifier, uniquely identifies carrier within the UE, see \ref fapiExtDoc_indices_sec "PcellIndex/ScellIndex’ing".
*/
uint8_t servCellIndex;
};
/**
* \brief See section 4.3.13 srListElement
* Scheduling Request information.
*/
struct SrListElement_s
{
/**
* The RNTI identifying the UE.
*/
uint16_t rnti;
};
/**
* \brief See section 4.3.15 macCEValue
* UL MAC CE value.
*/
struct MacCeUlValue_u
{
/**
* The power headroom, see \ref ref1 "[1]" section 6.1.3.6. 64 means no valid PHR is available.
*\n Range: 0..63,64
*/
uint8_t phr;
/**
* Indicates that a C-RNTI MAC CE was received. The value is not used.
*/
uint8_t crnti;
/**
* The value 64 indicates that the buffer status for this LCG should not to be updated. Always all 4 LCGs are present, see \ref ref1 "[1]" 6.1.3.1.
*/
uint8_t bufferStatus[MAX_NR_LCG];
};
/**
* \brief See section 4.3.14 macCEListElement
* UL MAC CE information.
*/
struct MacCeUlListElement_s
{
/**
* The RNTI identifying the UE.
*/
uint16_t rnti;
/**
* Mac Control Element Type.
*/
enum MacCeType_e
{
ff_BSR, ff_PHR, ff_CRNTI
} macCeType;
struct MacCeUlValue_u macCeValue;
};
/**
* \brief macCEDLValue (new)
*/
struct MacCeDlValue_u
{
// timing advance value is not included here as it is supposed to be filled in by the MAC (scheduler does not care)
// dtx CE does not have a value
// contention resolution value should also be filled in by the MAC and not by the scheduler
uint8_t ActicationDeactivation;
};
/**
* \brief macCEDLListElement (new)
/**
* MAC CE value.
*/
struct MacCeDlListElement_s
{
uint16_t rnti;
enum CeBitmap_e macCeType;
struct MacCeDlValue_u macCeValue;
struct MacCeUlValue_u macCeValue;
};
/**
* \brief See section 4.3.16 drxConfig
* DRX configuration.
*/
struct DrxConfig_s
{
/**
* Timer in subframes, see \ref ref1 "[1]".
* \n Range: 1,2,3,4,5,6,8,10,20,30,40,50,60,80,100,200
*/
uint8_t onDurationTimer;
/**
* Timer in subframes, see \ref ref1 "[1]".
* \n Range: 1,2,3,4,5,6,8,10,20,30,40,50,60,80,100,200,300,500,750,1280,1920,2560
*/
uint16_t drxInactivityTimer;
/**
* Timer in subframes, see \ref ref1 "[1]".
* \n Range: 1,2,4,6,8,16,24,33
*/
uint16_t drxRetransmissionTimer;
/**
* Long DRX cycle in subframes, see \ref ref1 "[1]".
* \n Range: 10,20,32,40,64,80,128,160,256,320,512,640,1024,1280,2048,2560
*/
uint16_t longDrxCycle;
/**
* Long DRX cycle offset, see \ref ref1 "[1]".
* \n Range: 0..2559
*/
uint16_t longDrxCycleStartOffset;
/**
* Short DRX cycle in subframes, see \ref ref1 "[1]".
* \n Range: 2,5,8,10,16,10,21,40,64,80,128,160,256,320,512,640,OFF
*/
uint16_t shortDrxCycle;
/**
* Timer in subframes, see \ref ref1 "[1]".
* \n Range: 1..16
*/
uint8_t drxShortCycleTimer;
};
/**
* \brief See section 4.3.17 spsConfig
* Semi-persistent scheduling configuration.
*/
struct SpsConfig_s
{
/**
* SPS scheduling interval in UL in subframes.
* \n Range: 10,20,32,40,64,80,128,160,320,640
*/
uint16_t semiPersistSchedIntervalUl;
/**
* SPS scheduling interval in DL in subframes.
* \n Range: 10,20,32,40,64,80,128,160,320,640
*/
uint16_t semiPersistSchedIntervalDl;
/**
* Number of SPS HARQ processes, see \ref ref1 "[1]".
* \n Range: 1..8
*/
uint8_t numberOfConfSpsProcesses;
/**
* The size of the \ref n1PucchAnPersistentList list. When spsConfig is included in CschedUeConfigReq() this parameters is ignored.
* \n Range: 0..4
*/
uint8_t n1PucchAnPersistentListSize;
/**
* See \ref ref4 "[4]" section 10.1. When spsConfig is included in CschedUeConfigReq() this parameters is ignored.
* \n Range: 0..2047
*/
uint16_t n1PucchAnPersistentList[4];
/**
* Number of empty transmission, see \ref ref1 "[1]" section 5.10.2. When spsConfig is included in CschedUeConfigReq() this parameters is ignored.
* \n Range: 2,3,4,8
*/
uint8_t implicitReleaseAfter;
};
/**
* \brief See section 4.3.18 srConfig
* Scheduling Request configuration.
*/
struct SrConfig_s
{
/**
* Indicates if SR config should be released or changed.
*/
enum SetupRelease_e action;
/**
* SR scheduling interval in subframes.
* \n Range: 5,10,20,40,80
*/
uint8_t schedInterval;
/**
* See \ref ref1 "[1]", section 5.4.4.
* \n Range: 4,8,16,32,64
*/
uint8_t dsrTransMax;
};
/**
* \brief See section 4.3.19 cqiConfig
* CQI configuration.
*/
struct CqiConfig_s
{
/**
* Indicates if CQI config should be released or changed.
*/
enum SetupRelease_e action;
/**
* CQI scheduling interval in subframes.
* \n Range: 1,2,5,10,20,32,40,64,80,128,160
*/
uint16_t cqiSchedInterval;
/**
* RI scheduling interval in subframes.
* \n Range: 1,2,4,8,16,20
*/
uint8_t riSchedInterval;
};
/**
* \brief See section 4.3.20 ueCapabilities
* UE capabilities.
*/
struct UeCapabilities_s
{
/**
* UE only supports half-duplex FDD operation.
*
*/
bool halfDuplex;
/**
* UE support of intra-subframe hopping.
*/
bool intraSfHopping;
/**
* UE supports type 2 hopping with n_sb > 1.
*/
bool type2Sb1;
/**
* The UE category
* \n Range: 1..5
*/
uint8_t ueCategory;
/**
* UE support for resource allocation type 1.
*/
bool resAllocType1;
};
/**
* \brief See section 4.3.22 siMessageListElement
* System Information message.
*/
struct SiMessageListElement_s
{
/**
* Periodicity of the SI-message Unit in radio frames.
* \n Range: 8, 16, 32, 64, 128, 256, 512
*/
uint16_t periodicity;
/**
* The length of SI message. Unit in bytes.
* \n Range: 1..#MAX_SI_MSG_SIZE
*/
uint16_t length;
};
/**
* \brief See section 4.3.21 siConfiguration
* System Information configuration.
*/
struct SiConfiguration_s
{
/**
* Frame number to apply this configuration.
* \n Range: 0..1023
*/
uint16_t sfn;
/**
* The length of the SIB 1 message. Unit in bytes.
* \n Range: 1..#MAX_SI_MSG_SIZE
*/
uint16_t sib1Length;
/**
* Common SI scheduling window for all SIs. Unit in subframes.
* \n Range: 1,2,5,10,15,20,40
*/
uint8_t siWindowLength;
/**
* The number of SI messages on the \ref siMessageList list.
* \n Range: 0..#MAX_SI_MSG_LIST
*/
uint8_t nrSI_Message_List;
/**
* List of SI messages to be sent. The index will later be used to identify the message in the \ref BuildBroadcastListElement_s.
*/
struct SiMessageListElement_s *siMessageList;
};
/**
* \brief See section 4.3.23 dlInfoListElement
* DL HARQ information.
*/
struct DlInfoListElement_s
{
/**
* The RNTI identifying the UE.
*/
uint16_t rnti;
/**
* HARQ process ID. 8 is not present.
*/
uint8_t harqProcessId;
/**
* The size of the HARQ status list.
* \n Range: 1..#MAX_TB_LIST
*/
uint8_t nr_harqStatus;
/**
* HARQ status for the above process.
*/
enum HarqStatus_e
{
ff_ACK, ff_NACK, ff_DTX
} harqStatus[MAX_TB_LIST];
uint8_t servCellIndex; //definition according to 36.331 'ServCellIndex'
/**
* Component carrier identifier, uniquely identifies carrier within the UE, see \ref fapiExtDoc_indices_sec "PcellIndex/ScellIndex’ing".
*/
uint8_t servCellIndex;
};
/**
* \brief Represents types of SCI reports for all CSI reporting modes. \a mode indicates which structure is held in \a report union.
* Represents types of CSI reports for all CSI reporting modes.
*/
struct CsiReport_s
{
/**
* The last received rank indication.
* \n Range: 1..4
*/
uint8_t ri;
/**
* CSI reporting mode.
*/
enum CsiRepMode_e
{
P10, P11, P20, P21, A12, A22, A20, A30, A31
} mode;
/**
* Union discriminated by \ref mode. See \ref ref4 "[4]" sections 7.2.1 and 7.2.2.
*/
union
{
struct A12Csi_s
......@@ -540,8 +1178,14 @@ struct CsiReport_s
{
uint8_t wbCqi;
uint8_t sbCqi;
uint8_t bwPartIndex; //range 0-3; to cover maximum number of BW parts (J)
uint8_t sbIndex; //range 0-3; to cover maximum number of subbands inside BW part (Nj)
/**
* Range: 0-3, to cover maximum number of BW parts (J).
*/
uint8_t bwPartIndex;
/**
* Range: 0-3, to cover maximum number of subbands inside BW part (Nj)
*/
uint8_t sbIndex;
} P20Csi;
struct P21Csi_s
......@@ -549,80 +1193,156 @@ struct CsiReport_s
uint8_t wbCqi[MAX_TB_LIST];
uint8_t wbPmi;
uint8_t sbCqi[MAX_TB_LIST];
uint8_t bwPartIndex; //range 0-3; to cover maximum number of BW parts (J)
uint8_t sbIndex; //range 0-3; to cover maximum number of subbands inside BW part (Nj)
/**
* Range: 0-3, to cover maximum number of BW parts (J).
*/
uint8_t bwPartIndex;
/**
* Range: 0-3, to cover maximum number of subbands inside BW part (Nj)
*/
uint8_t sbIndex;
} P21Csi;
} report;
};
/**
* \brief Modified structure holding CSI report for single UE (for original structure see section 4.3.24 cqiListElement).
* CSI report for single UE.
*/
struct CqiListElement_s
{
/**
* The RNTI identifying the UE.
*/
uint16_t rnti;
/**
* CSI report.
*/
struct CsiReport_s csiReport;
uint8_t servCellIndex; //definition according to 36.331 'ServCellIndex'
/**
* Component carrier identifier, uniquely identifies carrier within the UE, see \ref fapiExtDoc_indices_sec "PcellIndex/ScellIndex’ing".
*/
uint8_t servCellIndex;
};
/**
* \brief See section 4.3.29 ulCQI
* UL channel state.
*/
struct UlCqi_s
{
/**
* The RNTI identifying the UE.
*/
uint16_t rnti;
uint16_t sinr[MAX_SINR_RB_LIST];
/**
* The SINR measurement based on the resource given in type. In case of PUCCH only the first index is used. For PRACH the first 6 indices are used. For PUSCH and SRS each index represents one RB.
* The SINR is given in dB. See \ref fapiExtDoc_ul_sinr "UL channel state reporting" for exact interpretation of the array.
* Format of each SINR value: fixed point Q12.3 format with sign.
*/
int16_t sinr[MAX_SINR_RB_LIST];
/**
* Type of the SINR measurement.
*/
enum UlCqiType_e
{
ff_SRS,
ff_PUSCH,
ff_PUCCH_1,
ff_PUCCH_2,
ff_PRACH
ff_SRS, //!< measurement comes from SRS
ff_PUSCH, //!< measurement comes from last PUSCH transmission
ff_PUCCH_1,//!< measurement done on Format 1 resource
ff_PUCCH_2,//!< measurement done on Format 2 resource
ff_PRACH //!< measurement comes from PRACH transmission
} type;
uint8_t servCellIndex; //definition according to 36.331 'ServCellIndex'
/**
* Component carrier identifier, uniquely identifies carrier within the UE, see \ref fapiExtDoc_indices_sec "PcellIndex/ScellIndex’ing".
*/
uint8_t servCellIndex;
};
/**
* \brief See section 4.3.30 pagingInfoListElement
* Paging information.
*/
struct PagingInfoListElement_s
{
/**
* The index used to identify the scheduled message, will be returned in \ref SchedDlConfigInd_callback_t "SchedDlConfigInd()".
* \n Range: 32..63
*/
uint8_t pagingIndex;
/**
* The size of the paging message.
*/
uint16_t pagingMessageSize;
/**
* The subframe during which the message shall be sent.
* \n Range: 0..9
*/
uint8_t pagingSubframe;
/**
* Component carrier identifier, uniquely identifies carrier within the eNB, see \ref fapiExtDoc_indices_sec "PcellIndex/ScellIndex’ing".
*/
uint8_t carrierIndex;
};
/**
* \brief Describes the SCell configuration.
* SCell configuration.
*/
struct ScellConfig_s
{
/* Unique carrier identifier */
/**
* Component carrier identifier, uniquely identifies carrier within the eNB, see \ref fapiExtDoc_indices_sec "PcellIndex/ScellIndex’ing".
*/
uint8_t carrierIndex;
/* Index of this SCell (RRC SCellIndex) */
/**
* SCell index as to be sent in RRCConnectionReconfiguration (IE SCellIndex defined in RRC specification), see \ref fapiExtDoc_indices_sec "PcellIndex/ScellIndex’ing".
* \n Range: 1..7
*/
uint8_t scellIndex;
/* Indicates if cross-carrier scheduling shall be used or not on the SCell */
/**
* Indicates if cross carrier scheduling shall be used on this SCell. If so, detailed cross configuration is given in \ref schedulingCellIndex and \ref pdschStart.
*/
bool useCrossCarrierScheduling;
/* Index of the cell responsible for delivering scheduling for this SCell */
/**
* Indicates which cell signals the downlink allocations and uplink grants, if applicable, for the concerned SCell.
* \n Range: 0..7
*/
uint8_t schedulingCellIndex;
/* Starting OFDM symbol of PDSCH data region for this SCell */
/**
* Starting OFDM symbol of PDSCH data region for this Scell.
* \n Range: 1..4
*/
uint8_t pdschStart;
};
/**
* PDCCH symbol count.
*/
struct PdcchOfdmSymbolCountListElement_s
{
/* Unique carrier identifier */
/**
* Component carrier identifier, uniquely identifies carrier within the eNB, see \ref fapiExtDoc_indices_sec "PcellIndex/ScellIndex’ing".
*/
uint8_t carrierIndex;
/* Size of PDCCH in OFDM symbols */
/**
* Current size of PDCCH.
* \n Range: 0..4
*/
uint8_t pdcchOfdmSymbolCount;
};
/*@}*/
#if defined (__cplusplus)
}
#endif
......
/*******************************************************************************
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-csched-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
* @ingroup _fapi
/**
* @file ff-mac-csched-sap.h
* @brief Implementation of the Femto Forum LTE MAC Scheduler Interface Specification v1.11 with extensions.
* @details Contains CSCHED SAP MAC->scheduler primitive declarations and all primitives data structures definitions.
* @author Florian Kaltenberger, Maciej Wewior
* @date March 2015
* @email: florian.kaltenberger@eurecom.fr, m.wewior@is-wireless.com
* @ingroup _mac
*/
#ifndef FF_MAC_CSCHED_SAP_H
......@@ -47,40 +20,120 @@
extern "C" {
#endif
/** @defgroup _fapi FAPI
* @ingroup _mac
* @{
//forward declarations
struct CschedCellConfigReqParameters;
struct CschedUeConfigReqParameters;
struct CschedLcConfigReqParameters;
struct CschedLcReleaseReqParameters;
struct CschedUeReleaseReqParameters;
//CSCHED SAP MAC->scheduler primitives
/**
* @brief Configure cell.
* @details (Re-)configure MAC scheduler with cell configuration and scheduler configuration. The cell configuration will also setup the BCH, BCCH, PCCH and CCCH LC configuration (for each component carrier).
* @param scheduler Scheduler context pointer, see SchedInit()
* @param params Cell configuration
*/
void CschedCellConfigReq (void* scheduler, const struct CschedCellConfigReqParameters *params);
/**
* @brief Configure single UE.
* @details (Re-)configure MAC scheduler with single UE specific parameters. A UE can only be configured when a cell configuration has been received.
* @param scheduler Scheduler context pointer, see SchedInit()
* @param params UE configuration
*/
void CschedUeConfigReq (void* scheduler, const struct CschedUeConfigReqParameters *params);
/**
* @brief Configure UE's logical channel(s).
* @details (Re-)configure MAC scheduler with UE's logical channel configuration. A logical channel can only be configured when a UE configuration has been received.
* @param scheduler Scheduler context pointer, see SchedInit()
* @param params UE's logical channel configuration
*/
void CschedLcConfigReq (void* scheduler, const struct CschedLcConfigReqParameters *params);
/**
* Parameters of the API primitives
* @brief Release UE's logical channel(s).
* @details Release UE's logical channel(s) in the MAC scheduler. A logical channel can only be released if it has been configured previously.
* @param scheduler Scheduler context pointer, see SchedInit()
* @param params UE's logical channel(s) to be released
*/
void CschedLcReleaseReq (void* scheduler, const struct CschedLcReleaseReqParameters *params);
/**
* Parameters of the CSCHED_CELL_CONFIG_REQ primitive.
* See section 4.1.1 for a detailed description of the parameters.
* @brief Release UE.
* @details Release a UE in the MAC scheduler. The release of the UE configuration implies the release of LCs, which are still active. A UE can only be released if it has been configured previously.
* @param scheduler Scheduler context pointer, see SchedInit()
* @param params UE to be released
*/
void CschedUeReleaseReq (void* scheduler, const struct CschedUeReleaseReqParameters *params);
//CSCHED SAP primitives parameters
/**
* Cell configuration parameters.
*/
struct CschedCellConfigReqParameters
{
/**
* The number of elements in the \ref ccConfigList array.
* \n Range: 0..#MAX_NUM_CCs
*/
uint8_t nr_carriers;
#warning MAX_NUM_CCs forced to 2 in structure CschedCellConfigReqParameters!!
/**
* The list of component carrier’s configurations.
*/
struct CschedCellConfigReqParametersListElement* ccConfigList[2 /*MAX_NUM_CCs*/];
/**
* The number of elements in the \ref vendorSpecificList array.
*/
uint8_t nr_vendorSpecificList;
/**
* Contains scheduler specific configuration received from the OAM subsystem for use by a specific scheduler.
*/
struct VendorSpecificListElement_s *vendorSpecificList;
};
/**
* Component carrier configuration parameters.
*/
struct CschedCellConfigReqParametersListElement
{
/**
* PUSCH resources in RBs. used for hopping. see \ref ref2 "[2]" section 5.3.4.
* \n Range: 0..98
*/
uint8_t puschHoppingOffset;
/**
* Physical cell ID.
* \n Range: 0..503
*/
unsigned NcellID;
/**
* See \ref ref2 "[2]" section 5.3.4
*/
enum HoppingMode_e
{
inter,
interintra
} hoppingMode;
/**
* Number of subbands, see \ref ref2 "[2]" section 5.3.4.
* \n Range: 1..4
*/
uint8_t nSb;
/**
* The number of resources element groups used for PHICH.
*/
enum PhichResource_e
{
PHICH_R_ONE_SIXTH,
......@@ -90,68 +143,220 @@ struct CschedCellConfigReqParametersListElement
} phichResource;
/**
* See \ref ref2 "[2]" table 6.9.3-1.
*/
enum NormalExtended_e phichDuration;
/**
* Nr of PDCCH OFDM symbols, see \ref ref2 "[2]" section 6.9.
* \n Range: 0..4
*/
uint8_t initialNrOfPdcchOfdmSymbols;
/**
* The SI configuration.
*/
struct SiConfiguration_s siConfiguration;
/**
* UL transmission bandwidth in RBs.
* \n Range: 6,15,25,50,75,100
*/
uint8_t ulBandwidth;
/**
* DL transmission bandwidth in RBs.
* \n Range: 6,15,25,50,75,100
*/
uint8_t dlBandwidth;
/**
* See \ref ref2 "[2]" section 5.2.1.
*/
enum NormalExtended_e ulCyclicPrefixLength;
/**
* DL cyclic prefix.
*/
enum NormalExtended_e dlCyclicPrefixLength;
/**
* Number of cell specific antenna ports, see \ref ref2 "[2]" section 6.2.1.
* \n Range: 1,2,4
*/
uint8_t antennaPortsCount;
/**
* Cell is configured in TDD or FDD mode.
*/
enum DuplexMode_e
{
DTDD,
DFDD
} duplexMode;
/**
* DL/UL subframe assignment. Only TDD, see \ref ref2 "[2]" table 4.2.2.
* \n Range: 0..6
*/
uint8_t subframeAssignment;
/**
* TDD configuration. Only TDD, see \ref ref2 "[2]" table 4.2.1.
* \n Range: 0..8
*/
uint8_t specialSubframePatterns;
#warning mbsfn_SubframeConfigPresent is missing in the structure CschedCellConfigReqParametersListElement
/**
* Indicates if the \ref mbsfnSubframeConfigRfPeriod, \ref mbsfnSubframeConfigRfOffset, \ref mbsfnSubframeConfigSfAllocation fields are valid or not.
*/
bool mbsfn_SubframeConfigPresent;
/**
* The MBSFN radio frame period.
* \n Range: 1,2,4,8,16,32
*/
uint8_t mbsfnSubframeConfigRfPeriod[MAX_MBSFN_CONFIG];
/**
* The radio frame offset.
* \n Range: 0..7
*/
uint8_t mbsfnSubframeConfigRfOffset[MAX_MBSFN_CONFIG];
/**
* Indicates the MBSFN subframes.
* \n Range: bitmap 0..9
*/
uint8_t mbsfnSubframeConfigSfAllocation[MAX_MBSFN_CONFIG];
/**
* See \ref ref2 "[2]" section 5.7.1.
* \n Range: 0..63
*/
uint8_t prachConfigurationIndex;
/**
* See \ref ref2 "[2]" section 5.7.1.
* \n Range: 0..94
*/
uint8_t prachFreqOffset;
/**
* Duration of RA response window in SF, see \ref ref1 "[1]".
* \n Range: 2..8,10
*/
uint8_t raResponseWindowSize;
/**
* Contention resolution timer used during random access, see \ref ref1 "[1]".
* \n Range: 8,16,24,32,40,48,56,64
*/
uint8_t macContentionResolutionTimer;
/**
* See \ref ref1 "[1]".
* \n Range: 1..8
*/
uint8_t maxHarqMsg3Tx;
/**
* See \ref ref4 "[4]" section 10.1.
* \n Range: 0..2047
*/
uint16_t n1PucchAn;
/**
* See \ref ref2 "[2]" section 5.4.
* \n Range: 1..3
*/
uint8_t deltaPucchShift;
/**
* See \ref ref2 "[2]" section 5.4.
* \n Range: 0..98
*/
uint8_t nrbCqi;
/**
* See \ref ref2 "[2]" section 5.4.
* \n Range: 0..7
*/
uint8_t ncsAn;
/**
* See \ref ref2 "[2]" table 5.5.3.3-1 and 5.5.3.3-2.
* \n Range: 0..15
*/
uint8_t srsSubframeConfiguration;
/**
* See \ref ref2 "[2]" section 5.5.3.2.
* \n Range: 0..9
*/
uint8_t srsSubframeOffset;
/**
* SRS bandwidth, see \ref ref2 "[2]" section 5.5.3.2.
* \n Range: 0..7
*/
uint8_t srsBandwidthConfiguration;
/**
* See \ref ref2 "[2]" section 5.5.3.2. Only TDD.
*/
bool srsMaxUpPts;
/**
* Maximum UL modulation supported, see \ref ref4 "[4]" section 8.6.1.
*/
enum Enable64Qae
{
MOD_16QAM,
MOD_64QAM
} enable64Qam;
/**
* Component carrier identifier.
*/
uint8_t carrierIndex;
};
/**
* Parameters of the CSCHED_UE_CONFIG_REQ primitive.
* See section 4.1.3 for a detailed description of the parameters.
* UE configuration parameters.
*/
struct CschedUeConfigReqParameters
{
/**
* The RNTI identifying the UE.
*/
uint16_t rnti;
/**
* Indicates if this is a reconfiguration for an existing UE or if a new UE is added.
*/
bool reconfigureFlag;
/**
* Indicates if the \ref drxConfig sub-structure is valid or not.
*/
bool drxConfigPresent;
/**
* The DRX configuration.
*/
struct DrxConfig_s drxConfig;
/**
* In subframes, see \ref ref1 "[1]". Used for controlling synchronization status of the UE, not for the actual timing advance procedure.
* \n Range: 500,750,1280,1920,2560,5120,10240,inf
*/
uint16_t timeAlignmentTimer;
/**
* Specifies the measurement gap configuration or that it is not applicable, see \ref ref6 "[6]".
*/
enum MeasGapConfigPattern_e
{
MGP_GP1,
......@@ -159,18 +364,68 @@ struct CschedUeConfigReqParameters
OFF
} measGapConfigPattern;
/**
* Specifies the measurement gap offset, if applicable, see \ref ref6 "[6]".
* \n Range: 0..79
*/
uint8_t measGapConfigSubframeOffset;
/**
* Indicates if the \ref spsConfig is valid.
*/
bool spsConfigPresent;
/**
* The SPS configuration.
*/
struct SpsConfig_s spsConfig;
/**
* Indicates if \ref srConfig struct is valid.
*/
bool srConfigPresent;
/**
* The SR configuration.
*/
struct SrConfig_s srConfig;
/**
* Indicates if \ref cqiConfig struct is valid.
*/
bool cqiConfigPresent;
/**
* The CQI configuration.
*/
struct CqiConfig_s cqiConfig;
/**
* The configured transmission mode, see \ref ref4 "[4]" section 7.1.
* \n Range: 1..7
*/
uint8_t transmissionMode;
/**
* Aggregated bit rate of non-gbr bearer per UE, see \ref ref7 "[7]".
* \n Range: 0..10000000000
*/
uint64_t ueAggregatedMaximumBitrateUl;
/**
* Aggregated bit rate of non-gbr bearer per UE, see \ref ref7 "[7]".
* \n Range: 0..10000000000
*/
uint64_t ueAggregatedMaximumBitrateDl;
/**
* The UE capabilities.
*/
struct UeCapabilities_s ueCapabilities;
/**
* See \ref ref4 "[4]" section 8.7.
*/
enum OpenClosedLoop_e
{
noneloop,
......@@ -178,221 +433,446 @@ struct CschedUeConfigReqParameters
closedloop
} ueTransmitAntennaSelection;
/**
* See \ref ref1 "[1]".
*/
bool ttiBundling;
/**
* The maximum HARQ retransmission for uplink HARQ, see \ref ref1 "[1]".
* \n Range: 1..8,10,12,16,20,24,28
*/
uint8_t maxHarqTx;
/**
* See \ref ref4 "[4]" table 8.6.3-1.
* \n Range: 0..15
*/
uint8_t betaOffsetAckIndex;
/**
* See \ref ref4 "[4]" table 8.6.3-2.
* \n Range: 0..15
*/
uint8_t betaOffsetRiIndex;
/**
* See \ref ref4 "[4]" table 8.6.3-3.
* \n Range: 0..15
*/
uint8_t betaOffsetCqiIndex;
/**
* See \ref ref4 "[4]" section 8.2.
*/
bool ackNackSrsSimultaneousTransmission;
/**
* See \ref ref4 "[4]" section 10.1.
*/
bool simultaneousAckNackAndCqi;
/**
* Reporting mode for aperiodic CQI, see \ref ref4 "[4]" section 7.2.1.
*/
enum RepMode_e
{
ff_rm12, ff_rm20, ff_rm22, ff_rm30, ff_rm31, ff_nonemode
} aperiodicCqiRepMode;
/**
* See \ref ref3 "[3]" section 7.3. Only TDD.
*/
enum FeedbackMode_e
{
ff_bundling,
ff_multiplexing
} tddAckNackFeedbackMode;
/**
* See \ref ref4 "[4]" section 10.1. 0 means no repetition.
* \n Range: 0,2,4,6
*/
uint8_t ackNackRepetitionFactor;
/**
* Indicates if extended BSR sizes shall be used, see \ref ref1 "[1]" section 6.1.3.1.
*/
bool extendedBSRSizes;
/**
* Indicates if the UE supports CA.
*/
bool caSupport;
/**
* Indicates if the supports cross carrier scheduling.
*/
bool crossCarrierSchedSupport;
/**
* Carrier index of the UE’s PCell. Indicates which of available carriers in eNB is the PCell for the UE, see \ref fapiExtDoc_indices_sec "PcellIndex/ScellIndex’ing".
*/
uint8_t pcellCarrierIndex;
/**
* Number of SCells configured for the UE, indicates number of valid elements in \ref scellConfigList.
* \n Range: 0..#MAX_NUM_CCs-1
*/
uint8_t nr_scells;
#warning MAX_NUM_CCs forced to 2 in structure CschedUeConfigReqParameters!!
struct ScellConfig_s* scellConfigList[2 /* MAX_NUM_CCs */ -1];
/**
* The list of SCell configurations.
*/
struct ScellConfig_s* scellConfigList[2 /*MAX_NUM_CCs*/ -1];
/**
* SCell deactivation timer, see \ref ref1 "[1]".
*/
uint8_t scellDeactivationTimer;
/**
* The number of elements in the \ref vendorSpecificList array.
*/
uint8_t nr_vendorSpecificList;
/**
* Contains scheduler specific configuration received from the OAM subsystem for use by a specific scheduler.
*/
struct VendorSpecificListElement_s *vendorSpecificList;
};
/**
* Parameters of the CSCHED_LC_CONFIG_REQ primitive.
* See section 4.1.5 for a detailed description of the parameters.
* Logical channel configuration parameters.
*/
struct CschedLcConfigReqParameters
{
/**
* The RNTI identifying the UE.
*/
uint16_t rnti;
/**
* Indicates if this is a reconfiguration for an existing UE or if a new UE is added. See \ref fapiExtDoc_lcreconf_sec "Logical channel reconfiguration".
*/
bool reconfigureFlag;
/**
* The number of elements in \ref logicalChannelConfigList array.
* \n Range: 1..#MAX_LC_LIST
*/
uint8_t nr_logicalChannelConfigList;
/**
* The array of logical channel configurations to be configured.
*/
struct LogicalChannelConfigListElement_s *logicalChannelConfigList;
/**
* The number of elements in the \ref vendorSpecificList array.
*/
uint8_t nr_vendorSpecificList;
/**
* Contains scheduler specific configuration received from the OAM subsystem for use by a specific scheduler.
*/
struct VendorSpecificListElement_s *vendorSpecificList;
};
/**
* Parameters of the CSCHED_LC_RELEASE_REQ primitive.
* See section 4.1.7 for a detailed description of the parameters.
* Logical channel release parameters.
*/
struct CschedLcReleaseReqParameters
{
/**
* The RNTI identifying the UE.
*/
uint16_t rnti;
/**
* The number of elements in the \ref logicalChannelIdentity array.
* \n Range: 1..#MAX_LC_LIST
*/
uint8_t nr_logicalChannelIdendity;
/**
* The array of logical channel ID which shall be released.
*/
uint8_t *logicalChannelIdentity;
/**
* The number of elements in the \ref vendorSpecificList array.
*/
uint8_t nr_vendorSpecificList;
/**
* Contains scheduler specific configuration received from the OAM subsystem for use by a specific scheduler.
*/
struct VendorSpecificListElement_s *vendorSpecificList;
};
/**
* Parameters of the CSCHED_UE_RELEASE_REQ primitive.
* See section 4.1.9 for a detailed description of the parameters.
* UE release parameters.
*/
struct CschedUeReleaseReqParameters
{
/**
* The RNTI identifying the UE.
*/
uint16_t rnti;
/**
* The number of elements in the \ref vendorSpecificList array.
*/
uint8_t nr_vendorSpecificList;
/**
* Contains scheduler specific configuration received from the OAM subsystem for use by a specific scheduler.
*/
struct VendorSpecificListElement_s *vendorSpecificList;
};
//
// CSCHED - MAC Scheduler Control SAP primitives
// (See 4.1 for description of the primitives)
//
/**
* \brief CSCHED_CELL_CONFIG_REQ
*/
void CschedCellConfigReq(void *, const struct CschedCellConfigReqParameters *params);
void CschedUeConfigReq(void *, const struct CschedUeConfigReqParameters *params);
void CschedLcConfigReq(void *, const struct CschedLcConfigReqParameters *params);
void CschedLcReleaseReq(void *, const struct CschedLcReleaseReqParameters *params);
void CschedUeReleaseReq(void *, const struct CschedUeReleaseReqParameters *params);
/**
* Parameters of the API primitives
*/
//CSCHED SAP scheduler->MAC primitives parameters
/**
* Parameters of the CSCHED_CELL_CONFIG_CNF primitive.
* See section 4.1.2 for a detailed description of the parameters.
* Cell configuration confirmation parameters.
*/
struct CschedCellConfigCnfParameters
{
/**
* The outcome of the cell configuration request.
*/
enum Result_e result;
/**
* The number of elements in the \ref vendorSpecificList array.
*/
uint8_t nr_vendorSpecificList;
/**
* Contains scheduler specific configuration received from the OAM subsystem for use by a specific scheduler.
*/
struct VendorSpecificListElement_s *vendorSpecificList;
};
/**
* Parameters of the CSCHED_UE_CONFIG_CNF primitive.
* See section 4.1.4 for a detailed description of the parameters.
* UE configuration confirmation parameters.
*/
struct CschedUeConfigCnfParameters
{
/**
* The RNTI identifying the UE.
*/
uint16_t rnti;
/**
* The outcome of the UE configuration request.
*/
enum Result_e result;
/**
* The number of elements in the \ref vendorSpecificList array.
*/
uint8_t nr_vendorSpecificList;
/**
* Contains scheduler specific configuration received from the OAM subsystem for use by a specific scheduler.
*/
struct VendorSpecificListElement_s *vendorSpecificList;
};
/**
* Parameters of the CSCHED_LC_CONFIG_CNF primitive.
* See section 4.1.6 for a detailed description of the parameters.
* Logical channel configuration confirmation parameters.
*/
struct CschedLcConfigCnfParameters
{
/**
* The RNTI identifying the UE.
*/
uint16_t rnti;
/**
* The outcome of the LC configuration request.
*/
enum Result_e result;
/**
* The number of elements in the \ref logicalChannelIdentity array.
* \n Range: 1..#MAX_LC_LIST
*/
uint8_t nr_logicalChannelIdendity;
/**
* The array of logical channel ID which have been configured/updated.
*/
uint8_t *logicalChannelIdentity;
/**
* The number of elements in the \ref vendorSpecificList array.
*/
uint8_t nr_vendorSpecificList;
/**
* Contains scheduler specific configuration received from the OAM subsystem for use by a specific scheduler.
*/
struct VendorSpecificListElement_s *vendorSpecificList;
};
/**
* Parameters of the CSCHED_LC_RELEASE_CNF primitive.
* See section 4.1.8 for a detailed description of the parameters.
* Logical channel release confirmation parameters.
*/
struct CschedLcReleaseCnfParameters
{
/**
* The RNTI identifying the UE.
*/
uint16_t rnti;
/**
* The outcome of the LC release request.
*/
enum Result_e result;
/**
* The number of elements in the \ref logicalChannelIdentity array.
* \n Range: 1..#MAX_LC_LIST
*/
uint8_t nr_logicalChannelIdendity;
/**
* The array of logical channel ID which have been released.
*/
uint8_t *logicalChannelIdentity;
/**
* The number of elements in the \ref vendorSpecificList array.
*/
uint8_t nr_vendorSpecificList;
/**
* Contains scheduler specific configuration received from the OAM subsystem for use by a specific scheduler.
*/
struct VendorSpecificListElement_s *vendorSpecificList;
};
/**
* Parameters of the CSCHED_UE_RELEASE_CNF primitive.
* See section 4.1.10 for a detailed description of the parameters.
* UE release confirmation parameters.
*/
struct CschedUeReleaseCnfParameters
{
/**
* The RNTI identifying the UE.
*/
uint16_t rnti;
/**
* The outcome of the UE release request.
*/
enum Result_e result;
/**
* The number of elements in the \ref vendorSpecificList array.
*/
uint8_t nr_vendorSpecificList;
/**
* Contains scheduler specific configuration received from the OAM subsystem for use by a specific scheduler.
*/
struct VendorSpecificListElement_s *vendorSpecificList;
};
/**
* Parameters of the CSCHED_UE_CONFIG_UPDATE_IND primitive.
* See section 4.1.11 for a detailed description of the parameters.
* UE configuration update indication parameters.
*/
struct CschedUeConfigUpdateIndParameters
{
/**
* The RNTI identifying the UE.
*/
uint16_t rnti;
/**
* The configured transmission mode, see \ref ref4 "[4]" section 7.1.
* \n Range: 1..7
*/
uint8_t transmissionMode;
/**
* Indicates if \ref spsConfig struct is present.
*/
bool spsConfigPresent;
/**
* The SPS configuration request.
*/
struct SpsConfig_s spsConfig;
/**
* Indicates if \ref srConfig struct is present.
*/
bool srConfigPresent;
/**
* The SR configuration request.
*/
struct SrConfig_s srConfig;
/**
* Indicates if \ref cqiConfig struct is present.
*/
bool cqiConfigPresent;
/**
* The CQI configuration request.
*/
struct CqiConfig_s cqiConfig;
/**
* The number of elements in the \ref vendorSpecificList array.
*/
uint8_t nr_vendorSpecificList;
/**
* Contains scheduler specific configuration received from the OAM subsystem for use by a specific scheduler.
*/
struct VendorSpecificListElement_s *vendorSpecificList;
};
/**
* Parameters of the CSCHED_CELL_CONFIG_UPDATE_IND primitive.
* See section 4.1.12 for a detailed description of the parameters.
* Cell configuration update indication parameters.
*/
struct CschedCellConfigUpdateIndParameters
{
/**
* Component carrier identifier, uniquely identifies carrier in the eNB, see \ref fapiExtDoc_indices_sec "PcellIndex/ScellIndex’ing".
*/
uint8_t carrierIndex;
/**
* Percentage as defined in \ref ref8 "[8]".
* \n Range: 0..100
*/
uint8_t prbUtilizationDl;
/**
* Percentage as defined in \ref ref8 "[8]".
* \n Range: 0..100
*/
uint8_t prbUtilizationUl;
/**
* The number of elements in the \ref vendorSpecificList array.
*/
uint8_t nr_vendorSpecificList;
/**
* Contains scheduler specific configuration received from the OAM subsystem for use by a specific scheduler.
*/
struct VendorSpecificListElement_s *vendorSpecificList;
};
//
// CSCHED - MAC Scheduler Control SAP primitives
// (See 4.1 for description of the primitives)
//
// Primitives defined as callbacks in separate file ff-mac-callback.h
#if 0
/* not used - the scheduler has callbacks for those */
void CschedCellConfigCnf(const struct CschedCellConfigCnfParameters *params);
void CschedUeConfigCnf(const struct CschedUeConfigCnfParameters *params);
void CschedLcConfigCnf(const struct CschedLcConfigCnfParameters *params);
void CschedLcReleaseCnf(const struct CschedLcReleaseCnfParameters *params);
void CschedUeReleaseCnf(const struct CschedUeReleaseCnfParameters *params);
void CschedUeConfigUpdateInd(const struct CschedUeConfigUpdateIndParameters *params);
void CschedCellConfigUpdateInd(const struct CschedCellConfigUpdateIndParameters *params);
#endif
/*@}*/
//CSCHED SAP MAC->scheduler primitives are defined as callbacks in separate file ff-mac-callback.h
#if defined (__cplusplus)
}
......
#ifndef FF_MAC_INIT_H
#define FF_MAC_INIT_H
/**
* @file ff-mac-init.h
* @brief Implementation of the Femto Forum LTE MAC Scheduler Interface Specification v1.11 with extensions.
* @details Contains init and shutdown function declarations, that the MAC shall call upon the scheduler.
* @author Florian Kaltenberger, Maciej Wewior
* @date March 2015
* @email: florian.kaltenberger@eurecom.fr, m.wewior@is-wireless.com
* @ingroup _mac
*/
/*!
* @ingroup _fapi
/**
* @mainpage LTE MAC Scheduler Interface
* This is an implementation of FemtoForum (today <a href="http://www.smallcellforum.org">Small Cell Forum</a>) originated LTE MAC Scheduler Interface v1.11.
* Current version of the API was developed by <a href="http://www.is-wireless.com">IS-Wireless</a> and <a href="http://www.eurecom.fr/en">Eurecom</a> and is an extension of original FAPI. Extensions are:
* @li support for Carrier Aggregation
* @li improved CQI report structures
* @li bug fixes
*
* <hr>
* @section fapiOrigDoc_sec Original FAPI documentation
* This section contains the copy of FAPI documentation that was included in the original "LTE MAC Scheduler Interface v1.11" document by FemtoForum (Document number: FF_Tech_001_v1.11
* , Date issued: 12-10-2010, Document status: Document for public distribution).
* @subsection fapiOrigDoc_scope_sec Scope
* This document specifies the MAC Scheduler interface. The goal of this interface specification is to allow the use of a wide range of schedulers which can be plugged
* into the eNodeB and to allow for standardized interference coordination interface to the scheduler.
* @subsection fapiOrigDoc_overview_sec Interface overview
* The MAC scheduler is part of MAC from a logical view and the MAC scheduler should be independent from the PHY interface.
* \n The description in this interface does not foresee any specific implementation of the interface. What is specified in this document is the structure of the parameters.
* In order to describe the interface in detail the following model is used:
* \n The interface is defined as a service access point offered by the MAC scheduler to the remaining MAC functionality, as shown in Figure 1. A _REQ primitive is from MAC to the MAC scheduler.
* A _IND/_CNF primitives are from the MAC scheduler to the MAC. The description using primitives does not foresee any specific implementation and is used for illustration purposes.
* Therefore an implementation could be message-based or function-based interface. Timing constrains applicable to the MAC scheduler are not yet specified.
* \n For the MAC scheduler interface specification a push-based concept is employed, that is all parameters needed by the scheduler are passed to the scheduler at specific times
* rather than using a pull-based concept (i.e. fetching the parameters from different places as needed). The parameters specified are as far as possible aligned with the 3GPP specifications.
* @image html fapi_overview.jpg
* @image latex fapi_overview.eps
* Figure 1 shows the functionality split between the MAC scheduler and the remaining MAC. For the purposes of describing the MAC scheduler interface the MAC consists of a control block and a subframe
* block, which uses the CSCHED and SCHED SAP respectively. The subframe block triggers the MAC scheduler every TTI and receives the scheduler results. The control block forwards control information to the MAC
* scheduler as necessary. The scheduler consists of the following blocks:
* @li <b>UL</b> Is responsible for scheduling of the PUSCH resources.
* @li <b>DL</b> Is responsible for scheduling of the PDSCH resources.
* @li <b>PDCCH/RACH</b> Is responsible for shared resources between UL and DL.
* @li <b>HARQ</b> Is responsible for handling HARQ retransmissions, keeping track of the number of retransmissions and redundancy versions.
* @li <b>Cell Cfg</b> Stores the UE configuration needed by the MAC scheduler.
* @li <b>UE Cfg</b> Stores the UE configuration needed by the MAC scheduler.
* @li <b>LC Cfg</b> Stores the logical channel configuration needed by the MAC scheduler.
* @li <b>Sched Cfg</b> Stores the scheduler-specific configuration needed by the MAC scheduler.
* @subsection fapiOrigDoc_detailed_sec Detailed interface description
* In the following section the messages exchanged at the SAPs are specified.
* @subsubsection fapiOrigDoc_detailed_csched_sec CSCHED – MAC Scheduler Control SAP
* Below list specifies which configuration messages can be used to configure the scheduler. There is no restriction on the timing of when these messages can be sent, except where otherwise
* noted in the message description. The RNTI and, if available, the LCID are used to identity the UE/LC between the MAC scheduler and the MAC. In case of a reconfiguration message
* all parameters previously configured in a message have to be resend, otherwise parameters not present are removed in the scheduler (i.e. no delta configuration is possible).
* @paragraph csched_par_1 CSCHED primitives from MAC to scheduler
* @li CschedCellConfigReq()
* @li CschedUeConfigReq()
* @li CschedLcConfigReq()
* @li CschedLcReleaseReq()
* @li CschedUeReleaseReq()
* @paragraph csched_par_2 CSCHED Primitives from scheduler to MAC
* @li \ref CschedCellConfigCnf_callback_t "CschedCellConfigCnf()"
* @li \ref CschedUeConfigCnf_callback_t "CschedUeConfigCnf()"
* @li \ref CschedLcConfigCnf_callback_t "CschedLcConfigCnf()"
* @li \ref CschedLcReleaseCnf_callback_t "CschedLcReleaseCnf()"
* @li \ref CschedUeReleaseCnf_callback_t "CschedUeReleaseCnf()"
* @li \ref CschedUeConfigUpdateInd_callback_t "CschedUeConfigUpdateInd()"
* @li \ref CschedCellConfigUpdateInd_callback_t "CschedCellConfigUpdateInd()"
* @subsubsection fapiOrigDoc_detailed_sched_sec SCHED - MAC Scheduler SAP
* @paragraph sched_par_1 SCHED primitives from MAC to scheduler
* @li SchedDlTriggerReq()
* @li SchedDlRlcBufferReq()
* @li SchedDlPagingBufferReq()
* @li SchedDlMacBufferReq()
* @li SchedDlRachInfoReq()
* @li SchedDlCqiInfoReq()
* @li SchedUlTriggerReq()
* @li SchedUlNoiseInterferenceReq()
* @li SchedUlSrInfoReq()
* @li SchedUlMacCtrlInfoReq()
* @li SchedUlCqiInfoReq()
* @paragraph sched_par_2 SCHED primitives from scheduler to MAC
* @li \ref SchedDlConfigInd_callback_t "SchedDlConfigInd()"
* @li \ref SchedUlConfigInd_callback_t "SchedUlConfigInd()"
* @subsection fapiOrigDoc_scenarios_sec Scenarios
* @subsubsection scenarios_1 Cell Setup
* @image html cell_setup.jpg
* @image latex cell_setup.eps
* @subsubsection scenarios_2 RACH procedure
* Mind!: this original sequence diagram has been found bugs and the new random access diagram has been created, see \ref fapiExtDoc_rap_sec "new random access procedure".
* @image html random_access_old.jpg
* @image latex random_access_old.eps
* @subsubsection scenarios_3 UE configuration
* @image html ue_conf.jpg
* @image latex ue_conf.eps
* @subsubsection scenarios_4 Radio Bearer Setup
* @image html radio_bearer_setup.jpg
* @image latex radio_bearer_setup.eps
* @subsubsection scenarios_5 Handling of logical channel buffer status
* Mind!: this original sequence diagram has improper name of the primitive for reporting DL buffer status, the proper name is SCHED_DL_RLC_BUFFER_REQ.
* @image html buffer_status.jpg
* @image latex buffer_status.eps
* @subsubsection scenarios_6 DRB release
* @image html drb_release.jpg
* @image latex drb_release.eps
* @subsubsection scenarios_7 DRB UE release
* @image html ue_release.jpg
* @image latex ue_release.eps
* @subsubsection scenarios_8 UE configuration update by MAC scheduler
* @image html conf_update.jpg
* @image latex conf_update.eps
* @subsubsection scenarios_9 Scheduler Subframe flow
* @image html subframe_flow.jpg
* @image latex subframe_flow.eps
* @subsection fapiOrigDoc_appendix Appendix A: Performance and Functional Requirements for the LTE Femtocell Scheduler API
* This appendix provides a high level overview of performance and functionality requirements for LTE schedulers that utilize the LTE femtocell scheduler API framework being defined by Femto Forum WG2.
* These requirements are not totally comprehensive but represent a set of basic requirements that would be reasonably expected by an operator from an LTE scheduler residing in an LTE home eNodeB.
* @li Satisfy latency and packet error loss characteristics of each QCI class standardized in 3GPP 23.203 Table 6.1.7 under the following conditions:
* - Single user case: one user accesses any one of the example services in below table via a home eNodeB.
* - Multiple user/services case: one or several users simultaneously access more than one of the example services in below table via a home eNodeB.
* @li Satisfy Guaranteed Bit Rate (GBR), Minimum Bit Rate (MBR, as applicable, for each service data flow managed by the scheduler under the following conditions:
* - Single user case: one user accesses any one of the example services in below table via a home eNodeB.
* - Multiple user/services case: one or several users simultaneously access more than one of the example services in below table via a home eNodeB.
* @li Enforce downlink maximum bit rate for sum of downlink bearers based on UE-AMBR and APN-AMBR (for non-GBR flows). Enforce corresponding uplink maximum bit rates.
* @li Interact with admission and load control mechanisms to ensure that new users are admitted only when QoS requirements of existing and newly added users/bearers can be met.
* @li When system load exceeds certain pre-defined thresholds, judiciously select lowest priority bearers for service downgrade.
* @li Dynamically perform frequency selective and frequency diverse scheduling (localized and distributed virtual resource blocks) depending upon channel conditions, QoS requirements, etc.
* @li Dynamically adapt transport block size selection, MIMO mode selection, and rank depending upon Channel Quality Indicator (CQI), Pre-coding Matrix Indicator (PMI), and Rank Indication (RI) feedback
* from UEs while taking into account the status of data buffers.
* @li Provide higher priority to HARQ re-transmissions versus new transmissions for a bearer.
* @li Monitor current packet allocations and overall system load.
*
* <hr>
*
* @section fapiExtDoc_sec FAPI extensions
* This section contains information related to FAPI extensions.
*
* @subsection fapiExtDoc_cellAct_sec SCell activation/deactivation
* Decision about SCell activation/deactivation is always taken inside the scheduler and in such cases the scheduler generates proper MAC CE and schedules it for sending to the UE.
*
* @subsection fapiExtDoc_indices_sec PcellIndex/ScellIndex’ing
* There are 3 kinds of component carrier indices in the interface:
* @li carrierIndex – this is global eNB identifier that clearly and uniquely identifies component carrier within eNB. It does not need to be related to any 3gpp defined indices,
* it is not related to RRC ServCellIndex value at all. Scheduler (and the other side of the interface) uses this index to signal which component carrier the data concerns.
* @li servCellIndex - this is 1 to 1 copy of ServCellIndex from RRCConnectionReconfiguration message that configures SCell(s) for the UE. It is used to identify serving cells for given UE.
* @li scellIndex – this is 1 to 1 copy of SCellIndex from RRCConnectionReconfiguration message that configures SCell(s) for the UE. It is used to identify SCells for given UE.
* Example: \n
* We have 3 carriers configured in the eNB:
* @li CC1 – carrierIndex = 10
* @li CC2 – carrierIndex = 15
* @li CC3 – carrierIndex = 4
* At some moment we may have 3 UEs connected to eNB having example CC configurations:
* @li UE1 – has 2 CCs:
* - PCell – CC with carrierIndex 10, servCellIndex 0
* - SCell – CC with carrierIndex 15 and scellIndex=servCellIndex=1
* @li UE2 – has 3 CCs:
* - PCell – CC with carrierIndex 4, servCellIndex 0
* - SCell – CC with carrierIndex 10 and scellIndex=servCellIndex=1
* - SCell – CC with carrierIndex 15 and scellIndex=servCellIndex=2
* @li UE1 – has 2 CCs:
* - PCell – CC with carrierIndex 15, servCellIndex 0
* - SCell – CC with carrierIndex 10 and scellIndex=servCellIndex=3
*
* @subsection fapiExtDoc_rap_sec Random access procedure
* This section contains new fixed random access procedure sequence diagram.
* @image html random_access_new.jpg
* @image latex random_access_new.eps
*
* @subsection fapiExtDoc_lcreconf_sec Logical channel reconfiguration
* Logical channel (re)configuration CschedLcConfigReqParameters::reconfigureFlag flag works as follows:
* @li 'true' means that CschedLcConfigReq() contains the whole new logical channel configuration (except CCCH, which is always by default configured) - as the result
* all current logical channels (except logical channel 0, CCCH) are removed and replaced by the new config
* @li 'false' means that CschedLcConfigReq() contains new logical channel(s) to be added to existing channel config - as the result current logical channels are not touched just new one(s) are appended
*
* @subsection fapiExtDoc_timing_sec Scheduler timing
* There're a few issues that must be taken into account regarding timing in the FAPI scheduler:
* @li PUSCH scheduling is always 4 subframes ahead (PDCCH carries DCI0s that inform about PUSCH allocations +4 subframes)
* @li the stack may, to have the scheduling decision on time, send the scheduling trigger in advance, that is send the scheduling trigger containing timestamp N at time N-k
* @li HARQ on UL is synchronous meaning that the moment when the HARQ ACK/NACK is received indicates which HARQ process it relates to
*
* Let's see the following example of 2 radio frames below consisting of 20 subframes A-U:
* <table border="1" style="width:50%">
* <tr><td>A</td><td bgcolor="#00FF00">B</td><td>C</td><td bgcolor="#FF0000">D</td><td>E</td><td>F</td><td>G</td><td bgcolor="#FF0000">H</td><td>I</td><td bgcolor="#00FF00">J</td><td>K</td><td>L</td><td>M</td><td>N</td><td>O</td><td>P</td><td>R</td><td>S</td><td>T</td><td>U</td></tr>
* </table>
* The following example scenario is valid:
* 1. B - scheduler receives DL and UL scheduling triggers with 'sfnSf' indicating D. The scheduler schedules D's PDCCH and PDSCH and D+4 (thus H) PUSCH and returns the scheduling decision when ready.
* 2. D - eNB stack uses allocated PDSCH resources to send DL data.
* 3. H - UE uses allocated PUSCH resources to send UL data. eNB stack starts decoding PUSCH data.
* 4. J - eNB stack passes (to the scheduler) information about decoding of PUSCH data received in H.
*
* @subsection fapiExtDoc_timestamp_sec Timestamp coding
* Timestamps in FAPI are conveyed by means of 16 bit unsigned integers, whose bits are coded as below:
* - bit 0-3 subframe number
* - bit 4-13 frame number
*
* @subsection fapiExtDoc_ul_sinr UL channel state reporting
* UL channel state is reported as the array of SINRs for all/subset of PRBs. Channel state might be reported based on the following information:
* @li SRS measurement - in this case the SINR array contains SINR values for the whole UL bandwidth thus number of valid elements is N_UL_PRB, where element '0' holds SINR for PRB '0', while element 'N_UL_PRB' holds SINR
* for PRB 'N_UL_RB-1'
* @li PRACH transmission - in this case the SINR array contains SINR values for the PRACH band - number of valid elements is 6 (PRACH bandwidth), where element '0' holds SINR for PRB 'prachFreqOffset'
* (\ref CschedCellConfigReqParametersListElement::prachFreqOffset), while element '6' holds SINR for PRB 'prachFreqOffset+5'
* @li PUSCH transmission - in this case the SINR array contains measurements measured during very last PUSCH transmission; here's the example when PUSCH transmission occurred upon the DCI0 allocation <2,7>.
* 2 cases are possible here, depending on if PUSCH hopping was used:
* - no PUSCH hopping is used - in such case the transmission happened on PRBs <2,7> so the channel measurement comes exactly from this range - number of valid elements in the SINR array is 6, where element '0'
* holds SINR for PRB 2, while element '5' holds SINR for PRB 7
* - PUSCH hopping is used - in such case the transmission happens on different set of PRBs for both slots, let's say transmission in slot0 occurred on PRBs <2,7>, while on the 2nd slot on PRBs <20,25>; in such case
* number of valid elements is 12, where element '0' holds SINR for PRB 2, element '5' SINR for PRB 7, element '6' SINR for PRB 20, element '11' SINR for PRB 25; always slot0 then slot1, always from smaller PRBs to bigger
*
* @section fapiDoc_sec External documentation
* @anchor ref1 [1] 3GPP TS 36.321: "Evolved Universal Terrestrial Radio Access (E-UTRA); Medium Access Control (MAC) protocol specification (Release 10)" \n
* @anchor ref2 [2] 3GPP TS 36.211: "Evolved Universal Terrestrial Radio Access (E-UTRA); Physical Channels and Modulation (Release 10)" \n
* @anchor ref3 [3] 3GPP TS 36.212: "Evolved Universal Terrestrial Radio Access (E-UTRA); Multiplexing and channel coding (Release 10)" \n
* @anchor ref4 [4] 3GPP TS 36.213: "Evolved Universal Terrestrial Radio Access (E-UTRA); Physical Layer Procedures (Release 10)" \n
* @anchor ref5 [5] 3GPP TS 36.331: "Evolved Universal Terrestrial Radio Access (E-UTRA); Radio Resource Control (RRC); Protocol Specification (Release 10)" \n
* @anchor ref6 [6] 3GPP TS 36.133: "Evolved Universal Terrestrial Radio Access (E-UTRA); Requirements for support of radio resource management (Release 10)" \n
* @anchor ref7 [7] 3GPP TS 36.413: "Evolved Universal Terrestrial Radio Access Network (E-UTRAN); S1 Application Protocol (S1AP) (Release 10)" \n
* @anchor ref8 [8] 3GPP TS 36.314: "Evolved Universal Terrestrial Radio Access (E-UTRA); Layer 2 - Measurements (Release 10)" \n
* @anchor ref9 [9] 3GPP TS 36.214: "Evolved Universal Terrestrial Radio Access (E-UTRA); Physical layer; Measurements (Release 10)" \n
* @anchor ref10 [10] 3GPP TS 23.203 "Universal Mobile Telecommunications System (UMTS); LTE; Policy and charging control architecture (Release 10)" \n
*/
#ifndef FF_MAC_INIT_H
#define FF_MAC_INIT_H
#if defined (__cplusplus)
extern "C" {
......@@ -12,7 +227,20 @@ extern "C" {
#include "ff-mac-callback.h"
/* this function is called to create and initialize a scheduler */
/**
* Initialize the scheduler instance. Must be called during system initialization before any communication with the scheduler occurs.
* @param callback_data Pointer to the callback data to be put by the scheduler when calling callback functions.
* @param SchedDlConfigInd SchedDlConfigInd callback pointer
* @param SchedUlConfigInd SchedUlConfigInd callback pointer
* @param CschedCellConfigCnf CschedCellConfigCnf callback pointer
* @param CschedUeConfigCnf CschedUeConfigCnf callback pointer
* @param CschedLcConfigCnf CschedLcConfigCnf callback pointer
* @param CschedLcReleaseCnf CschedLcReleaseCnf callback pointer
* @param CschedUeReleaseCnf CschedUeReleaseCnf callback pointer
* @param CschedUeConfigUpdateInd CschedUeConfigUpdateInd callback pointer
* @param CschedCellConfigUpdateInd CschedCellConfigUpdateInd callback pointer
* @return Scheduler context pointer
*/
void *SchedInit(
void *callback_data,
SchedDlConfigInd_callback_t *SchedDlConfigInd,
......@@ -25,6 +253,10 @@ void *SchedInit(
CschedUeConfigUpdateInd_callback_t *CschedUeConfigUpdateInd,
CschedCellConfigUpdateInd_callback_t *CschedCellConfigUpdateInd);
/**
* Shutdown the scheduler instance.
* @param scheduler Scheduler context pointer
*/
void SchedShutdown(void* scheduler);
#if defined (__cplusplus)
......
/*******************************************************************************
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
* @ingroup _fapi
/**
* @file ff-mac-sched-sap.h
* @brief Implementation of the Femto Forum LTE MAC Scheduler Interface Specification v1.11 with extensions.
* @details Contains SCHED SAP MAC->scheduler primitive declarations and all primitives data structures definitions.
* @author Florian Kaltenberger, Maciej Wewior
* @date March 2015
* @email: florian.kaltenberger@eurecom.fr, m.wewior@is-wireless.com
* @ingroup _mac
*/
#ifndef FF_MAC_SCHED_SAP_H
......@@ -47,235 +20,569 @@
extern "C" {
#endif
/** @defgroup _fapi FAPI
* @ingroup _mac
* @{
//forward declarations
struct SchedDlRlcBufferReqParameters;
struct SchedDlPagingBufferReqParameters;
struct SchedDlMacBufferReqParameters;
struct SchedDlTriggerReqParameters;
struct SchedDlRachInfoReqParameters;
struct SchedDlCqiInfoReqParameters;
struct SchedUlTriggerReqParameters;
struct SchedUlNoiseInterferenceReqParameters;
struct SchedUlSrInfoReqParameters;
struct SchedUlMacCtrlInfoReqParameters;
struct SchedUlCqiInfoReqParameters;
//SCHED SAP MAC->scheduler primitives
/**
* Update buffer status of logical channel data in RLC. The update rate with which the buffer status is updated in the scheduler is outside of the scope of the document.
* @param scheduler Scheduler context pointer, see SchedInit()
* @param params RLC buffer status
*/
void SchedDlRlcBufferReq (void * scheduler, const struct SchedDlRlcBufferReqParameters *params);
/**
* Parameters of the API primitives
* Update buffer status of paging messages.
* @param scheduler Scheduler context pointer, see SchedInit()
* @param params Paging buffer status
*/
void SchedDlPagingBufferReq (void * scheduler, const struct SchedDlPagingBufferReqParameters *params);
/**
* Parameters of the SCHED_DL_RLC_BUFFER_REQ primitive.
* See section 4.2.1 for a detailed description of the parameters.
* Update buffer status of MAC control elements. The update rate with which the buffer status is updated in the scheduler is outside of the scope of the document.
* @param scheduler Scheduler context pointer, see SchedInit()
* @param params MAC buffer status
*/
void SchedDlMacBufferReq (void * scheduler, const struct SchedDlMacBufferReqParameters *params);
/**
* Starts the DL MAC scheduler for this subframe.
* @param scheduler Scheduler context pointer, see SchedInit()
* @param params DL HARQ information
*/
void SchedDlTriggerReq (void * scheduler, const struct SchedDlTriggerReqParameters *params);
/**
* Provides RACH reception information to the scheduler.
* @param scheduler Scheduler context pointer, see SchedInit()
* @param params RACH reception information
*/
void SchedDlRachInfoReq (void * scheduler, const struct SchedDlRachInfoReqParameters *params);
/**
* Provides CQI measurement report information to the scheduler.
* @param scheduler Scheduler context pointer, see SchedInit()
* @param params DL CQI information
*/
void SchedDlCqiInfoReq (void * scheduler, const struct SchedDlCqiInfoReqParameters *params);
/**
* Starts the UL MAC scheduler for this subframe.
* @param scheduler Scheduler context pointer, see SchedInit()
* @param params UL HARQ information
*/
void SchedUlTriggerReq (void * scheduler, const struct SchedUlTriggerReqParameters *params);
/**
* Provides noise and interference measurement information to the scheduler.
* @param scheduler Scheduler context pointer, see SchedInit()
* @param params Noise and interference measurements
*/
void SchedUlNoiseInterferenceReq (void * scheduler, const struct SchedUlNoiseInterferenceReqParameters *params);
/**
* Provides scheduling request reception information to the scheduler.
* @param scheduler Scheduler context pointer, see SchedInit()
* @param params Scheduling request information.
*/
void SchedUlSrInfoReq (void * scheduler, const struct SchedUlSrInfoReqParameters *params);
/**
* Provides mac control information (power headroom, ul buffer status) to the scheduler.
* @param scheduler Scheduler context pointer, see SchedInit()
* @param params MAC control information received
*/
void SchedUlMacCtrlInfoReq (void * scheduler, const struct SchedUlMacCtrlInfoReqParameters *params);
/**
* Provides UL CQI measurement information to the scheduler.
* @param scheduler Scheduler context pointer, see SchedInit()
* @param params UL CQI information
*/
void SchedUlCqiInfoReq (void * scheduler, const struct SchedUlCqiInfoReqParameters *params);
//SCHED primitives parameters
/**
* RLC buffer status.
*/
struct SchedDlRlcBufferReqParameters
{
/**
* The RNTI identifying the UE.
*/
uint16_t rnti;
/**
* The logical channel ID, see \ref ref1 "[1]".
* \n Range: 0..10
*/
uint8_t logicalChannelIdentity;
/**
* The current size of the transmission queue in byte.
*/
uint32_t rlcTransmissionQueueSize;
/**
* Head of line delay of new transmissions in ms.
*/
uint16_t rlcTransmissionQueueHolDelay;
/**
* The current size of the retransmission queue in byte.
*/
uint32_t rlcRetransmissionQueueSize;
/**
* Head of line delay of retransmissions in ms.
*/
uint16_t rlcRetransmissionHolDelay;
/**
* The current size of the pending STATUS message in byte.
*/
uint16_t rlcStatusPduSize;
/**
* The number of elements in the \ref vendorSpecificList array.
*/
uint8_t nr_vendorSpecificList;
/**
* Contains scheduler specific configuration received from the OAM subsystem for use by a specific scheduler.
*/
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.
* Paging buffer status.
*/
struct SchedDlPagingBufferReqParameters
{
uint16_t rnti;
/**
* The number of elements in \ref pagingInfoList.
* \n Range: 0..#MAX_PAGING_LIST
*/
uint8_t nr_pagingInfoList;
/**
* List holding paging information to be sent.
*/
struct PagingInfoListElement_s *pagingInfoList;
/**
* The number of elements in the \ref vendorSpecificList array.
*/
uint8_t nr_vendorSpecificList;
/**
* Contains scheduler specific configuration received from the OAM subsystem for use by a specific scheduler.
*/
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.
* MAC buffer status.
*/
struct SchedDlMacBufferReqParameters
{
/**
* The RNTI identifying the UE.
*/
uint16_t rnti;
uint8_t nr_macCEDL_List;
struct MacCeDlListElement_s *macCeDlList;
/**
* The CE element which is scheduled to be sent by the MAC. Can be Timing Advance CE, DRX Command CE and Contention Resolution CE (Activation/Deactivation CE is generated by the scheduler itself).
* This bitmap holds \ref CeBitmap_e enum flags.
*/
uint8_t ceBitmap;
/**
* The number of elements in the \ref vendorSpecificList array.
*/
uint8_t nr_vendorSpecificList;
/**
* Contains scheduler specific configuration received from the OAM subsystem for use by a specific scheduler.
*/
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
{
/**
* The SFN and SF for which the scheduling is to be done, see \ref fapiExtDoc_timing_sec "Scheduler timing" and \ref fapiExtDoc_timestamp_sec "Timestamp coding".
*/
uint16_t sfnSf;
/**
* Number of elements in \ref dlInfoList array.
* \n Range: 0..#MAX_DL_INFO_LIST
*/
uint8_t nr_dlInfoList;
/**
* The list of UE DL information.
*/
struct DlInfoListElement_s *dlInfoList;
/**
* The number of elements in the \ref vendorSpecificList array.
*/
uint8_t nr_vendorSpecificList;
/**
* Contains scheduler specific configuration received from the OAM subsystem for use by a specific scheduler.
*/
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.
* RACH reception information.
*/
struct SchedDlRachInfoReqParameters
{
/**
* The SFN and SF in which the information was received, see \ref fapiExtDoc_timestamp_sec "Timestamp coding".
*/
uint16_t sfnSf;
/**
* The number of elements in \ref rachList array.
* \n Range: 0..#MAX_RACH_LIST
*/
uint8_t nrrachList;
/**
* The list of detected RACHs.
*/
struct RachListElement_s *rachList;
/**
* The number of elements in the \ref vendorSpecificList array.
*/
uint8_t nr_vendorSpecificList;
/**
* Contains scheduler specific configuration received from the OAM subsystem for use by a specific scheduler.
*/
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.
* DL CQI information.
*/
struct SchedDlCqiInfoReqParameters
{
/**
* The SFN and SF in which the information was received, see \ref fapiExtDoc_timestamp_sec "Timestamp coding".
*/
uint16_t sfnSf;
/**
* The number of elements in \ref cqiList array.
* \n Range: 0..#MAX_CQI_LIST
*/
uint8_t nrcqiList;
/**
* The list of DL CQI reports received in one subframe.
*/
struct CqiListElement_s *cqiList;
/**
* The number of elements in the \ref vendorSpecificList array.
*/
uint8_t nr_vendorSpecificList;
/**
* Contains scheduler specific configuration received from the OAM subsystem for use by a specific scheduler.
*/
struct VendorSpecificListElement_s *vendorSpecificList;
};
/**
* Parameters of the SCHED_UL_TRIGGER_REQ primitive.
* See section 4.2.8 for a detailed description of the parameters.
* UL HARQ information.
*/
struct SchedUlTriggerReqParameters
{
/**
* The SFN and SF for which the scheduling is to be done, see \ref fapiExtDoc_timing_sec "Scheduler timing" and \ref fapiExtDoc_timestamp_sec "Timestamp coding".
*/
uint16_t sfnSf;
/**
* The number of elements in \ref ulInfoList array.
* \n Range: 0..#MAX_UL_INFO_LIST
*/
uint8_t nr_ulInfoList;
/**
* The list of UL information for the scheduler.
*/
struct UlInfoListElement_s *ulInfoList;
/**
* The number of elements in the \ref vendorSpecificList array.
*/
uint8_t nr_vendorSpecificList;
/**
* Contains scheduler specific configuration received from the OAM subsystem for use by a specific scheduler.
*/
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.
* Noise and interference measurements.
*/
struct SchedUlNoiseInterferenceReqParameters
{
/**
* Component carrier identifier, uniquely identifies carrier in the eNB, see \ref fapiExtDoc_indices_sec "PcellIndex/ScellIndex’ing".
*/
uint8_t carrierIndex;
/**
* The SFN and SF in which the information was received, see \ref fapiExtDoc_timestamp_sec "Timestamp coding".
*/
uint16_t sfnSf;
uint16_t rip;
uint16_t tnp;
/**
* Received Interference Power, see \ref ref9 "[9]". In dBm.
* \n Range: -126.0..-75.0
* In fixed point format Q7.8.
*/
int16_t rip;
/**
* Thermal Noise Power, see \ref ref9 "[9]". In dBm.
* \n Range: -146.0..-75
* In fixed point format Q7.8.
*/
int16_t tnp;
/**
* The number of elements in the \ref vendorSpecificList array.
*/
uint8_t nr_vendorSpecificList;
/**
* Contains scheduler specific configuration received from the OAM subsystem for use by a specific scheduler.
*/
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.
* Scheduling request information.
*/
struct SchedUlSrInfoReqParameters
{
/**
* The SFN and SF in which the information was received, see \ref fapiExtDoc_timestamp_sec "Timestamp coding".
*/
uint16_t sfnSf;
/**
* The number of elements on \ref srList array.
* \n Range: 0..#MAX_SR_LIST
*/
uint8_t nr_srList;
/**
* The list of SRs received in one subframe.
*/
struct SrListElement_s *srList;
/**
* The number of elements in the \ref vendorSpecificList array.
*/
uint8_t nr_vendorSpecificList;
/**
* Contains scheduler specific configuration received from the OAM subsystem for use by a specific scheduler.
*/
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.
* MAC control information received.
*/
struct SchedUlMacCtrlInfoReqParameters
{
/**
* The SFN and SF in which the information was received, see \ref fapiExtDoc_timestamp_sec "Timestamp coding".
*/
uint16_t sfnSf;
/**
* Number of elements in \ref macCeUlList array.
* \n Range: 0..#MAX_MAC_CE_LIST
*/
uint8_t nr_macCEUL_List;
/**
* The list of MAC control elements received in one subframe.
*/
struct MacCeUlListElement_s *macCeUlList;
/**
* The number of elements in the \ref vendorSpecificList array.
*/
uint8_t nr_vendorSpecificList;
/**
* Contains scheduler specific configuration received from the OAM subsystem for use by a specific scheduler.
*/
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.
* UL CQI information.
*/
struct SchedUlCqiInfoReqParameters
{
/**
* The SFN and SF in which the information was received, see \ref fapiExtDoc_timestamp_sec "Timestamp coding".
*/
uint16_t sfnSf;
/**
* The number of elements in \ref ulCqiList array.
*/
uint8_t nr_ulCqiList;
/**
* List of UL CQI information received in one subframe.
*/
struct UlCqi_s* ulCqiList;
/**
* The number of elements in the \ref vendorSpecificList array.
*/
uint8_t nr_vendorSpecificList;
/**
* Contains scheduler specific configuration received from the OAM subsystem for use by a specific scheduler.
*/
struct VendorSpecificListElement_s *vendorSpecificList;
};
//
// SCHED - MAC Scheduler SAP primitives
// (See 4.2 for description of the primitives)
//
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);
/**
* 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.
* DL scheduling decision.
*/
struct SchedDlConfigIndParameters
{
/**
* The number of elements in \ref buildDataList array.
* \n Range: 0..#MAX_BUILD_DATA_LIST
*/
uint8_t nr_buildDataList;
/**
* The number of elements in \ref buildRarList array.
* \n Range: 0..#MAX_BUILD_RAR_LIST
*/
uint8_t nr_buildRARList;
/**
* The number of elements in \ref buildBroadcastList array.
* \n Range: 0..#MAX_BUILD_BC_LIST
*/
uint8_t nr_buildBroadcastList;
/**
* The list of resource allocation for UEs and LCs.
*/
struct BuildDataListElement_s *buildDataList;
/**
* The list of resource allocation for RAR.
*/
struct BuildRarListElement_s *buildRarList;
/**
* The list of resource allocation for BCCH, PCCH.
*/
struct BuildBroadcastListElement_s *buildBroadcastList;
/* mind: this is just number of elems in the next array (not actual number of PDCCH OFDM symbols) */
/**
* The number of elements in \ref nrOfPdcchOfdmSymbols array.
*/
uint8_t nr_ofdmSymbolsCount;
#warning MAX_NUM_CCs forced to 2 in structure SchedDlConfigIndParameters!!
struct PdcchOfdmSymbolCountListElement_s* nrOfPdcchOfdmSymbols[2 /* MAX_NUM_CCs */];
/**
* Current size of PDCCH for each CC.
*/
struct PdcchOfdmSymbolCountListElement_s* nrOfPdcchOfdmSymbols[2 /*MAX_NUM_CCs*/];
/**
* The number of elements in the \ref vendorSpecificList array.
*/
uint8_t nr_vendorSpecificList;
/**
* Contains scheduler specific configuration received from the OAM subsystem for use by a specific scheduler.
*/
struct VendorSpecificListElement_s *vendorSpecificList;
};
/**
* Parameters of the SCHED_UL_CONFIG_IND primitive.
* See section 4.2.13 for a detailed description of the parameters.
* UL scheduling decision.
*/
struct SchedUlConfigIndParameters
{
/**
* The number of elements in \ref dciList array.
* \n Range: 0..MAX_DCI_LIST
*/
uint8_t nr_dciList;
/**
* The number of elements in \ref phichList array.
* \n Range: 0..MAX_PHICH_LIST
*/
uint8_t nr_phichList;
/**
* The list of UL DCI (Format 0) elements.
*/
struct UlDciListElement_s *dciList;
/**
* The list of PHICH elements.
*/
struct PhichListElement_s *phichList;
/**
* The number of elements in the \ref vendorSpecificList array.
*/
uint8_t nr_vendorSpecificList;
/**
* Contains scheduler specific configuration received from the OAM subsystem for use by a specific scheduler.
*/
struct VendorSpecificListElement_s *vendorSpecificList;
};
//
// SCHED - MAC Scheduler SAP primitives
// (See 4.2 for description of the primitives)
//
// Primitives defined as callbacks in separate file ff-mac-callback.h
#if 0
/* not used - the scheduler has callbacks for those */
void SchedDlConfigInd(const struct SchedDlConfigIndParameters* params);
void SchedUlConfigInd(const struct SchedUlConfigIndParameters* params);
#endif
/*@}*/
#if defined (__cplusplus)
}
#endif
......
......@@ -378,6 +378,7 @@ int mac_top_init(int eMBMS_active, char *uecap_xer, uint8_t cba_group_active, ui
p.nr_vendorSpecificList = 0;
l.puschHoppingOffset = conf->properties[i]->pusch_hoppingOffset[0];
l.NcellID = conf->properties[i]->Nid_cell[0];
l.hoppingMode = conf->properties[i]->pusch_hoppingMode[0];
l.nSb = conf->properties[i]->pusch_n_SB[0];
switch (conf->properties[i]->phich_resource[0]) {
......@@ -423,7 +424,7 @@ int mac_top_init(int eMBMS_active, char *uecap_xer, uint8_t cba_group_active, ui
}
l.subframeAssignment = conf->properties[i]->tdd_config[0];
l.specialSubframePatterns = conf->properties[i]->tdd_config_s[0];
#warning TODO: mbsfn stuff (when mbsfn_SubframeConfigPresent will be added to the structure CschedCellConfigReqParametersListElement)
l.mbsfn_SubframeConfigPresent = false;
l.prachConfigurationIndex = conf->properties[i]->prach_config_index[0];
l.prachFreqOffset = conf->properties[i]->prach_freq_offset[0];
l.raResponseWindowSize = conf->properties[i]->rach_raResponseWindowSize[0];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment