Merge remote-tracking branch 'origin/develop' into RU-RAU-split-parallel-EMUFH-phy-test-merge
Conflicts: cmake_targets/build_oai common/utils/itti/intertask_interface.c openair1/PHY/INIT/lte_init.c openair1/PHY/LTE_TRANSPORT/dci.c openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c openair1/PHY/defs.h openair1/SCHED/phy_procedures_lte_eNb.c openair2/ENB_APP/enb_paramdef.h openair2/LAYER2/MAC/defs.h openair2/LAYER2/MAC/eNB_scheduler.c targets/ARCH/COMMON/common_lib.c targets/COMMON/create_tasks.c targets/RT/USER/lte-enb.c targets/RT/USER/lte-ru.c targets/RT/USER/lte-softmodem.h
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
* 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.0 (the "License"); you may not use this file
|
||||
* 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
|
||||
*
|
||||
@@ -36,6 +36,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "common_lib.h"
|
||||
#include "common/utils/load_module_shlib.h"
|
||||
|
||||
int set_device(openair0_device *device) {
|
||||
|
||||
@@ -85,52 +86,26 @@ int set_transport(openair0_device *device) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
typedef int(*devfunc_t)(openair0_device *, openair0_config_t *, eth_params_t *);
|
||||
/* look for the interface library and load it */
|
||||
int load_lib(openair0_device *device, openair0_config_t *openair0_cfg, eth_params_t * cfg, uint8_t flag) {
|
||||
|
||||
void *lib_handle;
|
||||
oai_device_initfunc_t dp ;
|
||||
oai_transport_initfunc_t tp ;
|
||||
loader_shlibfunc_t shlib_fdesc[1];
|
||||
int ret=0;
|
||||
|
||||
char *libname;
|
||||
if (flag == RAU_LOCAL_RADIO_HEAD) {
|
||||
lib_handle = dlopen(OAI_RF_LIBNAME, RTLD_LAZY);
|
||||
if (!lib_handle) {
|
||||
fprintf(stderr,"Unable to locate %s: HW device set to NONE_DEV.\n", OAI_RF_LIBNAME);
|
||||
fprintf(stderr,"%s\n",dlerror());
|
||||
return -1;
|
||||
}
|
||||
|
||||
dp = dlsym(lib_handle,"device_init");
|
||||
|
||||
if (dp != NULL ) {
|
||||
ret = dp(device,openair0_cfg);
|
||||
if (ret<0) {
|
||||
fprintf(stderr, "%s %d:oai device intialization failed %s\n", __FILE__, __LINE__, dlerror());
|
||||
}
|
||||
} else {
|
||||
fprintf(stderr, "%s %d:oai device intializing function not found %s\n", __FILE__, __LINE__, dlerror());
|
||||
return -1;
|
||||
}
|
||||
libname=OAI_RF_LIBNAME;
|
||||
shlib_fdesc[0].fname="device_init";
|
||||
} else {
|
||||
lib_handle = dlopen(OAI_TP_LIBNAME, RTLD_LAZY);
|
||||
if (!lib_handle) {
|
||||
printf( "Unable to locate %s: transport protocol set to NONE_TP.\n", OAI_TP_LIBNAME);
|
||||
printf( "%s\n",dlerror());
|
||||
return -1;
|
||||
}
|
||||
|
||||
tp = dlsym(lib_handle,"transport_init");
|
||||
|
||||
if (tp != NULL ) {
|
||||
tp(device,openair0_cfg,cfg);
|
||||
} else {
|
||||
fprintf(stderr, "%s %d:oai device intializing function not found %s\n", __FILE__, __LINE__, dlerror());
|
||||
return -1;
|
||||
}
|
||||
libname=OAI_TP_LIBNAME;
|
||||
shlib_fdesc[0].fname="transport_init";
|
||||
}
|
||||
|
||||
ret=load_module_shlib(libname,shlib_fdesc,1);
|
||||
if (ret < 0) {
|
||||
fprintf(stderr,"Library %s couldn't be loaded\n",libname);
|
||||
} else {
|
||||
ret=((devfunc_t)shlib_fdesc[0].fptr)(device,openair0_cfg,cfg);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* 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.0 (the "License"); you may not use this file
|
||||
* 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
|
||||
*
|
||||
@@ -36,9 +36,9 @@
|
||||
#include <sys/types.h>
|
||||
|
||||
/* name of shared library implementing the radio front end */
|
||||
#define OAI_RF_LIBNAME "liboai_device.so"
|
||||
#define OAI_RF_LIBNAME "oai_device"
|
||||
/* name of shared library implementing the transport */
|
||||
#define OAI_TP_LIBNAME "liboai_transpro.so"
|
||||
#define OAI_TP_LIBNAME "oai_transpro"
|
||||
|
||||
/* flags for BBU to determine whether the attached radio head is local or remote */
|
||||
#define RAU_LOCAL_RADIO_HEAD 0
|
||||
@@ -207,6 +207,15 @@ typedef struct {
|
||||
int iq_rxrescale;
|
||||
//! Configuration file for LMS7002M
|
||||
char *configFilename;
|
||||
#if defined(USRP_REC_PLAY)
|
||||
unsigned short sf_mode; // 1=record, 2=replay
|
||||
char sf_filename[1024]; // subframes file path
|
||||
unsigned int sf_max; // max number of recorded subframes
|
||||
unsigned int sf_loops; // number of loops in replay mode
|
||||
unsigned int sf_read_delay; // read delay in replay mode
|
||||
unsigned int sf_write_delay; // write delay in replay mode
|
||||
unsigned int eth_mtu; // ethernet MTU
|
||||
#endif
|
||||
} openair0_config_t;
|
||||
|
||||
/*! \brief RF mapping */
|
||||
|
||||
Reference in New Issue
Block a user