Commit f822c17d authored by Nick Ho's avatar Nick Ho

Add if_inst as a global paramters

parent 87aff44c
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
#include "RACH-ConfigCommon-NB-r13.h" #include "RACH-ConfigCommon-NB-r13.h"
#include "MasterInformationBlock-NB.h" #include "MasterInformationBlock-NB.h"
#include "BCCH-BCH-Message-NB.h" #include "BCCH-BCH-Message-NB.h"
#include "openair2/PHY_INTERFACE/IF_Module_nb_iot.h"
//#ifdef PHY_EMUL //#ifdef PHY_EMUL
//#include "SIMULATION/PHY_EMULATION/impl_defs.h" //#include "SIMULATION/PHY_EMULATION/impl_defs.h"
//#endif //#endif
......
...@@ -45,7 +45,10 @@ ...@@ -45,7 +45,10 @@
#endif //PHY_EMUL #endif //PHY_EMUL
#include "PHY_INTERFACE/defs.h" #include "PHY_INTERFACE/defs.h"
#include "RRC/LITE/defs.h" #include "RRC/LITE/defs.h"
#include "defs_nb_iot.h"
//NB-IoT
extern IF_Module_t *if_inst;
extern const uint32_t BSR_TABLE[BSR_TABLE_SIZE]; extern const uint32_t BSR_TABLE[BSR_TABLE_SIZE];
//extern uint32_t EBSR_Level[63]; //extern uint32_t EBSR_Level[63];
......
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
//NB-IoT //NB-IoT
eNB_MAC_INST_NB *eNB_mac_inst_NB; eNB_MAC_INST_NB *eNB_mac_inst_NB;
IF_Module_t *if_inst;
const uint32_t BSR_TABLE[BSR_TABLE_SIZE]= {0,10,12,14,17,19,22,26,31,36,42,49,57,67,78,91, const uint32_t BSR_TABLE[BSR_TABLE_SIZE]= {0,10,12,14,17,19,22,26,31,36,42,49,57,67,78,91,
105,125,146,171,200,234,274,321,376,440,515,603,706,826,967,1132, 105,125,146,171,200,234,274,321,376,440,515,603,706,826,967,1132,
......
...@@ -5,18 +5,18 @@ ...@@ -5,18 +5,18 @@
#include "LAYER2/MAC/proto_nb_iot.h" #include "LAYER2/MAC/proto_nb_iot.h"
//called at initialization of the PHY //called at initialization of L2
//TODO: define the input //TODO: define the input
IF_Module_t* IF_Module_init_L1(IF_Module_t *if_inst) //southbound IF-Module Interface IF_Module_t* IF_Module_init_L2(void) //southbound IF-Module Interface
{ {
//fill the UL_IND_t?? //register the IF Module to MAC
if_inst->UL_indication = UL_indication; if_inst->UL_indication = UL_indication;
return 0; return 0;
} }
//called at initialization of L2 //called at initialization of L1
//TODO: define the input //TODO: define the input
IF_Module_t* IF_Module_init_L2(IF_Module_t *if_inst) //northbound IF-Module Interface IF_Module_t* IF_Module_init_L1(void) //northbound IF-Module Interface
{ {
//fill the Sched_Rsp_t //fill the Sched_Rsp_t
//fill the PHY_Config_t -->already done in rrc_mac_config //fill the PHY_Config_t -->already done in rrc_mac_config
......
...@@ -331,8 +331,8 @@ typedef struct IF_Module_s{ ...@@ -331,8 +331,8 @@ typedef struct IF_Module_s{
//int IF_Module_init(IF_Module_t *if_inst); //int IF_Module_init(IF_Module_t *if_inst);
IF_Module_t* IF_Module_init_L1(IF_Module_t *if_inst); IF_Module_t* IF_Module_init_L1(void);
IF_Module_t* IF_Module_init_L2(IF_Module_t *if_inst); IF_Module_t* IF_Module_init_L2(void);
#endif #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