Commit b8a41765 authored by Matthieu Kanj's avatar Matthieu Kanj

removing some included .h files from eNB_scheduler_ulsch_NB_IoT.c (129 warnings) +

creation of new file:openair2/RRC/LITE/rrc_types_NB_IoT.h
parent 6be4cae6
......@@ -49,8 +49,8 @@
//#include "RRC/LITE/extern.h"
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
//NB-IoT
#include "PHY/defs_NB_IoT.h"
#include "LAYER2/MAC/defs_NB_IoT.h"
//#include "PHY/defs_NB_IoT.h"
//#include "LAYER2/MAC/defs_NB_IoT.h"
#include "LAYER2/MAC/proto_NB_IoT.h"
#include "LAYER2/MAC/extern_NB_IoT.h"
#include "RRC/LITE/defs_NB_IoT.h"
......
......@@ -43,7 +43,7 @@
// //#include "SIMULATION/simulation_defs.h"
// #endif //PHY_EMUL
#include "PHY_INTERFACE/defs.h" // should be replaced by PHY_INTERFACE/defs_NB_IoT.h (create MAC_xface for NB_IoT)
//#include "RRC/LITE/defs.h"
//#include "RRC/LITE/defs_NB_IoT.h"
#ifdef NB_IOT
#include "defs_NB_IoT.h"
......@@ -67,7 +67,7 @@ extern const uint32_t BSR_TABLE_NB_IoT[BSR_TABLE_SIZE_NB_IoT];
// extern UE_MAC_INST *UE_mac_inst;
// extern eNB_MAC_INST *eNB_mac_inst;
// extern eNB_RRC_INST *eNB_rrc_inst;
// extern UE_RRC_INST *UE_rrc_inst;
//extern UE_RRC_INST_NB_IoT *UE_rrc_inst_NB_IoT;
// extern UE_MAC_INST *ue_mac_inst;
// extern MAC_RLC_XFACE *Mac_rlc_xface;
// extern uint8_t Is_rrc_registered;
......
......@@ -3079,6 +3079,46 @@ rlc_op_status_t rrc_rlc_remove_rlc_NB_IoT (
return RLC_OP_STATUS_OK;
}
//defined in rlc_am.c
//-----------------------------------------------------------------------------
void config_req_rlc_am_NB_IoT (
const protocol_ctxt_t* const ctxt_pP,
const srb_flag_t srb_flagP,
rlc_am_info_NB_t * const config_am_pP, //XXX: MP: rlc_am_init.c --> this structure has been modified for NB-IoT
const rb_id_t rb_idP,
const logical_chan_id_t chan_idP
)
{
rlc_union_t *rlc_union_p = NULL;
rlc_am_entity_t *l_rlc_p = NULL;
hash_key_t key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
hashtable_rc_t h_rc;
h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
if (h_rc == HASH_TABLE_OK) {
l_rlc_p = &rlc_union_p->rlc.am;
LOG_D(RLC,
PROTOCOL_RLC_AM_CTXT_FMT" CONFIG_REQ (max_retx_threshold=%d t_poll_retransmit=%d)\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,l_rlc_p),
config_am_pP->max_retx_threshold_NB,
config_am_pP->t_poll_retransmit_NB
//enableStatusReportSN_Gap_r13
);
rlc_am_init(ctxt_pP, l_rlc_p);
rlc_am_set_debug_infos(ctxt_pP, l_rlc_p, srb_flagP, rb_idP, chan_idP);
rlc_am_configure_NB_IoT(ctxt_pP,
l_rlc_p,
config_am_pP->max_retx_threshold_NB,
config_am_pP->t_poll_retransmit_NB,
config_am_pP->enableStatusReportSN_Gap);
} else {
LOG_E(RLC, PROTOCOL_RLC_AM_CTXT_FMT" CONFIG_REQ RLC NOT FOUND\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,l_rlc_p));
}
}
//defined in rlc_rrc.c
//used only for rrc_t310_expiration --> I don't know if it is used (probably not)
rlc_op_status_t rrc_rlc_config_req_NB_IoT (
......@@ -3155,44 +3195,6 @@ rlc_op_status_t rrc_rlc_config_req_NB_IoT (
}
//defined in rlc_am.c
//-----------------------------------------------------------------------------
void config_req_rlc_am_NB_IoT (
const protocol_ctxt_t* const ctxt_pP,
const srb_flag_t srb_flagP,
rlc_am_info_NB_t * const config_am_pP, //XXX: MP: rlc_am_init.c --> this structure has been modified for NB-IoT
const rb_id_t rb_idP,
const logical_chan_id_t chan_idP
)
{
rlc_union_t *rlc_union_p = NULL;
rlc_am_entity_t *l_rlc_p = NULL;
hash_key_t key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
hashtable_rc_t h_rc;
h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
if (h_rc == HASH_TABLE_OK) {
l_rlc_p = &rlc_union_p->rlc.am;
LOG_D(RLC,
PROTOCOL_RLC_AM_CTXT_FMT" CONFIG_REQ (max_retx_threshold=%d t_poll_retransmit=%d)\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,l_rlc_p),
config_am_pP->max_retx_threshold_NB,
config_am_pP->t_poll_retransmit_NB
//enableStatusReportSN_Gap_r13
);
rlc_am_init(ctxt_pP, l_rlc_p);
rlc_am_set_debug_infos(ctxt_pP, l_rlc_p, srb_flagP, rb_idP, chan_idP);
rlc_am_configure_NB_IoT(ctxt_pP,
l_rlc_p,
config_am_pP->max_retx_threshold_NB,
config_am_pP->t_poll_retransmit_NB,
config_am_pP->enableStatusReportSN_Gap);
} else {
LOG_E(RLC, PROTOCOL_RLC_AM_CTXT_FMT" CONFIG_REQ RLC NOT FOUND\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,l_rlc_p));
}
}
//defined in rlc_tm_init.c (nothing to be changed)
......
......@@ -38,7 +38,7 @@
#endif
#include "collection/tree.h"
#include "rrc_types.h"
#include "rrc_types_NB_IoT.h"
//#include "PHY/defs.h"
#include "PHY/defs_NB_IoT.h"
#include "COMMON/platform_constants.h"
......@@ -210,17 +210,6 @@ typedef struct uid_linear_allocator_NB_IoT_s {
#define PROTOCOL_RRC_CTXT_FMT PROTOCOL_CTXT_FMT
#define PROTOCOL_RRC_CTXT_ARGS(CTXT_Pp) PROTOCOL_CTXT_ARGS(CTXT_Pp)
/** @defgroup _rrc RRC
* @ingroup _oai2
* @{
*/
//#define NUM_PRECONFIGURED_LCHAN (NB_CH_CX*2) //BCCH, CCCH
#define UE_MODULE_INVALID ((module_id_t) ~0) // FIXME attention! depends on type uint8_t!!!
#define UE_INDEX_INVALID ((module_id_t) ~0) // FIXME attention! depends on type uint8_t!!! used to be -1
//left as they are --> used in LAYER2/epenair2_proc.c and UE side
typedef enum UE_STATE_NB_IoT_e {
......@@ -233,6 +222,41 @@ typedef enum UE_STATE_NB_IoT_e {
} UE_STATE_NB_IoT_t;
/** @defgroup _rrc RRC
* @ingroup _oai2
* @{
*/
typedef struct UE_RRC_INFO_NB_IoT_s {
UE_STATE_NB_IoT_t State;
uint8_t SIB1systemInfoValueTag;
uint32_t SIStatus;
uint32_t SIcnt;
#if defined(Rel10) || defined(Rel14)
uint8_t MCCHStatus[8]; // MAX_MBSFN_AREA
#endif
uint8_t SIwindowsize; //!< Corresponds to the SIB1 si-WindowLength parameter. The unit is ms. Possible values are (final): 1,2,5,10,15,20,40
uint8_t handoverTarget;
//HO_STATE_t ho_state;
uint16_t SIperiod; //!< Corresponds to the SIB1 si-Periodicity parameter (multiplied by 10). Possible values are (final): 80,160,320,640,1280,2560,5120
unsigned short UE_index;
uint32_t T300_active;
uint32_t T300_cnt;
uint32_t T304_active;
uint32_t T304_cnt;
uint32_t T310_active;
uint32_t T310_cnt;
uint32_t N310_cnt;
uint32_t N311_cnt;
rnti_t rnti;
} __attribute__ ((__packed__)) UE_RRC_INFO_NB_IoT;
//#define NUM_PRECONFIGURED_LCHAN (NB_CH_CX*2) //BCCH, CCCH
#define UE_MODULE_INVALID ((module_id_t) ~0) // FIXME attention! depends on type uint8_t!!!
#define UE_INDEX_INVALID ((module_id_t) ~0) // FIXME attention! depends on type uint8_t!!! used to be -1
// HO_STATE is not supported by NB-IoT
//#define NUMBER_OF_UE_MAX MAX_MOBILES_PER_RG
......@@ -319,6 +343,10 @@ typedef struct SRB_INFO_TABLE_ENTRY_NB_IoT_s {
//MEAS_REPORT_LIST_s not implemented in NB-IoT but is used at UE side
//HANDOVER_INFO_UE not implemented in NB-IoT
typedef struct HANDOVER_INFO_UE_NB_IoT_s {
PhysCellId_t targetCellId;
uint8_t measFlag;
} HANDOVER_INFO_UE_NB_IoT;
//NB-IoT eNB_RRC_UE_NB_IoT_s--(used as a context in eNB --> ue_context in rrc_eNB_ue_context)------
typedef struct eNB_RRC_UE_NB_IoT_s {
......@@ -534,16 +562,113 @@ typedef struct eNB_RRC_INST_NB_IoT_s {
} eNB_RRC_INST_NB_IoT;
#define MAX_UE_CAPABILITY_SIZE 255
#define RRC_HEADER_SIZE_MAX_NB_IoT 64
#define MAX_UE_CAPABILITY_SIZE_NB_IoT 255
//not needed for the moment
//typedef struct OAI_UECapability_s {
// uint8_t sdu[MAX_UE_CAPABILITY_SIZE];
// uint8_t sdu_size;
typedef struct OAI_UECapability_NB_IoT_s {
uint8_t sdu[MAX_UE_CAPABILITY_SIZE_NB_IoT];
uint8_t sdu_size;
////NB-IoT------
// UE_Capability_NB_r13_t UE_Capability_NB; //replace the UE_EUTRA_Capability of LTE
//} OAI_UECapability_t;
UE_Capability_NB_r13_t UE_Capability_NB_IoT; //replace the UE_EUTRA_Capability of LTE
} OAI_UECapability_NB_IoT_t;
#define RRC_BUFFER_SIZE_MAX_NB_IoT 1024
typedef struct UE_RRC_INST_NB_IoT_s {
Rrc_State_NB_IoT_t RrcState;
Rrc_Sub_State_NB_IoT_t RrcSubState;
# if defined(ENABLE_USE_MME)
plmn_t plmnID;
Byte_t rat;
as_nas_info_t initialNasMsg;
# endif
OAI_UECapability_NB_IoT_t *UECap;
uint8_t *UECapability;
uint8_t UECapability_size;
UE_RRC_INFO_NB_IoT Info[NB_SIG_CNX_UE];
SRB_INFO_NB_IoT Srb0[NB_SIG_CNX_UE];
SRB_INFO_TABLE_ENTRY_NB_IoT Srb1[NB_CNX_UE];
SRB_INFO_TABLE_ENTRY_NB_IoT Srb2[NB_CNX_UE];
HANDOVER_INFO_UE_NB_IoT HandoverInfoUe;
/*
uint8_t *SIB1[NB_CNX_UE];
uint8_t sizeof_SIB1[NB_CNX_UE];
uint8_t *SI[NB_CNX_UE];
uint8_t sizeof_SI[NB_CNX_UE];
uint8_t SIB1Status[NB_CNX_UE];
uint8_t SIStatus[NB_CNX_UE];
SystemInformationBlockType1_t *sib1[NB_CNX_UE];
SystemInformation_t *si[NB_CNX_UE]; //!< Temporary storage for an SI message. Decoding happens in decode_SI().
*/
SystemInformationBlockType2_t *sib2[NB_CNX_UE];
/*
SystemInformationBlockType3_t *sib3[NB_CNX_UE];
SystemInformationBlockType4_t *sib4[NB_CNX_UE];
SystemInformationBlockType5_t *sib5[NB_CNX_UE];
SystemInformationBlockType6_t *sib6[NB_CNX_UE];
SystemInformationBlockType7_t *sib7[NB_CNX_UE];
SystemInformationBlockType8_t *sib8[NB_CNX_UE];
SystemInformationBlockType9_t *sib9[NB_CNX_UE];
SystemInformationBlockType10_t *sib10[NB_CNX_UE];
SystemInformationBlockType11_t *sib11[NB_CNX_UE];
#if defined(Rel10) || defined(Rel14)
uint8_t MBMS_flag;
uint8_t *MCCH_MESSAGE[NB_CNX_UE];
uint8_t sizeof_MCCH_MESSAGE[NB_CNX_UE];
uint8_t MCCH_MESSAGEStatus[NB_CNX_UE];
MBSFNAreaConfiguration_r9_t *mcch_message[NB_CNX_UE];
SystemInformationBlockType12_r9_t *sib12[NB_CNX_UE];
SystemInformationBlockType13_r9_t *sib13[NB_CNX_UE];
#endif
#ifdef CBA
uint8_t num_active_cba_groups;
uint16_t cba_rnti[NUM_MAX_CBA_GROUP];
#endif
uint8_t num_srb;
struct SRB_ToAddMod *SRB1_config[NB_CNX_UE];
struct SRB_ToAddMod *SRB2_config[NB_CNX_UE];
struct DRB_ToAddMod *DRB_config[NB_CNX_UE][8];
rb_id_t *defaultDRB; // remember the ID of the default DRB
MeasObjectToAddMod_t *MeasObj[NB_CNX_UE][MAX_MEAS_OBJ];
struct ReportConfigToAddMod *ReportConfig[NB_CNX_UE][MAX_MEAS_CONFIG];
*/
struct QuantityConfig *QuantityConfig[NB_CNX_UE];
/*
struct MeasIdToAddMod *MeasId[NB_CNX_UE][MAX_MEAS_ID];
MEAS_REPORT_LIST *measReportList[NB_CNX_UE][MAX_MEAS_ID];
uint32_t measTimer[NB_CNX_UE][MAX_MEAS_ID][6]; // 6 neighboring cells
RSRP_Range_t s_measure;
struct MeasConfig__speedStatePars *speedStatePars;
struct PhysicalConfigDedicated *physicalConfigDedicated[NB_CNX_UE];
struct SPS_Config *sps_Config[NB_CNX_UE];
MAC_MainConfig_t *mac_MainConfig[NB_CNX_UE];
MeasGapConfig_t *measGapConfig[NB_CNX_UE];
double filter_coeff_rsrp; // [7] ???
double filter_coeff_rsrq; // [7] ???
float rsrp_db[7];
float rsrq_db[7];
float rsrp_db_filtered[7];
float rsrq_db_filtered[7];
#if ENABLE_RAL
obj_hash_table_t *ral_meas_thresholds;
ral_transaction_id_t scan_transaction_id;
#endif
#if defined(ENABLE_SECURITY)
// KeNB as computed from parameters within USIM card //
uint8_t kenb[32];
#endif
// Used integrity/ciphering algorithms //
CipheringAlgorithm_r12_t ciphering_algorithm;
e_SecurityAlgorithmConfig__integrityProtAlgorithm integrity_algorithm;
*/
} UE_RRC_INST_NB_IoT;
#include "proto_NB_IoT.h" //should be put here otherwise compilation error
......
......@@ -39,6 +39,7 @@
//MP: NOTE:XXX some of the parameters defined in vars_nb_iot are called by the extern.h file so not replicated here
extern UE_RRC_INST_NB_IoT *UE_rrc_inst_NB_IoT;
extern eNB_RRC_INST_NB_IoT *eNB_rrc_inst_NB_IoT;
extern PHY_Config_t *config_INFO;
......
This diff is collapsed.
......@@ -30,6 +30,7 @@
#define RRC_ENB_C
/*NB-IoT include files*/
//#include "RRC/LITE/proto_NB_IoT.h"
#include "defs_NB_IoT.h"
#include "RRC/LITE/MESSAGES/asn1_msg_NB_IoT.h"
#include "RRCConnectionRequest-NB.h"
......
/*
* 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 rrc_types.h
* \brief rrc types and subtypes
* \author Navid Nikaein and Raymond Knopp
* \date 2011 - 2014
* \version 1.0
* \company Eurecom
* \email: navid.nikaein@eurecom.fr, raymond.knopp@eurecom.fr
*/
#ifndef RRC_TYPES_NB_IOT_H_
#define RRC_TYPES_NB_IOT_H_
typedef enum Rrc_State_NB_IoT_e {
RRC_STATE_INACTIVE_NB_IoT=0,
RRC_STATE_IDLE_NB_IoT,
RRC_STATE_CONNECTED_NB_IoT,
RRC_STATE_FIRST_NB_IoT = RRC_STATE_INACTIVE_NB_IoT,
RRC_STATE_LAST_NB_IoT = RRC_STATE_CONNECTED_NB_IoT,
} Rrc_State_NB_IoT_t;
typedef enum Rrc_Sub_State_NB_IoT_e {
RRC_SUB_STATE_INACTIVE_NB_IoT=0,
RRC_SUB_STATE_IDLE_SEARCHING_NB_IoT,
RRC_SUB_STATE_IDLE_RECEIVING_SIB_NB_IoT,
RRC_SUB_STATE_IDLE_SIB_COMPLETE_NB_IoT,
RRC_SUB_STATE_IDLE_CONNECTING_NB_IoT,
RRC_SUB_STATE_IDLE_NB_IoT,
RRC_SUB_STATE_CONNECTED_NB_IoT,
RRC_SUB_STATE_INACTIVE_FIRST_NB_IoT = RRC_SUB_STATE_INACTIVE_NB_IoT,
RRC_SUB_STATE_INACTIVE_LAST_NB_IoT = RRC_SUB_STATE_INACTIVE_NB_IoT,
RRC_SUB_STATE_IDLE_FIRST_NB_IoT = RRC_SUB_STATE_IDLE_SEARCHING_NB_IoT,
RRC_SUB_STATE_IDLE_LAST_NB_IoT = RRC_SUB_STATE_IDLE_NB_IoT,
RRC_SUB_STATE_CONNECTED_FIRST_NB_IoT = RRC_SUB_STATE_CONNECTED_NB_IoT,
RRC_SUB_STATE_CONNECTED_LAST_NB_IoT = RRC_SUB_STATE_CONNECTED_NB_IoT,
} Rrc_Sub_State_NB_IoT_t;
#endif /* RRC_TYPES_H_ */
......@@ -40,7 +40,7 @@
//------------------------------------------------------------------------
//UE_RRC_INST *UE_rrc_inst; //MP: may not used for the moment
UE_RRC_INST_NB_IoT *UE_rrc_inst_NB_IoT; //MP: may not used for the moment
#ifndef USER_MODE
#ifndef NO_RRM
......
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