adding --rrc_config_path command line option to UE

This commit is contained in:
Florian Kaltenberger
2020-01-03 21:40:27 +01:00
parent 2efa277990
commit 5ef27f4c21
7 changed files with 25 additions and 12 deletions
+2 -2
View File
@@ -33,10 +33,10 @@
#include "defs.h"
#include "rrc_proto.h"
int nr_l3_init_ue(void){
int nr_l3_init_ue(char* rrc_config_path){
//LOG_I(RRC, "[MAIN] NR UE MAC initialization...\n");
openair_rrc_top_init_ue_nr();
openair_rrc_top_init_ue_nr(rrc_config_path);
return 0;
+12 -3
View File
@@ -259,7 +259,7 @@ void process_nsa_message(NR_UE_RRC_INST_t *rrc, nsa_message_t nsa_message_type,
}
int8_t openair_rrc_top_init_ue_nr(void){
int8_t openair_rrc_top_init_ue_nr(char* rrc_config_path){
if(NB_NR_UE_INST > 0){
NR_UE_rrc_inst = (NR_UE_RRC_INST_t *)malloc(NB_NR_UE_INST * sizeof(NR_UE_RRC_INST_t));
@@ -324,12 +324,21 @@ int8_t openair_rrc_top_init_ue_nr(void){
if (phy_test==1) {
// read in files for RRCReconfiguration and RBconfig
FILE *fd;
fd = fopen("reconfig.raw","r");
char filename[1024];
if (rrc_config_path)
sprintf(filename,"%s/reconfig.raw",rrc_config_path);
else
sprintf(filename,"reconfig.raw");
fd = fopen(filename,"r");
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);
fd = fopen("rbconfig.raw","r");
if (rrc_config_path)
sprintf(filename,"%s/rbconfig.raw",rrc_config_path);
else
sprintf(filename,"rbconfig.raw");
fd = fopen(filename,"r");
msg_len=fread(buffer,1,1024,fd);
fclose(fd);
process_nsa_message(NR_UE_rrc_inst, nr_RadioBearerConfigX_r15, buffer,msg_len);
+2 -2
View File
@@ -43,14 +43,14 @@
// main_rrc.c
//
/**\brief Layer 3 initialization*/
int nr_l3_init_ue(void);
int nr_l3_init_ue(char*);
//
// UE_rrc.c
//
/**\brief Initial the top level RRC structure instance*/
int8_t openair_rrc_top_init_ue_nr(void);
int8_t openair_rrc_top_init_ue_nr(char*);