Commit e72fa6aa authored by Robert Schmidt's avatar Robert Schmidt

Implement F1 handlers

parent bb63aa79
......@@ -98,7 +98,27 @@ static void ue_context_modification_response_f1ap(const f1ap_ue_context_modif_re
static void ue_context_modification_required_f1ap(const f1ap_ue_context_modif_required_t *required)
{
AssertFatal(false, "%s() not implemented yet\n", __func__);
MessageDef *msg = itti_alloc_new_message(TASK_MAC_GNB, 0, F1AP_UE_CONTEXT_MODIFICATION_REQUIRED);
f1ap_ue_context_modif_required_t *f1ap_msg = &F1AP_UE_CONTEXT_MODIFICATION_REQUIRED(msg);
f1ap_msg->gNB_CU_ue_id = required->gNB_CU_ue_id;
f1ap_msg->gNB_DU_ue_id = required->gNB_DU_ue_id;
f1ap_msg->du_to_cu_rrc_information = NULL;
if (required->du_to_cu_rrc_information != NULL) {
f1ap_msg->du_to_cu_rrc_information = calloc(1, sizeof(*f1ap_msg->du_to_cu_rrc_information));
AssertFatal(f1ap_msg->du_to_cu_rrc_information != NULL, "out of memory\n");
du_to_cu_rrc_information_t *du2cu = f1ap_msg->du_to_cu_rrc_information;
AssertFatal(required->du_to_cu_rrc_information->cellGroupConfig != NULL && required->du_to_cu_rrc_information->cellGroupConfig_length > 0,
"cellGroupConfig is mandatory\n");
du2cu->cellGroupConfig_length = required->du_to_cu_rrc_information->cellGroupConfig_length;
du2cu->cellGroupConfig = malloc(du2cu->cellGroupConfig_length * sizeof(*du2cu->cellGroupConfig));
AssertFatal(du2cu->cellGroupConfig != NULL, "out of memory\n");
memcpy(du2cu->cellGroupConfig, required->du_to_cu_rrc_information->cellGroupConfig, du2cu->cellGroupConfig_length);
AssertFatal(required->du_to_cu_rrc_information->measGapConfig == NULL && required->du_to_cu_rrc_information->measGapConfig_length == 0, "not handled yet\n");
AssertFatal(required->du_to_cu_rrc_information->requestedP_MaxFR1 == NULL && required->du_to_cu_rrc_information->requestedP_MaxFR1_length == 0, "not handled yet\n");
}
f1ap_msg->cause = required->cause;
f1ap_msg->cause_value = required->cause_value;
itti_send_msg_to_task(TASK_DU_F1, 0, msg);
}
static void ue_context_release_request_f1ap(const f1ap_ue_context_release_req_t* req)
......
......@@ -73,14 +73,27 @@ static void ue_context_modification_request_f1ap(const f1ap_ue_context_modif_req
static void ue_context_modification_confirm_f1ap(const f1ap_ue_context_modif_confirm_t *confirm)
{
(void)confirm;
AssertFatal(false, "%s() not implemented yet\n", __func__);
MessageDef *msg = itti_alloc_new_message(TASK_MAC_GNB, 0, F1AP_UE_CONTEXT_MODIFICATION_CONFIRM);
f1ap_ue_context_modif_confirm_t *f1ap_msg = &F1AP_UE_CONTEXT_MODIFICATION_CONFIRM(msg);
f1ap_msg->gNB_CU_ue_id = confirm->gNB_CU_ue_id;
f1ap_msg->gNB_DU_ue_id = confirm->gNB_DU_ue_id;
f1ap_msg->rrc_container = NULL;
f1ap_msg->rrc_container_length = 0;
if (confirm->rrc_container != NULL) {
f1ap_msg->rrc_container = calloc(1, sizeof(*f1ap_msg->rrc_container));
AssertFatal(f1ap_msg->rrc_container != NULL, "out of memory\n");
memcpy(f1ap_msg->rrc_container, confirm->rrc_container, confirm->rrc_container_length);
f1ap_msg->rrc_container_length = confirm->rrc_container_length;
}
itti_send_msg_to_task(TASK_CU_F1, 0, msg);
}
static void ue_context_modification_refuse_f1ap(const f1ap_ue_context_modif_refuse_t *refuse)
{
(void)refuse;
AssertFatal(false, "%s() not implemented yet\n", __func__);
MessageDef *msg = itti_alloc_new_message(TASK_MAC_GNB, 0, F1AP_UE_CONTEXT_MODIFICATION_REFUSE);
f1ap_ue_context_modif_refuse_t *f1ap_msg = &F1AP_UE_CONTEXT_MODIFICATION_REFUSE(msg);
*f1ap_msg = *refuse;
itti_send_msg_to_task(TASK_CU_F1, 0, msg);
}
static void ue_context_release_command_f1ap(const f1ap_ue_context_release_cmd_t *cmd)
......
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