replace a set of #define by a C bit array, remove duplicated extern global variable declaration

This commit is contained in:
Laurent THOMAS
2025-01-09 15:28:25 +01:00
committed by Robert Schmidt
parent f9bff3d6a0
commit e0ca70c36d
48 changed files with 135 additions and 284 deletions
+1 -14
View File
@@ -44,28 +44,17 @@
#define _GNU_SOURCE
#include <pthread.h>
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
#include "assertions.h"
#include "PHY/types.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/defs_eNB.h"
#include "SCHED/sched_eNB.h"
#include "PHY/LTE_TRANSPORT/transport_proto.h"
#include "nfapi/oai_integration/vendor_ext.h"
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
#include "radio/COMMON/common_lib.h"
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
#include "PHY/LTE_TRANSPORT/if4_tools.h"
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
@@ -102,8 +91,6 @@ struct timing_info_t {
// Fix per CC openair rf/if device update
extern int oai_exit;
extern int transmission_mode;
#include "executables/thread-common.h"
@@ -927,7 +914,7 @@ void init_eNB_proc(int inst) {
if (cpu_meas_enabled)
threadCreate(&proc->process_stats_thread, process_stats_thread, (void *)eNB, "opp stats", -1, sched_get_priority_min(SCHED_OAI));
if (!IS_SOFTMODEM_NOSTATS_BIT)
if (!IS_SOFTMODEM_NOSTATS)
threadCreate(&proc->L1_stats_thread, L1_stats_thread, (void *)eNB, "L1 stats", -1, sched_get_priority_min(SCHED_OAI));
}
-3
View File
@@ -45,8 +45,6 @@
#include <getopt.h>
#include <sys/sysinfo.h>
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
#include "assertions.h"
#include "PHY/defs_common.h"
#include "PHY/types.h"
@@ -78,7 +76,6 @@ static int DEFRUTPCORES[] = {2,4,6,8};
#define MBMS_EXPERIMENTAL
extern int oai_exit;
extern clock_source_t clock_source;
#include "executables/thread-common.h"
//extern PARALLEL_CONF_t get_thread_parallel_conf(void);
+2 -9
View File
@@ -33,9 +33,6 @@
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <sched.h>
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
#include "assertions.h"
#include "common/oai_version.h"
@@ -45,14 +42,9 @@
#include "common/ran_context.h"
#include "common/config/config_userapi.h"
#include "common/utils/load_module_shlib.h"
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
#include "radio/COMMON/common_lib.h"
#include "radio/ETHERNET/if_defs.h"
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
#include <openair1/PHY/phy_extern_ue.h>
#include "PHY/phy_vars.h"
@@ -297,7 +289,8 @@ void exit_function(const char *file, const char *function, const int line, const
static void get_options(configmodule_interface_t *cfg)
{
CONFIG_SETRTFLAG(CONFIG_NOEXITONHELP);
get_common_options(cfg, SOFTMODEM_ENB_BIT);
IS_SOFTMODEM_ENB = true;
get_common_options(cfg);
CONFIG_CLEARRTFLAG(CONFIG_NOEXITONHELP);
if ( !(CONFIG_ISFLAGSET(CONFIG_ABORT)) ) {
-4
View File
@@ -20,7 +20,6 @@
#include <sys/types.h>
#include <unistd.h>
#include "radio/COMMON/common_lib.h"
//#undef MALLOC
#include "assertions.h"
#include "PHY/types.h"
#include "PHY/defs_eNB.h"
@@ -121,9 +120,6 @@ extern uint64_t downlink_frequency[MAX_NUM_CCs][4];
extern int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
extern int rx_input_level_dBm;
extern int oai_exit;
extern openair0_config_t openair0_cfg[MAX_CARDS];
extern pthread_cond_t sync_cond;
extern pthread_mutex_t sync_mutex;
-3
View File
@@ -41,9 +41,6 @@
#include "PHY/MODULATION/modulation_UE.h"
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
#include "PHY/phy_extern_ue.h"
#include "LAYER2/MAC/mac_extern.h"
#include "LAYER2/MAC/mac_proto.h"
+2 -9
View File
@@ -33,9 +33,6 @@
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <sched.h>
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
#include "assertions.h"
#include "PHY/types.h"
@@ -46,14 +43,9 @@
#include "common/ran_context.h"
#include "common/config/config_userapi.h"
#include "common/utils/load_module_shlib.h"
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
#include "radio/COMMON/common_lib.h"
#include "radio/ETHERNET/if_defs.h"
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
#include "PHY/phy_vars_ue.h"
#include "PHY/LTE_TRANSPORT/transport_vars.h"
@@ -274,7 +266,8 @@ static void get_options(configmodule_interface_t *cfg)
CONFIG_SETRTFLAG(CONFIG_NOEXITONHELP);
/* unknown parameters on command line will be checked in main
after all init have been performed */
get_common_options(cfg, SOFTMODEM_4GUE_BIT);
IS_SOFTMODEM_4GUE = true;
get_common_options(cfg);
paramdef_t cmdline_uemodeparams[] =CMDLINE_UEMODEPARAMS_DESC;
paramdef_t cmdline_ueparams[] =CMDLINE_UEPARAMS_DESC;
config_process_cmdline(cfg, cmdline_uemodeparams, sizeofArray(cmdline_uemodeparams), NULL);
+2 -1
View File
@@ -119,7 +119,8 @@ void exit_function(const char *file, const char *function, const int line, const
static void get_options(configmodule_interface_t *cfg)
{
CONFIG_SETRTFLAG(CONFIG_NOEXITONHELP);
get_common_options(cfg, SOFTMODEM_ENB_BIT);
IS_SOFTMODEM_ENB = true;
get_common_options(cfg);
CONFIG_CLEARRTFLAG(CONFIG_NOEXITONHELP);
// RCConfig();
+3 -11
View File
@@ -33,8 +33,6 @@
#define _GNU_SOURCE
#include <pthread.h>
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
#include "assertions.h"
#include <common/utils/LOG/log.h>
#include <common/utils/system.h>
@@ -54,13 +52,7 @@
#include "LAYER2/NR_MAC_COMMON/nr_mac_extern.h"
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
#include "radio/COMMON/common_lib.h"
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
#include "PHY/LTE_TRANSPORT/if4_tools.h"
#include "PHY/phy_extern.h"
@@ -376,9 +368,9 @@ void init_gNB_Tpool(int inst) {
// this will be removed when the msgDataTx is not necessary anymore
gNB->msgDataTx = msgDataTx;
if ((!get_softmodem_params()->emulate_l1) && (!IS_SOFTMODEM_NOSTATS_BIT) && (NFAPI_MODE!=NFAPI_MODE_VNF) && (NFAPI_MODE != NFAPI_MODE_AERIAL))
threadCreate(&proc->L1_stats_thread,nrL1_stats_thread,(void*)gNB,"L1_stats",-1,OAI_PRIORITY_RT_LOW);
if ((!get_softmodem_params()->emulate_l1) && (!IS_SOFTMODEM_NOSTATS) && (NFAPI_MODE != NFAPI_MODE_VNF)
&& (NFAPI_MODE != NFAPI_MODE_AERIAL))
threadCreate(&proc->L1_stats_thread, nrL1_stats_thread, (void *)gNB, "L1_stats", -1, OAI_PRIORITY_RT_LOW);
}
void term_gNB_Tpool(int inst) {
-2
View File
@@ -29,8 +29,6 @@
#include <sys/sysinfo.h>
#include <math.h>
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
#include "common/utils/nr/nr_common.h"
#include "common/utils/assertions.h"
#include "common/utils/system.h"
-1
View File
@@ -25,7 +25,6 @@
#include <sys/sysinfo.h>
#include "radio/COMMON/common_lib.h"
#undef MALLOC
#include "assertions.h"
#include "PHY/types.h"
+2 -2
View File
@@ -82,7 +82,6 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "radio/COMMON/common_lib.h"
#include "s1ap_eNB.h"
#include "sctp_eNB_task.h"
#include "softmodem-bits.h"
#include "system.h"
#include "time_meas.h"
#include "utils.h"
@@ -350,7 +349,8 @@ static void get_options(configmodule_interface_t *cfg)
{
paramdef_t cmdline_params[] = CMDLINE_PARAMS_DESC_GNB ;
CONFIG_SETRTFLAG(CONFIG_NOEXITONHELP);
get_common_options(cfg, SOFTMODEM_GNB_BIT);
IS_SOFTMODEM_GNB = true;
get_common_options(cfg);
config_process_cmdline(cfg, cmdline_params, sizeofArray(cmdline_params), NULL);
CONFIG_CLEARRTFLAG(CONFIG_NOEXITONHELP);
}
+1 -1
View File
@@ -1133,7 +1133,7 @@ void init_NR_UE_threads(PHY_VARS_NR_UE *UE) {
char thread_name[16];
sprintf(thread_name, "UEthread_%d", UE->Mod_id);
threadCreate(&thread, UE_thread, (void *)UE, thread_name, -1, OAI_PRIORITY_RT_MAX);
if (!IS_SOFTMODEM_NOSTATS_BIT) {
if (!IS_SOFTMODEM_NOSTATS) {
pthread_t stat_pthread;
sprintf(thread_name, "L1_UE_stats_%d", UE->Mod_id);
threadCreate(&stat_pthread, nrL1_UE_stats_thread, UE, thread_name, -1, OAI_PRIORITY_RT_LOW);
+2 -2
View File
@@ -403,8 +403,8 @@ int main(int argc, char **argv)
// get options and fill parameters from configuration file
get_options(uniqCfg); // Command-line options specific for NRUE
get_common_options(uniqCfg, SOFTMODEM_5GUE_BIT);
IS_SOFTMODEM_5GUE = true;
get_common_options(uniqCfg);
CONFIG_CLEARRTFLAG(CONFIG_NOEXITONHELP);
softmodem_verify_mode(get_softmodem_params());
-6
View File
@@ -43,16 +43,11 @@
#include <getopt.h>
#include <sys/sysinfo.h>
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
#include "assertions.h"
#include "PHY/types.h"
#include "PHY/defs_common.h"
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
#include "radio/COMMON/common_lib.h"
#include "radio/ETHERNET/ethernet_lib.h"
@@ -79,7 +74,6 @@ const char rru_format_options[4][20] = {"OAI_IF5_only","OAI_IF4p5_only","OAI_IF5
const char rru_formats[3][20] = {"OAI_IF5","MBP_IF5","OAI_IF4p5"};
const char ru_if_formats[4][20] = {"LOCAL_RF","REMOTE_OAI_IF5","REMOTE_MBP_IF5","REMOTE_OAI_IF4p5"};
extern int oai_exit;
extern void wait_eNBs(void);
int send_tick(RU_t *ru)
-61
View File
@@ -1,61 +0,0 @@
/*
* 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
*/
#ifndef SOFTMODEM_BITS_H
#define SOFTMODEM_BITS_H
// clang-format off
#define BIT_0 (1 << 0)
#define BIT_1 (1 << 1)
#define BIT_2 (1 << 2)
#define BIT_10 (1 << 10)
#define BIT_12 (1 << 12)
#define BIT_13 (1 << 13)
#define BIT_15 (1 << 15)
#define BIT_16 (1 << 16)
#define BIT_17 (1 << 17)
#define BIT_18 (1 << 18)
#define BIT_20 (1 << 20)
#define BIT_21 (1 << 21)
#define BIT_22 (1 << 22)
#define BIT_23 (1 << 23)
#define BIT_24 (1 << 24)
#define BIT_25 (1 << 25)
#define SOFTMODEM_NOS1_BIT BIT_0
#define SOFTMODEM_NOKRNMOD_BIT BIT_1
#define SOFTMODEM_NONBIOT_BIT BIT_2
#define SOFTMODEM_RFSIM_BIT BIT_10
#define SOFTMODEM_SIML1_BIT BIT_12
#define SOFTMODEM_DLSIM_BIT BIT_13
#define SOFTMODEM_DOSCOPE_BIT BIT_15
#define SOFTMODEM_RECPLAY_BIT BIT_16
#define SOFTMODEM_TELNETCLT_BIT BIT_17
#define SOFTMODEM_RECRECORD_BIT BIT_18
#define SOFTMODEM_ENB_BIT BIT_20
#define SOFTMODEM_GNB_BIT BIT_21
#define SOFTMODEM_4GUE_BIT BIT_22
#define SOFTMODEM_5GUE_BIT BIT_23
#define SOFTMODEM_NOSTATS_BIT BIT_24
#define SOFTMODEM_IMSCOPE_BIT BIT_25
// clang-format on
#endif // SOFTMODEM_BITS_H
+20 -43
View File
@@ -41,55 +41,33 @@
#include "softmodem-common.h"
#include "nfapi/oai_integration/vendor_ext.h"
static softmodem_params_t softmodem_params;
char *parallel_config=NULL;
char *worker_config=NULL;
int usrp_tx_thread = 0;
uint8_t nfapi_mode=0;
static mapping softmodem_funcs[] = MAPPING_SOFTMODEM_FUNCTIONS;
static struct timespec start;
uint64_t get_softmodem_optmask(void) {
return softmodem_params.optmask;
}
uint64_t set_softmodem_optmask(uint64_t bitmask) {
softmodem_params.optmask = softmodem_params.optmask | bitmask;
return softmodem_params.optmask;
}
uint64_t clear_softmodem_optmask(uint64_t bitmask)
{
softmodem_params.optmask = softmodem_params.optmask & (~bitmask);
return softmodem_params.optmask;
}
static softmodem_params_t softmodem_params;
softmodem_params_t *get_softmodem_params(void) {
return &softmodem_params;
}
int32_t check_execmask(uint64_t execmask) {
char *softmodemfunc=map_int_to_str(softmodem_funcs, execmask);
if (softmodemfunc != NULL) {
set_softmodem_optmask(execmask);
return 0;
}
return -1;
}
char *get_softmodem_function(uint64_t *sofmodemfunc_mask_ptr) {
uint64_t fmask=(get_softmodem_optmask()&SOFTMODEM_FUNC_BITS);
char *softmodemfunc=map_int_to_str(softmodem_funcs, fmask);
if (sofmodemfunc_mask_ptr != NULL)
*sofmodemfunc_mask_ptr=fmask;
if (softmodemfunc != NULL) {
return softmodemfunc;
}
char *get_softmodem_function(void)
{
optmask_t fmask = *get_softmodem_optmask();
if (fmask.bit.SOFTMODEM_ENB_BIT)
return "enb";
if (fmask.bit.SOFTMODEM_GNB_BIT)
return "gnb";
if (fmask.bit.SOFTMODEM_4GUE_BIT)
return "4Gue";
if (fmask.bit.SOFTMODEM_5GUE_BIT)
return "5Gue";
return "???";
}
void get_common_options(configmodule_interface_t *cfg, uint32_t execmask)
void get_common_options(configmodule_interface_t *cfg)
{
int32_t stats_disabled = 0;
uint32_t online_log_messages=0;
@@ -101,7 +79,6 @@ void get_common_options(configmodule_interface_t *cfg, uint32_t execmask)
uint32_t enable_imscope = 0;
int nfapi_index = 0;
char *logmem_filename = NULL;
check_execmask(execmask);
paramdef_t cmdline_params[] = CMDLINE_PARAMS_DESC;
checkedparam_t cmdline_CheckParams[] = CMDLINE_PARAMS_CHECK_DESC;
@@ -136,7 +113,7 @@ void get_common_options(configmodule_interface_t *cfg, uint32_t execmask)
}
if (start_telnetclt) {
set_softmodem_optmask(SOFTMODEM_TELNETCLT_BIT);
IS_SOFTMODEM_TELNETCLT = true;
}
if (logmem_filename != NULL && strlen(logmem_filename) > 0) {
@@ -145,23 +122,23 @@ void get_common_options(configmodule_interface_t *cfg, uint32_t execmask)
}
if (noS1) {
set_softmodem_optmask(SOFTMODEM_NOS1_BIT);
IS_SOFTMODEM_NOS1 = true;
}
if (nonbiot) {
set_softmodem_optmask(SOFTMODEM_NONBIOT_BIT);
IS_SOFTMODEM_NONBIOT = true;
}
if (rfsim) {
set_softmodem_optmask(SOFTMODEM_RFSIM_BIT);
IS_SOFTMODEM_RFSIM = true;
}
if (do_forms) {
set_softmodem_optmask(SOFTMODEM_DOSCOPE_BIT);
IS_SOFTMODEM_DOSCOPE = true;
}
if (enable_imscope) {
set_softmodem_optmask(SOFTMODEM_IMSCOPE_BIT);
IS_SOFTMODEM_IMSCOPE_ENABLED = true;
}
if (start_websrv) {
@@ -173,7 +150,7 @@ void get_common_options(configmodule_interface_t *cfg, uint32_t execmask)
if(worker_config != NULL) set_worker_conf(worker_config);
nfapi_setmode(nfapi_mode);
if (stats_disabled)
set_softmodem_optmask(SOFTMODEM_NOSTATS_BIT);
IS_SOFTMODEM_NOSTATS = true;
}
void softmodem_verify_mode(const softmodem_params_t *p)
+42 -28
View File
@@ -32,7 +32,6 @@
#ifndef SOFTMODEM_COMMON_H
#define SOFTMODEM_COMMON_H
#include "openair1/PHY/defs_common.h"
#include "softmodem-bits.h"
#ifdef __cplusplus
extern "C"
{
@@ -268,28 +267,46 @@ extern int usrp_tx_thread;
/***************************************************************************************************************************************/
#define SOFTMODEM_FUNC_BITS (SOFTMODEM_ENB_BIT | SOFTMODEM_GNB_BIT | SOFTMODEM_5GUE_BIT | SOFTMODEM_4GUE_BIT)
#define MAPPING_SOFTMODEM_FUNCTIONS {{"enb",SOFTMODEM_ENB_BIT},{"gnb",SOFTMODEM_GNB_BIT},{"4Gue",SOFTMODEM_4GUE_BIT},{"5Gue",SOFTMODEM_5GUE_BIT}}
#define IS_SOFTMODEM_NOS1 ( get_softmodem_optmask() & SOFTMODEM_NOS1_BIT)
#define IS_SOFTMODEM_NONBIOT ( get_softmodem_optmask() & SOFTMODEM_NONBIOT_BIT)
#define IS_SOFTMODEM_RFSIM ( get_softmodem_optmask() & SOFTMODEM_RFSIM_BIT)
#define IS_SOFTMODEM_SIML1 ( get_softmodem_optmask() & SOFTMODEM_SIML1_BIT)
#define IS_SOFTMODEM_DLSIM ( get_softmodem_optmask() & SOFTMODEM_DLSIM_BIT)
#define IS_SOFTMODEM_DOSCOPE ( get_softmodem_optmask() & SOFTMODEM_DOSCOPE_BIT)
#define IS_SOFTMODEM_IQPLAYER ( get_softmodem_optmask() & SOFTMODEM_RECPLAY_BIT)
#define IS_SOFTMODEM_IQRECORDER ( get_softmodem_optmask() & SOFTMODEM_RECRECORD_BIT)
#define IS_SOFTMODEM_TELNETCLT_BIT ( get_softmodem_optmask() & SOFTMODEM_TELNETCLT_BIT)
#define IS_SOFTMODEM_ENB_BIT ( get_softmodem_optmask() & SOFTMODEM_ENB_BIT)
#define IS_SOFTMODEM_GNB_BIT ( get_softmodem_optmask() & SOFTMODEM_GNB_BIT)
#define IS_SOFTMODEM_4GUE_BIT ( get_softmodem_optmask() & SOFTMODEM_4GUE_BIT)
#define IS_SOFTMODEM_5GUE_BIT ( get_softmodem_optmask() & SOFTMODEM_5GUE_BIT)
#define IS_SOFTMODEM_NOSTATS_BIT ( get_softmodem_optmask() & SOFTMODEM_NOSTATS_BIT)
#define IS_SOFTMODEM_IMSCOPE_ENABLED ( get_softmodem_optmask() & SOFTMODEM_IMSCOPE_BIT)
#define IS_SOFTMODEM_NOS1 (get_softmodem_optmask()->bit.SOFTMODEM_NOS1_BIT)
#define IS_SOFTMODEM_NONBIOT (get_softmodem_optmask()->bit.SOFTMODEM_NONBIOT_BIT)
#define IS_SOFTMODEM_RFSIM (get_softmodem_optmask()->bit.SOFTMODEM_RFSIM_BIT)
#define IS_SOFTMODEM_SIML1 (get_softmodem_optmask()->bit.SOFTMODEM_SIML1_BIT)
#define IS_SOFTMODEM_DLSIM (get_softmodem_optmask()->bit.SOFTMODEM_DLSIM_BIT)
#define IS_SOFTMODEM_DOSCOPE (get_softmodem_optmask()->bit.SOFTMODEM_DOSCOPE_BIT)
#define IS_SOFTMODEM_IQPLAYER (get_softmodem_optmask()->bit.SOFTMODEM_RECPLAY_BIT)
#define IS_SOFTMODEM_IQRECORDER (get_softmodem_optmask()->bit.SOFTMODEM_RECRECORD_BIT)
#define IS_SOFTMODEM_TELNETCLT (get_softmodem_optmask()->bit.SOFTMODEM_TELNETCLT_BIT)
#define IS_SOFTMODEM_ENB (get_softmodem_optmask()->bit.SOFTMODEM_ENB_BIT)
#define IS_SOFTMODEM_GNB (get_softmodem_optmask()->bit.SOFTMODEM_GNB_BIT)
#define IS_SOFTMODEM_4GUE (get_softmodem_optmask()->bit.SOFTMODEM_4GUE_BIT)
#define IS_SOFTMODEM_5GUE (get_softmodem_optmask()->bit.SOFTMODEM_5GUE_BIT)
#define IS_SOFTMODEM_NOSTATS (get_softmodem_optmask()->bit.SOFTMODEM_NOSTATS_BIT)
#define IS_SOFTMODEM_IMSCOPE_ENABLED (get_softmodem_optmask()->bit.SOFTMODEM_IMSCOPE_BIT)
typedef struct optmask_s {
union {
struct {
uint64_t SOFTMODEM_NOS1_BIT: 1;
uint64_t SOFTMODEM_NOKRNMOD_BIT: 1;
uint64_t SOFTMODEM_NONBIOT_BIT: 1;
uint64_t SOFTMODEM_RFSIM_BIT: 1;
uint64_t SOFTMODEM_SIML1_BIT: 1;
uint64_t SOFTMODEM_DLSIM_BIT: 1;
uint64_t SOFTMODEM_DOSCOPE_BIT: 1;
uint64_t SOFTMODEM_RECPLAY_BIT: 1;
uint64_t SOFTMODEM_TELNETCLT_BIT: 1;
uint64_t SOFTMODEM_RECRECORD_BIT: 1;
uint64_t SOFTMODEM_ENB_BIT: 1;
uint64_t SOFTMODEM_GNB_BIT: 1;
uint64_t SOFTMODEM_4GUE_BIT: 1;
uint64_t SOFTMODEM_5GUE_BIT: 1;
uint64_t SOFTMODEM_NOSTATS_BIT: 1;
uint64_t SOFTMODEM_IMSCOPE_BIT: 1;
} bit;
uint64_t v; // allow to export entire bit set, force to 64 bit processor atomic size
};
} optmask_t;
typedef struct {
uint64_t optmask;
optmask_t optmask;
//THREAD_STRUCT thread_struct;
char *rf_config_file;
char *threadPoolConfig;
@@ -323,12 +340,10 @@ typedef struct {
#define IS_SA_MODE(sM_params) (!(sM_params)->phy_test && !(sM_params)->do_ra && !(sM_params)->nsa)
void softmodem_verify_mode(const softmodem_params_t *p);
uint64_t get_softmodem_optmask(void);
uint64_t set_softmodem_optmask(uint64_t bitmask);
uint64_t clear_softmodem_optmask(uint64_t bitmask);
#define get_softmodem_optmask() (&(get_softmodem_params()->optmask))
softmodem_params_t *get_softmodem_params(void);
void get_common_options(configmodule_interface_t *cfg, uint32_t execmask);
char *get_softmodem_function(uint64_t *sofmodemfunc_mask_ptr);
void get_common_options(configmodule_interface_t *cfg);
char *get_softmodem_function(void);
#define SOFTMODEM_RTSIGNAL (SIGRTMIN+1)
void set_softmodem_sighandler(void);
extern uint64_t downlink_frequency[MAX_NUM_CCs][4];
@@ -336,7 +351,6 @@ extern int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
extern int usrp_tx_thread;
extern uint16_t sl_ahead;
extern uint16_t sf_ahead;
extern int oai_exit;
void ru_tx_func(void *param);
void configure_ru(void *, void *arg);