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
b9a2436f
Commit
b9a2436f
authored
May 24, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issue for SMF Event
parent
e2e61fe2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
10 deletions
+31
-10
src/api-server/model/SmfEvent.cpp
src/api-server/model/SmfEvent.cpp
+4
-4
src/api-server/model/SmfEvent.h
src/api-server/model/SmfEvent.h
+4
-4
src/common/utils/3gpp_conversions.cpp
src/common/utils/3gpp_conversions.cpp
+23
-2
No files found.
src/api-server/model/SmfEvent.cpp
View file @
b9a2436f
...
...
@@ -25,13 +25,13 @@ void SmfEvent::validate() {
// TODO: implement validation
}
void
SmfEvent
::
set_value
(
uint8_t
value
)
{
void
SmfEvent
::
set_value
(
std
::
string
value
)
{
this
->
value
=
value
;
}
void
SmfEvent
::
get_value
(
uint8_t
&
value
)
const
{
void
SmfEvent
::
get_value
(
std
::
string
&
value
)
const
{
value
=
this
->
value
;
}
uint8_t
SmfEvent
::
get_value
()
const
{
std
::
string
SmfEvent
::
get_value
()
const
{
return
value
;
}
...
...
@@ -40,7 +40,7 @@ void to_json(nlohmann::json& j, const SmfEvent& o) {
}
void
from_json
(
const
nlohmann
::
json
&
j
,
SmfEvent
&
o
)
{
o
.
set_value
(
j
.
get
<
int
>
());
o
.
set_value
(
j
.
get
<
std
::
string
>
());
}
}
// namespace model
...
...
src/api-server/model/SmfEvent.h
View file @
b9a2436f
...
...
@@ -39,9 +39,9 @@ class SmfEvent {
void
validate
();
void
set_value
(
uint8_t
value
);
void
get_value
(
uint8_t
&
value
)
const
;
uint8_t
get_value
()
const
;
void
set_value
(
std
::
string
value
);
void
get_value
(
std
::
string
&
value
)
const
;
std
::
string
get_value
()
const
;
/////////////////////////////////////////////
/// SmfEvent members
...
...
@@ -50,7 +50,7 @@ class SmfEvent {
protected:
private:
uint8_t
value
;
std
::
string
value
;
};
}
// namespace model
...
...
src/common/utils/3gpp_conversions.cpp
View file @
b9a2436f
...
...
@@ -465,8 +465,29 @@ void xgpp_conv::smf_event_exposure_notification_from_openapi(
for
(
auto
e
:
event_subcription_api
)
{
// EventSubscription: TODO
event_subscription_t
event_subscription
=
{};
event_subscription
.
smf_event
=
static_cast
<
smf_event_t
>
(
e
.
getEvent
().
get_value
());
uint8_t
event_id_enum
=
0
;
std
::
string
event_id
=
e
.
getEvent
().
get_value
();
if
(
event_id
.
compare
(
"AC_TY_CH"
)
==
0
)
{
event_subscription
.
smf_event
=
smf_event_e
::
SMF_EVENT_AC_TY_CH
;
}
else
if
(
event_id
.
compare
(
"UP_PATH_CH"
)
==
0
)
{
event_subscription
.
smf_event
=
smf_event_e
::
SMF_EVENT_UP_PATH_CH
;
}
else
if
(
event_id
.
compare
(
"PDU_SES_REL"
)
==
0
)
{
event_subscription
.
smf_event
=
smf_event_e
::
SMF_EVENT_PDU_SES_REL
;
}
else
if
(
event_id
.
compare
(
"PLMN_CH"
)
==
0
)
{
event_subscription
.
smf_event
=
smf_event_e
::
SMF_EVENT_PLMN_CH
;
}
else
if
(
event_id
.
compare
(
"UE_IP_CH"
)
==
0
)
{
event_subscription
.
smf_event
=
smf_event_e
::
SMF_EVENT_UE_IP_CH
;
}
else
if
(
event_id
.
compare
(
"DDDS"
)
==
0
)
{
event_subscription
.
smf_event
=
smf_event_e
::
SMF_EVENT_DDDS
;
}
else
if
(
event_id
.
compare
(
"FLEXCN"
)
==
0
)
{
event_subscription
.
smf_event
=
smf_event_e
::
SMF_EVENT_FLEXCN
;
}
else
{
Logger
::
smf_api_server
().
debug
(
"Unknown SMF Event %s"
,
event_id
.
c_str
());
break
;
}
// event_subscription.smf_event =
// static_cast<smf_event_t>(e.getEvent().get_value());
// TODO: dnaiChType (for event UP path change)
// TODO: dddTraDes/ddsStati (for event downlink data delivery status)
// TODO: altNotifIpv4Addrs, altNotifIpv6Addrs, serviceName, ImmeRep,
...
...
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