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
bdddb08c
Commit
bdddb08c
authored
Mar 31, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PS establishment over CLI
parent
720e879b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
6 deletions
+19
-6
src/app/cli_cmd.cpp
src/app/cli_cmd.cpp
+19
-6
No files found.
src/app/cli_cmd.cpp
View file @
bdddb08c
...
...
@@ -21,12 +21,14 @@
return nullptr; \
}
static
opt
::
OptionsDescription
De
sc
(
const
std
::
string
&
subCommand
,
const
std
::
string
&
desc
,
const
std
::
string
&
usage
,
bool
helpIfEmpty
)
static
opt
::
OptionsDescription
De
faultDesc
(
const
std
::
string
&
subCommand
,
const
std
::
string
&
desc
,
const
std
::
string
&
usage
,
bool
helpIfEmpty
)
{
return
{{},
{},
desc
,
{},
subCommand
,
{
usage
},
helpIfEmpty
,
true
};
}
using
DescType
=
decltype
(
&
DefaultDesc
);
class
OptionsHandler
:
public
opt
::
IOptionsHandler
{
public:
...
...
@@ -63,6 +65,11 @@ static std::string DumpCommands(const OrderedMap<std::string, std::string> &desc
namespace
app
{
static
OrderedMap
<
std
::
string
,
DescType
>
g_gnbCmdToDescFunc
=
{
{
"status"
,
DefaultDesc
},
{
"info"
,
DefaultDesc
},
{
"amf-list"
,
DefaultDesc
},
{
"amf-info"
,
DefaultDesc
},
{
"ue-list"
,
DefaultDesc
},
{
"ue-count"
,
DefaultDesc
},
};
static
OrderedMap
<
std
::
string
,
std
::
string
>
g_gnbCmdToDescription
=
{
{
"status"
,
"Show some status information about the gNB"
},
{
"info"
,
"Show some information about the gNB"
},
...
...
@@ -80,6 +87,12 @@ static OrderedMap<std::string, bool> g_gnbCmdToHelpIfEmpty = {{"status", false},
{
"amf-list"
,
false
},
{
"amf-info"
,
true
},
{
"ue-list"
,
false
},
{
"ue-count"
,
false
}};
static
OrderedMap
<
std
::
string
,
DescType
>
g_ueCmdToDescFunc
=
{
{
"info"
,
DefaultDesc
},
{
"status"
,
DefaultDesc
},
{
"timers"
,
DefaultDesc
},
{
"deregister"
,
DefaultDesc
},
{
"ps-establish"
,
DefaultDesc
},
{
"ps-release"
,
DefaultDesc
},
{
"ps-release-all"
,
DefaultDesc
},
};
static
OrderedMap
<
std
::
string
,
std
::
string
>
g_ueCmdToDescription
=
{
{
"info"
,
"Show some information about the UE"
},
{
"status"
,
"Show some status information about the UE"
},
...
...
@@ -126,8 +139,8 @@ std::unique_ptr<GnbCliCommand> ParseGnbCliCommand(std::vector<std::string> &&tok
return
nullptr
;
}
opt
::
OptionsDescription
desc
=
Desc
(
subCmd
,
g_gnbCmdToDescription
[
subCmd
],
g_gnbCmdToUsage
[
subCmd
],
g_gnbCmdToHelpIfEmpty
[
subCmd
]);
opt
::
OptionsDescription
desc
=
g_gnbCmdToDescFunc
[
subCmd
](
subCmd
,
g_gnbCmdToDescription
[
subCmd
],
g_gnbCmdToUsage
[
subCmd
],
g_gnbCmdToHelpIfEmpty
[
subCmd
]);
OptionsHandler
handler
{};
...
...
@@ -201,8 +214,8 @@ std::unique_ptr<UeCliCommand> ParseUeCliCommand(std::vector<std::string> &&token
return
nullptr
;
}
opt
::
OptionsDescription
desc
=
Desc
(
subCmd
,
g_ueCmdToDescription
[
subCmd
],
g_ueCmdToUsage
[
subCmd
],
g_ueCmdToHelpIfEmpty
[
subCmd
]);
opt
::
OptionsDescription
desc
=
g_ueCmdToDescFunc
[
subCmd
](
subCmd
,
g_ueCmdToDescription
[
subCmd
],
g_ueCmdToUsage
[
subCmd
],
g_ueCmdToHelpIfEmpty
[
subCmd
]);
OptionsHandler
handler
{};
...
...
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