use ric_client configuration (ip, port)

master
Piotr Gawlowicz 2 years ago committed by Justin Tallon
parent e21a90336e
commit c3f4dfd194

@ -370,6 +370,12 @@ enable = false
#auto_target_papr = 8
#ema_alpha = 0.0143
#####################################################################
[ric_client]
enable = true
#ric_ip = 127.0.0.1
#ric_port = 36421
#####################################################################
# Expert configuration options
#

@ -104,12 +104,6 @@ struct general_args_t {
uint32_t rlf_release_timer_ms;
};
struct ric_args_t {
bool enable;
std::string ric_ip;
uint32_t ric_port;
};
struct all_args_t {
enb_args_t enb;
enb_files_t enb_files;

@ -198,7 +198,7 @@ bool enb::enable_ric_client(srsenb::e2_interface_metrics* e2_metrics)
srsran::console("Error creating RIC client instance.\n");
return SRSRAN_ERROR;
}
if (tmp_ric_client->init()) {
if (tmp_ric_client->init(args.ric_client)) {
srsran::console("Error initializing RIC client.\n");
return SRSRAN_ERROR;
}

@ -231,7 +231,7 @@ void parse_args(all_args_t* args, int argc, char* argv[])
/* RIC section */
("ric_client.enable", bpo::value<bool>(&args->ric_client.enable)->default_value(false), "Enables the RIC client")
("ric_client.ric_ip", bpo::value<string>(&args->ric_client.ric_ip)->default_value("127.0.0.1"), "RIC IP address")
("ric_client.ric_port", bpo::value<uint32_t>(&args->ric_client.ric_port)->default_value(36422), "RIC port")
("ric_client.ric_port", bpo::value<uint32_t>(&args->ric_client.ric_port)->default_value(36421), "RIC port")
/* Expert section */
("expert.metrics_period_secs", bpo::value<float>(&args->general.metrics_period_secs)->default_value(1.0), "Periodicity for metrics in seconds.")
("expert.metrics_csv_enable", bpo::value<bool>(&args->general.metrics_csv_enable)->default_value(false), "Write metrics to CSV file.")

@ -32,6 +32,12 @@ enum e2_msg_type_t {
E2_RESET_RESPONSE
};
struct ric_args_t {
bool enable;
std::string ric_ip;
uint32_t ric_port;
};
namespace srsenb {
class ric_client : public srsran::thread
{
@ -39,7 +45,7 @@ public:
ric_client(srslog::basic_logger& logger, srsenb::e2_interface_metrics* _gnb_metrics);
// Initiate and Stop
bool init();
bool init(ric_args_t args);
void stop();
void run_thread();

@ -21,7 +21,7 @@ ric_client::ric_client(srslog::basic_logger& logger, e2_interface_metrics* _gnb_
gnb_metrics = _gnb_metrics;
}
bool ric_client::init()
bool ric_client::init(ric_args_t args)
{
printf("RIC_CLIENT: Init\n");
using namespace srsran::net_utils;
@ -42,7 +42,7 @@ bool ric_client::init()
}
// Connect to the AMF address
if (not ric_socket.connect_to("127.0.0.1", e2ap_port, &ric_addr)) {
if (not ric_socket.connect_to(args.ric_ip.c_str(), args.ric_port, &ric_addr)) {
return false;
}
// Assign a handler to rx RIC packets

Loading…
Cancel
Save