Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-AUSF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-AUSF
Commits
387abb6b
Commit
387abb6b
authored
Jul 14, 2021
by
Niuhaiwen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add nrf cfg
parent
87db9a23
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
93 additions
and
3 deletions
+93
-3
src/.vscode/settings.json
src/.vscode/settings.json
+71
-0
src/utils/ausf_config.cpp
src/utils/ausf_config.cpp
+15
-3
src/utils/ausf_config.hpp
src/utils/ausf_config.hpp
+7
-0
No files found.
src/.vscode/settings.json
0 → 100644
View file @
387abb6b
{
"files.associations"
:
{
"algorithm"
:
"cpp"
,
"array"
:
"cpp"
,
"atomic"
:
"cpp"
,
"cctype"
:
"cpp"
,
"chrono"
:
"cpp"
,
"clocale"
:
"cpp"
,
"cmath"
:
"cpp"
,
"compare"
:
"cpp"
,
"concepts"
:
"cpp"
,
"cstdarg"
:
"cpp"
,
"cstddef"
:
"cpp"
,
"cstdint"
:
"cpp"
,
"cstdio"
:
"cpp"
,
"cstdlib"
:
"cpp"
,
"cstring"
:
"cpp"
,
"ctime"
:
"cpp"
,
"cwchar"
:
"cpp"
,
"exception"
:
"cpp"
,
"forward_list"
:
"cpp"
,
"fstream"
:
"cpp"
,
"functional"
:
"cpp"
,
"initializer_list"
:
"cpp"
,
"iomanip"
:
"cpp"
,
"ios"
:
"cpp"
,
"iosfwd"
:
"cpp"
,
"iostream"
:
"cpp"
,
"istream"
:
"cpp"
,
"iterator"
:
"cpp"
,
"limits"
:
"cpp"
,
"list"
:
"cpp"
,
"locale"
:
"cpp"
,
"map"
:
"cpp"
,
"memory"
:
"cpp"
,
"mutex"
:
"cpp"
,
"new"
:
"cpp"
,
"numeric"
:
"cpp"
,
"ostream"
:
"cpp"
,
"ratio"
:
"cpp"
,
"sstream"
:
"cpp"
,
"stdexcept"
:
"cpp"
,
"streambuf"
:
"cpp"
,
"string"
:
"cpp"
,
"system_error"
:
"cpp"
,
"thread"
:
"cpp"
,
"tuple"
:
"cpp"
,
"type_traits"
:
"cpp"
,
"typeinfo"
:
"cpp"
,
"unordered_map"
:
"cpp"
,
"utility"
:
"cpp"
,
"valarray"
:
"cpp"
,
"vector"
:
"cpp"
,
"xfacet"
:
"cpp"
,
"xhash"
:
"cpp"
,
"xiosbase"
:
"cpp"
,
"xlocale"
:
"cpp"
,
"xlocbuf"
:
"cpp"
,
"xlocinfo"
:
"cpp"
,
"xlocmes"
:
"cpp"
,
"xlocmon"
:
"cpp"
,
"xlocnum"
:
"cpp"
,
"xloctime"
:
"cpp"
,
"xmemory"
:
"cpp"
,
"xstddef"
:
"cpp"
,
"xstring"
:
"cpp"
,
"xtr1common"
:
"cpp"
,
"xtree"
:
"cpp"
,
"xutility"
:
"cpp"
}
}
\ No newline at end of file
src/utils/ausf_config.cpp
View file @
387abb6b
...
...
@@ -99,7 +99,11 @@ int ausf_config::load(const std::string &config_file) {
}
catch
(
const
SettingNotFoundException
&
nfex
)
{
Logger
::
config
().
error
(
"%s : %s, using defaults"
,
nfex
.
what
(),
nfex
.
getPath
());
}
try
{
ausf_cfg
.
lookupValue
(
AUSF_CONFIG_STRING_NF_REGISTRATION
,
nf_registion
);
}
catch
(
const
SettingNotFoundException
&
nfex
)
{
Logger
::
config
().
error
(
"%s : %s, using defaults"
,
nfex
.
what
(),
nfex
.
getPath
());
}
// try {
// ausf_cfg.lookupValue(AUSF_CONFIG_STRING_STATISTICS_TIMER_INTERVAL, statistics_interval);
// } catch (const SettingNotFoundException &nfex) {
...
...
@@ -130,7 +134,6 @@ int ausf_config::load(const std::string &config_file) {
// Logger::config().error("%s : %s, using defaults", nfex.what(), nfex.getPath());
// }
try
{
const
Setting
&
new_if_cfg
=
ausf_cfg
[
AUSF_CONFIG_STRING_INTERFACES
];
...
...
@@ -143,6 +146,9 @@ int ausf_config::load(const std::string &config_file) {
const
Setting
&
namf_cfg
=
new_if_cfg
[
AUSF_CONFIG_STRING_INTERFACE_NAMF
];
load_interface
(
namf_cfg
,
namf
);
const
Setting
&
nnrf_cfg
=
new_if_cfg
[
AUSF_CONFIG_STRING_INTERFACE_NNRF
];
load_interface
(
nnrf_cfg
,
nnrf
);
// const Setting &udr_addr_pool = nudm_cfg[AUSF_CONFIG_STRING_UDR_INSTANCES_POOL];
// int count = udr_addr_pool.getLength();
// for (int i = 0; i < count; i++) {
...
...
@@ -195,6 +201,7 @@ void ausf_config::display() {
Logger
::
config
().
info
(
"- Instance ...........................................: %d"
,
instance
);
Logger
::
config
().
info
(
"- PID dir ............................................: %s"
,
pid_dir
.
c_str
());
Logger
::
config
().
info
(
"- AUSF NAME............................................: %s"
,
AUSF_Name
.
c_str
());
Logger
::
config
().
info
(
"- NF_REGISTRATION......................................: %s"
,
nf_registion
.
c_str
());
// Logger::config().info("- GUAMI (MCC, MNC, Region ID, AMF Set ID, AMF pointer): ");
// Logger::config().info("- SERVED_GUAMI_LIST...................................: ");
...
...
@@ -231,6 +238,11 @@ void ausf_config::display() {
Logger
::
config
().
info
(
" ip ...................: %s"
,
inet_ntoa
(
namf
.
addr4
));
Logger
::
config
().
info
(
" port .................: %d"
,
namf
.
port
);
Logger
::
config
().
info
(
"- Nnrf Networking:"
);
Logger
::
config
().
info
(
" iface ................: %s"
,
nnrf
.
if_name
.
c_str
());
Logger
::
config
().
info
(
" ip ...................: %s"
,
inet_ntoa
(
nnrf
.
addr4
));
Logger
::
config
().
info
(
" port .................: %d"
,
nnrf
.
port
);
// Logger::config().info(" HTTP2 port ............: %d", nudm_http2_port);
// Logger::config().info("- Remote udr Pool.....................................: ");
...
...
@@ -245,7 +257,7 @@ void ausf_config::display() {
}
//------------------------------------------------------------------------------
int
ausf_config
::
load_interface
(
const
libconfig
::
Setting
&
if_cfg
,
interface_cfg_t
&
cfg
)
{
int
ausf_config
::
:
load_interface
(
const
libconfig
::
Setting
&
if_cfg
,
interface_cfg_t
&
cfg
)
{
if_cfg
.
lookupValue
(
AUSF_CONFIG_STRING_INTERFACE_NAME
,
cfg
.
if_name
);
util
::
trim
(
cfg
.
if_name
);
if
(
not
boost
::
iequals
(
cfg
.
if_name
,
"none"
))
{
...
...
src/utils/ausf_config.hpp
View file @
387abb6b
...
...
@@ -54,10 +54,12 @@
#define AUSF_CONFIG_STRING_INTERFACE_SBI_AUSF "SBI_AUSF"
#define AUSF_CONFIG_STRING_INTERFACE_NUDM "NUDM"
#define AUSF_CONFIG_STRING_INTERFACE_NAMF "NAMF"
#define AUSF_CONFIG_STRING_INTERFACE_NNRF "NNRF"
#define AUSF_CONFIG_STRING_INTERFACE_NAME "INTERFACE_NAME"
#define AUSF_CONFIG_STRING_IPV4_ADDRESS "IPV4_ADDRESS"
#define AUSF_CONFIG_STRING_PORT "PORT"
#define AUSF_CONFIG_STRING_PPID "PPID"
#define AUSF_CONFIG_STRING_NF_REGISTRATION "NF_REGISTRATION"
// #define AUSF_CONFIG_STRING_UDM_INSTANCES_POOL "UDM_INSTANCES_POOL"
...
...
@@ -109,6 +111,7 @@ typedef struct interface_cfg_s {
unsigned
int
port
;
}
interface_cfg_t
;
// typedef struct slice_s {
// std::string sST;
// std::string sD;
...
...
@@ -138,6 +141,7 @@ typedef struct interface_cfg_s {
// std::string random;
// } auth_conf;
class
ausf_config
{
public:
ausf_config
();
...
...
@@ -149,10 +153,13 @@ class ausf_config {
unsigned
int
instance
;
std
::
string
pid_dir
;
std
::
string
AUSF_Name
;
std
::
string
nf_registion
;
interface_cfg_t
sbi
;
interface_cfg_t
nudm
;
interface_cfg_t
namf
;
interface_cfg_t
nnrf
;
//unsigned int statistics_interval;
//std::vector<plmn_item_t> plmn_list;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment