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.
37 lines
1.2 KiB
C
37 lines
1.2 KiB
C
/*
|
|
* 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 E2_AGENT_ARGS_H
|
|
#define E2_AGENT_ARGS_H
|
|
|
|
#include <stdint.h>
|
|
|
|
// Wrapper for OAI
|
|
typedef struct{
|
|
const char *ip;
|
|
const char *sm_dir;
|
|
const bool enabled;
|
|
} e2_agent_args_t;
|
|
|
|
#endif
|
|
|
|
|