Deprecate NR-UE --rrc_config_path, use --r{e,b}config-file instead

Config options --reconfig_file and --rbconfig-file have been introduced
to modify the filenames of reconfig.raw and rbconfig.raw (e.g., in the
case of multiple UEs). These filen*ames* were to be prepended with
--rrc_config_path to set the path. In summary, three options were
necessary, when two are sufficient.

In this commit, change to the options --reconfig-file and
--rbconfig-file (slight change for harmonization with other options,
which mostly use dashes) to give the full path to the corresponding
files, and avoid to surprise users who would not expect to have three
options.

--rrc_config_path has been deprecated and an error will be printed if a
user attempts to use it.
This commit is contained in:
Robert Schmidt
2023-08-09 17:32:45 +02:00
parent 9983478a61
commit 9f45f1d769
13 changed files with 29 additions and 37 deletions
+2 -2
View File
@@ -34,9 +34,9 @@
#include "rrc_proto.h"
#include "common/utils/LOG/log.h"
NR_UE_RRC_INST_t* nr_l3_init_ue(char* uecap, char* rrc_config_path, char* reconfig_file, char* rbconfig_file)
NR_UE_RRC_INST_t* nr_l3_init_ue(char* uecap, char* reconfig_file, char* rbconfig_file)
{
// LOG_I(RRC, "[MAIN] NR UE MAC initialization...\n");
return openair_rrc_top_init_ue_nr(uecap, rrc_config_path, reconfig_file, rbconfig_file);
return openair_rrc_top_init_ue_nr(uecap, reconfig_file, rbconfig_file);
}
+8 -18
View File
@@ -344,7 +344,7 @@ void process_nsa_message(NR_UE_RRC_INST_t *rrc, nsa_message_t nsa_message_type,
}
NR_UE_RRC_INST_t* openair_rrc_top_init_ue_nr(char* uecap_file, char* rrc_config_path, char* reconfig_file, char* rbconfig_file)
NR_UE_RRC_INST_t* openair_rrc_top_init_ue_nr(char* uecap_file, char* reconfig_file, char* rbconfig_file)
{
if(NB_NR_UE_INST > 0) {
NR_UE_rrc_inst = (NR_UE_RRC_INST_t *)calloc(NB_NR_UE_INST , sizeof(NR_UE_RRC_INST_t));
@@ -367,34 +367,24 @@ NR_UE_RRC_INST_t* openair_rrc_top_init_ue_nr(char* uecap_file, char* rrc_config_
if (get_softmodem_params()->phy_test==1 || get_softmodem_params()->do_ra==1) {
// read in files for RRCReconfiguration and RBconfig
FILE *fd;
char filename[1024];
if (rrc_config_path && reconfig_file)
sprintf(filename, "%s/%s", rrc_config_path, reconfig_file);
else
sprintf(filename,"reconfig.raw");
LOG_I(NR_RRC, "using %s for rrc init[1/2]\n", filename);
fd = fopen(filename,"r");
char buffer[1024];
LOG_I(NR_RRC, "using %s for rrc init[1/2]\n", reconfig_file);
FILE *fd = fopen(reconfig_file,"r");
AssertFatal(fd,
"cannot read file %s: errno %d, %s\n",
filename,
reconfig_file,
errno,
strerror(errno));
char buffer[1024];
int msg_len=fread(buffer,1,1024,fd);
fclose(fd);
process_nsa_message(NR_UE_rrc_inst, nr_SecondaryCellGroupConfig_r15, buffer,msg_len);
if (rrc_config_path && rbconfig_file)
sprintf(filename, "%s/%s", rrc_config_path, rbconfig_file);
else
sprintf(filename,"rbconfig.raw");
LOG_I(NR_RRC, "using %s for rrc init[2/2]\n", filename);
fd = fopen(filename,"r");
LOG_I(NR_RRC, "using %s for rrc init[2/2]\n", rbconfig_file);
fd = fopen(rbconfig_file,"r");
AssertFatal(fd,
"cannot read file %s: errno %d, %s\n",
filename,
rbconfig_file,
errno,
strerror(errno));
msg_len=fread(buffer,1,1024,fd);
+2 -2
View File
@@ -56,14 +56,14 @@ extern queue_t nr_ul_tti_req_queue;
// main_rrc.c
//
/**\brief Layer 3 initialization*/
NR_UE_RRC_INST_t *nr_l3_init_ue(char *, char *, char *, char *);
NR_UE_RRC_INST_t *nr_l3_init_ue(char *, char *, char *);
//
// UE_rrc.c
//
/**\brief Initial the top level RRC structure instance*/
NR_UE_RRC_INST_t *openair_rrc_top_init_ue_nr(char *, char *, char *, char *);
NR_UE_RRC_INST_t *openair_rrc_top_init_ue_nr(char *, char *, char *);
/**\brief Decode RRC Connection Reconfiguration, sent from E-UTRA RRC Connection Reconfiguration v1510 carring EN-DC config
\param buffer encoded NR-RRC-Connection-Reconfiguration/Secondary-Cell-Group-Config message.