Commit b8783bf1 authored by Xenofon Foukas's avatar Xenofon Foukas

Added macros for enabling FlexRAN agent operation

parent e93907e5
...@@ -62,10 +62,12 @@ ...@@ -62,10 +62,12 @@
#endif #endif
#if defined(FLEXRAN_AGENT_SB_IF)
//Agent-related headers //Agent-related headers
#include "ENB_APP/flexran_agent_extern.h" #include "ENB_APP/flexran_agent_extern.h"
#include "ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.h" #include "ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.h"
#include "LAYER2/MAC/flexran_agent_mac_proto.h" #include "LAYER2/MAC/flexran_agent_mac_proto.h"
#endif
//#define DIAG_PHY //#define DIAG_PHY
...@@ -1369,11 +1371,13 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB, ...@@ -1369,11 +1371,13 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
eNB->dlsch_ra->active = 0; eNB->dlsch_ra->active = 0;
} }
#if defined(FLEXRAN_AGENT_SB_IF)
#ifndef DISABLE_SF_TRIGGER #ifndef DISABLE_SF_TRIGGER
//Send subframe trigger to the controller //Send subframe trigger to the controller
if (mac_agent_registered[eNB->Mod_id]) { if (mac_agent_registered[eNB->Mod_id]) {
agent_mac_xface[eNB->Mod_id]->flexran_agent_send_sf_trigger(eNB->Mod_id); agent_mac_xface[eNB->Mod_id]->flexran_agent_send_sf_trigger(eNB->Mod_id);
} }
#endif
#endif #endif
// Now scan UE specific DLSCH // Now scan UE specific DLSCH
......
...@@ -52,10 +52,12 @@ ...@@ -52,10 +52,12 @@
//#include "LAYER2/MAC/pre_processor.c" //#include "LAYER2/MAC/pre_processor.c"
#include "pdcp.h" #include "pdcp.h"
#if defined(FLEXRAN_AGENT_SB_IF)
//Agent-related headers //Agent-related headers
#include "flexran_agent_extern.h" #include "flexran_agent_extern.h"
#include "flexran_agent_mac.h" #include "flexran_agent_mac.h"
#include "flexran_agent_mac_proto.h" #include "flexran_agent_mac_proto.h"
#endif
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
# include "intertask_interface.h" # include "intertask_interface.h"
...@@ -103,7 +105,9 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag, ...@@ -103,7 +105,9 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
void *DLSCH_dci=NULL; void *DLSCH_dci=NULL;
int size_bits=0,size_bytes=0; int size_bits=0,size_bytes=0;
#if defined(FLEXRAN_AGENT_SB_IF)
Protocol__FlexranMessage *msg; Protocol__FlexranMessage *msg;
#endif
LOG_D(MAC,"[eNB %d] Frame %d, Subframe %d, entering MAC scheduler (UE_list->head %d)\n",module_idP, frameP, subframeP,UE_list->head); LOG_D(MAC,"[eNB %d] Frame %d, Subframe %d, entering MAC scheduler (UE_list->head %d)\n",module_idP, frameP, subframeP,UE_list->head);
...@@ -137,14 +141,17 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag, ...@@ -137,14 +141,17 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
eNB_mac_inst[module_idP].UE_list.UE_sched_ctrl[i].cqi_req_timer++; eNB_mac_inst[module_idP].UE_list.UE_sched_ctrl[i].cqi_req_timer++;
if (mac_xface->get_eNB_UE_stats(module_idP, CC_id, rnti)==NULL) { if (mac_xface->get_eNB_UE_stats(module_idP, CC_id, rnti)==NULL) {
//mac_remove_ue(module_idP, i, frameP, subframeP); //mac_remove_ue(module_idP, i, frameP, subframeP);
//Inform the controller about the UE deactivation. Should be moved to RRC agent in the future //Inform the controller about the UE deactivation. Should be moved to RRC agent in the future
#if defined(FLEXRAN_AGENT_SB_IF)
if (mac_agent_registered[module_idP]) { if (mac_agent_registered[module_idP]) {
agent_mac_xface[module_idP]->flexran_agent_notify_ue_state_change(module_idP, agent_mac_xface[module_idP]->flexran_agent_notify_ue_state_change(module_idP,
rnti, rnti,
PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_DEACTIVATED); PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_DEACTIVATED);
} }
#endif
} }
else { else {
// check uplink failure // check uplink failure
...@@ -1081,11 +1088,13 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag, ...@@ -1081,11 +1088,13 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
for (CC_id=0;CC_id<MAX_NUM_CCs;CC_id++) for (CC_id=0;CC_id<MAX_NUM_CCs;CC_id++)
allocate_CCEs(module_idP,CC_id,subframeP,0); allocate_CCEs(module_idP,CC_id,subframeP,0);
#if defined(FLEXRAN_AGENT_SB_IF)
#ifndef DISABLE_CONT_STATS #ifndef DISABLE_CONT_STATS
//Send subframe trigger to the controller //Send subframe trigger to the controller
if (mac_agent_registered[module_idP]) { if (mac_agent_registered[module_idP]) {
agent_mac_xface[module_idP]->flexran_agent_send_update_mac_stats(module_idP); agent_mac_xface[module_idP]->flexran_agent_send_update_mac_stats(module_idP);
} }
#endif
#endif #endif
/* /*
......
...@@ -93,7 +93,9 @@ ...@@ -93,7 +93,9 @@
#include "SIMULATION/TOOLS/defs.h" // for taus #include "SIMULATION/TOOLS/defs.h" // for taus
#if defined(FLEXRAN_AGENT_SB_IF)
#include "flexran_agent_extern.h" #include "flexran_agent_extern.h"
#endif
#define XER_PRINT #define XER_PRINT
#ifdef PHY_EMUL #ifdef PHY_EMUL
...@@ -4541,12 +4543,14 @@ rrc_eNB_decode_dcch( ...@@ -4541,12 +4543,14 @@ rrc_eNB_decode_dcch(
ue_context_p, ue_context_p,
ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.rrc_TransactionIdentifier); ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.rrc_TransactionIdentifier);
#if defined(FLEXRAN_AGENT_SB_IF)
//WARNING:Inform the controller about the UE activation. Should be moved to RRC agent in the future //WARNING:Inform the controller about the UE activation. Should be moved to RRC agent in the future
if (mac_agent_registered[ctxt_pP->module_id]) { if (mac_agent_registered[ctxt_pP->module_id]) {
agent_mac_xface[ctxt_pP->eNB_index]->flexran_agent_notify_ue_state_change(ctxt_pP->module_id, agent_mac_xface[ctxt_pP->eNB_index]->flexran_agent_notify_ue_state_change(ctxt_pP->module_id,
ue_context_p->ue_id_rnti, ue_context_p->ue_id_rnti,
PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_UPDATED); PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_UPDATED);
} }
#endif
} }
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
# if defined(ENABLE_USE_MME) # if defined(ENABLE_USE_MME)
...@@ -4642,12 +4646,15 @@ rrc_eNB_decode_dcch( ...@@ -4642,12 +4646,15 @@ rrc_eNB_decode_dcch(
ue_context_p->ue_context.Status = RRC_CONNECTED; ue_context_p->ue_context.Status = RRC_CONNECTED;
LOG_I(RRC, PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_CONNECTED \n", LOG_I(RRC, PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_CONNECTED \n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP)); PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP));
#if defined(FLEXRAN_AGENT_SB_IF)
//WARNING:Inform the controller about the UE activation. Should be moved to RRC agent in the future //WARNING:Inform the controller about the UE activation. Should be moved to RRC agent in the future
if (mac_agent_registered[ctxt_pP->module_id]) { if (mac_agent_registered[ctxt_pP->module_id]) {
agent_mac_xface[ctxt_pP->eNB_index]->flexran_agent_notify_ue_state_change(ctxt_pP->module_id, agent_mac_xface[ctxt_pP->eNB_index]->flexran_agent_notify_ue_state_change(ctxt_pP->module_id,
ue_context_p->ue_id_rnti, ue_context_p->ue_id_rnti,
PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_ACTIVATED); PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_ACTIVATED);
} }
#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