Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-SMF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-SMF
Commits
1e932480
Commit
1e932480
authored
Jan 06, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add function headers
parent
30165886
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
13 deletions
+29
-13
src/smf_app/smf_app.hpp
src/smf_app/smf_app.hpp
+10
-5
src/smf_app/smf_n11.cpp
src/smf_app/smf_n11.cpp
+5
-7
src/smf_app/smf_n11.hpp
src/smf_app/smf_n11.hpp
+14
-1
No files found.
src/smf_app/smf_app.hpp
View file @
1e932480
...
@@ -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"
...
...
src/smf_app/smf_n11.cpp
View file @
1e932480
...
@@ -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,10 +753,10 @@ void smf_n11::update_nf_instance(
...
@@ -754,10 +753,10 @@ 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
);
}
}
std
::
string
body
=
json_data
.
dump
();
std
::
string
body
=
json_data
.
dump
();
Logger
::
smf_n11
().
debug
(
"Send NF Instance Registration to NRF (Msg body %s)"
,
Logger
::
smf_n11
().
debug
(
"Send NF Instance Registration to NRF (Msg body %s)"
,
...
@@ -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
();
...
...
src/smf_app/smf_n11.hpp
View file @
1e932480
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
namespace
smf
{
namespace
smf
{
#define TASK_SMF_N11_TIMEOUT_NRF_HEARTBEAT_REQUEST
1
#define TASK_SMF_N11_TIMEOUT_NRF_HEARTBEAT_REQUEST 1
class
smf_n11
{
class
smf_n11
{
private:
private:
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment