Normalization of the file names for CU and DU
This commit is contained in:
@@ -32,10 +32,10 @@
|
||||
|
||||
#include "conversions.h"
|
||||
#include "f1ap_common.h"
|
||||
#include "cu_f1ap_defs.h"
|
||||
#include "f1ap_cu_defs.h"
|
||||
#include "f1ap_encoder.h"
|
||||
#include "f1ap_decoder.h"
|
||||
#include "cu_f1ap_task.h"
|
||||
#include "f1ap_cu_task.h"
|
||||
#include "platform_types.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "intertask_interface.h"
|
||||
@@ -148,18 +148,21 @@ void *F1AP_CU_task(void *arg) {
|
||||
|
||||
case SCTP_NEW_ASSOCIATION_IND:
|
||||
LOG_I(CU_F1AP, "SCTP_NEW_ASSOCIATION_IND\n");
|
||||
LOG_I(DU_F1AP, "--------------3--------------\n");
|
||||
CU_handle_sctp_association_ind(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
&received_msg->ittiMsg.sctp_new_association_ind);
|
||||
break;
|
||||
|
||||
case SCTP_NEW_ASSOCIATION_RESP:
|
||||
LOG_I(CU_F1AP, "SCTP_NEW_ASSOCIATION_RESP\n");
|
||||
LOG_I(DU_F1AP, "--------------4--------------\n");
|
||||
CU_handle_sctp_association_resp(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
&received_msg->ittiMsg.sctp_new_association_resp);
|
||||
break;
|
||||
|
||||
case SCTP_DATA_IND:
|
||||
LOG_I(CU_F1AP, "SCTP_DATA_IND\n");
|
||||
LOG_I(DU_F1AP, "--------------5--------------\n");
|
||||
CU_handle_sctp_data_ind(&received_msg->ittiMsg.sctp_data_ind);
|
||||
break;
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#include "f1ap_common.h"
|
||||
#include "f1ap_decoder.h"
|
||||
|
||||
static int f1ap_eNB_decode_initiating_message(F1AP_F1AP_PDU_t *pdu)
|
||||
static int f1ap_decode_initiating_message(F1AP_F1AP_PDU_t *pdu)
|
||||
{
|
||||
MessageDef *message_p;
|
||||
MessagesIds message_id;
|
||||
@@ -76,28 +76,17 @@ static int f1ap_eNB_decode_initiating_message(F1AP_F1AP_PDU_t *pdu)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int f1ap_eNB_decode_successful_outcome(F1AP_F1AP_PDU_t *pdu)
|
||||
static int f1ap_decode_successful_outcome(F1AP_F1AP_PDU_t *pdu)
|
||||
{
|
||||
MessageDef *message_p;
|
||||
MessagesIds message_id;
|
||||
asn_encode_to_new_buffer_result_t res = { NULL, {0, NULL, NULL} };
|
||||
DevAssert(pdu != NULL);
|
||||
|
||||
switch(pdu->choice.successfulOutcome->procedureCode) {
|
||||
// case F1AP_ProcedureCode_id_F1Setup:
|
||||
// res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_F1AP_F1AP_PDU, pdu);
|
||||
// message_id = F1AP_F1_SETUP_LOG;
|
||||
// message_p = itti_alloc_new_message_sized(TASK_F1AP, message_id, res.result.encoded + sizeof (IttiMsgText));
|
||||
// message_p->ittiMsg.f1ap_s1_setup_log.size = res.result.encoded;
|
||||
// memcpy(&message_p->ittiMsg.f1ap_s1_setup_log.text, res.buffer, res.result.encoded);
|
||||
// itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p);
|
||||
// free(res.buffer);
|
||||
// break;
|
||||
case F1AP_ProcedureCode_id_F1Setup:
|
||||
LOG_I(F1AP, "get F1AP_ProcedureCode_id_F1Setup\n");
|
||||
break;
|
||||
|
||||
default:
|
||||
// F1AP_ERROR("Unknown procedure ID (%d) for successfull outcome message\n",
|
||||
// (int)pdu->choice.successfulOutcome->procedureCode);
|
||||
printf("Unknown procedure ID (%d) for successfull outcome message\n",
|
||||
LOG_E(F1AP,"Unknown procedure ID (%d) for successfull outcome message\n",
|
||||
(int)pdu->choice.successfulOutcome->procedureCode);
|
||||
return -1;
|
||||
}
|
||||
@@ -105,28 +94,19 @@ static int f1ap_eNB_decode_successful_outcome(F1AP_F1AP_PDU_t *pdu)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int f1ap_eNB_decode_unsuccessful_outcome(F1AP_F1AP_PDU_t *pdu)
|
||||
static int f1ap_decode_unsuccessful_outcome(F1AP_F1AP_PDU_t *pdu)
|
||||
{
|
||||
MessageDef *message_p;
|
||||
MessagesIds message_id;
|
||||
asn_encode_to_new_buffer_result_t res = { NULL, {0, NULL, NULL} };
|
||||
DevAssert(pdu != NULL);
|
||||
|
||||
switch(pdu->choice.unsuccessfulOutcome->procedureCode) {
|
||||
// case F1AP_ProcedureCode_id_F1Setup:
|
||||
// res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_F1AP_F1AP_PDU, pdu);
|
||||
// message_id = F1AP_F1_SETUP_LOG;
|
||||
// message_p = itti_alloc_new_message_sized(TASK_F1AP, message_id, res.result.encoded + sizeof (IttiMsgText));
|
||||
// message_p->ittiMsg.f1ap_f1_setup_log.size = res.result.encoded;
|
||||
// memcpy(&message_p->ittiMsg.f1ap_f1_setup_log.text, res.buffer, res.result.encoded);
|
||||
// itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p);
|
||||
// free(res.buffer);
|
||||
// break;
|
||||
case F1AP_ProcedureCode_id_F1Setup:
|
||||
LOG_I(F1AP, "get F1AP_ProcedureCode_id_F1Setup\n");
|
||||
break;
|
||||
|
||||
default:
|
||||
// F1AP_ERROR("Unknown procedure ID (%d) for unsuccessfull outcome message\n",
|
||||
// (int)pdu->choice.unsuccessfulOutcome->procedureCode);
|
||||
printf("Unknown procedure ID (%d) for unsuccessfull outcome message\n",
|
||||
LOG_E(F1AP, "Unknown procedure ID (%d) for unsuccessfull outcome message\n",
|
||||
(int)pdu->choice.unsuccessfulOutcome->procedureCode);
|
||||
return -1;
|
||||
}
|
||||
@@ -148,27 +128,26 @@ int f1ap_decode_pdu(F1AP_F1AP_PDU_t *pdu, const uint8_t *const buffer, uint32_t
|
||||
0,
|
||||
0);
|
||||
|
||||
//xer_fprint(stdout, &asn_DEF_F1AP_F1AP_PDU, pdu_p);
|
||||
//xer_fprint(stdout, &asn_DEF_F1AP_F1AP_PDU, pdu);
|
||||
//LOG_I(F1AP, "f1ap_decode_pdu.dec_ret.code = %d\n", dec_ret.code);
|
||||
|
||||
if (dec_ret.code != RC_OK) {
|
||||
//F1AP_ERROR("Failed to decode pdu\n");
|
||||
printf("Failed to decode pdu\n");
|
||||
LOG_E(F1AP, "Failed to decode pdu\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
switch(pdu->present) {
|
||||
case F1AP_F1AP_PDU_PR_initiatingMessage:
|
||||
return f1ap_eNB_decode_initiating_message(pdu);
|
||||
return f1ap_decode_initiating_message(pdu);
|
||||
|
||||
case F1AP_F1AP_PDU_PR_successfulOutcome:
|
||||
return f1ap_eNB_decode_successful_outcome(pdu);
|
||||
return f1ap_decode_successful_outcome(pdu);
|
||||
|
||||
case F1AP_F1AP_PDU_PR_unsuccessfulOutcome:
|
||||
return f1ap_eNB_decode_unsuccessful_outcome(pdu);
|
||||
return f1ap_decode_unsuccessful_outcome(pdu);
|
||||
|
||||
default:
|
||||
//F1AP_DEBUG("Unknown presence (%d) or not implemented\n", (int)pdu->present);
|
||||
printf("Unknown presence (%d) or not implemented\n", (int)pdu->present);
|
||||
LOG_D(F1AP, "Unknown presence (%d) or not implemented\n", (int)pdu->present);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,10 +32,10 @@
|
||||
|
||||
#include "conversions.h"
|
||||
#include "f1ap_common.h"
|
||||
#include "du_f1ap_defs.h"
|
||||
#include "f1ap_du_defs.h"
|
||||
#include "f1ap_encoder.h"
|
||||
#include "f1ap_decoder.h"
|
||||
#include "du_f1ap_task.h"
|
||||
#include "f1ap_du_task.h"
|
||||
#include "platform_types.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "intertask_interface.h"
|
||||
@@ -130,6 +130,7 @@ void *F1AP_DU_task(void *arg) {
|
||||
// 2. store the message in f1ap context, that is also stored in RC
|
||||
// 2. send a sctp_association req
|
||||
LOG_I(DU_F1AP, "F1AP_SETUP_REQ\n");
|
||||
LOG_I(DU_F1AP, "--------------0--------------\n");
|
||||
DU_send_sctp_association_req(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
&F1AP_SETUP_REQ(received_msg));
|
||||
break;
|
||||
@@ -138,6 +139,7 @@ void *F1AP_DU_task(void *arg) {
|
||||
// 1. store the respon
|
||||
// 2. send the f1setup_req
|
||||
LOG_I(DU_F1AP, "SCTP_NEW_ASSOCIATION_RESP\n");
|
||||
LOG_I(DU_F1AP, "--------------1--------------\n");
|
||||
DU_handle_sctp_association_resp(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
&received_msg->ittiMsg.sctp_new_association_resp);
|
||||
break;
|
||||
@@ -145,6 +147,7 @@ void *F1AP_DU_task(void *arg) {
|
||||
case SCTP_DATA_IND:
|
||||
// ex: any F1 incoming message for DU ends here
|
||||
LOG_I(DU_F1AP, "SCTP_DATA_IND\n");
|
||||
LOG_I(DU_F1AP, "--------------2--------------\n");
|
||||
DU_handle_sctp_data_ind(&received_msg->ittiMsg.sctp_data_ind);
|
||||
break;
|
||||
|
||||
@@ -464,7 +467,7 @@ void DU_send_F1_SETUP_REQUEST(instance_t instance, sctp_new_association_resp_t *
|
||||
F1AP_GNB_DU_System_Information_t *gNB_DU_System_Information = (F1AP_GNB_DU_System_Information_t *)calloc(1, sizeof(F1AP_GNB_DU_System_Information_t));
|
||||
|
||||
OCTET_STRING_fromBuf(&gNB_DU_System_Information->mIB_message, // sept. 2018
|
||||
"1",
|
||||
"1",//f1ap_setup_req->mib,
|
||||
sizeof("1"));
|
||||
|
||||
OCTET_STRING_fromBuf(&gNB_DU_System_Information->sIB1_message, // sept. 2018
|
||||
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "queue.h"
|
||||
#include "tree.h"
|
||||
|
||||
#include "sctp_eNB_defs.h"
|
||||
|
||||
#ifndef DU_F1AP_DEFS_H_
|
||||
#define DU_F1AP_DEFS_H_
|
||||
|
||||
struct du_f1ap_instance_s;
|
||||
typedef struct du_f1ap_instance_s {
|
||||
/* Next f1ap du association.
|
||||
* Only used for virtual mode.
|
||||
*/
|
||||
|
||||
/* For virtual mode, mod_id as defined in the rest of the L1/L2 stack */
|
||||
instance_t instance;
|
||||
|
||||
// F1_Setup_Req payload
|
||||
uint32_t gNB_DU_id;
|
||||
char *gNB_DU_name;
|
||||
|
||||
/* Unique eNB_id to identify the eNB within EPC.
|
||||
* In our case the eNB is a macro eNB so the id will be 20 bits long.
|
||||
* For Home eNB id, this field should be 28 bits long.
|
||||
*/
|
||||
uint32_t eNB_id;
|
||||
|
||||
/* Tracking area code */
|
||||
uint16_t tac;
|
||||
|
||||
/* Mobile Country Code
|
||||
* Mobile Network Code
|
||||
*/
|
||||
uint16_t mcc;
|
||||
uint16_t mnc;
|
||||
uint8_t mnc_digit_length;
|
||||
|
||||
} du_f1ap_instance_t;
|
||||
|
||||
#endif /* DU_F1AP_DEFS_H_ */
|
||||
@@ -52,13 +52,17 @@ int f1ap_handle_f1_setup_request(uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
static
|
||||
int f1ap_handle_f1_setup_response(uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu);
|
||||
|
||||
/* Handlers matrix. Only f1 related procedure present here */
|
||||
f1ap_message_decoded_callback f1ap_messages_callback[][3] = {
|
||||
|
||||
|
||||
{ 0, 0, 0 }, /* Reset */
|
||||
{ f1ap_handle_f1_setup_request, 0, 0 }, /* F1Setup */
|
||||
{ f1ap_handle_f1_setup_request, f1ap_handle_f1_setup_response, 0 }, /* F1Setup */
|
||||
{ 0, 0, 0 }, /* ErrorIndication */
|
||||
{ f1ap_handle_f1_setup_request, 0, 0 }, /* gNBDUConfigurationUpdate */
|
||||
{ f1ap_handle_f1_setup_request, 0, 0 }, /* gNBCUConfigurationUpdate */
|
||||
@@ -151,3 +155,13 @@ int f1ap_handle_f1_setup_request(uint32_t assoc_id,
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static
|
||||
int f1ap_handle_f1_setup_response(uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu)
|
||||
{
|
||||
printf("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user