Commit 9bcd12b1 authored by Imad ALAWE's avatar Imad ALAWE Committed by Frédéric Leroy

openairinterface5g: Fix multi definition of UE/eNB NB_MAX

In openairinterface5g many definitions in many layers of UE or eNB NB_MAX.
We created a file called openairinterface5g_limits.h
located at openairinterface5g_dir/targets/COMMON/ declaring the number max
of UE and eNB to be used in ALL layers depending on launching conditions
(LARGE_SCALE for example).
parent 006654f8
......@@ -452,6 +452,7 @@ set(esm_SRC
)
set(esm_HDR
${OPENAIR_TARGETS}/COMMON/openairinterface5g_limits.h
${OPENAIR_NAS_DIR}/UE/ESM/esm_main.h
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextAccept.h
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextReject.h
......@@ -491,6 +492,7 @@ target_include_directories(esm PRIVATE
${OPENAIR_NAS_DIR}/UE
${OPENAIR_NAS_DIR}/UE/API/USER
${OPENAIR_NAS_DIR}/UE/ESM
${OPENAIR_TARGETS}/COMMON
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG
${OPENAIR_NAS_DIR}/UE/ESM/SAP
${OPENAIR_NAS_DIR}/COMMON/IES
......@@ -673,6 +675,7 @@ target_include_directories(ies PRIVATE
# EXECUTABLE at_nas_ue
################################################################################
include_directories(
${OPENAIR_TARGETS}/COMMON
${OPENAIR_NAS_DIR}/UE
${OPENAIR_DIR}/common/utils
${OPENAIR_DIR}/common/utils/msc
......
......@@ -284,21 +284,7 @@ typedef enum {
#define NUMBER_OF_HARQ_PID_MAX 8
#define MAX_FRAME_NUMBER 0x400
#if defined(CBMIMO1) || defined(EXMIMO) || defined(OAI_USRP)
#define NUMBER_OF_eNB_MAX 1
#define NUMBER_OF_UE_MAX 16
#define NUMBER_OF_CONNECTED_eNB_MAX 3
#else
#ifdef LARGE_SCALE
#define NUMBER_OF_eNB_MAX 2
#define NUMBER_OF_UE_MAX 120
#define NUMBER_OF_CONNECTED_eNB_MAX 1 // to save some memory
#else
#define NUMBER_OF_eNB_MAX 7
#define NUMBER_OF_UE_MAX 16
#define NUMBER_OF_CONNECTED_eNB_MAX 3
#endif
#endif
#include "openairinterface5g_limits.h"
#define NUMBER_OF_RN_MAX 3
typedef enum {no_relay=1,unicast_relay_type1,unicast_relay_type2, multicast_relay} relaying_type_t;
......
......@@ -19,6 +19,7 @@
* contact@openairinterface.org
*/
#include "openairinterface5g_limits.h"
#ifndef _UE_IP_CST
#define _UE_IP_CST
......@@ -51,7 +52,7 @@
#define UE_IP_NB_INSTANCES_MAX 8
#define UE_IP_NB_INSTANCES_MAX NUMBER_OF_UE_MAX
#endif
......
......@@ -31,13 +31,12 @@
#ifndef STRUCTURES_H
#define STRUCTURES_H
#include "openairinterface5g_limits.h"
#ifndef __PHY_IMPLEMENTATION_DEFS_H__
#define Maxneighbor 64
#define NUMBER_OF_UE_MAX 64
#define NUMBER_OF_eNB_MAX 3
#ifndef NB_ANTENNAS_RX
# define NB_ANTENNAS_RX 4
#endif
#define Maxneighbor NUMBER_OF_UE_MAX
#ifndef NB_ANTENNAS_RX
#define NB_ANTENNAS_RX 4
#endif
#endif
//
......
......@@ -33,12 +33,12 @@
#ifndef __OTG_DEFS_H__
# define __OTG_DEFS_H__
/* \brief To define the NUMBER_OF_eNB_MAX and NUMBER_OF_UE_MAX */
#if STANDALONE==1
# define NUMBER_OF_eNB_MAX 3
# define NUMBER_OF_UE_MAX 3
#include "openairinterface5g_limits.h"
#else
#include "PHY/impl_defs_top.h" /* \brief To define the NUMBER_OF_eNB_MAX and NUMBER_OF_UE_MAX */
// impl_defs_top.h includes openairinterface5g_limits.h
#include "PHY/impl_defs_top.h"
#endif
#include "otg_config.h"
......
......@@ -22,8 +22,7 @@
#ifndef NAS_UE_TASK_H_
#define NAS_UE_TASK_H_
// FIXME There is multiple definition of NUMBER_OF_UE_MAX
#include "defs.h"
#include "openairinterface5g_limits.h"
#include "user_defs.h"
// XXX simple array container for multiple users
......
#if defined(CBMIMO1) || defined(EXMIMO) || defined(OAI_USRP)
#define NUMBER_OF_eNB_MAX 1
#define NUMBER_OF_UE_MAX 16
#define NUMBER_OF_CONNECTED_eNB_MAX 3
#else
#define NUMBER_OF_eNB_MAX 7
#define NUMBER_OF_UE_MAX 20
#define NUMBER_OF_CONNECTED_eNB_MAX 3
#if STANDALONE==1
#define NUMBER_OF_eNB_MAX 3
#define NUMBER_OF_UE_MAX 3
#endif
#if LARGE_SCALE
#define NUMBER_OF_eNB_MAX 2
#define NUMBER_OF_UE_MAX 120
#define NUMBER_OF_CONNECTED_eNB_MAX 1 // to save some memory
#endif
#endif
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