Commit 0ed39237 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Fix issue for SMF Event type

parent b9a2436f
......@@ -34,6 +34,17 @@ typedef enum smf_event_e {
SMF_EVENT_FLEXCN = 99
} smf_event_t;
static std::string smf_event_from_enum(smf_event_t e) {
if (e == smf_event_t::SMF_EVENT_AC_TY_CH) return "AC_TY_CH";
if (e == smf_event_t::SMF_EVENT_UP_PATH_CH) return "UP_PATH_CH";
if (e == smf_event_t::SMF_EVENT_PDU_SES_REL) return "PDU_SES_REL";
if (e == smf_event_t::SMF_EVENT_PLMN_CH) return "PLMN_CH";
if (e == smf_event_t::SMF_EVENT_UE_IP_CH) return "UE_IP_CH";
if (e == smf_event_t::SMF_EVENT_DDDS) return "DDDS";
if (e == smf_event_t::SMF_EVENT_FLEXCN) return "FLEXCN";
return "";
}
static const std::vector<std::string> smf_event_e2str = {
"SMF_EVENT_UNKNOWN",
"Access Type Change",
......@@ -41,7 +52,8 @@ static const std::vector<std::string> smf_event_e2str = {
"PDU Session Release",
"PLMN Change",
"UE IP address change",
"Downlink data delivery status"};
"Downlink data delivery status",
"FlexCN"};
enum class notification_method_e {
PERIODIC = 1,
......
......@@ -569,7 +569,7 @@ void smf_sbi::notify_subscribed_event(
json_data["notifId"] = i.get_notif_id();
auto event_notifs = nlohmann::json::array();
nlohmann::json event_notif = {};
event_notif["event"] = i.get_smf_event();
event_notif["event"] = smf_event_from_enum(i.get_smf_event());
event_notif["pduSeId"] = i.get_pdu_session_id();
event_notif["supi"] = std::to_string(i.get_supi());
......
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