Commit c8c80323 authored by Raymond Knopp's avatar Raymond Knopp

initial DU part for F1AP_setup_resp

parent c56eb9ed
......@@ -217,8 +217,7 @@ void *eNB_app_task(void *args_p)
configure_rrc(enb_id);
if (RC.nb_macrlc_inst >0 && mac_has_f1[enb_id]==1) RC.rrc[enb_id]->node_type = ngran_eNB_DU;
pdcp_layer_init();
else pdcp_layer_init();
}
......@@ -252,8 +251,11 @@ void *eNB_app_task(void *args_p)
# if defined(ENABLE_USE_MME)
case S1AP_REGISTER_ENB_CNF:
AssertFatal(RC.rrc[0]->node_type != ngran_eNB_DU, "Should not have received S1AP_REGISTER_ENB_CNF\n");
LOG_I(ENB_APP, "[eNB %d] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p),
S1AP_REGISTER_ENB_CNF(msg_p).nb_mme);
S1AP_REGISTER_ENB_CNF(msg_p).nb_mme);
DevAssert(register_enb_pending > 0);
register_enb_pending--;
......@@ -291,6 +293,50 @@ void *eNB_app_task(void *args_p)
break;
case F1AP_SETUP_RESP:
AssertFatal(RC.rrc[0]->node_type == ngran_eNB_DU, "Should not have received F1AP_REGISTER_ENB_CNF\n");
LOG_I(ENB_APP, "[eNB %d] Received %s: associated ngran_eNB_CU %s with %d cells to activate\n", instance, ITTI_MSG_NAME (msg_p),
F1AP_SETUP_RESP(msg_p).gNB_CU_name,F1AP_SETUP_RESP(msg_p).num_cells_to_activate);
handle_f1ap_setup_resp(&F1AP_SETUP_RESP(msg_p));
DevAssert(register_enb_pending > 0);
register_enb_pending--;
/* Check if at least eNB is registered with one MME */
if (F1AP_SETUP_RESP(msg_p).num_cells_to_activate > 0) {
registered_enb++;
}
/* Check if all register eNB requests have been processed */
if (register_enb_pending == 0) {
if (registered_enb == enb_nb) {
/* If all eNB cells are registered, start L2L1 task */
MessageDef *msg_init_p;
msg_init_p = itti_alloc_new_message (TASK_ENB_APP, INITIALIZE_MESSAGE);
itti_send_msg_to_task (TASK_L2L1, INSTANCE_DEFAULT, msg_init_p);
} else {
LOG_W(ENB_APP, " %d eNB not associated with a MME, retrying registration in %d seconds ...\n",
enb_nb - registered_enb, ENB_REGISTER_RETRY_DELAY);
/* Restart the eNB registration process in ENB_REGISTER_RETRY_DELAY seconds */
if (timer_setup (ENB_REGISTER_RETRY_DELAY, 0, TASK_ENB_APP, INSTANCE_DEFAULT, TIMER_ONE_SHOT,
NULL, &enb_register_retry_timer_id) < 0) {
LOG_E(ENB_APP, " Can not start eNB register retry timer, use \"sleep\" instead!\n");
sleep(ENB_REGISTER_RETRY_DELAY);
/* Restart the registration process */
registered_enb = 0;
register_enb_pending = eNB_app_register (RC.rrc[0]->node_type,enb_id_start, enb_id_end);//, enb_properties_p);
}
}
}
break;
case S1AP_DEREGISTERED_ENB_IND:
LOG_W(ENB_APP, "[eNB %d] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p),
S1AP_DEREGISTERED_ENB_IND(msg_p).nb_mme);
......
......@@ -2706,3 +2706,23 @@ void RCConfig(void) {
RC.nb_RU = RUParamList.numelt;
}
void handle_f1ap_setup_resp(f1ap_setup_resp_t *resp) {
int i,j,si_ind;
AssertFatal(1==0, "Shouldn't get here yet\n");
/*
for (j=0;j<resp->num_cells_to_activate;j++) {
for (i=0;i<RC.nb_inst;i++) {
rrc_eNB_carrier_data_t *carrier = &RC.rrc[i]->carrier[0];
// identify local index of cell j by plmn identity
if (check_plmn_identity(carrier, resp->mcc[j], resp->mnc[j], resp->mnc_digit_length[j])>0 &&
resp->nrpci[j] == carrier->physCellId) {
// copy system information and decode it to perform MAC/L1 common configuration
for (si_ind=0;si_ind<resp->num_SI[j];si_ind++) {
}
}
*/
}
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