Commit 31993a37 authored by aligungr's avatar aligungr

UE de-registration improvement

parent 68d4137d
...@@ -84,18 +84,21 @@ static std::map<std::string, std::string> g_ueCmdToDescription = { ...@@ -84,18 +84,21 @@ static std::map<std::string, std::string> g_ueCmdToDescription = {
{"info", "Show some information about the UE"}, {"info", "Show some information about the UE"},
{"status", "Show some status information about the UE"}, {"status", "Show some status information about the UE"},
{"timers", "Dump current status of the timers in the UE"}, {"timers", "Dump current status of the timers in the UE"},
{"deregister", "Perform de-registration by the UE"},
}; };
static std::map<std::string, std::string> g_ueCmdToUsage = { static std::map<std::string, std::string> g_ueCmdToUsage = {
{"info", "[option...]"}, {"info", "[option...]"},
{"status", "[option...]"}, {"status", "[option...]"},
{"timers", "[option...]"}, {"timers", "[option...]"},
{"deregister", "<deregister-type>"},
}; };
static std::map<std::string, bool> g_ueCmdToHelpIfEmpty = { static std::map<std::string, bool> g_ueCmdToHelpIfEmpty = {
{"info", false}, {"info", false},
{"status", false}, {"status", false},
{"timers", false}, {"timers", false},
{"deregister", true},
}; };
std::unique_ptr<GnbCliCommand> ParseGnbCliCommand(std::vector<std::string> &&tokens, std::string &error, std::unique_ptr<GnbCliCommand> ParseGnbCliCommand(std::vector<std::string> &&tokens, std::string &error,
...@@ -224,6 +227,11 @@ std::unique_ptr<UeCliCommand> ParseUeCliCommand(std::vector<std::string> &&token ...@@ -224,6 +227,11 @@ std::unique_ptr<UeCliCommand> ParseUeCliCommand(std::vector<std::string> &&token
{ {
return std::make_unique<UeCliCommand>(UeCliCommand::TIMERS); return std::make_unique<UeCliCommand>(UeCliCommand::TIMERS);
} }
else if (subCmd == "deregister")
{
auto cmd = std::make_unique<UeCliCommand>(UeCliCommand::DE_REGISTER);
return cmd;
}
return nullptr; return nullptr;
} }
......
...@@ -42,8 +42,13 @@ struct UeCliCommand ...@@ -42,8 +42,13 @@ struct UeCliCommand
INFO, INFO,
STATUS, STATUS,
TIMERS, TIMERS,
DE_REGISTER,
} present; } present;
// DE_REGISTER
bool isSwitchOff{};
bool dueToDisable5g{};
explicit UeCliCommand(PR present) : present(present) explicit UeCliCommand(PR present) : present(present)
{ {
} }
......
...@@ -115,6 +115,10 @@ void UeCmdHandler::HandleCmdImpl(TaskBase &base, NwUeCliCommand &msg) ...@@ -115,6 +115,10 @@ void UeCmdHandler::HandleCmdImpl(TaskBase &base, NwUeCliCommand &msg)
msg.sendResult(ToJson(base.nasTask->timers).dumpYaml()); msg.sendResult(ToJson(base.nasTask->timers).dumpYaml());
break; break;
} }
case app::UeCliCommand::DE_REGISTER: {
msg.sendError("not implemented yet");
break;
}
} }
} }
......
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