Commit for updates to RAL (802.21, MIH)

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4867 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
Lionel Gauthier
2014-01-14 09:54:15 +00:00
parent 3b13d05cdc
commit 58b62709f3
21 changed files with 486 additions and 90 deletions
+19 -15
View File
@@ -472,8 +472,9 @@ void *l2l1_task(void *args_p) {
int result;
itti_mark_task_ready (TASK_L2L1);
LOG_I(EMU, "TASK_L2L1 is READY\n");
if (NB_eNB_INST > 0) {
if (oai_emulation.info.nb_enb_local > 0) {
/* Wait for the initialize message */
do {
if (message_p != NULL) {
@@ -533,6 +534,7 @@ void *l2l1_task(void *args_p) {
LOG_I(EMU, "Received %s\n", ITTI_MSG_NAME(message_p));
break;
default:
LOG_E(EMU, "Received unexpected message %s\n", ITTI_MSG_NAME(message_p));
break;
@@ -674,29 +676,29 @@ void *l2l1_task(void *args_p) {
if ((next_slot % 2) == 0)
clear_UE_transport_info (oai_emulation.info.nb_ue_local);
for (UE_id = oai_emulation.info.first_ue_local;
(UE_id < (oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local)); UE_id++) {
(UE_id < (oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local)); UE_id++) {
if (oai_emulation.info.cli_start_ue[UE_id] != 0) {
#if defined(ENABLE_ITTI) && defined(ENABLE_USE_MME)
{
#else
if (frame >= (UE_id * 20)) { // activate UE only after 20*UE_id frames so that different UEs turn on separately
if (frame >= (UE_id * 20)) // activate UE only after 20*UE_id frames so that different UEs turn on separately
#endif
LOG_D(EMU, "PHY procedures UE %d for frame %d, slot %d (subframe TX %d, RX %d)\n", UE_id, frame, slot, next_slot >> 1, last_slot>>1);
{
LOG_D(EMU, "PHY procedures UE %d for frame %d, slot %d (subframe TX %d, RX %d)\n", UE_id, frame, slot, next_slot >> 1, last_slot>>1);
if (PHY_vars_UE_g[UE_id]->UE_mode[0] != NOT_SYNCHED) {
if (frame > 0) {
PHY_vars_UE_g[UE_id]->frame = frame;
#ifdef OPENAIR2
//Application
update_otg_UE (UE_id, oai_emulation.info.time_ms);
//Access layer
pdcp_run (frame, 0, UE_id, 0);
#endif
phy_procedures_UE_lte (last_slot, next_slot, PHY_vars_UE_g[UE_id], 0, abstraction_flag, normal_txrx,
no_relay, NULL);
ue_data[UE_id]->tx_power_dBm = PHY_vars_UE_g[UE_id]->tx_power_dBm;
@@ -711,7 +713,7 @@ void *l2l1_task(void *args_p) {
}
if ((frame > 0) && (last_slot == (LTE_SLOTS_PER_FRAME - 2))) {
initial_sync (PHY_vars_UE_g[UE_id], normal_txrx);
/*
write_output("dlchan00.m","dlch00",&(PHY_vars_UE_g[0]->lte_ue_common_vars.dl_ch_estimates[0][0][0]),(6*(PHY_vars_UE_g[0]->lte_frame_parms.ofdm_symbol_size)),1,1);
if (PHY_vars_UE_g[0]->lte_frame_parms.nb_antennas_rx>1)
@@ -739,8 +741,8 @@ void *l2l1_task(void *args_p) {
}
#endif
}
}
}
}
}
#ifdef Rel10
for (RN_id=oai_emulation.info.first_rn_local;
RN_id<oai_emulation.info.first_rn_local+oai_emulation.info.nb_rn_local;
@@ -1078,13 +1080,15 @@ int main(int argc, char **argv) {
#if defined(ENABLE_ITTI)
// Handle signals until all tasks are terminated
if (create_tasks(NB_eNB_INST, NB_UE_INST) >= 0) {
if (create_tasks(oai_emulation.info.nb_enb_local, oai_emulation.info.nb_ue_local) >= 0) {
itti_wait_tasks_end();
} else {
exit(-1); // need a softer mode
}
#else
eNB_app_task(NULL); // do nothing for the moment
if (oai_emulation.info.nb_enb_local > 0) {
eNB_app_task(NULL); // do nothing for the moment
}
l2l1_task (NULL);
#endif
+14 -8
View File
@@ -458,34 +458,40 @@ int olg_config() {
set_comp_log(OCG, LOG_EMERG, 0x15,1);
set_comp_log(OCM, LOG_EMERG, 0x15,1);
set_comp_log(OTG, LOG_EMERG, 0x15,1);
set_comp_log(MAC, LOG_EMERG, 0x15,1);
set_comp_log(MAC, LOG_DEBUG, 0x15,1);
set_comp_log(OMG, LOG_EMERG, 0x15,1);
set_comp_log(OPT, LOG_EMERG, 0x15,1);
set_comp_log(PDCP, LOG_TRACE, LOG_MED,1);
set_comp_log(RLC, LOG_TRACE, LOG_MED,1);
set_comp_log(RRC, LOG_TRACE, LOG_MED,1);
#if defined(ENABLE_RAL)
set_comp_log(RAL_ENB, LOG_TRACE, LOG_MED,1);
set_comp_log(RAL_UE, LOG_TRACE, LOG_MED,1);
set_log(RAL_ENB, LOG_DEBUG, 1);
set_log(RAL_UE, LOG_DEBUG, 1);
#endif
//set_log(OCG, LOG_DEBUG, 1);
//set_log(EMU, LOG_INFO, 20);
//set_log(MAC, LOG_DEBUG, 1);
set_log(RLC, LOG_TRACE, 1);
set_log(MAC, LOG_DEBUG, 1);
set_log(RLC, LOG_TRACE, 1);
//set_log(PHY, LOG_DEBUG, 1);
set_log(PDCP, LOG_TRACE, 1);
set_log(PDCP, LOG_TRACE, 1);
set_log(RRC, LOG_DEBUG, 1);
//set_log(OCM, LOG_INFO, 20);
//set_log(OTG, LOG_INFO, 1);
/* set_comp_log(OCG, LOG_ERR, 0x15,1);
set_comp_log(OCG, LOG_ERR, 0x15,1);
set_comp_log(EMU, LOG_ERR, 0x15,20);
set_comp_log(MAC, LOG_ERR, 0x15,1);
set_comp_log(MAC, LOG_DEBUG, 0x15,1);
set_comp_log(RLC, LOG_INFO, 0x15,1);
set_comp_log(PHY, LOG_ERR, 0x15, 1);
set_comp_log(PHY, LOG_DEBUG, 0x15, 1);
set_comp_log(PDCP, LOG_DEBUG, 0x15,1);
set_comp_log(RRC, LOG_DEBUG, 0x15,1);
set_comp_log(OCM, LOG_ERR, 0x15,20);
set_comp_log(OTG, LOG_ERR, 0x15,1);
set_comp_log(OMG, LOG_ERR, 0x15,1);
set_comp_log(OPT, LOG_ERR, 0x15,1);
*/
// set_comp_log(MAC, LOG_TRACE, LOG_FULL,1);
return 1;
}
+15 -32
View File
@@ -555,8 +555,8 @@ void check_and_adjust_params() {
NB_eNB_INST+=NB_RN_INST;
NB_UE_INST+=NB_RN_INST;
}
LOG_I(EMU,"Total number of UE %d (local %d, remote %d, relay %d) mobility %s \n",
NB_UE_INST,oai_emulation.info.nb_ue_local,oai_emulation.info.nb_ue_remote,
LOG_I(EMU,"Total number of UE %d (first local %d , num local %d, remote %d, relay %d) mobility %s \n",
NB_UE_INST,oai_emulation.info.first_ue_local, oai_emulation.info.nb_ue_local,oai_emulation.info.nb_ue_remote,
NB_RN_INST,
oai_emulation.topology_config.mobility.UE_mobility.UE_mobility_type.selected_option);
@@ -620,7 +620,9 @@ void init_seed(u8 set_seed) {
void init_openair1() {
s32 UE_id, eNB_id;
#if defined(ENABLE_RAL)
int list_index;
#endif
// change the nb_connected_eNB
init_lte_vars (&frame_parms, oai_emulation.info.frame_type, oai_emulation.info.tdd_config, oai_emulation.info.tdd_config_S,oai_emulation.info.extended_prefix_flag,oai_emulation.info.N_RB_DL, Nid_cell, cooperation_flag, oai_emulation.info.transmission_mode, abstraction_flag,nb_antennas_rx, oai_emulation.info.eMBMS_active_state);
@@ -672,6 +674,16 @@ void init_openair1() {
PHY_vars_UE_g[UE_id]->current_dlsch_cqi[0] = 10;
LOG_I(EMU, "UE %d mode is initialized to %d\n", UE_id, PHY_vars_UE_g[UE_id]->UE_mode[0] );
#if defined(ENABLE_RAL)
PHY_vars_UE_g[UE_id]->ral_thresholds_timed = hashtable_create (64, NULL, NULL);
for (list_index = 0; list_index < RAL_LINK_PARAM_GEN_MAX; list_index++) {
SLIST_INIT(&PHY_vars_UE_g[UE_id]->ral_thresholds_gen_polled[list_index]);
}
for (list_index = 0; list_index < RAL_LINK_PARAM_LTE_MAX; list_index++) {
SLIST_INIT(&PHY_vars_UE_g[UE_id]->ral_thresholds_lte_polled[list_index]);
}
#endif
}
}
@@ -695,38 +707,9 @@ void init_openair2() {
mac_xface->macphy_exit = exit_fun;
#ifdef ENABLE_RAL
init_802_21_link_saps();
#endif
#endif
}
void init_802_21_link_saps() {
#ifdef ENABLE_RAL
#ifdef OPENAIR2
#if defined(ENABLE_ITTI)
if (NB_eNB_INST > 0) {
if (itti_create_task (TASK_RAL_ENB, eRAL_task, NULL) < 0) {
LOG_E(EMU, "Create task failed");
LOG_D(EMU, "Initializing RAL eNB task interface: FAILED\n");
exit (-1);
}
}
if (NB_UE_INST > 0) {
if (itti_create_task (TASK_RAL_UE, mRAL_task, NULL) < 0) {
LOG_E(EMU, "Create task failed");
LOG_D(EMU, "Initializing RAL UE task interface: FAILED\n");
exit (-1);
}
}
sleep(15);
#endif
#endif
#endif
}
void init_ocm() {
s32 UE_id, eNB_id;
/* Added for PHY abstraction */
-2
View File
@@ -20,8 +20,6 @@ void init_openair1();
void init_openair2();
void init_802_21_link_saps();
void init_ocm();
void init_otg_pdcp_buffer();