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
6b654827
Commit
6b654827
authored
Mar 10, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update gNB/UE statistic
parent
212fedf7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
39 deletions
+44
-39
src/amf-app/amf_n2.cpp
src/amf-app/amf_n2.cpp
+14
-13
src/amf-app/amf_statistics.cpp
src/amf-app/amf_statistics.cpp
+9
-22
src/amf-app/amf_statistics.hpp
src/amf-app/amf_statistics.hpp
+18
-0
src/ngap/ngap_app/ngap_app.cpp
src/ngap/ngap_app/ngap_app.cpp
+3
-4
No files found.
src/amf-app/amf_n2.cpp
View file @
6b654827
...
...
@@ -237,19 +237,21 @@ void amf_n2::handle_itti_message(itti_ng_setup_request& itti_msg) {
"Update gNB context with assoc id (%d)"
,
itti_msg
.
assoc_id
);
}
gnb_infos
gnbItem
;
gnb_infos
gnbItem
=
{}
;
// Get IE Global RAN Node ID
uint32_t
gnb_id
;
uint32_t
gnb_id
=
{}
;
std
::
string
gnb_mcc
;
std
::
string
gnb_mnc
;
if
(
!
itti_msg
.
ngSetupReq
->
getGlobalGnbID
(
gnb_id
,
gnb_mcc
,
gnb_mnc
))
{
Logger
::
amf_n2
().
error
(
"Missing Mandatory IE Global
Gnb
ID"
);
Logger
::
amf_n2
().
error
(
"Missing Mandatory IE Global
RAN Node
ID"
);
return
;
}
Logger
::
amf_n2
().
debug
(
"
IE GlobalGNB
ID: 0x%x"
,
gnb_id
);
Logger
::
amf_n2
().
debug
(
"
Global RAN Node
ID: 0x%x"
,
gnb_id
);
gc
->
globalRanNodeId
=
gnb_id
;
gnbItem
.
gnb_id
=
gnb_id
;
gnbItem
.
mcc
=
gnb_mcc
;
gnbItem
.
mnc
=
gnb_mnc
;
std
::
string
gnb_name
;
if
(
!
itti_msg
.
ngSetupReq
->
getRanNodeName
(
gnb_name
))
{
...
...
@@ -267,15 +269,16 @@ void amf_n2::handle_itti_message(itti_ng_setup_request& itti_msg) {
}
Logger
::
amf_n2
().
debug
(
"IE DefaultPagingDRX: %d"
,
defPagingDrx
);
// Get supported TA List
vector
<
SupportedItem_t
>
s_ta_list
;
if
(
!
itti_msg
.
ngSetupReq
->
getSupportedTAList
(
s_ta_list
))
{
// getSupportedTAList
if
(
!
itti_msg
.
ngSetupReq
->
getSupportedTAList
(
s_ta_list
))
{
return
;
}
// TODO: should be removed, since we stored list of common PLMNs
gnbItem
.
mcc
=
s_ta_list
[
0
].
b_plmn_list
[
0
].
mcc
;
gnbItem
.
mnc
=
s_ta_list
[
0
].
b_plmn_list
[
0
].
mnc
;
gnbItem
.
tac
=
s_ta_list
[
0
].
tac
;
// gnbItem.mcc = s_ta_list[0].b_plmn_list[0].mcc;
// gnbItem.mnc = s_ta_list[0].b_plmn_list[0].mnc;
// gnbItem.tac = s_ta_list[0].tac;
// association GlobalRANNodeID with assoc_id
// store RAN Node Name in gNB context, if present
// verify PLMN Identity and TAC with configuration and store supportedTAList
...
...
@@ -404,8 +407,6 @@ void amf_n2::handle_itti_message(itti_ng_reset& itti_msg) {
//------------------------------------------------------------------------------
void
amf_n2
::
handle_itti_message
(
itti_ng_shutdown
&
itti_msg
)
{
Logger
::
amf_n2
().
debug
(
"Parameters: assoc_id %d"
,
itti_msg
.
assoc_id
);
std
::
shared_ptr
<
gnb_context
>
gc
;
if
(
!
is_assoc_id_2_gnb_context
(
itti_msg
.
assoc_id
))
{
Logger
::
amf_n2
().
error
(
...
...
@@ -434,11 +435,11 @@ void amf_n2::handle_itti_message(itti_ng_shutdown& itti_msg) {
}
// Delete gNB context
Logger
::
amf_n2
().
debug
(
"Remove gNB Context %d"
,
itti_msg
.
assoc_id
);
remove_gnb_context
(
itti_msg
.
assoc_id
);
stacs
.
gnbs
.
erase
(
gc
.
get
()
->
globalRanNodeId
);
Logger
::
amf_n2
().
debug
(
"Remove gNB with globalRanNodeId 0x%x"
,
gc
.
get
()
->
globalRanNodeId
);
"Remove gNB with association id %d, globalRanNodeId 0x%x"
,
itti_msg
.
assoc_id
,
gc
.
get
()
->
globalRanNodeId
);
stacs
.
gNB_connected
-=
1
;
stacs
.
display
();
return
;
...
...
src/amf-app/amf_statistics.cpp
View file @
6b654827
...
...
@@ -33,13 +33,7 @@
//------------------------------------------------------------------------------
void
statistics
::
display
()
{
Logger
::
amf_app
().
info
(
""
);
// Logger::amf_app().info("--------------------------------------------------");
// Logger::amf_app().info("| connected gNBs | connected UEs | registered UEs
// |");
// Logger::amf_app().info("--------------------------------------------------");
// Logger::amf_app().info("| %d | %d | %d
// |",gNB_connected,UE_connected,UE_registred);
// Logger::amf_app().info("--------------------------------------------------");
Logger
::
amf_app
().
info
(
"|-----------------------------------------------------------------------"
"-----------------------------------------|"
);
...
...
@@ -48,31 +42,24 @@ void statistics::display() {
"information-------------------------------------------|"
);
Logger
::
amf_app
().
info
(
"| Index | Status | Global ID | gNB "
"Name |
Tracking Area (PLMN, TAC)
|"
);
"Name |
PLMN | Supported TA list
|"
);
if
(
gnbs
.
size
()
==
0
)
{
Logger
::
amf_app
().
info
(
"| - | - | - | "
"- |
-
|"
);
"- |
- | -
|"
);
}
// TODO: Show the list of common PLMNs
int
i
=
1
;
for
(
auto
const
&
gnb
:
gnbs
)
{
Logger
::
amf_app
().
info
(
"| %d | Connected | 0x%x | %s "
" |
%s, %d |
"
,
" |
%s, %s | %s |
"
,
i
,
gnb
.
second
.
gnb_id
,
gnb
.
second
.
gnb_name
.
c_str
(),
(
gnb
.
second
.
mcc
+
gnb
.
second
.
mnc
).
c_str
(),
gnb
.
second
.
tac
);
gnb
.
second
.
mcc
.
c_str
(),
gnb
.
second
.
mnc
.
c_str
(),
gnb
.
second
.
plmn_to_string
().
c_str
());
i
++
;
}
/* for (int i = 0; i < gnbs.size(); i++) {
Logger::amf_app().info(
"| %d | Connected | 0x%x | %s "
" | %s, %d | ",
i + 1, gnbs[i].gnb_id, gnbs[i].gnb_name.c_str(),
(gnbs[i].mcc + gnbs[i].mnc).c_str(), gnbs[i].tac);
}
*/
Logger
::
amf_app
().
info
(
"|-----------------------------------------------------------------------"
"-----------------------------------------|"
);
...
...
@@ -91,10 +78,10 @@ void statistics::display() {
i
=
0
;
for
(
auto
const
&
ue
:
ue_infos
)
{
Logger
::
amf_app
().
info
(
"|%7d|%22s|%18s|%15s|%16d|%11d|%
9
s|%7d|"
,
i
+
1
,
"|%7d|%22s|%18s|%15s|%16d|%11d|%
3s, %4
s|%7d|"
,
i
+
1
,
ue
.
second
.
registerStatus
.
c_str
(),
ue
.
second
.
imsi
.
c_str
(),
ue
.
second
.
guti
.
c_str
(),
ue
.
second
.
ranid
,
ue
.
second
.
amfid
,
(
ue
.
second
.
mcc
+
ue
.
second
.
mnc
)
.
c_str
(),
ue
.
second
.
cellId
);
ue
.
second
.
mcc
.
c_str
(),
ue
.
second
.
mnc
.
c_str
(),
ue
.
second
.
cellId
);
i
++
;
}
Logger
::
amf_app
().
info
(
...
...
src/amf-app/amf_statistics.hpp
View file @
6b654827
...
...
@@ -44,6 +44,24 @@ typedef struct {
std
::
string
gnb_name
;
uint32_t
tac
;
// long nrCellId;
std
::
string
plmn_to_string
()
const
{
std
::
string
s
=
{};
s
.
append
(
"PLMN List: "
);
for
(
auto
supported_item
:
plmn_list
)
{
s
.
append
(
"TAC "
+
std
::
to_string
(
supported_item
.
tac
));
s
.
append
(
"PLMNs ("
);
for
(
auto
plmn_slice
:
supported_item
.
b_plmn_list
)
{
s
.
append
(
"(MCC "
+
plmn_slice
.
mcc
);
s
.
append
(
", MNC "
+
plmn_slice
.
mnc
);
for
(
auto
slice
:
plmn_slice
.
slice_list
)
{
s
.
append
(
"(SST "
+
slice
.
sst
+
", SD "
+
slice
.
sd
+
")"
);
}
s
.
append
(
")"
);
}
s
.
append
(
")"
);
}
return
s
;
}
}
gnb_infos
;
typedef
struct
ue_info_s
{
...
...
src/ngap/ngap_app/ngap_app.cpp
View file @
6b654827
...
...
@@ -170,10 +170,9 @@ void ngap_app::set_gnb_id_2_gnb_context(
//------------------------------------------------------------------------------
void
ngap_app
::
remove_gnb_context
(
const
long
&
gnb_id
)
{
if
(
is_gnb_id_2_gnb_context
(
gnb_id
))
{
std
::
unique_lock
lock
(
m_gnbid2gnbContext
);
gnbid2gnbContext
.
erase
(
gnb_id
);
return
;
std
::
unique_lock
lock
(
m_gnbid2gnbContext
);
gnbid2gnbContext
.
erase
(
gnb_id
);
return
;
}
}
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