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
99328e87
Commit
99328e87
authored
Mar 31, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PS establishment over CLI
parent
23a5117b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
5 deletions
+22
-5
src/app/cli_cmd.cpp
src/app/cli_cmd.cpp
+13
-2
src/app/cli_cmd.hpp
src/app/cli_cmd.hpp
+9
-3
No files found.
src/app/cli_cmd.cpp
View file @
99328e87
...
@@ -156,12 +156,12 @@ static OrderedMap<std::string, CmdEntry> g_ueCmdEntries = {
...
@@ -156,12 +156,12 @@ static OrderedMap<std::string, CmdEntry> g_ueCmdEntries = {
{
"info"
,
{
"Show some information about the UE"
,
""
,
DefaultDesc
,
false
}},
{
"info"
,
{
"Show some information about the UE"
,
""
,
DefaultDesc
,
false
}},
{
"status"
,
{
"Show some status information about the UE"
,
""
,
DefaultDesc
,
false
}},
{
"status"
,
{
"Show some status information about the UE"
,
""
,
DefaultDesc
,
false
}},
{
"timers"
,
{
"Dump current status of the timers in the UE"
,
""
,
DefaultDesc
,
false
}},
{
"timers"
,
{
"Dump current status of the timers in the UE"
,
""
,
DefaultDesc
,
false
}},
{
"deregister"
,
{
"Perform a de-registration by the UE"
,
"<normal|disable-5g|switch-off|remove-sim>"
,
DefaultDesc
,
true
}},
{
"ps-establish"
,
{
"ps-establish"
,
{
"Trigger a PDU session establishment procedure"
,
"<session-type> [options]"
,
DescForPsEstablish
,
true
}},
{
"Trigger a PDU session establishment procedure"
,
"<session-type> [options]"
,
DescForPsEstablish
,
true
}},
{
"ps-release"
,
{
"Trigger a PDU session release procedure"
,
"<pdu-session-id>..."
,
DefaultDesc
,
true
}},
{
"ps-release"
,
{
"Trigger a PDU session release procedure"
,
"<pdu-session-id>..."
,
DefaultDesc
,
true
}},
{
"ps-release-all"
,
{
"Trigger PDU session release procedures for all active sessions"
,
""
,
DefaultDesc
,
false
}},
{
"ps-release-all"
,
{
"Trigger PDU session release procedures for all active sessions"
,
""
,
DefaultDesc
,
false
}},
{
"deregister"
,
{
"Perform a de-registration by the UE"
,
"<normal|disable-5g|switch-off|remove-sim>"
,
DefaultDesc
,
true
}},
};
};
static
std
::
unique_ptr
<
GnbCliCommand
>
GnbCliParseImpl
(
const
std
::
string
&
subCmd
,
const
opt
::
OptionsResult
&
options
,
static
std
::
unique_ptr
<
GnbCliCommand
>
GnbCliParseImpl
(
const
std
::
string
&
subCmd
,
const
opt
::
OptionsResult
&
options
,
...
@@ -263,6 +263,17 @@ static std::unique_ptr<UeCliCommand> UeCliParseImpl(const std::string &subCmd, c
...
@@ -263,6 +263,17 @@ static std::unique_ptr<UeCliCommand> UeCliParseImpl(const std::string &subCmd, c
{
{
return
std
::
make_unique
<
UeCliCommand
>
(
UeCliCommand
::
PS_RELEASE_ALL
);
return
std
::
make_unique
<
UeCliCommand
>
(
UeCliCommand
::
PS_RELEASE_ALL
);
}
}
else
if
(
subCmd
==
"ps-establish"
)
{
auto
cmd
=
std
::
make_unique
<
UeCliCommand
>
(
UeCliCommand
::
PS_ESTABLISH
);
if
(
options
.
positionalCount
()
==
0
)
CMD_ERR
(
"PDU session type is expected"
)
if
(
options
.
positionalCount
()
>
15
)
CMD_ERR
(
"Only one PDU session type is expected"
)
std
::
string
type
=
options
.
getPositional
(
0
);
if
(
type
!=
"IPv4"
||
type
!=
"ipv4"
||
type
!=
"IPV4"
||
type
!=
"Ipv4"
||
type
!=
"IpV4"
)
CMD_ERR
(
"Only IPv4 is supported for now"
)
}
return
nullptr
;
return
nullptr
;
}
}
...
...
src/app/cli_cmd.hpp
View file @
99328e87
...
@@ -8,11 +8,11 @@
...
@@ -8,11 +8,11 @@
#pragma once
#pragma once
#include <array>
#include <memory>
#include <memory>
#include <string>
#include <string>
#include <utils/common_types.hpp>
#include <utils/common_types.hpp>
#include <vector>
#include <vector>
#include <array>
namespace
app
namespace
app
{
{
...
@@ -44,9 +44,10 @@ struct UeCliCommand
...
@@ -44,9 +44,10 @@ struct UeCliCommand
INFO
,
INFO
,
STATUS
,
STATUS
,
TIMERS
,
TIMERS
,
DE_REGISTER
,
PS_ESTABLISH
,
PS_RELEASE
,
PS_RELEASE
,
PS_RELEASE_ALL
PS_RELEASE_ALL
,
DE_REGISTER
,
}
present
;
}
present
;
// DE_REGISTER
// DE_REGISTER
...
@@ -56,6 +57,11 @@ struct UeCliCommand
...
@@ -56,6 +57,11 @@ struct UeCliCommand
std
::
array
<
int8_t
,
16
>
psIds
{};
std
::
array
<
int8_t
,
16
>
psIds
{};
int
psCount
{};
int
psCount
{};
// PS_ESTABLISH
std
::
optional
<
SingleSlice
>
sNssai
{};
std
::
optional
<
std
::
string
>
apn
{};
bool
isEmergency
{};
explicit
UeCliCommand
(
PR
present
)
:
present
(
present
)
explicit
UeCliCommand
(
PR
present
)
:
present
(
present
)
{
{
}
}
...
...
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