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
325f3d65
Commit
325f3d65
authored
Feb 13, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gNB CLI improvement
parent
6b09b474
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
3 deletions
+39
-3
src/gnb/app/task.cpp
src/gnb/app/task.cpp
+28
-3
src/gnb/nts.hpp
src/gnb/nts.hpp
+11
-0
No files found.
src/gnb/app/task.cpp
View file @
325f3d65
...
...
@@ -30,15 +30,40 @@ void GnbAppTask::onLoop()
switch
(
msg
->
msgType
)
{
case
NtsMessageType
:
:
GNB_STATUS_UPDATE
:
{
auto
*
m
=
dynamic_cast
<
NwGnbStatusUpdate
*>
(
msg
);
switch
(
m
->
what
)
auto
*
w
=
dynamic_cast
<
NwGnbStatusUpdate
*>
(
msg
);
switch
(
w
->
what
)
{
case
NwGnbStatusUpdate
:
:
NGAP_IS_UP
:
m_statusInfo
.
isNgapUp
=
m
->
isNgapUp
;
m_statusInfo
.
isNgapUp
=
w
->
isNgapUp
;
break
;
}
break
;
}
case
NtsMessageType
:
:
GNB_CLI_COMMAND
:
{
auto
*
w
=
dynamic_cast
<
NwGnbCliCommand
*>
(
msg
);
if
(
w
->
cmd
==
nullptr
)
break
;
switch
(
w
->
cmd
->
present
)
{
case
app
:
:
GnbCliCommand
::
STATUS
:
{
w
->
sendError
(
"status command not implemented yet"
);
break
;
}
case
app
:
:
GnbCliCommand
::
INFO
:
{
w
->
sendError
(
"info command not implemented yet"
);
break
;
}
case
app
:
:
GnbCliCommand
::
AMF_LIST
:
{
w
->
sendError
(
"amf-list command not implemented yet"
);
break
;
}
case
app
:
:
GnbCliCommand
::
AMF_STATUS
:
{
w
->
sendError
(
"amf-status command not implemented yet"
);
break
;
}
}
break
;
}
default:
m_logger
->
unhandledNts
(
msg
);
delete
msg
;
...
...
src/gnb/nts.hpp
View file @
325f3d65
...
...
@@ -8,6 +8,7 @@
#pragma once
#include <app/cli_base.hpp>
#include <app/cli_cmd.hpp>
#include <rrc/rrc.hpp>
#include <sctp/sctp.hpp>
...
...
@@ -251,6 +252,16 @@ struct NwGnbCliCommand : NtsMessage
:
NtsMessage
(
NtsMessageType
::
GNB_CLI_COMMAND
),
cmd
(
std
::
move
(
cmd
)),
address
(
address
),
callbackTask
(
callbackTask
)
{
}
void
sendResult
(
const
std
::
string
&
output
)
const
{
callbackTask
->
push
(
new
app
::
NwCliSendResponse
(
address
,
output
,
false
));
}
void
sendError
(
const
std
::
string
&
output
)
const
{
callbackTask
->
push
(
new
app
::
NwCliSendResponse
(
address
,
output
,
true
));
}
};
}
// namespace nr::gnb
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