Commit 60f7a27e authored by aligungr's avatar aligungr

CLI improvements

parent d7d372bf
......@@ -95,13 +95,7 @@ void UeCmdHandler::HandleCmdImpl(TaskBase &base, NwUeCliCommand &msg)
break;
}
case app::UeCliCommand::INFO: {
Json json = Json::Obj({
{"supi", ToJson(base.config->supi)},
{"plmn", ToJson(base.config->plmn)},
{"imei", ::ToJson(base.config->imei)},
{"imeisv", ::ToJson(base.config->imeiSv)},
});
msg.sendResult(json.dumpYaml());
msg.sendResult(ToJson(*base.config).dumpYaml());
break;
}
}
......
......@@ -22,7 +22,7 @@ UeTimers::UeTimers()
{
}
Json ToJson(const ECmState& state)
Json ToJson(const ECmState &state)
{
switch (state)
{
......@@ -35,7 +35,7 @@ Json ToJson(const ECmState& state)
}
}
Json ToJson(const ERmState& state)
Json ToJson(const ERmState &state)
{
switch (state)
{
......@@ -48,7 +48,7 @@ Json ToJson(const ERmState& state)
}
}
Json ToJson(const EMmState& state)
Json ToJson(const EMmState &state)
{
switch (state)
{
......@@ -69,7 +69,7 @@ Json ToJson(const EMmState& state)
}
}
Json ToJson(const EMmSubState& state)
Json ToJson(const EMmSubState &state)
{
switch (state)
{
......@@ -120,4 +120,15 @@ Json ToJson(const EMmSubState& state)
}
}
Json ToJson(const UeConfig &v)
{
return Json::Obj({
{"supi", ToJson(v.supi)},
{"plmn", ToJson(v.plmn)},
{"imei", ::ToJson(v.imei)},
{"imeiSv", ::ToJson(v.imeiSv)},
{"nssai", ::ToJson(v.nssais)},
});
}
} // namespace nr::ue
......@@ -359,9 +359,10 @@ struct UeStatusInfo
std::optional<UePduSessionInfo> pduSessions[16]{};
};
Json ToJson(const ECmState& state);
Json ToJson(const ERmState& state);
Json ToJson(const EMmState& state);
Json ToJson(const EMmSubState& state);
Json ToJson(const ECmState &state);
Json ToJson(const ERmState &state);
Json ToJson(const EMmState &state);
Json ToJson(const EMmSubState &state);
Json ToJson(const UeConfig &v);
} // namespace nr::ue
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