Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-AMF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
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-AMF
Commits
319f474f
Commit
319f474f
authored
Jun 30, 2022
by
Tien Thinh NGUYEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code cleanup
parent
ed5ea7f3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
83 deletions
+7
-83
src/amf-app/amf_config.cpp
src/amf-app/amf_config.cpp
+2
-3
src/amf-app/amf_n1.cpp
src/amf-app/amf_n1.cpp
+4
-54
src/amf-app/amf_n11.cpp
src/amf-app/amf_n11.cpp
+0
-12
src/amf-app/amf_n2.cpp
src/amf-app/amf_n2.cpp
+1
-14
No files found.
src/amf-app/amf_config.cpp
View file @
319f474f
...
...
@@ -230,12 +230,11 @@ int amf_config::load(const std::string& config_file) {
slice
.
sd
=
SD_NO_VALUE
;
// Default value
try
{
slice
.
sst
=
std
::
stoi
(
sst
);
// Get SD if available
if
(
!
sd
.
empty
())
slice
.
sd
=
std
::
stoi
(
sd
);
conv
::
sd_string_to_int
(
sd
,
slice
.
sd
);
}
catch
(
const
std
::
exception
&
err
)
{
Logger
::
amf_app
().
error
(
"Invalid SST/SD"
);
}
conv
::
sd_string_to_int
(
sd
,
slice
.
sd
);
plmn_item
.
slice_list
.
push_back
(
slice
);
}
plmn_list
.
push_back
(
plmn_item
);
...
...
src/amf-app/amf_n1.cpp
View file @
319f474f
...
...
@@ -4193,25 +4193,13 @@ bool amf_n1::check_subscribed_nssai(
for
(
auto
n
:
nssai
.
getDefaultSingleNssais
())
{
if
(
s
.
sst
==
n
.
getSst
())
{
uint32_t
sd
=
SD_NO_VALUE
;
if
(
!
n
.
getSd
().
empty
())
{
conv
::
sd_string_to_int
(
n
.
getSd
(),
sd
);
}
conv
::
sd_string_to_int
(
n
.
getSd
(),
sd
);
if
(
sd
==
s
.
sd
)
{
common_snssais
.
push_back
(
n
);
Logger
::
amf_n1
().
debug
(
"Common S-NSSAI (SST %d, SD %ld)"
,
s
.
sst
,
sd
);
break
;
}
/*
if ((s.sst <= SST_MAX_STANDARDIZED_VALUE) or
(n.sdIsSet() and (n.getSd().compare(sd) == 0)) or
(!n.sdIsSet() and sd.empty())) {
common_snssais.push_back(n);
Logger::amf_n1().debug(
"Common S-NSSAI (SST %d, SD %s)", s.sst, sd.c_str());
break;
}
*/
}
}
...
...
@@ -4219,25 +4207,13 @@ bool amf_n1::check_subscribed_nssai(
for
(
auto
n
:
nssai
.
getSingleNssais
())
{
if
(
s
.
sst
==
n
.
getSst
())
{
uint32_t
sd
=
SD_NO_VALUE
;
if
(
!
n
.
getSd
().
empty
())
{
conv
::
sd_string_to_int
(
n
.
getSd
(),
sd
);
}
conv
::
sd_string_to_int
(
n
.
getSd
(),
sd
);
if
(
sd
==
s
.
sd
)
{
common_snssais
.
push_back
(
n
);
Logger
::
amf_n1
().
debug
(
"Common S-NSSAI (SST %d, SD %ld)"
,
s
.
sst
,
sd
);
break
;
}
/*
if ((s.sst <= SST_MAX_STANDARDIZED_VALUE) or
(n.sdIsSet() and (n.getSd().compare(sd) == 0)) or
(!n.sdIsSet() and sd.empty())) {
common_snssais.push_back(n);
Logger::amf_n1().debug(
"Common S-NSSAI (SST %d, SD %s)", s.sst, sd.c_str());
break;
}
*/
}
}
}
...
...
@@ -4250,28 +4226,15 @@ bool amf_n1::check_subscribed_nssai(
for
(
auto
n
:
nssai
.
getDefaultSingleNssais
())
{
bool
found_nssai
=
false
;
for
(
auto
s
:
p
.
slice_list
)
{
// std::string sd = std::to_string(s.sd);
if
(
s
.
sst
==
n
.
getSst
())
{
uint32_t
sd
=
SD_NO_VALUE
;
if
(
!
n
.
getSd
().
empty
())
{
conv
::
sd_string_to_int
(
n
.
getSd
(),
sd
);
}
conv
::
sd_string_to_int
(
n
.
getSd
(),
sd
);
if
(
sd
==
s
.
sd
)
{
found_nssai
=
true
;
Logger
::
amf_n1
().
debug
(
"Found S-NSSAI (SST %d, SD %s)"
,
s
.
sst
,
n
.
getSd
().
c_str
());
break
;
}
/*
if ((s.sst <= SST_MAX_STANDARDIZED_VALUE) or
(n.sdIsSet() and (n.getSd().compare(sd) == 0)) or
(!n.sdIsSet() and sd.empty())) {
found_nssai = true;
Logger::amf_n1().debug(
"Found S-NSSAI (SST %d, SD %s)", s.sst, n.getSd().c_str());
break;
}
*/
}
}
...
...
@@ -4285,28 +4248,15 @@ bool amf_n1::check_subscribed_nssai(
for
(
auto
n
:
common_snssais
)
{
bool
found_nssai
=
false
;
for
(
auto
s
:
p
.
slice_list
)
{
// std::string sd = std::to_string(s.sd);
if
(
s
.
sst
==
n
.
getSst
())
{
uint32_t
sd
=
SD_NO_VALUE
;
if
(
!
n
.
getSd
().
empty
())
{
conv
::
sd_string_to_int
(
n
.
getSd
(),
sd
);
}
conv
::
sd_string_to_int
(
n
.
getSd
(),
sd
);
if
(
sd
==
s
.
sd
)
{
found_nssai
=
true
;
Logger
::
amf_n1
().
debug
(
"Found S-NSSAI (SST %d, SD %s)"
,
s
.
sst
,
n
.
getSd
().
c_str
());
break
;
}
/*
if ((s.sst <= SST_MAX_STANDARDIZED_VALUE) or
(n.sdIsSet() and (n.getSd().compare(sd) == 0)) or
(!n.sdIsSet() and sd.empty())) {
found_nssai = true;
Logger::amf_n1().debug(
"Found S-NSSAI (SST %d, SD %s)", s.sst, n.getSd().c_str());
break;
}
*/
}
}
...
...
src/amf-app/amf_n11.cpp
View file @
319f474f
...
...
@@ -909,18 +909,6 @@ bool amf_n11::discover_smf(
break
;
// NSSAI is included in the list of supported slices
// from SMF
}
/*
// Match SD (optional) only if it is provided
if ((sst <= SST_MAX_STANDARDIZED_VALUE) or sd.empty() or
(snssai.sD.compare(sd) == 0)) {
Logger::amf_n11().debug(
"S-NSSAI [SST- %d, SD -%s] is matched for SMF profile",
snssai.sST, snssai.sD.c_str());
result = true;
break; // NSSAI is included in the list of supported slices
// from SMF
}
*/
}
}
}
...
...
src/amf-app/amf_n2.cpp
View file @
319f474f
...
...
@@ -2327,9 +2327,7 @@ bool amf_n2::get_common_plmn(
std
::
to_string
(
s2
.
sd
).
c_str
());
if
(
s1
.
sst
.
compare
(
std
::
to_string
(
s2
.
sst
))
==
0
)
{
uint32_t
s1_sd
=
SD_NO_VALUE
;
if
(
!
s1
.
sd
.
empty
())
{
conv
::
sd_string_to_int
(
s1
.
sd
,
s1_sd
);
}
conv
::
sd_string_to_int
(
s1
.
sd
,
s1_sd
);
if
(
s1_sd
==
s2
.
sd
)
{
Logger
::
amf_n2
().
debug
(
"Common S-NSSAI (SST %s, SD %s)"
,
s1
.
sst
.
c_str
(),
...
...
@@ -2337,17 +2335,6 @@ bool amf_n2::get_common_plmn(
plmn_slice_support_item
.
slice_list
.
push_back
(
s1
);
found_common_plmn
=
true
;
}
/*
if ((s2.sst <= SST_MAX_STANDARDIZED_VALUE) or
(s1.sd.compare(std::to_string(s2.sd)) ==
0)) { // don't need to check SD for
standard NSSAI Logger::amf_n2().debug( "Common S-NSSAI (SST
%s, SD %s)", s1.sst.c_str(), s1.sd.c_str());
plmn_slice_support_item.slice_list.push_back(s1);
found_common_plmn = true;
}
*/
}
}
}
...
...
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