Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
UERANSIM
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
Libraries
UERANSIM
Commits
f0c8eec6
Commit
f0c8eec6
authored
Apr 17, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UE context release request added to gNB CLI
parent
d76d2453
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
2 deletions
+31
-2
src/app/cli_cmd.cpp
src/app/cli_cmd.cpp
+13
-0
src/app/cli_cmd.hpp
src/app/cli_cmd.hpp
+5
-1
src/gnb/app/cmd_handler.cpp
src/gnb/app/cmd_handler.cpp
+13
-1
No files found.
src/app/cli_cmd.cpp
View file @
f0c8eec6
...
...
@@ -150,6 +150,7 @@ static OrderedMap<std::string, CmdEntry> g_gnbCmdEntries = {
{
"amf-info"
,
{
"Show some status information about the given AMF"
,
"<amf-id>"
,
DefaultDesc
,
true
}},
{
"ue-list"
,
{
"List all UEs associated with the gNB"
,
""
,
DefaultDesc
,
false
}},
{
"ue-count"
,
{
"Print the total number of UEs connected the this gNB"
,
""
,
DefaultDesc
,
false
}},
{
"ue-release"
,
{
"Request a UE context release for the given UE"
,
"<ue-id>"
,
DefaultDesc
,
false
}},
};
static
OrderedMap
<
std
::
string
,
CmdEntry
>
g_ueCmdEntries
=
{
...
...
@@ -200,6 +201,18 @@ static std::unique_ptr<GnbCliCommand> GnbCliParseImpl(const std::string &subCmd,
{
return
std
::
make_unique
<
GnbCliCommand
>
(
GnbCliCommand
::
UE_COUNT
);
}
else
if
(
subCmd
==
"ue-release"
)
{
auto
cmd
=
std
::
make_unique
<
GnbCliCommand
>
(
GnbCliCommand
::
UE_RELEASE_REQ
);
if
(
options
.
positionalCount
()
==
0
)
CMD_ERR
(
"UE ID is expected"
)
if
(
options
.
positionalCount
()
>
1
)
CMD_ERR
(
"Only one UE ID is expected"
)
cmd
->
ueId
=
utils
::
ParseInt
(
options
.
getPositional
(
0
));
if
(
cmd
->
ueId
<=
0
)
CMD_ERR
(
"Invalid UE ID"
)
return
cmd
;
}
return
nullptr
;
}
...
...
src/app/cli_cmd.hpp
View file @
f0c8eec6
...
...
@@ -26,12 +26,16 @@ struct GnbCliCommand
AMF_LIST
,
AMF_INFO
,
UE_LIST
,
UE_COUNT
UE_COUNT
,
UE_RELEASE_REQ
,
}
present
;
// AMF_INFO
int
amfId
{};
// UE_RELEASE_REQ
int
ueId
{};
explicit
GnbCliCommand
(
PR
present
)
:
present
(
present
)
{
}
...
...
src/gnb/app/cmd_handler.cpp
View file @
f0c8eec6
...
...
@@ -11,8 +11,8 @@
#include <gnb/app/task.hpp>
#include <gnb/gtp/task.hpp>
#include <gnb/ngap/task.hpp>
#include <gnb/rrc/task.hpp>
#include <gnb/rls/task.hpp>
#include <gnb/rrc/task.hpp>
#include <gnb/sctp/task.hpp>
#include <utils/common.hpp>
#include <utils/printer.hpp>
...
...
@@ -131,6 +131,7 @@ void GnbCmdHandler::handleCmdImpl(NwGnbCliCommand &msg)
for
(
auto
&
ue
:
m_base
->
ngapTask
->
m_ueCtx
)
{
json
.
push
(
Json
::
Obj
({
{
"ue-id"
,
ue
.
first
},
{
"ran-ngap-id"
,
ue
.
second
->
ranUeNgapId
},
{
"amf-ngap-id"
,
ue
.
second
->
amfUeNgapId
},
}));
...
...
@@ -142,6 +143,17 @@ void GnbCmdHandler::handleCmdImpl(NwGnbCliCommand &msg)
sendResult
(
msg
.
address
,
std
::
to_string
(
m_base
->
ngapTask
->
m_ueCtx
.
size
()));
break
;
}
case
app
:
:
GnbCliCommand
::
UE_RELEASE_REQ
:
{
if
(
m_base
->
ngapTask
->
m_ueCtx
.
count
(
msg
.
cmd
->
ueId
)
==
0
)
sendError
(
msg
.
address
,
"UE not found with given ID"
);
else
{
auto
ue
=
m_base
->
ngapTask
->
m_ueCtx
[
msg
.
cmd
->
ueId
];
m_base
->
ngapTask
->
sendContextRelease
(
ue
->
ctxId
,
NgapCause
::
RadioNetwork_unspecified
);
sendResult
(
msg
.
address
,
"UE Context Release Request is sending for specified UE"
);
}
break
;
}
}
}
...
...
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