VNF/PNF mode set using --vnf --pnf options

This commit is contained in:
MaheshK1995
2020-06-27 17:24:19 +05:30
parent abefe1a095
commit f17fc6dafd
3 changed files with 14 additions and 4 deletions
+2 -2
View File
@@ -26,7 +26,7 @@
"args": ["-E",
"-O ",
"/home/glab/NR_nfapi/openairinterface5g/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band78.tm1.106PRB.nfapi.conf",
"2"],
"--vnf"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
@@ -49,7 +49,7 @@
"args": ["-E",
"-O ",
"/home/glab/NR_nfapi/openairinterface5g/targets/PROJECTS/GENERIC-LTE-EPC/CONF/oaiL1.nfapi.usrpx300.conf",
"1"],
"--pnf"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
+12
View File
@@ -44,6 +44,7 @@
#include "../utils/LOG/log.h"
#define CONFIG_SHAREDLIBFORMAT "libparams_%s.so"
extern uint8_t nfapi_mode;
int load_config_sharedlib(configmodule_interface_t *cfgptr) {
void *lib_handle;
@@ -212,6 +213,17 @@ configmodule_interface_t *load_configmodule(int argc,
if ( (strcmp(argv[i]+1, "h") == 0) || (strstr(argv[i]+1, "help_") != NULL ) ) {
tmpflags = CONFIG_HELP;
}
if( strcmp(argv[i], "--vnf") == 0 ){
printf("\nVNF ENABLED\n");
nfapi_mode = 2;
}
if( strcmp(argv[i], "--pnf") == 0 ){
printf("\nPNF ENABLED\n");
nfapi_mode = 1;
}
}
/* look for the OAI_CONFIGMODULE environment variable */
-2
View File
@@ -794,8 +794,6 @@ int main( int argc, char **argv )
{
int ru_id, CC_id = 0;
nfapi_mode = (int) (argv[argc-1][0] - '0');
start_background_system();
///static configuration for NR at the moment