Commit 2d2a23ea authored by aligungr's avatar aligungr

UE CLI improvements

parent 021891ce
...@@ -130,10 +130,8 @@ void UeAppTask::receiveStatusUpdate(NwUeStatusUpdate &msg) ...@@ -130,10 +130,8 @@ void UeAppTask::receiveStatusUpdate(NwUeStatusUpdate &msg)
UePduSessionInfo sessionInfo{}; UePduSessionInfo sessionInfo{};
sessionInfo.psi = session->psi; sessionInfo.psi = session->psi;
if (session->apn.has_value()) sessionInfo.apn = session->apn;
sessionInfo.apn = session->apn.value(); sessionInfo.sNssai = session->sNssai;
if(session->sNssai.has_value())
sessionInfo.sNssai = session->sNssai.value();
sessionInfo.type = nas::utils::EnumToString(session->sessionType); sessionInfo.type = nas::utils::EnumToString(session->sessionType);
if (session->pduAddress.has_value()) if (session->pduAddress.has_value())
sessionInfo.address = utils::OctetStringToIp(session->pduAddress->pduAddressInformation); sessionInfo.address = utils::OctetStringToIp(session->pduAddress->pduAddressInformation);
......
...@@ -237,14 +237,12 @@ Json ToJson(const EPsState &state) ...@@ -237,14 +237,12 @@ Json ToJson(const EPsState &state)
Json ToJson(const UePduSessionInfo &v) Json ToJson(const UePduSessionInfo &v)
{ {
return Json::Obj({ return Json::Obj({{"id", v.psi},
{"id", v.psi}, {"type", v.type},
{"type", v.type}, {"address", v.address},
{"address", v.address}, {"emergency", v.isEmergency},
{"emergency", v.isEmergency}, {"apn", ::ToJson(v.apn)},
{"apn", v.apn}, {"s-nssai", ToJson(v.sNssai)}});
{"sNssai", ToJson(v.sNssai)}
});
} }
Json ToJson(const EServiceReqCause &v) Json ToJson(const EServiceReqCause &v)
......
...@@ -390,8 +390,8 @@ struct UePduSessionInfo ...@@ -390,8 +390,8 @@ struct UePduSessionInfo
std::string address{}; std::string address{};
bool isEmergency{}; bool isEmergency{};
bool uplinkPending{}; bool uplinkPending{};
std::string apn{}; std::optional<std::string> apn{};
SingleSlice sNssai{}; std::optional<SingleSlice> sNssai{};
}; };
enum class ERegUpdateCause enum class ERegUpdateCause
......
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