Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-NRF
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-NRF
Commits
5fc7b13f
Commit
5fc7b13f
authored
Aug 25, 2021
by
kharade
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code clean
parent
def43a7c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
34 deletions
+30
-34
src/common/3gpp_23.003.h
src/common/3gpp_23.003.h
+3
-7
src/common/3gpp_29.510.h
src/common/3gpp_29.510.h
+1
-1
src/nrf_app/nrf_profile.cpp
src/nrf_app/nrf_profile.cpp
+22
-24
src/nrf_app/nrf_profile.hpp
src/nrf_app/nrf_profile.hpp
+4
-2
No files found.
src/common/3gpp_23.003.h
View file @
5fc7b13f
...
...
@@ -148,14 +148,10 @@ typedef struct guami_s {
std
::
string
amf_id
;
}
guami_t
;
typedef
struct
routing_indicators_s
{
std
::
vector
<
std
::
string
>
routing_indicators
;
}
routing_indicators_t
;
typedef
struct
supi_range_s
{
std
::
string
start
;
std
::
string
end
;
std
::
string
pattern
;
std
::
string
start
;
std
::
string
end
;
std
::
string
pattern
;
}
supi_range_t
;
#endif
src/common/3gpp_29.510.h
View file @
5fc7b13f
...
...
@@ -66,7 +66,7 @@ typedef struct upf_info_s {
}
upf_info_t
;
typedef
struct
supi_range_ausf_info_item_s
{
supi_range_t
supi_range
;
supi_range_t
supi_range
;
}
supi_range_ausf_info_item_t
;
typedef
struct
ausf_info_s
{
...
...
src/nrf_app/nrf_profile.cpp
View file @
5fc7b13f
...
...
@@ -242,7 +242,7 @@ void nrf_profile::display() {
Logger
::
nrf_app
().
debug
(
"
\t
Priority: %d"
,
priority
);
Logger
::
nrf_app
().
debug
(
"
\t
Capacity: %d"
,
capacity
);
// SNSSAIs
if
(
!
plmn_list
.
empty
()){
if
(
!
plmn_list
.
empty
())
{
for
(
auto
s
:
plmn_list
)
{
Logger
::
nrf_app
().
debug
(
"
\t
PLMN List(MCC, MNC): %d, %s"
,
s
.
mcc
,
s
.
mnc
);
}
...
...
@@ -558,21 +558,20 @@ void nrf_profile::to_json(nlohmann::json& data) const {
data
[
"nfStatus"
]
=
nf_status
;
data
[
"heartBeatTimer"
]
=
heartBeat_timer
;
// SNSSAIs
if
(
!
snssais
.
empty
()){
if
(
!
snssais
.
empty
())
{
data
[
"sNssais"
]
=
nlohmann
::
json
::
array
();
for
(
auto
s
:
snssais
)
{
nlohmann
::
json
tmp
=
{};
tmp
[
"sst"
]
=
s
.
sST
;
tmp
[
"sd"
]
=
s
.
sD
;
;
data
[
"sNssais"
].
push_back
(
tmp
);
}
}
if
(
!
fqdn
.
empty
())
{
data
[
"fqdn"
]
=
fqdn
;
}
if
(
!
plmn_list
.
empty
()){
data
[
"plmnList"
]
=
nlohmann
::
json
::
array
();
if
(
!
plmn_list
.
empty
())
{
data
[
"plmnList"
]
=
nlohmann
::
json
::
array
();
for
(
auto
s
:
plmn_list
)
{
nlohmann
::
json
tmp
=
{};
tmp
[
"mcc"
]
=
s
.
mcc
;
...
...
@@ -1119,12 +1118,14 @@ void ausf_profile::get_ausf_info(ausf_info_t& infos) const {
void
ausf_profile
::
display
()
{
nrf_profile
::
display
();
Logger
::
nrf_app
().
debug
(
"
\t
AUSF Info"
);
Logger
::
nrf_app
().
debug
(
"
\t\t
GroupId: %s"
,
ausf_info
.
groupid
);
Logger
::
nrf_app
().
debug
(
"
\t\t
GroupId: %s"
,
ausf_info
.
groupid
);
for
(
auto
supi
:
ausf_info
.
supi_ranges
)
{
Logger
::
nrf_app
().
debug
(
"
\t\t
SupiRanges: Start - %s, End - %s, Pattern - %s"
,
supi
.
supi_range
.
start
,
supi
.
supi_range
.
end
,
supi
.
supi_range
.
pattern
);
Logger
::
nrf_app
().
debug
(
"
\t\t
SupiRanges: Start - %s, End - %s, Pattern - %s"
,
supi
.
supi_range
.
start
,
supi
.
supi_range
.
end
,
supi
.
supi_range
.
pattern
);
}
for
(
auto
route_ind
:
ausf_info
.
routing_indicator
)
{
Logger
::
nrf_app
().
debug
(
"
\t\t
Routing Indicators: %s"
,
route_ind
);
Logger
::
nrf_app
().
debug
(
"
\t\t
Routing Indicators: %s"
,
route_ind
);
}
}
...
...
@@ -1135,16 +1136,15 @@ bool ausf_profile::add_profile_info(
if
(
result
)
return
true
;
// add an element to a list of json object
if
(
path
.
compare
(
"ausInfo"
)
==
0
)
{
Logger
::
nrf_app
().
info
(
"Does not support this operation for ausInfo"
);
if
(
path
.
compare
(
"aus
f
Info"
)
==
0
)
{
Logger
::
nrf_app
().
info
(
"Does not support this operation for aus
f
Info"
);
return
false
;
}
if
((
path
.
compare
(
"nfInstanceId"
)
!=
0
)
and
(
path
.
compare
(
"nfInstanceName"
)
!=
0
)
and
(
path
.
compare
(
"nfType"
)
!=
0
)
and
(
path
.
compare
(
"nfStatus"
)
!=
0
)
and
(
path
.
compare
(
"heartBeatTimer"
)
!=
0
)
and
(
path
.
compare
(
"fqdn"
)
!=
0
)
and
(
path
.
compare
(
"heartBeatTimer"
)
!=
0
)
and
(
path
.
compare
(
"fqdn"
)
!=
0
)
and
(
path
.
compare
(
"plmnList"
)
!=
0
)
and
(
path
.
compare
(
"ipv4Addresses"
)
!=
0
)
and
(
path
.
compare
(
"priority"
)
!=
0
)
and
(
path
.
compare
(
"capacity"
)
!=
0
)
and
...
...
@@ -1164,7 +1164,7 @@ bool ausf_profile::replace_profile_info(
bool
result
=
nrf_profile
::
replace_profile_info
(
path
,
value
);
if
(
result
)
return
true
;
// for AUSF info
if
(
path
.
compare
(
"ausInfo"
)
==
0
)
{
if
(
path
.
compare
(
"aus
f
Info"
)
==
0
)
{
Logger
::
nrf_app
().
debug
(
"Does not support this operation for ausfInfo"
);
return
false
;
}
...
...
@@ -1172,13 +1172,12 @@ bool ausf_profile::replace_profile_info(
if
((
path
.
compare
(
"nfInstanceId"
)
!=
0
)
and
(
path
.
compare
(
"nfInstanceName"
)
!=
0
)
and
(
path
.
compare
(
"nfType"
)
!=
0
)
and
(
path
.
compare
(
"nfStatus"
)
!=
0
)
and
(
path
.
compare
(
"heartBeatTimer"
)
!=
0
)
and
(
path
.
compare
(
"fqdn"
)
!=
0
)
and
(
path
.
compare
(
"heartBeatTimer"
)
!=
0
)
and
(
path
.
compare
(
"fqdn"
)
!=
0
)
and
(
path
.
compare
(
"plmnList"
)
!=
0
)
and
(
path
.
compare
(
"ipv4Addresses"
)
!=
0
)
and
(
path
.
compare
(
"priority"
)
!=
0
)
and
(
path
.
compare
(
"capacity"
)
!=
0
)
and
(
path
.
compare
(
"priority"
)
!=
0
)
and
(
path
.
compare
(
"nfServices"
)
!=
0
)
and
(
path
.
compare
(
"ausInfo"
)
!=
0
))
{
(
path
.
compare
(
"aus
f
Info"
)
!=
0
))
{
Logger
::
nrf_app
().
debug
(
"Member (%s) not found!"
,
path
.
c_str
());
return
false
;
}
...
...
@@ -1191,7 +1190,7 @@ bool ausf_profile::remove_profile_info(const std::string& path) {
bool
result
=
nrf_profile
::
remove_profile_info
(
path
);
if
(
result
)
return
true
;
// for AUSF info
if
(
path
.
compare
(
"ausInfo"
)
==
0
)
{
if
(
path
.
compare
(
"aus
f
Info"
)
==
0
)
{
Logger
::
nrf_app
().
debug
(
"Do not support this operation for ausfInfo"
);
return
false
;
}
...
...
@@ -1199,8 +1198,7 @@ bool ausf_profile::remove_profile_info(const std::string& path) {
if
((
path
.
compare
(
"nfInstanceId"
)
!=
0
)
and
(
path
.
compare
(
"nfInstanceName"
)
!=
0
)
and
(
path
.
compare
(
"nfType"
)
!=
0
)
and
(
path
.
compare
(
"nfStatus"
)
!=
0
)
and
(
path
.
compare
(
"heartBeatTimer"
)
!=
0
)
and
(
path
.
compare
(
"fqdn"
)
!=
0
)
and
(
path
.
compare
(
"heartBeatTimer"
)
!=
0
)
and
(
path
.
compare
(
"fqdn"
)
!=
0
)
and
(
path
.
compare
(
"plmnList"
)
!=
0
)
and
(
path
.
compare
(
"ipv4Addresses"
)
!=
0
)
and
(
path
.
compare
(
"priority"
)
!=
0
)
and
(
path
.
compare
(
"capacity"
)
!=
0
)
and
...
...
@@ -1219,12 +1217,12 @@ void ausf_profile::to_json(nlohmann::json& data) const {
// AUSF Info
data
[
"ausfInfo"
][
"groupId"
]
=
ausf_info
.
groupid
;
data
[
"ausfInfo"
][
"supiRanges"
]
=
nlohmann
::
json
::
array
();
data
[
"ausfInfo"
][
"routingIndicators"
]
=
nlohmann
::
json
::
array
();
data
[
"ausfInfo"
][
"routingIndicators"
]
=
nlohmann
::
json
::
array
();
for
(
auto
supi
:
ausf_info
.
supi_ranges
)
{
nlohmann
::
json
tmp
=
{};
tmp
[
"start"
]
=
supi
.
supi_range
.
start
;
tmp
[
"end"
]
=
supi
.
supi_range
.
end
;
tmp
[
"pattern"
]
=
supi
.
supi_range
.
pattern
;
nlohmann
::
json
tmp
=
{};
tmp
[
"start"
]
=
supi
.
supi_range
.
start
;
tmp
[
"end"
]
=
supi
.
supi_range
.
end
;
tmp
[
"pattern"
]
=
supi
.
supi_range
.
pattern
;
data
[
"ausfInfo"
][
"supiRanges"
].
push_back
(
tmp
);
}
for
(
auto
route_ind
:
ausf_info
.
routing_indicator
)
{
...
...
src/nrf_app/nrf_profile.hpp
View file @
5fc7b13f
...
...
@@ -780,10 +780,12 @@ class upf_profile : public nrf_profile {
class
ausf_profile
:
public
nrf_profile
{
public:
ausf_profile
(
nrf_event
&
ev
)
:
nrf_profile
(
ev
,
NF_TYPE_AUSF
)
{
ausf_info
=
{};
}
ausf_profile
(
nrf_event
&
ev
)
:
nrf_profile
(
ev
,
NF_TYPE_AUSF
)
{
ausf_info
=
{};
}
ausf_profile
(
nrf_event
&
ev
,
const
std
::
string
&
id
)
:
nrf_profile
(
ev
,
id
)
{
nf_type
=
NF_TYPE_AUSF
;
nf_type
=
NF_TYPE_AUSF
;
ausf_info
=
{};
}
...
...
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