Commit 57876fc1 authored by Robert Schmidt's avatar Robert Schmidt

F1 setup request: message encoder takes struct

Instead of storing the F1 Setup Request implicitly in F1 context, we
provide the F1 Setup Request message to be encoded explicitly to the
encoding function.
parent 45a678cb
......@@ -81,7 +81,6 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu) {
LOG_D(F1AP, "CU_handle_F1_SETUP_REQUEST\n");
MessageDef *message_p;
F1AP_F1SetupRequest_t *container;
F1AP_F1SetupRequestIEs_t *ie;
int i = 0;
......@@ -94,9 +93,8 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance,
assoc_id, stream);
}
/* assoc_id */
f1ap_setup_req_t *req=&getCxt(true, instance)->setupReq;
req->assoc_id = assoc_id;
MessageDef *message_p = itti_alloc_new_message(TASK_CU_F1, 0, F1AP_SETUP_REQ);
f1ap_setup_req_t *req = &F1AP_SETUP_REQ(message_p);
/* gNB_DU_id */
// this function exits if the ie is mandatory
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_F1SetupRequestIEs_t, ie, container,
......@@ -246,12 +244,6 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance,
// } tdd;
// } nr_mode_info[F1AP_MAX_NB_CELLS];
// We copy and store in F1 task data, RRC will free "req" as it frees all itti received messages
message_p = itti_alloc_new_message(TASK_CU_F1, 0, F1AP_SETUP_REQ);
memcpy(&F1AP_SETUP_REQ(message_p), req, sizeof(f1ap_setup_req_t) );
if (req->num_cells_available > 0) {
itti_send_msg_to_task(TASK_RRC_GNB, GNB_MODULE_ID_TO_INSTANCE(instance), message_p);
} else {
......
......@@ -60,7 +60,7 @@ int DU_handle_ERROR_INDICATION(instance_t instance,
/*
* F1 Setup
*/
int DU_send_F1_SETUP_REQUEST(instance_t instance);
int DU_send_F1_SETUP_REQUEST(instance_t instance, f1ap_setup_req_t *setup_req);
int DU_handle_F1_SETUP_RESPONSE(instance_t instance,
uint32_t assoc_id,
......
......@@ -83,7 +83,7 @@ void du_task_handle_sctp_association_resp(instance_t instance, sctp_new_associat
f1ap_du_data->sctp_in_streams = sctp_new_association_resp->in_streams;
f1ap_du_data->sctp_out_streams = sctp_new_association_resp->out_streams;
/* setup parameters for F1U and start the server */
DU_send_F1_SETUP_REQUEST(instance);
DU_send_F1_SETUP_REQUEST(instance, f1ap_du_data);
}
void du_task_handle_sctp_data_ind(instance_t instance, sctp_data_ind_t *sctp_data_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