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
d1f42853
Commit
d1f42853
authored
Mar 09, 2023
by
Tien Thinh NGUYEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code cleanup
parent
9045bafd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
30 deletions
+24
-30
src/amf-app/amf_n2.cpp
src/amf-app/amf_n2.cpp
+5
-8
src/amf-app/amf_n2.hpp
src/amf-app/amf_n2.hpp
+19
-22
No files found.
src/amf-app/amf_n2.cpp
View file @
d1f42853
...
...
@@ -2301,8 +2301,7 @@ void amf_n2::get_ue_ngap_contexts(
}
//------------------------------------------------------------------------------
bool
amf_n2
::
is_amf_ue_id_2_ue_ngap_context
(
const
unsigned
long
&
amf_ue_ngap_id
)
const
{
bool
amf_n2
::
is_amf_ue_id_2_ue_ngap_context
(
const
long
&
amf_ue_ngap_id
)
const
{
std
::
shared_lock
lock
(
m_amfueid2uecontext
);
if
(
amfueid2uecontext
.
count
(
amf_ue_ngap_id
)
>
0
)
{
if
(
amfueid2uecontext
.
at
(
amf_ue_ngap_id
)
!=
nullptr
)
{
...
...
@@ -2314,8 +2313,7 @@ bool amf_n2::is_amf_ue_id_2_ue_ngap_context(
//------------------------------------------------------------------------------
bool
amf_n2
::
amf_ue_id_2_ue_ngap_context
(
const
unsigned
long
&
amf_ue_ngap_id
,
std
::
shared_ptr
<
ue_ngap_context
>&
unc
)
const
{
const
long
&
amf_ue_ngap_id
,
std
::
shared_ptr
<
ue_ngap_context
>&
unc
)
const
{
std
::
shared_lock
lock
(
m_amfueid2uecontext
);
if
(
amfueid2uecontext
.
count
(
amf_ue_ngap_id
)
>
0
)
{
unc
=
amfueid2uecontext
.
at
(
amf_ue_ngap_id
);
...
...
@@ -2328,14 +2326,14 @@ bool amf_n2::amf_ue_id_2_ue_ngap_context(
//------------------------------------------------------------------------------
void
amf_n2
::
set_amf_ue_ngap_id_2_ue_ngap_context
(
const
unsigned
long
&
amf_ue_ngap_id
,
std
::
shared_ptr
<
ue_ngap_context
>
unc
)
{
const
long
&
amf_ue_ngap_id
,
std
::
shared_ptr
<
ue_ngap_context
>
unc
)
{
std
::
unique_lock
lock
(
m_amfueid2uecontext
);
amfueid2uecontext
[
amf_ue_ngap_id
]
=
unc
;
}
//------------------------------------------------------------------------------
void
amf_n2
::
remove_amf_ue_ngap_id_2_ue_ngap_context
(
const
unsigned
long
&
amf_ue_ngap_id
)
{
const
long
&
amf_ue_ngap_id
)
{
std
::
unique_lock
lock
(
m_amfueid2uecontext
);
if
(
amfueid2uecontext
.
count
(
amf_ue_ngap_id
)
>
0
)
{
amfueid2uecontext
.
erase
(
amf_ue_ngap_id
);
...
...
@@ -2343,8 +2341,7 @@ void amf_n2::remove_amf_ue_ngap_id_2_ue_ngap_context(
}
//------------------------------------------------------------------------------
void
amf_n2
::
remove_ue_context_with_amf_ue_ngap_id
(
const
unsigned
long
&
amf_ue_ngap_id
)
{
void
amf_n2
::
remove_ue_context_with_amf_ue_ngap_id
(
const
long
&
amf_ue_ngap_id
)
{
// Remove all NAS context if still exist
std
::
shared_ptr
<
nas_context
>
nc
=
{};
if
(
amf_n1_inst
->
amf_ue_id_2_nas_context
(
amf_ue_ngap_id
,
nc
))
{
...
...
src/amf-app/amf_n2.hpp
View file @
d1f42853
...
...
@@ -241,10 +241,10 @@ class amf_n2 : public ngap::ngap_app {
/*
* Get the UE NGAP context associated with a RAN UE NGAP ID if it exists and
* not null
* @param [
const
uint32_t&] ran_ue_ngap_id: RAN UE NGAP ID
* @param [uint32_t&] ran_ue_ngap_id: RAN UE NGAP ID
* @param [const std::string&] ue_context_key: UE context key from AMF UE NGAP
* ID and RAN UE NGAP ID
* @param [std::shared_ptr<ue_ngap_context>&] unc: shared pointer to the
* @param [
const
std::shared_ptr<ue_ngap_context>&] unc: shared pointer to the
* existing UE NGAP context
* @return true if the context exists and is not null, otherwise return false
*/
...
...
@@ -253,8 +253,8 @@ class amf_n2 : public ngap::ngap_app {
std
::
shared_ptr
<
ue_ngap_context
>&
unc
)
const
;
/*
* Verify whether a UE NGAP context associated with a RAN UE NGAP ID exists
* @param [
const uint32_t&
] ran_ue_ngap_id: RAN UE NGAP ID
* @param [
const uint32_t&
] gnb_id: gNB ID
* @param [
uint32_t
] ran_ue_ngap_id: RAN UE NGAP ID
* @param [
uint32_t
] gnb_id: gNB ID
* @return true if the context exists and is not null, otherwise return false
*/
bool
is_ran_ue_id_2_ue_ngap_context
(
...
...
@@ -262,8 +262,8 @@ class amf_n2 : public ngap::ngap_app {
/*
* Store UE NGAP context associated with a RAN UE NGAP ID
* @param [
const uint32_t&
] ran_ue_ngap_id: RAN UE NGAP ID
* @param [
const uint32_t&
] gnb_id: gNB ID
* @param [
uint32_t
] ran_ue_ngap_id: RAN UE NGAP ID
* @param [
uint32_t
] gnb_id: gNB ID
* @param [const std::shared_ptr<ue_ngap_context>&] unc: pointer to UE NGAP
* context
* @return void
...
...
@@ -274,7 +274,8 @@ class amf_n2 : public ngap::ngap_app {
/*
* Remove UE NGAP context associated with a RAN UE NGAP ID
* @param [const uint32_t&] ran_ue_ngap_id: RAN UE NGAP ID
* @param [uint32_t] ran_ue_ngap_id: RAN UE NGAP ID
* @param [uint32_t] gnb_id: gNB ID
* @return void
*/
void
remove_ran_ue_ngap_id_2_ngap_context
(
...
...
@@ -282,7 +283,8 @@ class amf_n2 : public ngap::ngap_app {
/*
* Remove UE Context associated with a RAN UE NGAP ID
* @param [const uint32_t&] ran_ue_ngap_id: RAN UE NGAP ID
* @param [uint32_t] ran_ue_ngap_id: RAN UE NGAP ID
* @param [uint32_t] gnb_id: gNB ID
* @return void
*/
void
remove_ue_context_with_ran_ue_ngap_id
(
...
...
@@ -291,50 +293,45 @@ class amf_n2 : public ngap::ngap_app {
/*
* Verify whether a UE NGAP context associated with a AMF UE NGAP ID exists
* and is not null
* @param [const
unsigned
long&] amf_ue_ngap_id: AMF UE NGAP ID
* @param [const long&] amf_ue_ngap_id: AMF UE NGAP ID
* @return true if the context exists and is not null, otherwise return false
*/
bool
is_amf_ue_id_2_ue_ngap_context
(
const
unsigned
long
&
amf_ue_ngap_id
)
const
;
bool
is_amf_ue_id_2_ue_ngap_context
(
const
long
&
amf_ue_ngap_id
)
const
;
/*
* Get UE NGAP context associated with a AMF UE NGAP ID if the context exists
* and is not null
* @param [const
unsigned
long&] amf_ue_ngap_id: AMF UE NGAP ID
* @param [const long&] amf_ue_ngap_id: AMF UE NGAP ID
* @param [std::shared_ptr<ue_ngap_context>&] unc: store the pointer to UE
* NGAP context
* @return true if the context exists and is not null, otherwise return false
*/
bool
amf_ue_id_2_ue_ngap_context
(
const
unsigned
long
&
amf_ue_ngap_id
,
std
::
shared_ptr
<
ue_ngap_context
>&
unc
)
const
;
const
long
&
amf_ue_ngap_id
,
std
::
shared_ptr
<
ue_ngap_context
>&
unc
)
const
;
/*
* Store UE NGAP context associated with a AMF UE NGAP ID
* @param [const
unsigned
long&] amf_ue_ngap_id: AMF UE NGAP ID
* @param [const long&] amf_ue_ngap_id: AMF UE NGAP ID
* @param [const std::shared_ptr<ue_ngap_context>&] unc: pointer to UE NGAP
* context
* @return void
*/
void
set_amf_ue_ngap_id_2_ue_ngap_context
(
const
unsigned
long
&
amf_ue_ngap_id
,
std
::
shared_ptr
<
ue_ngap_context
>
unc
);
const
long
&
amf_ue_ngap_id
,
std
::
shared_ptr
<
ue_ngap_context
>
unc
);
/*
* Remove UE NGAP context associated with a AMF UE NGAP ID
* @param [const
unsigned
long&] amf_ue_ngap_id: AMF UE NGAP ID
* @param [const long&] amf_ue_ngap_id: AMF UE NGAP ID
* @return void
*/
void
remove_amf_ue_ngap_id_2_ue_ngap_context
(
const
unsigned
long
&
amf_ue_ngap_id
);
void
remove_amf_ue_ngap_id_2_ue_ngap_context
(
const
long
&
amf_ue_ngap_id
);
/*
* Remove UE Context associated with a AMF UE NGAP ID
* @param [const unsigned long&] amf_ue_ngap_id: AMF UE NGAP ID
* @return void
*/
void
remove_ue_context_with_amf_ue_ngap_id
(
const
unsigned
long
&
amf_ue_ngap_id
);
void
remove_ue_context_with_amf_ue_ngap_id
(
const
long
&
amf_ue_ngap_id
);
/*
* Get list of UE Context associated with a gNB
...
...
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