Start E2 agent only if configuration present
This commit introduces an additional (implicit) option that signals if the E2 agent is to be activated or not. When reading the configuration, we now check if all fields are set, and activate the E2 agent only if this is the case. If not, we only print a warning and start the gNB without the agent. Note that previously, if not all fields are set correctly, the gNB stopped. To implement this behavior, it is necessary to change the defaults of the RIC IP and the directory for SMs to a (non-NULL) default value. Otherwise, the configuration system would not consider the field to be set to the default, and wrongly assumes the field is set, even though it is not; at least, this change is necessary to make config_isparamset() return NULL if the configuration is not set.
This commit is contained in:
@@ -1330,9 +1330,8 @@ typedef struct srb1_params_s {
|
||||
//#define E2AGENT_CONFIG_PORT "port"
|
||||
#define E2AGENT_CONFIG_SMDIR "sm_dir"
|
||||
|
||||
static const char* const e2agent_config_ip_default = NULL;
|
||||
static const char* const e2agent_config_smdir_default = NULL;
|
||||
//static const uint16_t e2agent_config_port_default = 36421;
|
||||
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}, \
|
||||
|
||||
Reference in New Issue
Block a user