Commit 8f3adc8b authored by heshanyun's avatar heshanyun

fix gNB build error

parent 85fe26bd
......@@ -16,3 +16,4 @@
#include "openair2/COMMON/gtpv1_u_messages_def.h"
#include "openair2/COMMON/flexran_messages_def.h"
#include "openair2/COMMON/f1ap_messages_def.h"
#include "openair2/COMMON/ngap_messages_def.h"
......@@ -230,6 +230,7 @@ typedef struct IttiMsgText_s {
#include <openair2/COMMON/sctp_messages_types.h>
#include <openair2/COMMON/udp_messages_types.h>
#include <openair2/COMMON/gtpv1_u_messages_types.h>
#include <openair2/COMMON/ngap_messages_types.h>
#include <openair3/SCTP/sctp_eNB_task.h>
#include <openair3/NAS/UE/nas_proc_defs.h>
#include <openair3/NAS/UE/ESM/esmData.h>
......
......@@ -83,6 +83,7 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "executables/thread-common.h"
#include "NB_IoT_interface.h"
#include "x2ap_eNB.h"
#include "ngap_gNB.h"
pthread_cond_t nfapi_sync_cond;
pthread_mutex_t nfapi_sync_mutex;
......@@ -408,10 +409,12 @@ int create_gNB_tasks(uint32_t gnb_nb) {
return -1;
}
*/
/*
if (itti_create_task (TASK_NGAP, ngap_gNB_task, NULL) < 0) {
LOG_E(S1AP, "Create task for NGAP failed\n");
return -1;
}
*/
if(!emulate_rf){
......
This diff is collapsed.
......@@ -39,7 +39,7 @@
#include "x2ap_eNB.h"
#include "intertask_interface.h"
#include "s1ap_eNB.h"
#include "ngap_gNB.h"
#include "sctp_eNB_task.h"
#include "gtpv1u_eNB_task.h"
#include "PHY/INIT/phy_init.h"
......@@ -83,14 +83,14 @@ static uint32_t gNB_app_register(uint32_t gnb_id_start, uint32_t gnb_id_end)//,
ngap_register_gnb_req_t *ngap_register_gNB; //Type Temporarily reuse
// note: there is an implicit relationship between the data structure and the message name
*msg_p = itti_alloc_new_message (TASK_GNB_APP, NGAP_REGISTER_GNB_REQ); //Message Temporarily reuse
msg_p = itti_alloc_new_message (TASK_GNB_APP, NGAP_REGISTER_GNB_REQ); //Message Temporarily reuse
RCconfig_NR_NG(msg_p, gnb_id);
if (gnb_id == 0) RCconfig_nr_gtpu();
ngap_register_gNB = &NGAP_REGISTER_GNB_REQ(msg_p); //Message Temporarily reuse
LOG_I(GNB_APP,"default drx %d\n",ngap_register_gNB->default_drx);*/
LOG_I(GNB_APP,"default drx %d\n",ngap_register_gNB->default_drx);
LOG_I(GNB_APP,"[gNB %d] gNB_app_register for instance %d\n", gnb_id, GNB_MODULE_ID_TO_INSTANCE(gnb_id));
......
......@@ -37,6 +37,7 @@
#include "UTIL/OTG/otg.h"
#include "UTIL/OTG/otg_externs.h"
#include "intertask_interface.h"
#include "s1ap_eNB.h"
#include "ngap_gNB.h"
#include "sctp_eNB_task.h"
#include "sctp_default_values.h"
......@@ -342,7 +343,7 @@ void RCconfig_nr_flexran()
if (!GNBParamList.paramarray[i][GNB_GNB_ID_IDX].uptr) {
// Calculate a default gNB ID
if (EPC_MODE_ENABLED)
gnb_id = i + (ngap_generate_gNB_id () & 0xFFFF8);
gnb_id = i + (s1ap_generate_eNB_id () & 0xFFFF8);
else
gnb_id = i;
} else {
......@@ -569,7 +570,7 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
// Calculate a default gNB ID
if (EPC_MODE_ENABLED) {
uint32_t hash;
hash = ngap_generate_gNB_id ();
hash = s1ap_generate_eNB_id ();
gnb_id = i + (hash & 0xFFFF8);
} else {
gnb_id = i;
......@@ -786,7 +787,7 @@ int RCconfig_NR_NG(MessageDef *msg_p, uint32_t i) {
if (EPC_MODE_ENABLED) {
uint32_t hash;
hash = ngap_generate_gNB_id ();
hash = s1ap_generate_eNB_id ();
gnb_id = k + (hash & 0xFFFF8);
} else {
gnb_id = k;
......@@ -1035,7 +1036,7 @@ int RCconfig_NR_X2(MessageDef *msg_p, uint32_t i) {
// Calculate a default eNB ID
if (EPC_MODE_ENABLED) {
uint32_t hash;
hash = ngap_generate_gNB_id ();
hash = s1ap_generate_eNB_id ();
gnb_id = k + (hash & 0xFFFF8);
} else {
gnb_id = k;
......
......@@ -39,6 +39,7 @@
#include "platform_constants.h"
#include "PHY/defs_eNB.h"
#include "s1ap_messages_types.h"
#include "ngap_messages_types.h"
#ifdef CMAKER
#include "rrc_messages_types.h"
......
......@@ -39,6 +39,7 @@
#include "udp_messages_types.h"
#include "mme_app_messages_types.h"
#include "m2ap_messages_types.h"
#include "ngap_messages_types.h"
#endif /* MESSAGES_TYPES_H_ */
......@@ -64,7 +64,6 @@
#include "oaisim_amf_test_s1c.h"
#endif
ngap_gNB_config_t ngap_config;
static int ngap_gNB_generate_ng_setup_request(
ngap_gNB_instance_t *instance_p, ngap_gNB_amf_data_t *ngap_amf_data_p);
......
......@@ -30,15 +30,6 @@
#ifndef NGAP_GNB_H_
#define NGAP_GNB_H_
typedef struct ngap_gNB_config_s {
// AMF related params
unsigned char amf_enabled; ///< AMF enabled ?
} ngap_gNB_config_t;
extern ngap_gNB_config_t ngap_config;
#define EPC_MODE_ENABLED ngap_config.amf_enabled
void *ngap_gNB_process_itti_msg(void*);
void ngap_gNB_init(void);
void *ngap_gNB_task(void *arg);
......
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