Commit 8bbafb33 authored by KARIM BOUTIBA's avatar KARIM BOUTIBA

Merge remote-tracking branch 'origin/event_exposure_quick_fix' into amf_event_report_fix

parents f5b4b240 8804503e
{
"files.associations": {
"deque": "cpp",
"string": "cpp",
"vector": "cpp"
}
}
\ No newline at end of file
...@@ -3118,12 +3118,13 @@ void amf_n1::ue_initiate_de_registration_handle( ...@@ -3118,12 +3118,13 @@ void amf_n1::ue_initiate_de_registration_handle(
event_sub.ue_loss_of_connectivity( event_sub.ue_loss_of_connectivity(
supi, DEREGISTERED, 1, ran_ue_ngap_id, amf_ue_ngap_id); supi, DEREGISTERED, 1, ran_ue_ngap_id, amf_ue_ngap_id);
// TODO: put once this scenario is implemented
// Trigger UE Loss of Connectivity Status Notify // Trigger UE Loss of Connectivity Status Notify
Logger::amf_n1().debug( // Logger::amf_n1().debug(
"Signal the UE Loss of Connectivity Event notification for SUPI %s", // "Signal the UE Loss of Connectivity Event notification for SUPI %s",
supi.c_str()); // supi.c_str());
event_sub.ue_loss_of_connectivity( // event_sub.ue_loss_of_connectivity(supi, PURGED, 1, ran_ue_ngap_id,
supi, PURGED, 1, ran_ue_ngap_id, amf_ue_ngap_id); // amf_ue_ngap_id);
if (nc->is_stacs_available) { if (nc->is_stacs_available) {
stacs.update_5gmm_state(nc->imsi, "5GMM-DEREGISTERED"); stacs.update_5gmm_state(nc->imsi, "5GMM-DEREGISTERED");
......
...@@ -560,7 +560,7 @@ void amf_sbi::handle_itti_message(itti_sbi_notify_subscribed_event& itti_msg) { ...@@ -560,7 +560,7 @@ void amf_sbi::handle_itti_message(itti_sbi_notify_subscribed_event& itti_msg) {
i.get_reports(event_reports); i.get_reports(event_reports);
for (auto r : event_reports) { for (auto r : event_reports) {
report["type"] = r.getType().get_value(); report["type"] = r.getType().get_value();
report["state"]["active"] = true; report["state"]["active"] = true; // as boolean
if (r.supiIsSet()) { if (r.supiIsSet()) {
report["supi"] = r.getSupi(); report["supi"] = r.getSupi();
} }
...@@ -592,8 +592,9 @@ void amf_sbi::handle_itti_message(itti_sbi_notify_subscribed_event& itti_msg) { ...@@ -592,8 +592,9 @@ void amf_sbi::handle_itti_message(itti_sbi_notify_subscribed_event& itti_msg) {
// Timestamp // Timestamp
std::time_t time_epoch_ntp = std::time(nullptr); std::time_t time_epoch_ntp = std::time(nullptr);
uint64_t tv_ntp = time_epoch_ntp; // + SECONDS_SINCE_FIRST_EPOCH; uint64_t tv_ntp =
report["timeStamp"] = tv_ntp; time_epoch_ntp; // not needed: + SECONDS_SINCE_FIRST_EPOCH;
report["timeStamp"] = tv_ntp; // don't convert to string, leave as int64
report_lists.push_back(report); report_lists.push_back(report);
} }
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
namespace oai::amf::model { namespace oai::amf::model {
AmfEventReport::AmfEventReport() { AmfEventReport::AmfEventReport() {
m_TimeStamp = ""; m_TimeStamp = 0;
m_SubscriptionId = ""; m_SubscriptionId = "";
m_SubscriptionIdIsSet = false; m_SubscriptionIdIsSet = false;
m_AnyUe = false; m_AnyUe = false;
...@@ -412,10 +412,10 @@ AmfEventState AmfEventReport::getState() const { ...@@ -412,10 +412,10 @@ AmfEventState AmfEventReport::getState() const {
void AmfEventReport::setState(AmfEventState const& value) { void AmfEventReport::setState(AmfEventState const& value) {
m_State = value; m_State = value;
} }
std::string AmfEventReport::getTimeStamp() const { uint64_t AmfEventReport::getTimeStamp() const {
return m_TimeStamp; return m_TimeStamp;
} }
void AmfEventReport::setTimeStamp(std::string const& value) { void AmfEventReport::setTimeStamp(uint64_t const& value) {
m_TimeStamp = value; m_TimeStamp = value;
} }
std::string AmfEventReport::getSubscriptionId() const { std::string AmfEventReport::getSubscriptionId() const {
......
...@@ -75,8 +75,8 @@ class AmfEventReport { ...@@ -75,8 +75,8 @@ class AmfEventReport {
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
std::string getTimeStamp() const; uint64_t getTimeStamp() const;
void setTimeStamp(std::string const& value); void setTimeStamp(uint64_t const& value);
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
...@@ -222,7 +222,7 @@ class AmfEventReport { ...@@ -222,7 +222,7 @@ class AmfEventReport {
AmfEventState m_State; AmfEventState m_State;
std::string m_TimeStamp; uint64_t m_TimeStamp;
std::string m_SubscriptionId; std::string m_SubscriptionId;
bool m_SubscriptionIdIsSet; bool m_SubscriptionIdIsSet;
......
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