Commit e8f43ba5 authored by chenhsunyang0922's avatar chenhsunyang0922

fix openair2 error

parent 02c7134a
......@@ -7,7 +7,7 @@
#ifndef __IF_MODULE_L1_PRIMITIVES_NB_IOT_H__
#define __IF_MODULE_L1_PRIMITIVES_NB_IOT_H__
#include "openair1/PHY/defs_NB_IoT.h"
#include "openair1/PHY/defs_L1_NB_IoT.h"
//#include "LAYER2/MAC/extern.h"
//#include "LAYER2/MAC/proto_NB_IoT.h"
//#include "openair2/PHY_INTERFACE/IF_Module_NB_IoT.h"
......
......@@ -3,10 +3,11 @@
#ifndef __openair_SCHED_NB_IOT_H__
#define __openair_SCHED_NB_IOT_H__
#include "PHY/defs.h"
#include "PHY/defs_eNB.h"
#include "PHY/defs_UE.h"
#include "PHY/defs_L1_NB_IoT.h"
//#include "openair2/PHY_INTERFACE/IF_Module_nb_iot.h"
#include "openair2/PHY_INTERFACE/nfapi_interface.h"
#include "nfapi_interface.h"
......
......@@ -46,7 +46,8 @@
#include "SIMULATION/simulation_defs.h"
#endif //PHY_EMUL
#include "SCHED/defs.h"
#include "SCHED/sched_common.h"
#include "SCHED/sched_eNB.h"
///// NB-IoT testing
#include "proto_NB_IoT.h"
......
......@@ -596,11 +596,6 @@ rlc_op_status_t rrc_rlc_remove_rlc (
hashtable_rc_t h_lcid_rc;
rlc_union_t *rlc_union_p = NULL;
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
rlc_mbms_id_t *mbms_id_p = NULL;
#endif
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
rlc_mbms_id_t *mbms_id_p = NULL;
#endif rrc_rlc_remove_rlc
......
#include "openair2/PHY_INTERFACE/IF_Module_NB_IoT.h"
#include "openair2/PHY_INTERFACE/IF_Module_L2_primitives_NB_IoT.h"
#include "openair1/SCHED/IF_Module_L1_primitives_NB_IoT.h"
#include "openair1/SCHED_NBIOT/IF_Module_L1_primitives_NB_IoT.h"
#include "LAYER2/MAC/extern_NB_IoT.h"
//#include "LAYER2/MAC/proto_NB_IoT.h"
......
......@@ -139,7 +139,7 @@ typedef struct{
/*preamble part*/
nfapi_nrach_indication_body_t NRACH;
nfapi_nrach_indication_body_t nrach_ind;
/*Uplink data part*/
......
......@@ -57,7 +57,12 @@ extern uint16_t T310_NB_IoT[8];
extern uint16_t T311_NB_IoT[8];
extern uint16_t N310_NB_IoT[8];
extern uint16_t N311_NB_IoT[8];
extern uint8_t *get_NB_IoT_MIB(struct eNB_RRC_INST_NB_IoT_s *nb_iot_rrc);
extern uint8_t *get_NB_IoT_MIB(
rrc_eNB_carrier_data_NB_IoT_t *carrier,
uint16_t N_RB_DL,//may not needed--> for NB_IoT only 1 PRB is used
uint32_t subframe,
uint32_t frame,
uint32_t hyper_frame);
#endif
......@@ -38,19 +38,19 @@
//#include "LAYER2/MAC/defs.h" // MAC because see the PHY functions
//#include "extern.h"
//#include "LAYER2/MAC/extern.h"
#include "UTIL/LOG/log.h"
#include "UTIL/OCG/OCG_vars.h"
#include "common/utils/LOG/log.h"
#include "common/utils/OCG/OCG_vars.h"
#include "RRC/NBIOT/rrc_eNB_UE_context_NB_IoT.h"
#include "pdcp_primitives.h"
#include "pdcp.h"
#include "pdcp_util.h"
#include "rlc.h"
#include "msc.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
//#include "gtpv1u.h"
#include "osa_defs.h"
#include "pdcp_sequence_manager.h"
#include "UTIL/OTG/otg_rx.h"
#include "common/utils/OTG/otg_rx.h"
#include "openair2/PHY_INTERFACE/IF_Module_NB_IoT.h"
#include "openair1/SCHED/IF_Module_L1_primitives_NB_IoT.h"
#include "openair3/GTPV1-U/gtpv1u.h"
......@@ -1930,7 +1930,7 @@ uint32_t maxRetxThreshold_NB_tab[UL_AM_RLC_NB_r13__maxRetxThreshold_r13_t32 +1]
void config_req_rlc_am_asn1_NB_IoT (
const protocol_ctxt_t* const ctxt_pP,
const srb_flag_t srb_flagP,
const struct RLC_Config_NB_r13__am * const config_am_pP, //extracted from the srb_toAddMod
const struct LTE_RLC_Config_NB_r13__am * const config_am_pP, //extracted from the srb_toAddMod
const rb_id_t rb_idP,
const logical_chan_id_t chan_idP)
{
......
......@@ -48,26 +48,26 @@
//#include "LAYER2/MAC/defs.h"
//#include "COMMON/openair_defs.h"
#ifndef USER_MODE
#include <rtai.h>
#endif
//#ifndef USER_MODE
//#include <rtai.h>
//#endif
//-----NB-IoT #include files-------
//#include "SystemInformationBlockType1-NB.h"
//#include "SystemInformation-NB.h"
#include "RRCConnectionReconfiguration-NB.h"
#include "RRCConnectionReconfigurationComplete-NB.h"
#include "RRCConnectionSetup-NB.h"
#include "RRCConnectionSetupComplete-NB.h"
#include "RRCConnectionRequest-NB.h"
#include "RRCConnectionReestablishmentRequest-NB.h"
#include "BCCH-DL-SCH-Message-NB.h"
#include "BCCH-BCH-Message-NB.h"
#include "AS-Config-NB.h"
#include "AS-Context-NB.h"
#include "UE-Capability-NB-r13.h" //equivalent of UE-EUTRA-Capability.h
#include "LTE_RRCConnectionReconfiguration-NB.h"
#include "LTE_RRCConnectionReconfigurationComplete-NB.h"
#include "LTE_RRCConnectionSetup-NB.h"
#include "LTE_RRCConnectionSetupComplete-NB.h"
#include "LTE_RRCConnectionRequest-NB.h"
#include "LTE_RRCConnectionReestablishmentRequest-NB.h"
#include "LTE_BCCH-DL-SCH-Message-NB.h"
#include "LTE_BCCH-BCH-Message-NB.h"
#include "LTE_AS-Config-NB.h"
#include "LTE_AS-Context-NB.h"
#include "LTE_UE-Capability-NB-r13.h" //equivalent of UE-EUTRA-Capability.h
//-------------------
#if defined(ENABLE_ITTI)
......@@ -242,7 +242,7 @@ 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;
LTE_PhysCellId_t targetCellId;
uint8_t measFlag;
} HANDOVER_INFO_UE_NB_IoT;
......@@ -261,14 +261,14 @@ typedef struct eNB_RRC_UE_NB_IoT_s {
* 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* 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
LTE_SRB_ToAddModList_NB_r13_t* SRB_configList;//for SRB1 and SRB1bis
LTE_SRB_ToAddModList_NB_r13_t* SRB_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER];
LTE_DRB_ToAddModList_NB_r13_t* DRB_configList; //for all the DRBs
LTE_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
struct PhysicalConfigDedicated_NB_r13* physicalConfigDedicated_NB_IoT;
MAC_MainConfig_NB_r13_t* mac_MainConfig_NB_IoT;
LTE_MAC_MainConfig_NB_r13_t* mac_MainConfig_NB_IoT;
//No SPS(semi-persistent scheduling) in NB-IoT
//No Measurement report in NB-IoT
......@@ -284,8 +284,8 @@ typedef struct eNB_RRC_UE_NB_IoT_s {
#endif
/* Used integrity/ciphering algorithms--> maintained the same for NB-IoT */
e_CipheringAlgorithm_r12 ciphering_algorithm; //Specs. TS 36.331 V14.1.0 pag 432 Change position of chipering enumerative w.r.t previous version
e_SecurityAlgorithmConfig__integrityProtAlgorithm integrity_algorithm;
e_LTE_CipheringAlgorithm_r12 ciphering_algorithm; //Specs. TS 36.331 V14.1.0 pag 432 Change position of chipering enumerative w.r.t previous version
e_LTE_SecurityAlgorithmConfig__integrityProtAlgorithm integrity_algorithm;
uint8_t Status;
rnti_t rnti;
......@@ -295,10 +295,10 @@ typedef struct eNB_RRC_UE_NB_IoT_s {
/* Information from UE RRC ConnectionRequest-NB-r13_IE--> NB-IoT */
UE_S_TMSI_NB_IoT Initialue_identity_s_TMSI;
EstablishmentCause_NB_r13_t establishment_cause_NB_IoT; //different set for NB-IoT
LTE_EstablishmentCause_NB_r13_t establishment_cause_NB_IoT; //different set for NB-IoT
/* Information from UE RRC ConnectionReestablishmentRequest-NB--> NB-IoT */
ReestablishmentCause_NB_r13_t reestablishment_cause_NB_IoT; //different set for NB_IoT
LTE_ReestablishmentCause_NB_r13_t reestablishment_cause_NB_IoT; //different set for NB_IoT
/* UE id for initial connection to S1AP */
uint16_t ue_initial_id;
......@@ -394,18 +394,18 @@ typedef struct {
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_IoT;
BCCH_DL_SCH_Message_NB_t siblock1_NB_IoT; //SIB1-NB
BCCH_DL_SCH_Message_NB_t systemInformation_NB_IoT; //SI
LTE_BCCH_BCH_Message_NB_t mib_NB_IoT;
LTE_BCCH_DL_SCH_Message_NB_t siblock1_NB_IoT; //SIB1-NB
LTE_BCCH_DL_SCH_Message_NB_t systemInformation_NB_IoT; //SI
SystemInformationBlockType1_NB_t *sib1_NB_IoT;
SystemInformationBlockType2_NB_r13_t *sib2_NB_IoT;
SystemInformationBlockType3_NB_r13_t *sib3_NB_IoT;
LTE_SystemInformationBlockType1_NB_t *sib1_NB_IoT;
LTE_SystemInformationBlockType2_NB_r13_t *sib2_NB_IoT;
LTE_SystemInformationBlockType3_NB_r13_t *sib3_NB_IoT;
//not implemented yet
SystemInformationBlockType4_NB_r13_t *sib4_NB_IoT;
SystemInformationBlockType5_NB_r13_t *sib5_NB_IoT;
SystemInformationBlockType14_NB_r13_t *sib14_NB_IoT;
SystemInformationBlockType16_NB_r13_t *sib16_NB_IoT;
LTE_SystemInformationBlockType4_NB_r13_t *sib4_NB_IoT;
LTE_SystemInformationBlockType5_NB_r13_t *sib5_NB_IoT;
LTE_SystemInformationBlockType14_NB_r13_t *sib14_NB_IoT;
LTE_SystemInformationBlockType16_NB_r13_t *sib16_NB_IoT;
SRB_INFO_NB_IoT SI;
......@@ -471,7 +471,7 @@ 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_IoT; //replace the UE_EUTRA_Capability of LTE
LTE_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
......@@ -506,7 +506,7 @@ typedef struct UE_RRC_INST_NB_IoT_s {
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];
LTE_SystemInformationBlockType2_t *sib2[NB_CNX_UE];
/*
SystemInformationBlockType3_t *sib3[NB_CNX_UE];
SystemInformationBlockType4_t *sib4[NB_CNX_UE];
......
......@@ -36,7 +36,7 @@
//#include "LAYER2/MAC/defs.h"
//#include "LAYER2/MAC/extern.h"
#include "LAYER2/RLC/rlc.h"
#include "LogicalChannelConfig-NB-r13.h"
#include "LTE_LogicalChannelConfig-NB-r13.h"
#include "LAYER2/MAC/defs_NB_IoT.h"
extern eNB_MAC_INST_NB_IoT *mac_inst;
......@@ -50,8 +50,8 @@ extern eNB_RRC_INST_NB_IoT *eNB_rrc_inst_NB_IoT;
extern rlc_info_t Rlc_info_am_NB_IoT,Rlc_info_am_config_NB_IoT;
extern uint8_t DRB2LCHAN_NB_IoT[2];
extern LogicalChannelConfig_NB_r13_t SRB1bis_logicalChannelConfig_defaultValue_NB_IoT;
extern LogicalChannelConfig_NB_r13_t SRB1_logicalChannelConfig_defaultValue_NB_IoT;
extern LTE_LogicalChannelConfig_NB_r13_t SRB1bis_logicalChannelConfig_defaultValue_NB_IoT;
extern LTE_LogicalChannelConfig_NB_r13_t SRB1_logicalChannelConfig_defaultValue_NB_IoT;
extern uint16_t T300_NB_IoT[8];
extern uint16_t T301_NB_IoT[8];
......@@ -59,7 +59,12 @@ extern uint16_t T310_NB_IoT[8];
extern uint16_t T311_NB_IoT[8];
extern uint16_t N310_NB_IoT[8];
extern uint16_t N311_NB_IoT[8];
extern uint8_t *get_NB_IoT_MIB(
rrc_eNB_carrier_data_NB_IoT_t *carrier,
uint16_t N_RB_DL,//may not needed--> for NB_IoT only 1 PRB is used
uint32_t subframe,
uint32_t frame,
uint32_t hyper_frame);
#endif
......@@ -246,10 +246,11 @@ rlc_op_status_t rrc_rlc_config_asn1_req_NB_IoT (
//-------------------------------------------------------------------------
// defined in rlc_am.c
void config_req_rlc_am_asn1_NB_IoT (
const protocol_ctxt_t* const ctxt_pP,
const srb_flag_t srb_flagP,
const struct RLC_Config_NB_r13__am * const config_am_pP, //extracted from the srb_toAddMod
const struct LTE_RLC_Config_NB_r13__am * const config_am_pP, //extracted from the srb_toAddMod
const rb_id_t rb_idP,
const logical_chan_id_t chan_idP);
//------------------------------------------------------------
......
......@@ -38,10 +38,10 @@
//#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
#include "LAYER2/RLC/rlc.h"
//#include "COMMON/mac_rrc_primitives.h"
#include "UTIL/LOG/log.h"
#include "common/utils/LOG/log.h"
#include "asn1_msg.h"
#include "pdcp.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
//#include "rrc_eNB_UE_context.h"
//#include "proto_NB_IoT.h"
#include "RRC/NBIOT/defs_NB_IoT.h"
......
......@@ -36,11 +36,11 @@
#include "defs_NB_IoT.h"
/**************/
#include "vars_NB_IoT.h"
#include "extern.h"
#include "extern_NB_IoT.h"
#include "extern_NB_IoT.h"
#include "LAYER2/MAC/proto_NB_IoT.h"
/**************/
#include "openair1/SCHED/defs_NB_IoT.h"
#include "openair1/SCHED_NBIOT/defs_NB_IoT.h"
#include "RRC/NBIOT/MESSAGES/asn1_msg_NB_IoT.h"
#include "RRCConnectionRequest-NB.h"
#include "RRCConnectionReestablishmentRequest-NB.h"
......
......@@ -33,7 +33,7 @@
#include <string.h>
#include <limits.h>
#include "UTIL/LOG/log.h"
#include "common/utils/LOG/log.h"
#include "rrc_eNB_UE_context_NB_IoT.h"
#include "proto_NB_IoT.h"
#include "msc.h"
......
......@@ -35,7 +35,7 @@
#include "LAYER2/RLC/rlc.h"
#include "COMMON/mac_rrc_primitives.h"
#include "LAYER2/MAC/defs_NB_IoT.h"
#include "LogicalChannelConfig-NB-r13.h"
#include "LTE_LogicalChannelConfig-NB-r13.h"
//-----------------------------------------------------------------------
// ALL what is defined here should be shared through extern_NB_IoT.h file
......@@ -76,11 +76,11 @@ 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_logicalChannelConfig_defaultValue_NB_IoT = {
struct LTE_LogicalChannelConfig_NB_r13 SRB1bis_logicalChannelConfig_defaultValue_NB_IoT = {
priority_r13: &priority, //priority
logicalChannelSR_Prohibit_r13: &logicalChannelSR_Prohibit //set to TRUE
};
struct LogicalChannelConfig_NB_r13 SRB1_logicalChannelConfig_defaultValue_NB_IoT = {
struct LTE_LogicalChannelConfig_NB_r13 SRB1_logicalChannelConfig_defaultValue_NB_IoT = {
priority_r13: &priority, //priority
logicalChannelSR_Prohibit_r13: &logicalChannelSR_Prohibit //set to TRUE
};
......
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