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
9a3d4c98
Commit
9a3d4c98
authored
Jun 23, 2022
by
Tien Thinh NGUYEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add condition to Update AMF conf
parent
ff92e538
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
0 deletions
+43
-0
src/amf-app/amf_app.cpp
src/amf-app/amf_app.cpp
+17
-0
src/amf-app/amf_app.hpp
src/amf-app/amf_app.hpp
+25
-0
src/amf-app/amf_config.cpp
src/amf-app/amf_config.cpp
+1
-0
No files found.
src/amf-app/amf_app.cpp
View file @
9a3d4c98
...
...
@@ -778,9 +778,26 @@ bool amf_app::read_amf_configuration(nlohmann::json& json_data) {
//---------------------------------------------------------------------------------------------
bool
amf_app
::
update_amf_configuration
(
nlohmann
::
json
&
json_data
)
{
if
(
get_number_registered_ues
()
>
0
)
{
Logger
::
amf_app
().
info
(
"AMF is actively handling UEs, could not update AMF configuration"
);
return
false
;
}
return
amf_cfg
.
from_json
(
json_data
);
}
//---------------------------------------------------------------------------------------------
void
amf_app
::
get_number_registered_ues
(
uint32_t
&
num_ues
)
const
{
std
::
shared_lock
lock
(
m_amf_ue_ngap_id2ue_ctx
);
num_ues
=
amf_ue_ngap_id2ue_ctx
.
size
();
return
;
}
//---------------------------------------------------------------------------------------------
uint32_t
amf_app
::
get_number_registered_ues
()
const
{
std
::
shared_lock
lock
(
m_amf_ue_ngap_id2ue_ctx
);
return
amf_ue_ngap_id2ue_ctx
.
size
();
}
//---------------------------------------------------------------------------------------------
void
amf_app
::
add_n1n2_message_subscription
(
const
std
::
string
&
ue_ctx_id
,
const
n1n2sub_id_t
&
sub_id
,
...
...
src/amf-app/amf_app.hpp
View file @
9a3d4c98
...
...
@@ -166,9 +166,34 @@ class amf_app {
*/
void
handle_itti_message
(
itti_sbi_update_amf_configuration
&
itti_msg
);
/*
* Get the current AMF's configuration
* @param [nlohmann::json&]: json_data: Store AMF configuration
* @return true if success, otherwise return false
*/
bool
read_amf_configuration
(
nlohmann
::
json
&
json_data
);
/*
* Update AMF configuration
* @param [nlohmann::json&]: json_data: New AMF configuration
* @return true if success, otherwise return false
*/
bool
update_amf_configuration
(
nlohmann
::
json
&
json_data
);
/*
* Get number of registered UEs to this AMF
* @param [uint32_t&]: num_ues: Store the number of registered UEs
* @return void
*/
void
get_number_registered_ues
(
uint32_t
&
num_ues
)
const
;
/*
* Get number of registered UEs to this AMF
* @param void
* @return: number of registered UEs
*/
uint32_t
get_number_registered_ues
()
const
;
/*
* Verify if a UE context associated with an AMF UE NGAP ID exist
* @param [const long&] amf_ue_ngap_id: AMF UE NGAP ID
...
...
src/amf-app/amf_config.cpp
View file @
9a3d4c98
...
...
@@ -1017,6 +1017,7 @@ void amf_config::to_json(nlohmann::json& json_data) const {
}
}
//------------------------------------------------------------------------------
bool
amf_config
::
from_json
(
nlohmann
::
json
&
json_data
)
{
try
{
if
(
json_data
.
find
(
"instance"
)
!=
json_data
.
end
())
{
...
...
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