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

Add function headers

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