Commit 8b7b9271 authored by Robert Schmidt's avatar Robert Schmidt

Add stubs for F1 UE Context Release Req+Cmd+Cplt messages

parent c4448e49
......@@ -647,18 +647,13 @@ int DU_send_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
return 0;
}
int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance,
uint32_t assoc_id,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu) {
int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance, uint32_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
{
F1AP_UEContextReleaseCommand_t *container;
F1AP_UEContextReleaseCommandIEs_t *ie;
/* ITTI message to NR-RRC for the case of gNB-DU */
MessageDef *msg_p; // message to NR-RRC
msg_p = itti_alloc_new_message(TASK_DU_F1, 0, F1AP_UE_CONTEXT_RELEASE_CMD);
f1ap_ue_context_release_req_t *f1ap_ue_context_release_cmd = &F1AP_UE_CONTEXT_RELEASE_CMD(msg_p);
f1ap_ue_context_release_req_t ue_context_release = {0};
f1ap_ue_context_release_req_t *f1ap_ue_context_release_cmd = &ue_context_release;
DevAssert(pdu);
container = &pdu->choice.initiatingMessage->value.choice.UEContextReleaseCommand;
......@@ -709,7 +704,8 @@ int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance,
break;
}
itti_send_msg_to_task(TASK_RRC_GNB, instance, msg_p);
ue_context_release_command(f1ap_ue_context_release_cmd);
return 0;
}
......
......@@ -147,6 +147,11 @@ void ue_context_setup_request(const f1ap_ue_context_setup_t *req)
free(resp.du_to_cu_rrc_information);
}
void ue_context_release_command(const f1ap_ue_context_release_cmd_t *cmd)
{
AssertFatal(false, "not implemented\n");
}
int dl_rrc_message(module_id_t module_id, const f1ap_dl_rrc_message_t *dl_rrc)
{
LOG_D(NR_MAC, "DL RRC Message Transfer with %d bytes for RNTI %04x SRB %d\n", dl_rrc->rrc_container_length, dl_rrc->rnti, dl_rrc->srb_id);
......
......@@ -26,6 +26,7 @@
#include "f1ap_messages_types.h"
void ue_context_setup_request(const f1ap_ue_context_setup_t *req);
void ue_context_release_command(const f1ap_ue_context_release_cmd_t *cmd);
int dl_rrc_message(module_id_t module_id, const f1ap_dl_rrc_message_t *dl_rrc);
......
......@@ -26,6 +26,8 @@
#include "f1ap_messages_types.h"
typedef void (*ue_context_setup_response_func_t)(const f1ap_ue_context_setup_t* req, const f1ap_ue_context_setup_t *resp);
typedef void (*ue_context_release_request_func_t)(const f1ap_ue_context_release_req_t* req);
typedef void (*ue_context_release_complete_func_t)(const f1ap_ue_context_release_complete_t *complete);
typedef void (*initial_ul_rrc_message_transfer_func_t)(module_id_t module_id, const f1ap_initial_ul_rrc_message_t *ul_rrc);
......
......@@ -55,6 +55,16 @@ static void ue_context_setup_response_direct(const f1ap_ue_context_setup_t *req,
itti_send_msg_to_task(TASK_RRC_GNB, 0, msg);
}
static void ue_context_release_request_direct(const f1ap_ue_context_release_req_t* req)
{
AssertFatal(false, "not implemented\n");
}
static void ue_context_release_complete_direct(const f1ap_ue_context_release_complete_t *complete)
{
AssertFatal(false, "not implemented\n");
}
static void initial_ul_rrc_message_transfer_direct(module_id_t module_id, const f1ap_initial_ul_rrc_message_t *ul_rrc)
{
MessageDef *msg = itti_alloc_new_message(TASK_MAC_GNB, 0, F1AP_INITIAL_UL_RRC_MESSAGE);
......@@ -78,5 +88,7 @@ static void initial_ul_rrc_message_transfer_direct(module_id_t module_id, const
void mac_rrc_ul_direct_init(struct nr_mac_rrc_ul_if_s *mac_rrc)
{
mac_rrc->ue_context_setup_response = ue_context_setup_response_direct;
mac_rrc->ue_context_release_request = ue_context_release_request_direct;
mac_rrc->ue_context_release_complete = ue_context_release_complete_direct;
mac_rrc->initial_ul_rrc_message_transfer = initial_ul_rrc_message_transfer_direct;
}
......@@ -60,6 +60,16 @@ static void ue_context_setup_response_f1ap(const f1ap_ue_context_setup_t *req, c
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)
{
AssertFatal(false, "not implemented\n");
}
static void ue_context_release_complete_f1ap(const f1ap_ue_context_release_complete_t *complete)
{
AssertFatal(false, "not implemented\n");
}
static void initial_ul_rrc_message_transfer_f1ap(module_id_t module_id, const f1ap_initial_ul_rrc_message_t *ul_rrc)
{
MessageDef *msg = itti_alloc_new_message(TASK_MAC_GNB, 0, F1AP_INITIAL_UL_RRC_MESSAGE);
......@@ -83,6 +93,8 @@ static void initial_ul_rrc_message_transfer_f1ap(module_id_t module_id, const f1
void mac_rrc_ul_f1ap_init(struct nr_mac_rrc_ul_if_s *mac_rrc)
{
mac_rrc->ue_context_setup_response = ue_context_setup_response_f1ap;
mac_rrc->ue_context_release_request = ue_context_release_request_f1ap;
mac_rrc->ue_context_release_complete = ue_context_release_complete_f1ap;
mac_rrc->initial_ul_rrc_message_transfer = initial_ul_rrc_message_transfer_f1ap;
}
......@@ -659,8 +659,9 @@ typedef struct NR_bler_options {
} NR_bler_options_t;
typedef struct nr_mac_rrc_ul_if_s {
/* TODO add other message types as necessary */
ue_context_setup_response_func_t ue_context_setup_response;
ue_context_release_request_func_t ue_context_release_request;
ue_context_release_complete_func_t ue_context_release_complete;
initial_ul_rrc_message_transfer_func_t initial_ul_rrc_message_transfer;
} nr_mac_rrc_ul_if_t;
......
......@@ -26,6 +26,7 @@
#include "f1ap_messages_types.h"
typedef void (*ue_context_setup_request_func_t)(const f1ap_ue_context_setup_t *req);
typedef void (*ue_context_release_command_func_t)(const f1ap_ue_context_release_cmd_t *cmd);
typedef void (*dl_rrc_message_transfer_func_t)(module_id_t module_id, const f1ap_dl_rrc_message_t *dl_rrc);
......
......@@ -34,5 +34,6 @@ static void dl_rrc_message_transfer_direct(module_id_t module_id, const f1ap_dl_
void mac_rrc_dl_direct_init(nr_mac_rrc_dl_if_t *mac_rrc)
{
mac_rrc->ue_context_setup_request = ue_context_setup_request;
mac_rrc->ue_context_release_command = ue_context_release_command;
mac_rrc->dl_rrc_message_transfer = dl_rrc_message_transfer_direct;
}
......@@ -39,6 +39,11 @@ static void ue_context_setup_request_f1ap(const f1ap_ue_context_setup_t *req)
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)
{
AssertFatal(false, "not implemented\n");
}
static void dl_rrc_message_transfer_f1ap(module_id_t module_id, const f1ap_dl_rrc_message_t *dl_rrc)
{
/* TODO call F1AP function directly? no real-time constraint here */
......@@ -58,5 +63,6 @@ static void dl_rrc_message_transfer_f1ap(module_id_t module_id, const f1ap_dl_rr
void mac_rrc_dl_f1ap_init(nr_mac_rrc_dl_if_t *mac_rrc)
{
mac_rrc->ue_context_setup_request = ue_context_setup_request_f1ap;
mac_rrc->ue_context_release_command = ue_context_release_command_f1ap;
mac_rrc->dl_rrc_message_transfer = dl_rrc_message_transfer_f1ap;
}
......@@ -389,8 +389,8 @@ typedef struct {
} nr_security_configuration_t;
typedef struct nr_mac_rrc_dl_if_s {
/* TODO add other message types as necessary */
ue_context_setup_request_func_t ue_context_setup_request;
ue_context_release_command_func_t ue_context_release_command;
dl_rrc_message_transfer_func_t dl_rrc_message_transfer;
} nr_mac_rrc_dl_if_t;
......
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