Commit 1e932480 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Add function headers

parent 30165886
......@@ -30,14 +30,14 @@
#ifndef FILE_SMF_APP_HPP_SEEN
#define FILE_SMF_APP_HPP_SEEN
#include <boost/thread.hpp>
#include <boost/thread/future.hpp>
#include <future>
#include <map>
#include <set>
#include <shared_mutex>
#include <string>
#include <thread>
#include <boost/thread.hpp>
#include <boost/thread/future.hpp>
#include "3gpp_29.274.h"
#include "3gpp_29.502.h"
......@@ -51,8 +51,8 @@
#include "smf_context.hpp"
#include "smf_msg.hpp"
#include "smf_pco.hpp"
#include "smf_subscription.hpp"
#include "smf_profile.hpp"
#include "smf_subscription.hpp"
namespace smf {
......@@ -138,7 +138,7 @@ class smf_app {
pdu_session_release_sm_context_response>>>
sm_context_release_promises;
smf_profile nf_profile; //SMF profile
smf_profile nf_profile; // SMF profile
std::string smf_instance_id; // SMF instance id
timer_id_t timer_nrf_heartbeat;
......@@ -616,6 +616,12 @@ class smf_app {
*/
void timer_t3591_timeout(timer_id_t timer_id, uint64_t arg2_user);
/*
* will be executed when NRF Heartbeat timer expires
* @param [timer_id_t] timer_id
* @param [uint64_t] arg2_user
* @return void
*/
void timer_nrf_heartbeat_timeout(timer_id_t timer_id, uint64_t arg2_user);
/*
......@@ -793,7 +799,6 @@ class smf_app {
* @return void
*/
void trigger_nf_registration_request();
};
}
#include "smf_config.hpp"
......
......@@ -745,7 +745,6 @@ void smf_n11::register_nf_instance(
curl_global_cleanup();
}
//-----------------------------------------------------------------------------------------------------
void smf_n11::update_nf_instance(
std::shared_ptr<itti_n11_update_nf_instance_request> msg) {
......@@ -754,7 +753,7 @@ void smf_n11::update_nf_instance(
msg->http_version);
nlohmann::json json_data = nlohmann::json::array();
for (auto i: msg->patch_items) {
for (auto i : msg->patch_items) {
nlohmann::json item = {};
to_json(item, i);
json_data.push_back(item);
......@@ -769,8 +768,7 @@ void smf_n11::update_nf_instance(
smf_cfg.nrf_addr.api_version + NNRF_NF_REGISTER_URL +
msg->smf_instance_id;
Logger::smf_n11().debug("Send NF Update to NRF (NRF URL %s)",
url.c_str());
Logger::smf_n11().debug("Send NF Update to NRF (NRF URL %s)", url.c_str());
curl_global_init(CURL_GLOBAL_ALL);
CURL *curl = curl = curl_easy_init();
......
......@@ -97,11 +97,24 @@ class smf_n11 {
void notify_subscribed_event(
std::shared_ptr<itti_n11_notify_subscribed_event> msg);
/*
* Send NF instance registration to NRF
* @param [std::shared_ptr<itti_n11_register_nf_instance_request>] msg:
* Content of message to be sent
* @return void
*/
void register_nf_instance(
std::shared_ptr<itti_n11_register_nf_instance_request> msg);
/*
* Send NF instance update to NRF
* @param [std::shared_ptr<itti_n11_update_nf_instance_request>] msg: Content
* of message to be sent
* @return void
*/
void update_nf_instance(
std::shared_ptr<itti_n11_update_nf_instance_request> msg);
/*
* Create Curl handle for multi curl
* @param [event_notification&] ev_notif: content of the event notification
......
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