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
cc926d1a
Commit
cc926d1a
authored
Feb 14, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CLI improvements
parent
7c5ec424
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
41 additions
and
0 deletions
+41
-0
src/app/cli_cmd.cpp
src/app/cli_cmd.cpp
+7
-0
src/app/cli_cmd.hpp
src/app/cli_cmd.hpp
+1
-0
src/nas/timer.cpp
src/nas/timer.cpp
+11
-0
src/nas/timer.hpp
src/nas/timer.hpp
+4
-0
src/ue/app/cmd_handler.cpp
src/ue/app/cmd_handler.cpp
+4
-0
src/ue/types.cpp
src/ue/types.cpp
+13
-0
src/ue/types.hpp
src/ue/types.hpp
+1
-0
No files found.
src/app/cli_cmd.cpp
View file @
cc926d1a
...
...
@@ -83,16 +83,19 @@ static std::map<std::string, bool> g_gnbCmdToHelpIfEmpty = {{"status", false},
static
std
::
map
<
std
::
string
,
std
::
string
>
g_ueCmdToDescription
=
{
{
"info"
,
"Show some information about the UE"
},
{
"status"
,
"Show some status information about the UE"
},
{
"timers"
,
"Dump current status of the timers in the UE"
},
};
static
std
::
map
<
std
::
string
,
std
::
string
>
g_ueCmdToUsage
=
{
{
"info"
,
"[option...]"
},
{
"status"
,
"[option...]"
},
{
"timers"
,
"[option...]"
},
};
static
std
::
map
<
std
::
string
,
bool
>
g_ueCmdToHelpIfEmpty
=
{
{
"info"
,
false
},
{
"status"
,
false
},
{
"timers"
,
false
},
};
std
::
unique_ptr
<
GnbCliCommand
>
ParseGnbCliCommand
(
std
::
vector
<
std
::
string
>
&&
tokens
,
std
::
string
&
error
,
...
...
@@ -217,6 +220,10 @@ std::unique_ptr<UeCliCommand> ParseUeCliCommand(std::vector<std::string> &&token
{
return
std
::
make_unique
<
UeCliCommand
>
(
UeCliCommand
::
STATUS
);
}
else
if
(
subCmd
==
"timers"
)
{
return
std
::
make_unique
<
UeCliCommand
>
(
UeCliCommand
::
TIMERS
);
}
return
nullptr
;
}
...
...
src/app/cli_cmd.hpp
View file @
cc926d1a
...
...
@@ -41,6 +41,7 @@ struct UeCliCommand
{
INFO
,
STATUS
,
TIMERS
,
}
present
;
explicit
UeCliCommand
(
PR
present
)
:
present
(
present
)
...
...
src/nas/timer.cpp
View file @
cc926d1a
...
...
@@ -118,4 +118,15 @@ int NasTimer::getRemaining() const
return
static_cast
<
int
>
(
std
::
max
(
interval
-
elapsed
,
0L
));
}
Json
ToJson
(
const
NasTimer
&
v
)
{
int
interval
=
v
.
getInterval
();
return
Json
::
Obj
({
{
"interval"
,
interval
==
INT32_MAX
?
Json
{
"inf"
}
:
interval
},
{
"remaining"
,
v
.
getRemaining
()},
{
"running"
,
v
.
isRunning
()},
});
}
}
// namespace nas
src/nas/timer.hpp
View file @
cc926d1a
...
...
@@ -10,6 +10,8 @@
#include "ie4.hpp"
#include <utils/json.hpp>
namespace
nas
{
...
...
@@ -40,4 +42,6 @@ class NasTimer
[[
nodiscard
]]
int
getRemaining
()
const
;
};
Json
ToJson
(
const
NasTimer
&
v
);
}
// namespace nas
\ No newline at end of file
src/ue/app/cmd_handler.cpp
View file @
cc926d1a
...
...
@@ -111,6 +111,10 @@ void UeCmdHandler::HandleCmdImpl(TaskBase &base, NwUeCliCommand &msg)
msg
.
sendResult
(
ToJson
(
*
base
.
config
).
dumpYaml
());
break
;
}
case
app
:
:
UeCliCommand
::
TIMERS
:
{
msg
.
sendResult
(
ToJson
(
base
.
nasTask
->
timers
).
dumpYaml
());
break
;
}
}
}
...
...
src/ue/types.cpp
View file @
cc926d1a
...
...
@@ -131,4 +131,17 @@ Json ToJson(const UeConfig &v)
});
}
Json
ToJson
(
const
UeTimers
&
v
)
{
return
Json
::
Obj
({
{
"T3346"
,
ToJson
(
v
.
t3346
)},
{
"T3396"
,
ToJson
(
v
.
t3396
)},
{
"T3444"
,
ToJson
(
v
.
t3444
)},
{
"T3445"
,
ToJson
(
v
.
t3445
)},
{
"T3502"
,
ToJson
(
v
.
t3502
)},
{
"T3510"
,
ToJson
(
v
.
t3510
)},
{
"T3511"
,
ToJson
(
v
.
t3511
)},
{
"T3512"
,
ToJson
(
v
.
t3512
)},
{
"T3516"
,
ToJson
(
v
.
t3516
)},
{
"T3517"
,
ToJson
(
v
.
t3517
)},
{
"T3519"
,
ToJson
(
v
.
t3519
)},
{
"T3520"
,
ToJson
(
v
.
t3520
)},
{
"T3521"
,
ToJson
(
v
.
t3521
)},
{
"T3525"
,
ToJson
(
v
.
t3525
)},
{
"T3540"
,
ToJson
(
v
.
t3540
)},
{
"T3580"
,
ToJson
(
v
.
t3580
)},
{
"T3581"
,
ToJson
(
v
.
t3581
)},
{
"T3582"
,
ToJson
(
v
.
t3582
)},
{
"T3583"
,
ToJson
(
v
.
t3583
)},
{
"T3584"
,
ToJson
(
v
.
t3584
)},
{
"T3585"
,
ToJson
(
v
.
t3585
)},
});
}
}
// namespace nr::ue
src/ue/types.hpp
View file @
cc926d1a
...
...
@@ -364,5 +364,6 @@ Json ToJson(const ERmState &state);
Json
ToJson
(
const
EMmState
&
state
);
Json
ToJson
(
const
EMmSubState
&
state
);
Json
ToJson
(
const
UeConfig
&
v
);
Json
ToJson
(
const
UeTimers
&
v
);
}
// namespace nr::ue
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