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
b53c4006
Commit
b53c4006
authored
Feb 20, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UE de-registration improvement
parent
d042a7a4
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
15 deletions
+22
-15
src/app/cli_cmd.cpp
src/app/cli_cmd.cpp
+7
-7
src/cli.cpp
src/cli.cpp
+1
-1
src/gnb.cpp
src/gnb.cpp
+1
-1
src/ue.cpp
src/ue.cpp
+1
-1
src/utils/options.cpp
src/utils/options.cpp
+8
-3
src/utils/options.hpp
src/utils/options.hpp
+4
-2
No files found.
src/app/cli_cmd.cpp
View file @
b53c4006
...
...
@@ -23,7 +23,7 @@
static
opt
::
OptionsDescription
Desc
(
const
std
::
string
&
subCommand
,
const
std
::
string
&
desc
,
const
std
::
string
&
usage
,
bool
helpIfEmpty
)
{
return
{
subCommand
,
cons
::
Tag
,
desc
,
{},
subCommand
,
{
usage
},
helpIfEmpty
};
return
{
{},
{},
desc
,
{},
subCommand
,
{
usage
},
helpIfEmpty
,
true
};
}
class
OptionsHandler
:
public
opt
::
IOptionsHandler
...
...
@@ -71,9 +71,9 @@ static std::map<std::string, std::string> g_gnbCmdToDescription = {
};
static
std
::
map
<
std
::
string
,
std
::
string
>
g_gnbCmdToUsage
=
{
{
"status"
,
"
[option...]"
},
{
"info"
,
"[option...]
"
},
{
"amf-list"
,
"
[option...]"
},
{
"amf-info"
,
"<amf-id> [option...]
"
},
{
"ue-list"
,
"
[option...]"
},
{
"ue-count"
,
"[option...]
"
},
{
"status"
,
"
"
},
{
"info"
,
"
"
},
{
"amf-list"
,
"
"
},
{
"amf-info"
,
"<amf-id>
"
},
{
"ue-list"
,
"
"
},
{
"ue-count"
,
"
"
},
};
static
std
::
map
<
std
::
string
,
bool
>
g_gnbCmdToHelpIfEmpty
=
{{
"status"
,
false
},
{
"info"
,
false
},
...
...
@@ -88,9 +88,9 @@ static std::map<std::string, std::string> g_ueCmdToDescription = {
};
static
std
::
map
<
std
::
string
,
std
::
string
>
g_ueCmdToUsage
=
{
{
"info"
,
"
[option...]
"
},
{
"status"
,
"
[option...]
"
},
{
"timers"
,
"
[option...]
"
},
{
"info"
,
""
},
{
"status"
,
""
},
{
"timers"
,
""
},
{
"deregister"
,
"<switch-off|disable-5g|normal>"
},
};
...
...
src/cli.cpp
View file @
b53c4006
...
...
@@ -133,7 +133,7 @@ static void ReadOptions(int argc, char **argv)
{
opt
::
OptionsDescription
desc
{
"UERANSIM"
,
cons
::
Tag
,
"Command Line Interface"
,
cons
::
Owner
,
"nr-cli"
,
{
"<node-name> [option...]"
,
"--dump"
},
true
};
true
,
false
};
opt
::
OptionItem
itemDump
=
{
'd'
,
"dump"
,
"List all UE and gNBs in the environment"
,
std
::
nullopt
};
opt
::
OptionItem
itemExec
=
{
'e'
,
"exec"
,
"Execute the given command directly without an interactive shell"
,
...
...
src/gnb.cpp
View file @
b53c4006
...
...
@@ -79,7 +79,7 @@ static void ReadOptions(int argc, char **argv)
{
opt
::
OptionsDescription
desc
{
cons
::
Project
,
cons
::
Tag
,
"5G-SA gNB implementation"
,
cons
::
Owner
,
"nr-gnb"
,
{
"-c <config-file> [option...]"
},
true
};
true
,
false
};
opt
::
OptionItem
itemConfigFile
=
{
'c'
,
"config"
,
"Use specified configuration file for gNB"
,
"config-file"
};
opt
::
OptionItem
itemDisableCmd
=
{
'l'
,
"disable-cmd"
,
"Disable command line functionality for this instance"
,
...
...
src/ue.cpp
View file @
b53c4006
...
...
@@ -132,7 +132,7 @@ static void ReadOptions(int argc, char **argv)
{
opt
::
OptionsDescription
desc
{
cons
::
Project
,
cons
::
Tag
,
"5G-SA UE implementation"
,
cons
::
Owner
,
"nr-ue"
,
{
"-c <config-file> [option...]"
},
true
};
true
,
false
};
opt
::
OptionItem
itemConfigFile
=
{
'c'
,
"config"
,
"Use specified configuration file for UE"
,
"config-file"
};
opt
::
OptionItem
itemImsi
=
{
'i'
,
"imsi"
,
"Use specified IMSI number instead of provided one"
,
"imsi"
};
...
...
src/utils/options.cpp
View file @
b53c4006
...
...
@@ -269,10 +269,15 @@ void opt::OptionsResult::showHelp() const
ostream
<<
" "
<<
m_description
.
programName
<<
" "
<<
usage
<<
std
::
endl
;
ostream
<<
std
::
endl
;
ostream
<<
"Options:"
<<
std
::
endl
;
std
::
vector
<
OptionItem
>
items
=
m_description
.
items
;
items
.
emplace_back
(
'h'
,
"help"
,
"Show this help message and exit"
,
std
::
nullopt
);
items
.
emplace_back
(
'v'
,
"version"
,
"Show version information and exit"
,
std
::
nullopt
);
if
(
!
m_description
.
hideDefaultOptionsInUsage
)
{
items
.
emplace_back
(
'h'
,
"help"
,
"Show this help message and exit"
,
std
::
nullopt
);
items
.
emplace_back
(
'v'
,
"version"
,
"Show version information and exit"
,
std
::
nullopt
);
}
if
(
!
items
.
empty
())
ostream
<<
"Options:"
<<
std
::
endl
;
size_t
maxLengthOfItemName
=
0
;
for
(
auto
&
item
:
items
)
...
...
src/utils/options.hpp
View file @
b53c4006
...
...
@@ -73,12 +73,14 @@ struct OptionsDescription
std
::
vector
<
OptionItem
>
items
{};
std
::
vector
<
std
::
string
>
usages
{};
bool
helpIfEmpty
{};
bool
hideDefaultOptionsInUsage
{};
OptionsDescription
(
std
::
string
projectName
,
std
::
string
version
,
std
::
string
appDescription
,
std
::
string
copyright
,
std
::
string
programName
,
std
::
vector
<
std
::
string
>
usages
,
bool
helpIfEmpty
)
std
::
string
programName
,
std
::
vector
<
std
::
string
>
usages
,
bool
helpIfEmpty
,
bool
hideDefaultOptionsInUsage
)
:
projectName
(
std
::
move
(
projectName
)),
version
(
std
::
move
(
version
)),
appDescription
(
std
::
move
(
appDescription
)),
copyright
(
std
::
move
(
copyright
)),
programName
(
std
::
move
(
programName
)),
usages
(
std
::
move
(
usages
)),
helpIfEmpty
(
helpIfEmpty
)
helpIfEmpty
(
helpIfEmpty
)
,
hideDefaultOptionsInUsage
(
hideDefaultOptionsInUsage
)
{
}
};
...
...
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