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
ea5d7006
Commit
ea5d7006
authored
Apr 14, 2022
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add function header for AMF N2
parent
ef3b798f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
91 additions
and
36 deletions
+91
-36
src/amf-app/amf_n2.cpp
src/amf-app/amf_n2.cpp
+4
-23
src/amf-app/amf_n2.hpp
src/amf-app/amf_n2.hpp
+87
-13
No files found.
src/amf-app/amf_n2.cpp
View file @
ea5d7006
...
...
@@ -2168,7 +2168,8 @@ std::shared_ptr<ue_ngap_context> amf_n2::ran_ue_id_2_ue_ngap_context(
//------------------------------------------------------------------------------
void
amf_n2
::
set_ran_ue_ngap_id_2_ue_ngap_context
(
const
uint32_t
&
ran_ue_ngap_id
,
std
::
shared_ptr
<
ue_ngap_context
>
unc
)
{
const
uint32_t
&
ran_ue_ngap_id
,
const
std
::
shared_ptr
<
ue_ngap_context
>&
unc
)
{
std
::
unique_lock
lock
(
m_ranid2uecontext
);
ranid2uecontext
[
ran_ue_ngap_id
]
=
unc
;
}
...
...
@@ -2285,30 +2286,10 @@ void amf_n2::remove_ue_context_with_amf_ue_ngap_id(
remove_amf_ue_ngap_id_2_ue_ngap_context
(
amf_ue_ngap_id
);
}
//------------------------------------------------------------------------------
bool
amf_n2
::
verifyPlmn
(
vector
<
SupportedItem_t
>
list
)
{
for
(
int
i
=
0
;
i
<
amf_cfg
.
plmn_list
.
size
();
i
++
)
{
for
(
int
j
=
0
;
j
<
list
.
size
();
j
++
)
{
Logger
::
amf_n2
().
debug
(
"TAC configured %d, TAC received %d"
,
amf_cfg
.
plmn_list
[
i
].
tac
,
list
[
j
].
tac
);
if
(
amf_cfg
.
plmn_list
[
i
].
tac
!=
list
[
j
].
tac
)
{
continue
;
}
for
(
int
k
=
0
;
k
<
list
[
j
].
b_plmn_list
.
size
();
k
++
)
{
if
(
!
(
list
[
j
].
b_plmn_list
[
k
].
mcc
.
compare
(
amf_cfg
.
plmn_list
[
i
].
mcc
))
&&
!
(
list
[
j
].
b_plmn_list
[
k
].
mnc
.
compare
(
amf_cfg
.
plmn_list
[
i
].
mnc
)))
{
return
true
;
}
}
}
}
return
false
;
}
//------------------------------------------------------------------------------
bool
amf_n2
::
get_common_plmn
(
std
::
vector
<
SupportedItem_t
>
list
,
std
::
vector
<
SupportedItem_t
>&
result
)
{
const
std
::
vector
<
SupportedItem_t
>&
list
,
std
::
vector
<
SupportedItem_t
>&
result
)
{
std
::
vector
<
SupportedItem_t
>
plmn_list
=
{};
bool
found_common_plmn
=
false
;
for
(
int
i
=
0
;
i
<
amf_cfg
.
plmn_list
.
size
();
i
++
)
{
...
...
src/amf-app/amf_n2.hpp
View file @
ea5d7006
...
...
@@ -191,44 +191,118 @@ class amf_n2 : public ngap::ngap_app {
*/
void
handle_itti_message
(
itti_paging
&
itti_msg
);
// TODO
/*
* Send Handover Preparaton Failure message
* @param [const unsigned long] amf_ue_ngap_id: AMF UE NGAP ID
* @param [const uint32_t] ran_ue_ngap_id: RAN UE NGAP ID
* @param [const sctp_assoc_id_t&] gnb_assoc_id: gNB Association ID
* @return void
*/
void
send_handover_preparation_failure
(
const
unsigned
long
amf_ue_ngap_id
,
const
uint32_t
ran_ue_ngap_id
,
const
sctp_assoc_id_t
&
gnb_assoc_id
);
// TODO
bool
verifyPlmn
(
std
::
vector
<
SupportedItem_t
>
list
);
// TODO
/*
* Get list of common PLMN between AMF and gNB
* @param [const std::vector<SupportedItem_t>&] list: Supported TA list from
* gNB
* @param [std::vector<SupportedItem_t>&] result: list of common TA
* @return true if there's at least 1 common TA, otherwise return false
*/
bool
get_common_plmn
(
std
::
vector
<
SupportedItem_t
>
list
,
std
::
vector
<
SupportedItem_t
>&
result
);
// TODO
const
std
::
vector
<
SupportedItem_t
>&
list
,
std
::
vector
<
SupportedItem_t
>&
result
);
/*
* Get UE NGAP context associated with a RAN UE NGAP ID
* @param [const uint32_t&] ran_ue_ngap_id: RAN UE NGAP ID
* @return shared pointer to the UE NGAP context
*/
std
::
shared_ptr
<
ue_ngap_context
>
ran_ue_id_2_ue_ngap_context
(
const
uint32_t
&
ran_ue_ngap_id
)
const
;
// TODO
/*
* Verify whether a UE NGAP context associated with a RAN UE NGAP ID exist
* @param [const uint32_t&] ran_ue_ngap_id: RAN UE NGAP ID
* @return true if exist, otherwise return false
*/
bool
is_ran_ue_id_2_ue_ngap_context
(
const
uint32_t
&
ran_ue_ngap_id
)
const
;
// TODO
/*
* 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 std::shared_ptr<ue_ngap_context>&] unc: pointer to UE NGAP
* context
* @return void
*/
void
set_ran_ue_ngap_id_2_ue_ngap_context
(
const
uint32_t
&
ran_ue_ngap_id
,
std
::
shared_ptr
<
ue_ngap_context
>
unc
);
const
uint32_t
&
ran_ue_ngap_id
,
const
std
::
shared_ptr
<
ue_ngap_context
>&
unc
);
/*
* Remove UE NGAP context associated with a RAN UE NGAP ID
* @param [const uint32_t&] ran_ue_ngap_id: RAN UE NGAP ID
* @return void
*/
void
remove_ran_ue_ngap_id_2_ngap_context
(
const
uint32_t
&
ran_ue_ngap_id
);
// TODO:
/*
* Remove UE Context associated with a RAN UE NGAP ID
* @param [const uint32_t&] ran_ue_ngap_id: RAN UE NGAP ID
* @return void
*/
void
remove_ue_context_with_ran_ue_ngap_id
(
const
uint32_t
&
ran_ue_ngap_id
);
// TODO
/*
* Get UE NGAP context associated with a AMF UE NGAP ID
* @param [const unsigned long&] amf_ue_ngap_id: AMF UE NGAP ID
* @return shared pointer to the UE NGAP context
*/
std
::
shared_ptr
<
ue_ngap_context
>
amf_ue_id_2_ue_ngap_context
(
const
unsigned
long
&
amf_ue_ngap_id
)
const
;
// TODO
/*
* Verify whether a UE NGAP context associated with a AMF UE NGAP ID exist
* @param [const unsigned long&] amf_ue_ngap_id: AMF UE NGAP ID
* @return true if exist, otherwise return false
*/
bool
is_amf_ue_id_2_ue_ngap_context
(
const
unsigned
long
&
amf_ue_ngap_id
)
const
;
// TODO
/*
* 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 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
);
/*
* Remove UE NGAP context associated with a AMF UE NGAP ID
* @param [const unsigned 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
);
/*
* 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
);
/*
* Get list of UE Context associated with a gNB
* @param [const sctp_assoc_id_t&] gnb_assoc_id: gNB Association ID
* @param [std::vector<std::shared_ptr<ue_ngap_context>>&] ue_contexts: vector
* of UE Context
* @return void
*/
void
get_ue_ngap_contexts
(
const
sctp_assoc_id_t
&
gnb_assoc_id
,
std
::
vector
<
std
::
shared_ptr
<
ue_ngap_context
>>&
ue_contexts
);
...
...
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