Merge remote-tracking branch 'origin/update-e2-agent' into integration_2024_w03
This commit is contained in:
@@ -2931,35 +2931,3 @@ void read_config_and_init(void) {
|
||||
RCconfig_RRC(enb_id, RC.rrc[enb_id]);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef E2_AGENT
|
||||
|
||||
e2_agent_args_t RCconfig_E2agent(void)
|
||||
{
|
||||
paramdef_t e2agent_params[] = E2AGENT_PARAMS_DESC;
|
||||
int ret = config_get(config_get_if(), e2agent_params, sizeofArray(e2agent_params), CONFIG_STRING_E2AGENT);
|
||||
if (ret < 0) {
|
||||
LOG_W(GNB_APP, "configuration file does not contain a \"%s\" section, applying default parameters\n", CONFIG_STRING_E2AGENT);
|
||||
return (e2_agent_args_t) {0};
|
||||
}
|
||||
|
||||
bool enabled = config_isparamset(e2agent_params, E2AGENT_CONFIG_SMDIR_IDX)
|
||||
&& config_isparamset(e2agent_params, E2AGENT_CONFIG_IP_IDX);
|
||||
if (!enabled) {
|
||||
LOG_W(GNB_APP, "E2 agent is DISABLED (for activation, define .%s.{%s,%s} parameters)\n", CONFIG_STRING_E2AGENT, E2AGENT_CONFIG_IP, E2AGENT_CONFIG_SMDIR);
|
||||
return (e2_agent_args_t) {
|
||||
.enabled = false,
|
||||
};
|
||||
}
|
||||
|
||||
return (e2_agent_args_t) {
|
||||
.enabled = true,
|
||||
.ip = *e2agent_params[E2AGENT_CONFIG_IP_IDX].strptr,
|
||||
.sm_dir = *e2agent_params[E2AGENT_CONFIG_SMDIR_IDX].strptr,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -1321,32 +1321,7 @@ typedef struct srb1_params_s {
|
||||
#define CONFIG_HLP_PARALLEL "PARALLEL_SINGLE_THREAD, PARALLEL_RU_L1_SPLIT, or PARALLEL_RU_L1_TRX_SPLIT(RU_L1_TRX_SPLIT by defult)\n"
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef E2_AGENT
|
||||
|
||||
/* E2 Agent configuration */
|
||||
#define CONFIG_STRING_E2AGENT "e2_agent"
|
||||
|
||||
#define E2AGENT_CONFIG_IP "near_ric_ip_addr"
|
||||
//#define E2AGENT_CONFIG_PORT "port"
|
||||
#define E2AGENT_CONFIG_SMDIR "sm_dir"
|
||||
|
||||
static const char* const e2agent_config_ip_default = "127.0.0.1";
|
||||
static const char* const e2agent_config_smdir_default = ".";
|
||||
|
||||
#define E2AGENT_PARAMS_DESC { \
|
||||
{E2AGENT_CONFIG_IP, "RIC IP address", 0, strptr:NULL, defstrval:(char*)e2agent_config_ip_default, TYPE_STRING, 0}, \
|
||||
{E2AGENT_CONFIG_SMDIR, "Directory with SMs to load", 0, strptr:NULL, defstrval:(char*)e2agent_config_smdir_default, TYPE_STRING, 0}, \
|
||||
}
|
||||
/*
|
||||
// {E2AGENT_CONFIG_PORT, "RIC port", 0, u16ptr:NULL, defuintval:e2agent_config_port_default, TYPE_UINT16, 0}, \
|
||||
}
|
||||
*/
|
||||
|
||||
#define E2AGENT_CONFIG_IP_IDX 0
|
||||
#define E2AGENT_CONFIG_SMDIR_IDX 1
|
||||
//#define E2AGENT_CONFIG_PORT_IDX 2
|
||||
|
||||
#endif // E2_AGENT
|
||||
|
||||
|
||||
#include "enb_paramdef_emtc.h"
|
||||
|
||||
Reference in New Issue
Block a user