Commit a0ca787c authored by aligungr's avatar aligungr

UePduSessionInfo and EPsState json serialization

parent 020b415f
......@@ -204,4 +204,33 @@ Json ToJson(const ERegUpdateCause &v)
}
}
Json ToJson(const EPsState &state)
{
switch (state)
{
case EPsState::INACTIVE:
return "PS-INACTIVE";
case EPsState::ACTIVE_PENDING:
return "PS-ACTIVE-PENDING";
case EPsState::ACTIVE:
return "PS-ACTIVE";
case EPsState::INACTIVE_PENDING:
return "PS-INACTIVE-PENDING";
case EPsState::MODIFICATION_PENDING:
return "PS-MODIFICATION-PENDING";
default:
return "?";
}
}
Json ToJson(const UePduSessionInfo &v)
{
return Json::Obj({
{"id", v.psi},
{"type", v.type},
{"address", v.address},
{"emergency", v.isEmergency},
});
}
} // 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