Commit a228777c authored by Michele Paffetti's avatar Michele Paffetti

Adding new files 'L2_interface_nb_iot.c'(temporary collection of the major...

Adding new files 'L2_interface_nb_iot.c'(temporary collection of the major interfaces among layers),'proto_nb_iot.h',.. and modification of others. The code compile but not running test since still lower layers to be completed. Still to be reviewed the SRBs logic and activation
parent e6c25ec9
......@@ -308,6 +308,7 @@ if (NOT ${ret} STREQUAL 0)
endif (NOT ${ret} STREQUAL 0)
file(GLOB rrc_source ${RRC_FULL_DIR}/*.c)
set(rrc_source ${rrc_source} ${OPENAIR2_DIR}/RRC/LITE/MESSAGES/asn1_msg.c)
set(rrc_source ${rrc_source} ${OPENAIR2_DIR}/RRC/LITE/MESSAGES/asn1_msg_nb_iot.c)
file(GLOB rrc_h ${RRC_FULL_DIR}/*.h)
set(rrc_h ${rrc_h} ${RRC_FULL_DIR}/asn1_constants.h)
set_source_files_properties(${rrc_source} PROPERTIES COMPILE_FLAGS -w) # suppress warnings from generated code
......@@ -1112,12 +1113,16 @@ set(L2_SRC
${RLC_DIR}/rlc.c
${RLC_DIR}/rlc_rrc.c
${RLC_DIR}/rlc_mpls.c
${RRC_DIR}/vars_nb_iot.c
${RRC_DIR}/rrc_UE.c
${RRC_DIR}/rrc_eNB.c
${RRC_DIR}/rrc_eNB_nb_iot.c
${RRC_DIR}/rrc_eNB_S1AP.c
${RRC_DIR}/rrc_eNB_UE_context.c
${RRC_DIR}/rrc_common.c
${RRC_DIR}/rrc_common_nb_iot.c
${RRC_DIR}/L2_interface.c
${RRC_DIR}/L2_interface_nb_iot.c
)
set (MAC_SRC
${MAC_DIR}/lte_transport_init.c
......
......@@ -83,8 +83,11 @@
#define MAX_MANAGED_ENB_PER_MOBILE 2
#define DEFAULT_RAB_ID 1
///NB-IOT
#define NB_RB_MAX_NB_IOT (maxDRB_NB_r13 + 3) //MP: NB_IoT --> 2+3 = 5
#define DEFAULT_RAB_ID 1
#define NB_RB_MAX (maxDRB + 3) /* was 11, now 14, maxDRB comes from asn1_constants.h, + 3 because of 3 SRB, one invisible id 0, then id 1 and 2 */
#if defined(Rel10) || defined(Rel14)
#define NB_RB_MBMS_MAX (maxSessionPerPMCH*maxServiceCount)
......
......@@ -87,6 +87,12 @@ typedef boolean_t srb_flag_t;
#define SRB_FLAG_NO FALSE
#define SRB_FLAG_YES TRUE
///NB-IoT
typedef boolean_t srb1bis_flag_t;
#define SRB1BIS_FLAG_NO FALSE
#define SRB1BIS_FLAG_YES TRUE
typedef enum link_direction_e {
UNKNOWN_DIR = 0,
DIR_UPLINK = 1,
......
......@@ -83,8 +83,9 @@ typedef struct RrcStateInd_s {
Rrc_Sub_State_t sub_state;
} RrcStateInd;
// eNB: ENB_APP -> RRC messages
// eNB: ENB_APP -> RRC messages---------------------------------------------------
//these parameters are set by the configuration files?
typedef struct RrcConfigurationReq_s {
uint32_t cell_identity;
......@@ -104,8 +105,8 @@ typedef struct RrcConfigurationReq_s {
*/
int16_t nb_cc;
lte_frame_type_t frame_type[MAX_NUM_CCs];
uint8_t tdd_config[MAX_NUM_CCs]; //not present in NB-IoT
uint8_t tdd_config_s[MAX_NUM_CCs]; //not present in NB-IoT
uint8_t tdd_config[MAX_NUM_CCs];
uint8_t tdd_config_s[MAX_NUM_CCs];
lte_prefix_type_t prefix_type[MAX_NUM_CCs];
int16_t eutra_band[MAX_NUM_CCs];
uint32_t downlink_frequency[MAX_NUM_CCs];
......@@ -113,17 +114,18 @@ typedef struct RrcConfigurationReq_s {
int16_t Nid_cell[MAX_NUM_CCs];// for testing, change later
int16_t N_RB_DL[MAX_NUM_CCs];// for testing, change later
int nb_antennas_tx[MAX_NUM_CCs];
int nb_antennas_rx[MAX_NUM_CCs];
int nb_antennas_tx[MAX_NUM_CCs]; //MP: may no more used
int nb_antennas_rx[MAX_NUM_CCs]; //MP: may no more used
int nb_antenna_ports[MAX_NUM_CCs];
//PRACH
long prach_root[MAX_NUM_CCs];
long prach_config_index[MAX_NUM_CCs];
BOOLEAN_t prach_high_speed[MAX_NUM_CCs];
long prach_zero_correlation[MAX_NUM_CCs];
long prach_freq_offset[MAX_NUM_CCs];
//NPRACH for NB-IoT---
//...completely different parameter and structure for NPRACH
//-----------
//PUCCH
long pucch_delta_shift[MAX_NUM_CCs];
long pucch_nRB_CQI[MAX_NUM_CCs];
......@@ -165,17 +167,17 @@ typedef struct RrcConfigurationReq_s {
e_DeltaFList_PUCCH__deltaF_PUCCH_Format2a pucch_deltaF_Format2a[MAX_NUM_CCs];
e_DeltaFList_PUCCH__deltaF_PUCCH_Format2b pucch_deltaF_Format2b[MAX_NUM_CCs];
long rach_numberOfRA_Preambles[MAX_NUM_CCs];// not present in NB-IoT SIB2
BOOLEAN_t rach_preamblesGroupAConfig[MAX_NUM_CCs]; // not present in NB-IoT SIB2
long rach_sizeOfRA_PreamblesGroupA[MAX_NUM_CCs];// not presen in NB-IoT SIB2
long rach_messageSizeGroupA[MAX_NUM_CCs]; // not presen in NB-IoT SIB2
long rach_numberOfRA_Preambles[MAX_NUM_CCs];
BOOLEAN_t rach_preamblesGroupAConfig[MAX_NUM_CCs];
long rach_sizeOfRA_PreamblesGroupA[MAX_NUM_CCs];
long rach_messageSizeGroupA[MAX_NUM_CCs];
e_RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB rach_messagePowerOffsetGroupB[MAX_NUM_CCs];// not presen in NB-IoT SIB2
long rach_powerRampingStep[MAX_NUM_CCs];
long rach_preambleInitialReceivedTargetPower[MAX_NUM_CCs];
long rach_preambleTransMax[MAX_NUM_CCs]; // not present in NB-IoT SIB2
long rach_raResponseWindowSize[MAX_NUM_CCs]; // not present in NB-IoT SIB2
long rach_macContentionResolutionTimer[MAX_NUM_CCs]; // not present in NB-IoT SIB2
long rach_maxHARQ_Msg3Tx[MAX_NUM_CCs];// not present in NB-IoT SIB2
long rach_preambleTransMax[MAX_NUM_CCs];
long rach_raResponseWindowSize[MAX_NUM_CCs];
long rach_macContentionResolutionTimer[MAX_NUM_CCs];
long rach_maxHARQ_Msg3Tx[MAX_NUM_CCs];
//BCCH
long bcch_modificationPeriodCoeff[MAX_NUM_CCs];
......
This diff is collapsed.
......@@ -38,6 +38,7 @@
#endif //USER_MODE
#include "PHY/defs.h"
#include "defs.h"
#include "defs_nb_iot.h"
#include "COMMON/mac_rrc_primitives.h"
#ifdef PHY_EMUL
//#include "SIMULATION/simulation_defs.h"
......@@ -64,6 +65,9 @@ extern UE_MAC_INST *ue_mac_inst;
extern MAC_RLC_XFACE *Mac_rlc_xface;
extern uint8_t Is_rrc_registered;
//NB-IoT
extern eNB_MAC_INST_NB *eNB_mac_inst_NB;
extern eNB_ULSCH_INFO eNB_ulsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][NUMBER_OF_UE_MAX]; // eNBxUE = 8x8
extern eNB_DLSCH_INFO eNB_dlsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][NUMBER_OF_UE_MAX]; // eNBxUE = 8x8
......
......@@ -37,6 +37,7 @@
#endif //USER_MODE
#include "PHY/defs.h"
#include "defs.h"
#include "defs_nb_iot.h"
#include "PHY_INTERFACE/defs.h"
#include "COMMON/mac_rrc_primitives.h"
......@@ -98,6 +99,8 @@ MAC_RLC_XFACE *Mac_rlc_xface;
/// Primary component carrier index of eNB
int pCC_id[NUMBER_OF_eNB_MAX];
//NB-IoT
eNB_MAC_INST_NB *eNB_mac_inst_NB;
eNB_ULSCH_INFO eNB_ulsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][NUMBER_OF_UE_MAX]; // eNBxUE = 8x8
......
......@@ -134,6 +134,7 @@ typedef struct rlc_am_entity_s {
uint16_t max_retx_threshold; /*!< \brief This parameter is used by the transmitting side of each AM RLC entity to limit the number of retransmissions of an AMD PDU. */
uint16_t poll_pdu; /*!< \brief This parameter is used by the transmitting side of each AM RLC entity to trigger a poll for every pollPDU PDUs. */
uint32_t poll_byte; /*!< \brief This parameter is used by the transmitting side of each AM RLC entity to trigger a poll for every pollByte bytes. */
uint16_t enableStatusReportSN_Gap;
//---------------------------------------------------------------------
// STATISTICS
......
......@@ -70,6 +70,12 @@ typedef volatile struct {
uint32_t t_status_prohibit; /*!< \brief t-StatusProhibit timer initial value. */
} rlc_am_info_t;
typedef volatile struct {
uint16_t max_retx_threshold;
uint32_t t_poll_retransmit;
uint32_t enableStatusReportSN_Gap;
}rlc_am_info_NB_t;
//-----------------------------------------------------------------------------
/*! \fn void rlc_am_init (const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP)
* \brief Initialize the RLC AM protocol instance, reset variables, allocate buffers, lists, then, the next step in order have a running RLC AM instance is to configure and set debug informations for this RLC instance.
......
......@@ -137,6 +137,7 @@ typedef volatile struct {
rlc_mode_t rlc_mode;
union {
rlc_am_info_t rlc_am_info; /*!< \sa rlc_am.h. */
rlc_am_info_NB_t rlc_am_info_NB;
rlc_tm_info_t rlc_tm_info; /*!< \sa rlc_tm.h. */
rlc_um_info_t rlc_um_info; /*!< \sa rlc_um.h. */
} rlc;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -314,8 +314,8 @@ typedef struct {
typedef struct RB_INFO_NB_s {
uint16_t Rb_id; //=Lchan_id
LCHAN_DESC Lchan_desc[2]; //LCHAN_DESC should be changed for NB-IoT
MAC_MEAS_REQ_ENTRY *Meas_entry; //may not needed for NB-IoT
LCHAN_DESC Lchan_desc[2]; //XXX LCHAN_DESC should be changed for NB-IoT
//MAC_MEAS_REQ_ENTRY *Meas_entry; //may not needed for NB-IoT
} RB_INFO_NB;
typedef struct SRB_INFO_NB_s {
......@@ -349,13 +349,20 @@ typedef struct SRB_INFO_TABLE_ENTRY_NB_s {
//NB-IoT eNB_RRC_UE_NB_s--(used as a context in eNB --> ue_context in rrc_eNB_ue_context)------
typedef struct eNB_RRC_UE_NB_s {
uint8_t primaryCC_id;
//Radio Bearers carried by RadioResourceConfigDedicated-NB-r13.h
//used in generate_default/dedicatedRRCConnectionReconfiguration (rrc_eNB.c)
//in NB-IoT only SRB0, SRB1 and SRB1bis (until AS security activation) exist
/*MP: Concept behind List and List2
*
* SRB_configList --> is used for the actual list of SRBs that is managed/that should be send over the RRC message
* SRB_configList2--> refers to all the SRBs configured for that specific transaction identifier
* this because in a single transaction one or more SRBs could be established
* and you want to keep memory on what happen for every transaction
* Transaction ID (xid): is used to associate the proper RRC....Complete message received by the UE to the corresponding
* message previously sent by the eNB (e.g. RRCConnectionSetup -- RRCConnectionSetupComplete)
* this because it could happen that more messages are transmitted at the same time
*/
SRB_ToAddModList_NB_r13_t* SRB_configList;//for SRB1 and SRB1bis
SRB_ToAddModList_NB_r13_t* SRB1_configList[RRC_TRANSACTION_IDENTIFIER_NUMBER]; //only for SRB1
SRB_ToAddModList_NB_r13_t* SRB_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER];
DRB_ToAddModList_NB_r13_t* DRB_configList; //for all the DRBs
DRB_ToAddModList_NB_r13_t* DRB_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER]; //for the configured DRBs of a xid
uint8_t DRB_active[2];//in LTE was 8 --> at most 2 for NB-IoT
......@@ -393,7 +400,6 @@ typedef struct eNB_RRC_UE_NB_s {
/* Information from UE RRC ConnectionReestablishmentRequest-NB--> NB-IoT */
ReestablishmentCause_NB_r13_t reestablishment_cause_NB; //different set for NB_IoT
///nothing to be changed for NB-IoT?
/* UE id for initial connection to S1AP */
uint16_t ue_initial_id;
......@@ -407,16 +413,17 @@ typedef struct eNB_RRC_UE_NB_s {
/* Number of e_rab to be setup in the list */ //NAS list?
uint8_t nb_of_e_rabs;
/* list of e_rab to be setup by RRC layers */
e_rab_param_NB_t e_rab[NB_RB_MAX];//[S1AP_MAX_E_RAB];
e_rab_param_NB_t e_rab[NB_RB_MAX_NB_IOT];//[S1AP_MAX_E_RAB];
// LG: For GTPV1 TUNNELS
uint32_t enb_gtp_teid[S1AP_MAX_E_RAB];
transport_layer_addr_t enb_gtp_addrs[S1AP_MAX_E_RAB];
rb_id_t enb_gtp_ebi[S1AP_MAX_E_RAB];
//Which timers are referring to?
uint32_t ul_failure_timer;
uint32_t ue_release_timer;
//threshold of the release timer--> set in RRCConnectionRelease
uint32_t ue_release_timer_thres;
} eNB_RRC_UE_NB_t;
//--------------------------------------------------------------------------------
......@@ -424,7 +431,7 @@ typedef struct eNB_RRC_UE_NB_s {
typedef uid_NB_t ue_uid_t;
//Not touched - generally variable called: ue_context_pP
//generally variable called: ue_context_pP
typedef struct rrc_eNB_ue_context_NB_s {
/* Tree related data */
......@@ -480,11 +487,12 @@ typedef struct {
uint8_t *SIB22_NB;
uint8_t sizeof_SIB22_NB;
int Ncp; //extended cyclic prefix (needed?)
int p_eNB; //number of Transmit antenna (may not needed)
uint32_t dl_CarrierFreq;
uint32_t ul_CarrierFreq;
uint16_t physCellId; //SIB5-NB //look also at the difference in In-Band implementation
//implicit parameters needed
int Ncp; //extended cyclic prefix
int p_eNB; //number of antenna port (getting from the CRS of the MIB-NB)
uint32_t dl_CarrierFreq; //detected by the UE
uint32_t ul_CarrierFreq; //detected by the UE
uint16_t physCellId; //not stored in the MIB-NB but is getting through NPSS/NSSS
//are the only static one (memory has been already allocated)
BCCH_BCH_Message_NB_t mib_NB;
......@@ -533,7 +541,6 @@ typedef struct eNB_RRC_INST_NB_s {
//RRC configuration
RrcConfigurationReq configuration; //should be changed but need PHY specs also
//new--> to be check
// other PLMN parameters
/// Mobile country code
int mcc;
......@@ -542,10 +549,8 @@ typedef struct eNB_RRC_INST_NB_s {
/// number of mnc digits
int mnc_digit_length;
// other RAN parameters
// other RAN parameters //FIXME: to be checked--> depends on APP layer
int srb1_timer_poll_retransmit;
int srb1_poll_pdu;
int srb1_poll_byte;
int srb1_max_retx_threshold;
int srb1_timer_reordering;
int srb1_timer_status_prohibit;
......
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file vars.h
* \brief rrc external vars
* \author Navid Nikaein and Raymond Knopp, Michele Paffetti
* \date 2011-2017
* \version 1.0
* \company Eurecom
* \email: navid.nikaein@eurecom.fr, michele.paffetti@studio.unibo.it
*/
#ifndef __OPENAIR_RRC_EXTERN_NB_IOT_H__
#define __OPENAIR_RRC_EXTERN_NB_IOT_H__
#include "defs_nb_iot.h"
#include "COMMON/mac_rrc_primitives.h"
#include "LAYER2/MAC/defs.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/RLC/rlc.h"
#include "LogicalChannelConfig-NB-r13.h"
//MP: NOTE:XXX some of the parameters defined in vars_nb_iot are called by the extern.h file so not replicated here
//should be modified
//extern LCHAN_DESC BCCH_LCHAN_DESC,CCCH_LCHAN_DESC,DCCH_LCHAN_DESC,DTCH_DL_LCHAN_DESC,DTCH_UL_LCHAN_DESC;
extern eNB_RRC_INST_NB *eNB_rrc_inst_NB;
extern rlc_info_t Rlc_info_um,Rlc_info_am_config,Rlc_info_am;
extern uint8_t DRB2LCHAN_NB[2];
extern LogicalChannelConfig_NB_r13_t SRB1bis_NB_logicalChannelConfig_defaultValue;
extern LogicalChannelConfig_NB_r13_t SRB1_NB_logicalChannelConfig_defaultValue;
#endif
This diff is collapsed.
This diff is collapsed.
......@@ -48,6 +48,17 @@ uid_linear_allocator_init(
memset(uid_pP, 0, sizeof(uid_allocator_t));
}
//------------------------------------------------------------------------------
void
uid_linear_allocator_init_NB(
uid_allocator_NB_t* const uid_pP
)
//------------------------------------------------------------------------------
{
memset(uid_pP, 0, sizeof(uid_allocator_NB_t));
}
//------------------------------------------------------------------------------
uid_t
uid_linear_allocator_new(
......@@ -155,6 +166,21 @@ rrc_eNB_get_ue_context(
}
//--(NB-IoT implementation)-----------------------------------------------------
struct rrc_eNB_ue_context_NB_s*
rrc_eNB_get_ue_context_NB(
eNB_RRC_INST_NB* rrc_instance_pP,
rnti_t rntiP)
//------------------------------------------------------------------------------
{
rrc_eNB_ue_context_NB_t temp;
memset(&temp, 0, sizeof(struct rrc_eNB_ue_context_NB_s));
/* eNB ue rrc id = 24 bits wide */
temp.ue_id_rnti = rntiP;
return RB_FIND(rrc_ue_tree_s, &rrc_instance_pP->rrc_ue_head, &temp);
}
//------------------------------------------------------------------------------
void rrc_eNB_remove_ue_context(
const protocol_ctxt_t* const ctxt_pP,
......
......@@ -31,6 +31,7 @@
#include "collection/tree.h"
#include "COMMON/platform_types.h"
#include "defs.h"
#include "defs_nb_iot.h"
void
......@@ -71,6 +72,12 @@ rrc_eNB_get_ue_context(
rnti_t rntiP
);
//NB-IoT
struct rrc_eNB_ue_context_NB_s*
rrc_eNB_get_ue_context_NB(
eNB_RRC_INST_NB* rrc_instance_pP,
rnti_t rntiP);
void rrc_eNB_remove_ue_context(
const protocol_ctxt_t* const ctxt_pP,
eNB_RRC_INST* rrc_instance_pP,
......
This diff is collapsed.
......@@ -36,11 +36,6 @@
#include "COMMON/mac_rrc_primitives.h"
#include "LAYER2/MAC/defs.h"
//for NB_IoT-------
#include "defs_nb_iot.h"
eNB_RRC_INST_NB *eNB_rrc_inst_NB;
//--------------------
eNB_RRC_INST *eNB_rrc_inst;
UE_RRC_INST *UE_rrc_inst;
//RRC_XFACE *Rrc_xface;
......@@ -68,8 +63,7 @@ unsigned short Data_to_read;
#define MAX_U32 0xFFFFFFFF
uint8_t DRB2LCHAN[8]; //max can be 2 DRBs for NB_IoT --> it used for saving the LCID of DRBs
uint8_t DRB2LCHAN[8];
long logicalChannelGroup0 = 0;
long logicalChannelSR_Mask_r9=0;
......@@ -107,7 +101,10 @@ LogicalChannelConfig_t SRB2_logicalChannelConfig_defaultValue = {ul_SpecificPara
};
//CONSTANTS
rlc_info_t Rlc_info_um,Rlc_info_am_config;
rlc_info_t Rlc_info_um,Rlc_info_am_config,
//NB-IoT
Rlc_info_am;
uint16_t RACH_FREQ_ALLOC;
//uint8_t NB_RACH;
LCHAN_DESC BCCH_LCHAN_DESC,CCCH_LCHAN_DESC,DCCH_LCHAN_DESC,DTCH_DL_LCHAN_DESC,DTCH_UL_LCHAN_DESC;
......
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file vars_nb_iot.c
* \brief rrc variables for NB_IoT
* \author Raymond Knopp, Navid Nikaein and Michele Paffetti
* \date 2013 -2017
* \version 1.0
* \company Eurecom
* \email: navid.nikaein@eurecom.fr, michele.paffetti@studio.unibo.it
*/
//#ifndef __OPENAIR_RRC_VARS_NB_H__
//#define __OPENAIR_RRC_VARS_NB_H__
#include "defs_nb_iot.h"
#include "LAYER2/RLC/rlc.h"
#include "COMMON/mac_rrc_primitives.h"
#include "LAYER2/MAC/defs_nb_iot.h"
#include "LogicalChannelConfig-NB-r13.h"
//UE_RRC_INST *UE_rrc_inst; //MP: may not used for the moment
#ifndef USER_MODE
#ifndef NO_RRM
int S_rrc= RRC2RRM_FIFO;
#endif //NO_RRM
#else
#include "LAYER2/MAC/extern.h"
#ifndef NO_RRM
sock_rrm_t S_rrc;
#endif
#endif
#ifndef NO_RRM
#ifndef USER_MODE
char *Header_buf;
char *Data;
unsigned short Header_read_idx,Data_read_idx,Header_size;
#endif
unsigned short Data_to_read;
#endif //NO_RRM
#include "LAYER2/MAC/extern.h"
#define MAX_U32 0xFFFFFFFF
//LogicalChannelConfig__ext1 logicalChannelSR_Mask_r9_ext1--> not defined for NB-IoT
eNB_RRC_INST_NB *eNB_rrc_inst_NB;
uint8_t DRB2LCHAN_NB[2];//max can be 2 DRBs for NB_IoT --> it used for saving the LCID of DRBs
BOOLEAN_t logicalChannelSR_Prohibit = 1;
long priority =1;
// Default SRB configurations from 36.331 (9.2.1.1 pag 641 V14.2.1)
struct LogicalChannelConfig_NB_r13 SRB1bis_NB_logicalChannelConfig_defaultValue = {
priority_r13: &priority, //priority
logicalChannelSR_Prohibit_r13: &logicalChannelSR_Prohibit //set to TRUE
};
struct LogicalChannelConfig_NB_r13 SRB1_NB_logicalChannelConfig_defaultValue = {
priority_r13: &priority, //priority
logicalChannelSR_Prohibit_r13: &logicalChannelSR_Prohibit //set to TRUE
};
//CONSTANTS
rlc_info_t Rlc_info_um,Rlc_info_am_config, Rlc_info_am;
uint16_t RACH_FREQ_ALLOC;
//TODO: MP: to e changed --> mac_rrc_primitives
LCHAN_DESC BCCH_LCHAN_DESC,CCCH_LCHAN_DESC,DCCH_LCHAN_DESC,DTCH_DL_LCHAN_DESC,DTCH_UL_LCHAN_DESC;
//XXX //MP:May not needed
//MAC_MEAS_T BCCH_MEAS_TRIGGER,CCCH_MEAS_TRIGGER,DCCH_MEAS_TRIGGER,DTCH_MEAS_TRIGGER;
//MAC_AVG_T BCCH_MEAS_AVG, CCCH_MEAS_AVG,DCCH_MEAS_AVG, DTCH_MEAS_AVG;
// timers (TS 36.331 "UE-TimersAndConstants-NB" pag 622) (milliseconds) XXX MP:--> not sure they will be used
uint16_t T300[8] = {2500,4000,6000,10000, 15000,25000,40000,60000};
uint16_t T301[8] = {2500,4000,6000,10000, 15000,25000,40000,60000}; //MP: this start at RRCconnectionReestablishmentReq (not implemented in OAI)
uint16_t T310[8] = {0,200,500,1000,2000,4000,8000};
uint16_t T311[8] = {1000, 3000, 5000, 10000, 15000, 20000, 30000}; //MP: may not used
uint16_t N310[8] = {1,2,3,4,6,8,10,20};
uint16_t N311[8] = {1,2,3,4,5,6,8,10};
// MP: TimeToTrigger not used in NB-IoT
/* MP: 36.133 Section 9.1.4 RSRP Measurement Report Mapping and RSRQ Mapping, Table: 9.1.4-1 --> not for NB-IoT*/
//#endif
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