near_ric_ip_addr added. The config needs to be defined in OAI's config file
This commit is contained in:
@@ -697,14 +697,16 @@ int main( int argc, char **argv ) {
|
||||
//////////////////////////////////
|
||||
//////////////////////////////////
|
||||
//// Init the E2 Agent
|
||||
|
||||
|
||||
sm_io_ag_ran_t io = init_ran_func_ag();
|
||||
fr_args_t args = init_fr_args(0, NULL);
|
||||
|
||||
// OAI Wrapper
|
||||
e2_agent_args_t oai_args = RCconfig_NR_E2agent();
|
||||
if(oai_args.sm_dir != NULL)
|
||||
memcpy(args.libs_dir, oai_args.sm_dir, 128);
|
||||
AssertFatal(oai_args.sm_dir != NULL , "Please, specify the directory where the SMs are located in the config file, i.e., e2_agent = {near_ric_ip_addr = \"127.0.0.1\"; sm_dir = \"/usr/local/lib/flexric/\");} ");
|
||||
AssertFatal(oai_args.ip != NULL , "Please, specify the IP address of the nearRT-RIC in the config file, i.e., e2_agent = {near_ric_ip_addr = \"127.0.0.1\"; sm_dir = \"/usr/local/lib/flexric/\"");
|
||||
|
||||
fr_args_t args = {.ip = oai_args.ip}; // init_fr_args(0, NULL);
|
||||
memcpy(args.libs_dir, oai_args.sm_dir, 128);
|
||||
|
||||
sleep(1);
|
||||
const gNB_RRC_INST* rrc = RC.nrrrc[0];
|
||||
|
||||
@@ -1322,7 +1322,7 @@ typedef struct srb1_params_s {
|
||||
/* E2 Agent configuration */
|
||||
#define CONFIG_STRING_E2AGENT "e2_agent"
|
||||
|
||||
#define E2AGENT_CONFIG_IP "ip"
|
||||
#define E2AGENT_CONFIG_IP "near_ric_ip_addr"
|
||||
//#define E2AGENT_CONFIG_PORT "port"
|
||||
#define E2AGENT_CONFIG_SMDIR "sm_dir"
|
||||
|
||||
|
||||
@@ -2271,10 +2271,13 @@ e2_agent_args_t RCconfig_NR_E2agent(void)
|
||||
return (e2_agent_args_t) { 0 };
|
||||
}
|
||||
e2_agent_args_t dst = {0};
|
||||
if(e2agent_params[E2AGENT_CONFIG_IP_IDX].strptr != NULL)
|
||||
dst.ip = *e2agent_params[E2AGENT_CONFIG_IP_IDX].strptr;
|
||||
if(e2agent_params[E2AGENT_CONFIG_SMDIR_IDX].strptr != NULL)
|
||||
|
||||
if (e2agent_params[E2AGENT_CONFIG_SMDIR_IDX].strptr != NULL)
|
||||
dst.sm_dir = *e2agent_params[E2AGENT_CONFIG_SMDIR_IDX].strptr;
|
||||
|
||||
if (e2agent_params[E2AGENT_CONFIG_IP_IDX].strptr != NULL)
|
||||
dst.ip = *e2agent_params[E2AGENT_CONFIG_IP_IDX].strptr;
|
||||
|
||||
return dst;
|
||||
}
|
||||
|
||||
|
||||
@@ -267,7 +267,7 @@ log_config :
|
||||
};
|
||||
|
||||
e2_agent = {
|
||||
address = "127.0.0.1";
|
||||
near_ric_ip_addr = "127.0.0.1";
|
||||
#sm_dir = "/path/where/the/SMs/are/located/"
|
||||
sm_dir = "/usr/local/lib/flexric/"
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user