Commit 10b996f5 authored by Robert Schmidt's avatar Robert Schmidt

Stubs for F1 UE Context Setup Req+Resp messages

parent 31a10033
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include "f1ap_decoder.h" #include "f1ap_decoder.h"
#include "f1ap_itti_messaging.h" #include "f1ap_itti_messaging.h"
#include "f1ap_du_ue_context_management.h" #include "f1ap_du_ue_context_management.h"
#include "openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.h"
#include "rrc_extern.h" #include "rrc_extern.h"
#include "openair2/RRC/NR/rrc_gNB_UE_context.h" #include "openair2/RRC/NR/rrc_gNB_UE_context.h"
...@@ -65,13 +66,13 @@ bool lteDURecvCb(protocol_ctxt_t *ctxt_pP, ...@@ -65,13 +66,13 @@ bool lteDURecvCb(protocol_ctxt_t *ctxt_pP,
int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance, int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
uint32_t assoc_id, uint32_t assoc_id,
uint32_t stream, uint32_t stream,
F1AP_F1AP_PDU_t *pdu) { F1AP_F1AP_PDU_t *pdu)
MessageDef *msg_p; // message to RRC {
F1AP_UEContextSetupRequest_t *container; F1AP_UEContextSetupRequest_t *container;
int i; int i;
DevAssert(pdu); DevAssert(pdu);
msg_p = itti_alloc_new_message(TASK_DU_F1, 0, F1AP_UE_CONTEXT_SETUP_REQ); f1ap_ue_context_setup_t ue_context_setup = {0};
f1ap_ue_context_setup_t *f1ap_ue_context_setup_req = &F1AP_UE_CONTEXT_SETUP_REQ(msg_p); f1ap_ue_context_setup_t *f1ap_ue_context_setup_req = &ue_context_setup;
container = &pdu->choice.initiatingMessage->value.choice.UEContextSetupRequest; container = &pdu->choice.initiatingMessage->value.choice.UEContextSetupRequest;
/* GNB_CU_UE_F1AP_ID */ /* GNB_CU_UE_F1AP_ID */
F1AP_UEContextSetupRequestIEs_t *ieCU; F1AP_UEContextSetupRequestIEs_t *ieCU;
...@@ -224,8 +225,7 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ...@@ -224,8 +225,7 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
LOG_W(F1AP, "can't find RRCContainer in UEContextSetupRequestIEs by id %ld \n", F1AP_ProtocolIE_ID_id_RRCContainer); LOG_W(F1AP, "can't find RRCContainer in UEContextSetupRequestIEs by id %ld \n", F1AP_ProtocolIE_ID_id_RRCContainer);
} }
itti_send_msg_to_task(TASK_RRC_GNB, instance, msg_p); ue_context_setup_request(f1ap_ue_context_setup_req);
return 0; return 0;
} }
......
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
* contact@openairinterface.org * contact@openairinterface.org
*/ */
#include <stdlib.h>
#include "mac_rrc_dl_handler.h" #include "mac_rrc_dl_handler.h"
#include "mac_proto.h" #include "mac_proto.h"
...@@ -29,6 +31,12 @@ ...@@ -29,6 +31,12 @@
#include "NR_DL-CCCH-Message.h" #include "NR_DL-CCCH-Message.h"
#include "NR_CellGroupConfig.h" #include "NR_CellGroupConfig.h"
void ue_context_setup_request(const f1ap_ue_context_setup_t *req)
{
(void) req;
abort();
}
int dl_rrc_message(module_id_t module_id, const f1ap_dl_rrc_message_t *dl_rrc) int dl_rrc_message(module_id_t module_id, const f1ap_dl_rrc_message_t *dl_rrc)
{ {
LOG_I(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); LOG_I(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);
......
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
#include "platform_types.h" #include "platform_types.h"
#include "f1ap_messages_types.h" #include "f1ap_messages_types.h"
void ue_context_setup_request(const f1ap_ue_context_setup_t *req);
int dl_rrc_message(module_id_t module_id, const f1ap_dl_rrc_message_t *dl_rrc); int dl_rrc_message(module_id_t module_id, const f1ap_dl_rrc_message_t *dl_rrc);
#endif /* MAC_RRC_DL_HANDLER_H */ #endif /* MAC_RRC_DL_HANDLER_H */
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
#include "platform_types.h" #include "platform_types.h"
#include "f1ap_messages_types.h" #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 (*initial_ul_rrc_message_transfer_func_t)(module_id_t module_id, const f1ap_initial_ul_rrc_message_t *ul_rrc); typedef void (*initial_ul_rrc_message_transfer_func_t)(module_id_t module_id, const f1ap_initial_ul_rrc_message_t *ul_rrc);
struct nr_mac_rrc_ul_if_s; struct nr_mac_rrc_ul_if_s;
......
...@@ -24,6 +24,12 @@ ...@@ -24,6 +24,12 @@
#include "mac_rrc_ul.h" #include "mac_rrc_ul.h"
static void ue_context_setup_response_direct(const f1ap_ue_context_setup_t *req, const f1ap_ue_context_setup_t *resp)
{
(void) req; /* we don't need the request -- it is to set up GTP in F1 case */
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) 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); MessageDef *msg = itti_alloc_new_message(TASK_MAC_GNB, 0, F1AP_INITIAL_UL_RRC_MESSAGE);
...@@ -46,5 +52,6 @@ static void initial_ul_rrc_message_transfer_direct(module_id_t module_id, const ...@@ -46,5 +52,6 @@ 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) 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->initial_ul_rrc_message_transfer = initial_ul_rrc_message_transfer_direct; mac_rrc->initial_ul_rrc_message_transfer = initial_ul_rrc_message_transfer_direct;
} }
...@@ -24,6 +24,13 @@ ...@@ -24,6 +24,13 @@
#include "mac_rrc_ul.h" #include "mac_rrc_ul.h"
static void ue_context_setup_response_f1ap(const f1ap_ue_context_setup_t *req, const f1ap_ue_context_setup_t *resp)
{
AssertFatal(false, "not implemented\n");
/* TODO: set up GTP tunnel for DL, and fill UL TEID in resp */
}
static void initial_ul_rrc_message_transfer_f1ap(module_id_t module_id, const f1ap_initial_ul_rrc_message_t *ul_rrc) 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); MessageDef *msg = itti_alloc_new_message(TASK_MAC_GNB, 0, F1AP_INITIAL_UL_RRC_MESSAGE);
...@@ -46,6 +53,7 @@ static void initial_ul_rrc_message_transfer_f1ap(module_id_t module_id, const f1 ...@@ -46,6 +53,7 @@ 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) 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->initial_ul_rrc_message_transfer = initial_ul_rrc_message_transfer_f1ap; mac_rrc->initial_ul_rrc_message_transfer = initial_ul_rrc_message_transfer_f1ap;
} }
...@@ -660,6 +660,7 @@ typedef struct NR_bler_options { ...@@ -660,6 +660,7 @@ typedef struct NR_bler_options {
typedef struct nr_mac_rrc_ul_if_s { typedef struct nr_mac_rrc_ul_if_s {
/* TODO add other message types as necessary */ /* TODO add other message types as necessary */
ue_context_setup_response_func_t ue_context_setup_response;
initial_ul_rrc_message_transfer_func_t initial_ul_rrc_message_transfer; initial_ul_rrc_message_transfer_func_t initial_ul_rrc_message_transfer;
} nr_mac_rrc_ul_if_t; } nr_mac_rrc_ul_if_t;
......
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
#include "platform_types.h" #include "platform_types.h"
#include "f1ap_messages_types.h" #include "f1ap_messages_types.h"
typedef void (*ue_context_setup_request_func_t)(const f1ap_ue_context_setup_t *req);
typedef void (*dl_rrc_message_transfer_func_t)(module_id_t module_id, const f1ap_dl_rrc_message_t *dl_rrc); typedef void (*dl_rrc_message_transfer_func_t)(module_id_t module_id, const f1ap_dl_rrc_message_t *dl_rrc);
struct nr_mac_rrc_dl_if_s; struct nr_mac_rrc_dl_if_s;
......
...@@ -33,5 +33,6 @@ static void dl_rrc_message_transfer_direct(module_id_t module_id, const f1ap_dl_ ...@@ -33,5 +33,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) 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->dl_rrc_message_transfer = dl_rrc_message_transfer_direct; mac_rrc->dl_rrc_message_transfer = dl_rrc_message_transfer_direct;
} }
...@@ -19,9 +19,17 @@ ...@@ -19,9 +19,17 @@
* conmnc_digit_lengtht@openairinterface.org * conmnc_digit_lengtht@openairinterface.org
*/ */
#include <stdlib.h>
#include "mac_rrc_dl.h" #include "mac_rrc_dl.h"
#include "nr_rrc_defs.h" #include "nr_rrc_defs.h"
static void ue_context_setup_request_f1ap(const f1ap_ue_context_setup_t *req)
{
(void) req;
abort();
}
static void dl_rrc_message_transfer_f1ap(module_id_t module_id, const f1ap_dl_rrc_message_t *dl_rrc) 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 */ /* TODO call F1AP function directly? no real-time constraint here */
...@@ -40,5 +48,6 @@ static void dl_rrc_message_transfer_f1ap(module_id_t module_id, const f1ap_dl_rr ...@@ -40,5 +48,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) 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->dl_rrc_message_transfer = dl_rrc_message_transfer_f1ap; mac_rrc->dl_rrc_message_transfer = dl_rrc_message_transfer_f1ap;
} }
...@@ -481,6 +481,7 @@ typedef struct { ...@@ -481,6 +481,7 @@ typedef struct {
typedef struct nr_mac_rrc_dl_if_s { typedef struct nr_mac_rrc_dl_if_s {
/* TODO add other message types as necessary */ /* TODO add other message types as necessary */
ue_context_setup_request_func_t ue_context_setup_request;
dl_rrc_message_transfer_func_t dl_rrc_message_transfer; dl_rrc_message_transfer_func_t dl_rrc_message_transfer;
} nr_mac_rrc_dl_if_t; } 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