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
3d122038
Commit
3d122038
authored
Nov 16, 2022
by
Tien Thinh NGUYEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Using a common promise for all SBI message request
parent
d8cf620f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
src/smf_app/smf_app.cpp
src/smf_app/smf_app.cpp
+7
-0
src/smf_app/smf_app.hpp
src/smf_app/smf_app.hpp
+16
-0
No files found.
src/smf_app/smf_app.cpp
View file @
3d122038
...
...
@@ -2059,6 +2059,13 @@ void smf_app::add_promise(
sm_context_release_promises
.
emplace
(
id
,
p
);
}
//---------------------------------------------------------------------------------------------
void
smf_app
::
add_promise
(
uint32_t
id
,
boost
::
shared_ptr
<
boost
::
promise
<
nlohmann
::
json
>>&
p
)
{
std
::
unique_lock
lock
(
m_sbi_server_promises
);
sbi_server_promises
.
emplace
(
id
,
p
);
}
//---------------------------------------------------------------------------------------------
void
smf_app
::
trigger_create_context_error_response
(
const
uint32_t
&
http_code
,
const
uint8_t
&
cause
,
...
...
src/smf_app/smf_app.hpp
View file @
3d122038
...
...
@@ -117,6 +117,7 @@ class smf_app {
mutable
std
::
shared_mutex
m_sm_context_create_promises
;
mutable
std
::
shared_mutex
m_sm_context_update_promises
;
mutable
std
::
shared_mutex
m_sm_context_release_promises
;
mutable
std
::
shared_mutex
m_sbi_server_promises
;
std
::
map
<
uint32_t
,
...
...
@@ -131,6 +132,9 @@ class smf_app {
boost
::
promise
<
pdu_session_release_sm_context_response
>>>
sm_context_release_promises
;
std
::
map
<
uint32_t
,
boost
::
shared_ptr
<
boost
::
promise
<
nlohmann
::
json
>>>
sbi_server_promises
;
smf_profile
nf_instance_profile
;
// SMF profile
std
::
string
smf_instance_id
;
// SMF instance id
timer_id_t
timer_nrf_heartbeat
;
...
...
@@ -753,6 +757,18 @@ class smf_app {
boost
::
shared_ptr
<
boost
::
promise
<
pdu_session_release_sm_context_response
>>&
p
);
/*
* To store a promise of a SBI Server response message to be
* triggered when the result is ready
* @param [uint32_t] id: promise id
* @param [boost::shared_ptr<
* boost::promise<nlohmann::json> >&] p: pointer to
* the promise
* @return void
*/
void
add_promise
(
uint32_t
id
,
boost
::
shared_ptr
<
boost
::
promise
<
nlohmann
::
json
>>&
p
);
/*
* To trigger the response to the HTTP server by set the value of the
* corresponding promise to ready
...
...
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