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
b7a56d6d
Commit
b7a56d6d
authored
Feb 13, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gNB CLI improvements
parent
c2374dd8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
src/app/cli_cmd.cpp
src/app/cli_cmd.cpp
+5
-5
src/app/cli_cmd.hpp
src/app/cli_cmd.hpp
+2
-2
src/gnb/app/cmd_handler.cpp
src/gnb/app/cmd_handler.cpp
+1
-1
No files found.
src/app/cli_cmd.cpp
View file @
b7a56d6d
...
@@ -64,21 +64,21 @@ namespace app
...
@@ -64,21 +64,21 @@ namespace app
static
std
::
map
<
std
::
string
,
std
::
string
>
g_gnbCmdToDescription
=
{
static
std
::
map
<
std
::
string
,
std
::
string
>
g_gnbCmdToDescription
=
{
{
"status"
,
"Show some status information about the gNB"
},
{
"status"
,
"Show some status information about the gNB"
},
{
"amf-list"
,
"List all AMFs associated with the gNB"
},
{
"amf-list"
,
"List all AMFs associated with the gNB"
},
{
"amf-
status
"
,
"Show some status information about the given AMF"
},
{
"amf-
info
"
,
"Show some status information about the given AMF"
},
{
"info"
,
"Show some information about the gNB"
},
{
"info"
,
"Show some information about the gNB"
},
};
};
static
std
::
map
<
std
::
string
,
std
::
string
>
g_gnbCmdToUsage
=
{
static
std
::
map
<
std
::
string
,
std
::
string
>
g_gnbCmdToUsage
=
{
{
"status"
,
"[option...]"
},
{
"status"
,
"[option...]"
},
{
"amf-list"
,
"[option...]"
},
{
"amf-list"
,
"[option...]"
},
{
"amf-
status
"
,
"<amf-id> [option...]"
},
{
"amf-
info
"
,
"<amf-id> [option...]"
},
{
"info"
,
"[option...]"
},
{
"info"
,
"[option...]"
},
};
};
static
std
::
map
<
std
::
string
,
bool
>
g_gnbCmdToHelpIfEmpty
=
{
static
std
::
map
<
std
::
string
,
bool
>
g_gnbCmdToHelpIfEmpty
=
{
{
"status"
,
false
},
{
"status"
,
false
},
{
"amf-list"
,
false
},
{
"amf-list"
,
false
},
{
"amf-
status
"
,
true
},
{
"amf-
info
"
,
true
},
{
"info"
,
false
},
{
"info"
,
false
},
};
};
...
@@ -133,9 +133,9 @@ std::unique_ptr<GnbCliCommand> ParseGnbCliCommand(std::vector<std::string> &&tok
...
@@ -133,9 +133,9 @@ std::unique_ptr<GnbCliCommand> ParseGnbCliCommand(std::vector<std::string> &&tok
{
{
return
std
::
make_unique
<
GnbCliCommand
>
(
GnbCliCommand
::
AMF_LIST
);
return
std
::
make_unique
<
GnbCliCommand
>
(
GnbCliCommand
::
AMF_LIST
);
}
}
else
if
(
subCmd
==
"amf-
status
"
)
else
if
(
subCmd
==
"amf-
info
"
)
{
{
auto
cmd
=
std
::
make_unique
<
GnbCliCommand
>
(
GnbCliCommand
::
AMF_
STATUS
);
auto
cmd
=
std
::
make_unique
<
GnbCliCommand
>
(
GnbCliCommand
::
AMF_
INFO
);
if
(
options
.
positionalCount
()
==
0
)
if
(
options
.
positionalCount
()
==
0
)
CMD_ERR
(
"AMF ID is expected"
)
CMD_ERR
(
"AMF ID is expected"
)
if
(
options
.
positionalCount
()
>
1
)
if
(
options
.
positionalCount
()
>
1
)
...
...
src/app/cli_cmd.hpp
View file @
b7a56d6d
...
@@ -22,10 +22,10 @@ struct GnbCliCommand
...
@@ -22,10 +22,10 @@ struct GnbCliCommand
STATUS
,
STATUS
,
INFO
,
INFO
,
AMF_LIST
,
AMF_LIST
,
AMF_
STATUS
AMF_
INFO
}
present
;
}
present
;
// AMF_
STATUS
// AMF_
INFO
int
amfId
{};
int
amfId
{};
explicit
GnbCliCommand
(
PR
present
)
:
present
(
present
)
explicit
GnbCliCommand
(
PR
present
)
:
present
(
present
)
...
...
src/gnb/app/cmd_handler.cpp
View file @
b7a56d6d
...
@@ -107,7 +107,7 @@ void GnbCmdHandler::HandleCmdImpl(TaskBase &base, NwGnbCliCommand &msg)
...
@@ -107,7 +107,7 @@ void GnbCmdHandler::HandleCmdImpl(TaskBase &base, NwGnbCliCommand &msg)
msg
.
sendResult
(
ss
.
str
());
msg
.
sendResult
(
ss
.
str
());
break
;
break
;
}
}
case
app
:
:
GnbCliCommand
::
AMF_
STATUS
:
{
case
app
:
:
GnbCliCommand
::
AMF_
INFO
:
{
if
(
base
.
ngapTask
->
m_amfCtx
.
count
(
msg
.
cmd
->
amfId
)
==
0
)
if
(
base
.
ngapTask
->
m_amfCtx
.
count
(
msg
.
cmd
->
amfId
)
==
0
)
msg
.
sendError
(
"AMF not found with given ID"
);
msg
.
sendError
(
"AMF not found with given ID"
);
else
else
...
...
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