Commit 47f85bf7 authored by yangjian's avatar yangjian

fix nrf configuration options

parent 24b835f4
...@@ -107,13 +107,16 @@ function main() ...@@ -107,13 +107,16 @@ function main()
if [[ $install_deps -ne 0 ]]; then if [[ $install_deps -ne 0 ]]; then
apt-get install cmake curl git libboost-all-dev libconfig++-dev libcurl4-gnutls-dev libgmp-dev libspdlog-dev nettle-dev -y apt-get install cmake curl git libboost-all-dev libconfig++-dev libcurl4-gnutls-dev libgmp-dev libspdlog-dev nettle-dev -y
if [ ! -d "$OPENXGAUSF_DIR/build/ext/json/git_src/build" ]; then read -p "Do you want to install Nlohmann Json ? <y/N> " prompt
mkdir $OPENXGAUSF_DIR/build/ext/json/git_src/build if [[ $prompt =~ [yY](es)* ]]; then
if [ ! -d "$OPENXGAUSF_DIR/build/ext/json/git_src/build" ]; then
mkdir $OPENXGAUSF_DIR/build/ext/json/git_src/build
fi
cd $OPENXGAUSF_DIR/build/ext/json/git_src/build
cmake ..
make
make install
fi fi
cd $OPENXGAUSF_DIR/build/ext/json/git_src/build
cmake ..
make
make install
echo "install successful!" echo "install successful!"
return 0 return 0
fi fi
...@@ -134,7 +137,7 @@ function main() ...@@ -134,7 +137,7 @@ function main()
cd $OPENXGAUSF_DIR/build/AUSF cd $OPENXGAUSF_DIR/build/AUSF
if [[ $jobs -ne 0 ]]; then if [[ $jobs -ne 0 ]]; then
make -j4 make -j`nproc`
else else
make make
fi fi
......
...@@ -5,29 +5,29 @@ AUSF = ...@@ -5,29 +5,29 @@ AUSF =
PID_DIRECTORY = "/var/run"; PID_DIRECTORY = "/var/run";
AUSF_NAME = "bupt-ausf"; AUSF_NAME = "bupt-ausf";
NF_REGISTRATION = "yes"; NF_REGISTRATION = "no";
INTERFACES:{ INTERFACES:{
SBI_AUSF:{ SBI_AUSF:{
INTERFACE_NAME = "ens33"; #interface for providing ausf service INTERFACE_NAME = "ens32"; #interface for providing ausf service
IPV4_ADDRESS = "192.168.83.130/24"; #address for intercafe (cidr) IPV4_ADDRESS = "192.168.2.35/24"; #address for intercafe (cidr)
PORT = 8383; #ausf service port PORT = 8383; #ausf service port
PPID = 60; PPID = 60;
}; };
NUDM:{ NUDM:{
INTERFACE_NAME = "ens33"; #interface for providing udm service INTERFACE_NAME = "ens32"; #interface for providing udm service
IPV4_ADDRESS = "192.168.83.130/24"; #address for intercafe (cidr) IPV4_ADDRESS = "192.168.2.35/24"; #address for intercafe (cidr)
PORT = 8181; #udm service port PORT = 8181; #udm service port
}; };
NAMF:{ NAMF:{
INTERFACE_NAME = "ens33"; #interface for request for amf service INTERFACE_NAME = "ens32"; #interface for request for amf service
IPV4_ADDRESS = "192.168.83.130/24"; #amf address (cidr) IPV4_ADDRESS = "192.168.2.35/24"; #amf address (cidr)
PORT = 8383; #amf port PORT = 8383; #amf port
}; };
NNRF:{ NNRF:{
INTERFACE_NAME = "ens33"; INTERFACE_NAME = "ens32";
IPV4_ADDRESS = "192.168.83.129/24"; IPV4_ADDRESS = "192.168.2.35/24";
PORT = 80; PORT = 80;
API_VERSION = "v1" API_VERSION = "v1"
}; };
}; };
}; };
......
...@@ -96,9 +96,11 @@ ausf_app::ausf_app() ...@@ -96,9 +96,11 @@ ausf_app::ausf_app()
unsigned int microsecond = 10000; // 10ms unsigned int microsecond = 10000; // 10ms
usleep(microsecond); usleep(microsecond);
register_to_nrf(); register_to_nrf();
timer_nrf_heartbeat = itti_inst->timer_setup(1, 0, TASK_AUSF_APP, TASK_AUSF_APP_TIMEOUT_NRF_HEARTBEAT, 0);
timer_id_t tid = itti_inst->timer_setup(20, 0, TASK_AUSF_APP, TASK_AUSF_APP_PERIODIC_GETINFO, 0);
} }
timer_id_t tid = itti_inst->timer_setup(20, 0, TASK_AUSF_APP, TASK_AUSF_APP_PERIODIC_GETINFO, 0);
timer_nrf_heartbeat = itti_inst->timer_setup(1, 0, TASK_AUSF_APP, TASK_AUSF_APP_TIMEOUT_NRF_HEARTBEAT, 0);
Logger::ausf_app().startup("Started"); Logger::ausf_app().startup("Started");
} }
void ausf_app::register_to_nrf(){ void ausf_app::register_to_nrf(){
......
...@@ -238,11 +238,14 @@ void ausf_config::display() { ...@@ -238,11 +238,14 @@ void ausf_config::display() {
Logger::config().info(" ip ...................: %s", inet_ntoa(namf.addr4)); Logger::config().info(" ip ...................: %s", inet_ntoa(namf.addr4));
Logger::config().info(" port .................: %d", namf.port); Logger::config().info(" port .................: %d", namf.port);
Logger::config().info("- Nnrf Networking:"); if(!nf_registion.compare("yes"))
Logger::config().info(" iface ................: %s", nnrf.if_name.c_str()); {
Logger::config().info(" ip ...................: %s", inet_ntoa(nnrf.addr4)); Logger::config().info("- Nnrf Networking:");
Logger::config().info(" port .................: %d", nnrf.port); Logger::config().info(" iface ................: %s", nnrf.if_name.c_str());
Logger::config().info(" api_version...........: %s", nnrf.api_version.c_str()); Logger::config().info(" ip ...................: %s", inet_ntoa(nnrf.addr4));
Logger::config().info(" port .................: %d", nnrf.port);
Logger::config().info(" api_version...........: %s", nnrf.api_version.c_str());
}
// Logger::config().info(" HTTP2 port ............: %d", nudm_http2_port); // Logger::config().info(" HTTP2 port ............: %d", nudm_http2_port);
......
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