Commit 99328e87 authored by aligungr's avatar aligungr

PS establishment over CLI

parent 23a5117b
...@@ -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;
} }
......
...@@ -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)
{ {
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment