Commit f17fc6da authored by MaheshK1995's avatar MaheshK1995

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

parent abefe1a0
......@@ -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": [],
......
......@@ -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 */
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment