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 = {
{"info", {"Show some 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}},
{"deregister",
{"Perform a de-registration by the UE", "<normal|disable-5g|switch-off|remove-sim>", DefaultDesc, true}},
{"ps-establish",
{"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-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,
......@@ -263,6 +263,17 @@ static std::unique_ptr<UeCliCommand> UeCliParseImpl(const std::string &subCmd, c
{
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;
}
......
......@@ -8,11 +8,11 @@
#pragma once
#include <array>
#include <memory>
#include <string>
#include <utils/common_types.hpp>
#include <vector>
#include <array>
namespace app
{
......@@ -44,9 +44,10 @@ struct UeCliCommand
INFO,
STATUS,
TIMERS,
DE_REGISTER,
PS_ESTABLISH,
PS_RELEASE,
PS_RELEASE_ALL
PS_RELEASE_ALL,
DE_REGISTER,
} present;
// DE_REGISTER
......@@ -56,6 +57,11 @@ struct UeCliCommand
std::array<int8_t, 16> psIds{};
int psCount{};
// PS_ESTABLISH
std::optional<SingleSlice> sNssai{};
std::optional<std::string> apn{};
bool isEmergency{};
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