uecap file path from command line at UE

This commit is contained in:
francescomani
2021-12-30 12:17:11 +01:00
parent 25bd60a96a
commit 0d3ee346bf
8 changed files with 28 additions and 15 deletions
+2 -2
View File
@@ -34,8 +34,8 @@
#include "rrc_proto.h"
#include "common/utils/LOG/log.h"
NR_UE_RRC_INST_t* nr_l3_init_ue(char* rrc_config_path){
NR_UE_RRC_INST_t* nr_l3_init_ue(char* uecap, char* rrc_config_path){
//LOG_I(RRC, "[MAIN] NR UE MAC initialization...\n");
return openair_rrc_top_init_ue_nr(rrc_config_path);
return openair_rrc_top_init_ue_nr(uecap,rrc_config_path);
}
+10 -4
View File
@@ -410,7 +410,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* rrc_config_path){
NR_UE_RRC_INST_t* openair_rrc_top_init_ue_nr(char* uecap_path, char* rrc_config_path){
int nr_ue;
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));
@@ -485,6 +485,8 @@ NR_UE_RRC_INST_t* openair_rrc_top_init_ue_nr(char* rrc_config_path){
RRC_LIST_INIT(NR_UE_rrc_inst[nr_ue].CSI_ReportConfig_list, NR_maxNrofCSI_ReportConfigurations);
}
NR_UE_rrc_inst->uecap_path = uecap_path;
if (get_softmodem_params()->phy_test==1 || get_softmodem_params()->do_ra==1) {
// read in files for RRCReconfiguration and RBconfig
FILE *fd;
@@ -494,7 +496,7 @@ NR_UE_RRC_INST_t* openair_rrc_top_init_ue_nr(char* rrc_config_path){
else
sprintf(filename,"reconfig.raw");
fd = fopen(filename,"r");
char buffer[1024];
char buffer[1024];
AssertFatal(fd,
"cannot read file %s: errno %d, %s\n",
filename,
@@ -2632,8 +2634,12 @@ nr_rrc_ue_process_ueCapabilityEnquiry(
ctxt_pP->frame,
gNB_index);
sprintf(UE_NR_Capability_xer_fname,"../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/uecap.xml");
FILE *f = fopen(UE_NR_Capability_xer_fname, "r");
FILE *f = NULL;
char *file_path = NR_UE_rrc_inst[ctxt_pP->module_id].uecap_path;
if (file_path) {
sprintf(UE_NR_Capability_xer_fname,"%s/uecap.xml",file_path);
f = fopen(UE_NR_Capability_xer_fname, "r");
}
memset((void *)&ul_dcch_msg,0,sizeof(NR_UL_DCCH_Message_t));
memset((void *)&ue_CapabilityRAT_Container,0,sizeof(NR_UE_CapabilityRAT_Container_t));
+2
View File
@@ -120,6 +120,8 @@ typedef struct NR_UE_RRC_INST_s {
NR_DRB_ToAddMod_t *DRB_config[NB_CNX_UE][8];
rb_id_t *defaultDRB; // remember the ID of the default DRB
char *uecap_path;
NR_SRB_INFO Srb0[NB_SIG_CNX_UE];
NR_SRB_INFO_TABLE_ENTRY Srb1[NB_CNX_UE];
NR_SRB_INFO_TABLE_ENTRY Srb2[NB_CNX_UE];
+2 -2
View File
@@ -43,14 +43,14 @@
// main_rrc.c
//
/**\brief Layer 3 initialization*/
NR_UE_RRC_INST_t* nr_l3_init_ue(char*);
NR_UE_RRC_INST_t* nr_l3_init_ue(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*);
NR_UE_RRC_INST_t* openair_rrc_top_init_ue_nr(char*,char*);