Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-AMF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
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-AMF
Commits
f5b9161e
Commit
f5b9161e
authored
Jul 27, 2021
by
Prateek Mishra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Files updated with clang-format
parent
fe3273e8
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
143 additions
and
149 deletions
+143
-149
src/amf-app/amf_app.cpp
src/amf-app/amf_app.cpp
+16
-18
src/amf-app/amf_app.hpp
src/amf-app/amf_app.hpp
+1
-2
src/amf-app/amf_event.hpp
src/amf-app/amf_event.hpp
+0
-1
src/amf-app/amf_event_sig.hpp
src/amf-app/amf_event_sig.hpp
+2
-3
src/amf-app/amf_msg.hpp
src/amf-app/amf_msg.hpp
+0
-1
src/sbi/amf_server/AMFApiServer.hpp
src/sbi/amf_server/AMFApiServer.hpp
+1
-1
src/sbi/amf_server/api/NFStatusNotifyApi.cpp
src/sbi/amf_server/api/NFStatusNotifyApi.cpp
+1
-1
src/sbi/amf_server/api/SubscriptionsCollectionApi.cpp
src/sbi/amf_server/api/SubscriptionsCollectionApi.cpp
+1
-1
src/sbi/amf_server/impl/NFStatusNotifyApiImpl.h
src/sbi/amf_server/impl/NFStatusNotifyApiImpl.h
+1
-1
src/sbi/amf_server/model/DddStatus.cpp
src/sbi/amf_server/model/DddStatus.cpp
+1
-1
src/sbi/amf_server/model/DnnUpfInfoItem.cpp
src/sbi/amf_server/model/DnnUpfInfoItem.cpp
+9
-9
src/sbi/amf_server/model/DnnUpfInfoItem.h
src/sbi/amf_server/model/DnnUpfInfoItem.h
+6
-6
src/sbi/amf_server/model/EventSubscription.h
src/sbi/amf_server/model/EventSubscription.h
+0
-1
src/sbi/amf_server/model/NFProfile.cpp
src/sbi/amf_server/model/NFProfile.cpp
+50
-49
src/sbi/amf_server/model/NFProfile.h
src/sbi/amf_server/model/NFProfile.h
+29
-29
src/sbi/amf_server/model/UpfInfo.cpp
src/sbi/amf_server/model/UpfInfo.cpp
+10
-10
src/sbi/amf_server/model/UpfInfo.h
src/sbi/amf_server/model/UpfInfo.h
+6
-6
src/utils/3gpp_conversions.cpp
src/utils/3gpp_conversions.cpp
+9
-9
No files found.
src/amf-app/amf_app.cpp
View file @
f5b9161e
...
...
@@ -407,17 +407,17 @@ evsub_id_t amf_app::handle_event_exposure_subscription(
std
::
shared_ptr
<
amf_subscription
>
ss
=
std
::
shared_ptr
<
amf_subscription
>
(
new
amf_subscription
());
ss
.
get
()
->
sub_id
=
evsub_id
;
//if (msg->event_exposure.is_supi_is_set()) {
//
if (msg->event_exposure.is_supi_is_set()) {
// supi64_t supi64 = amf_supi_to_u64(msg->event_exposure.get_supi());
// ss.get()->supi = supi64;
//}
//ss.get()->notif_id = msg->event_exposure.get_notif_id();
//ss.get()->notif_uri = msg->event_exposure.get_notif_uri();
//
ss.get()->notif_id = msg->event_exposure.get_notif_id();
//
ss.get()->notif_uri = msg->event_exposure.get_notif_uri();
//std::vector<event_subscription_t> event_subscriptions =
//
std::vector<event_subscription_t> event_subscriptions =
// msg->event_exposure.get_event_subs();
// store subscription
//for (auto i : event_subscriptions) {
//
for (auto i : event_subscriptions) {
// ss.get()->ev_type = i.amf_event;
// add_event_subscription(evsub_id, i.amf_event, ss);
//}
...
...
@@ -427,19 +427,18 @@ evsub_id_t amf_app::handle_event_exposure_subscription(
//------------------------------------------------------------------------------
bool
amf_app
::
handle_nf_status_notification
(
std
::
shared_ptr
<
itti_sbi_notification_data
>&
msg
,
oai
::
amf
::
model
::
ProblemDetails
&
problem_details
,
uint8_t
&
http_code
)
{
oai
::
amf
::
model
::
ProblemDetails
&
problem_details
,
uint8_t
&
http_code
)
{
Logger
::
amf_app
().
info
(
"Handle a NF status notification from NRF (HTTP version "
"%d)"
,
msg
->
http_version
);
data_notification_msg
notification_msg
=
msg
.
get
()
->
notification_msg
;
std
::
string
event_type
=
""
;
//notification_msg.get_notification_event_type(event_type);
std
::
string
event_type
=
""
;
//
notification_msg.get_notification_event_type(event_type);
if
(
event_type
.
compare
(
"NF_REGISTERED"
)
==
0
)
{
std
::
shared_ptr
<
nf_profile
>
profile
=
{};
//notification_msg.get_profile(profile);
//
notification_msg.get_profile(profile);
if
(
profile
.
get
()
!=
nullptr
)
{
std
::
string
nf_type
=
profile
.
get
()
->
get_nf_type
();
if
(
nf_type
.
compare
(
"UPF"
)
==
0
)
{
// UPF
...
...
@@ -458,7 +457,7 @@ bool amf_app::handle_nf_status_notification(
}
bool
found
=
false
;
//for (auto node : amf_cfg.upfs) {
//
for (auto node : amf_cfg.upfs) {
// if (node.u1.ipv4_address.s_addr == ipv4_addrs[0].s_addr) {
// found = false;
// break;
...
...
@@ -468,14 +467,14 @@ bool amf_app::handle_nf_status_notification(
// Add a new UPF node
Logger
::
amf_app
().
debug
(
"Add a new UPF node, Ipv4 Addr %s"
,
inet_ntoa
(
ipv4_addrs
[
0
]));
//pfcp::node_id_t n = {};
//n.node_id_type = pfcp::NODE_ID_TYPE_IPV4_ADDRESS;
//n.u1.ipv4_address.s_addr = ipv4_addrs[0].s_addr;
//
pfcp::node_id_t n = {};
//
n.node_id_type = pfcp::NODE_ID_TYPE_IPV4_ADDRESS;
//
n.u1.ipv4_address.s_addr = ipv4_addrs[0].s_addr;
// memcpy(&n.u1.ipv4_address, &ipv4_addrs[0], sizeof(struct in_addr));
//amf_cfg.upfs.push_back(n);
//upf_profile* upf_node_profile =
//
amf_cfg.upfs.push_back(n);
//
upf_profile* upf_node_profile =
// dynamic_cast<upf_profile*>(profile.get());
//start_upf_association(n, std::ref(*upf_node_profile));
//
start_upf_association(n, std::ref(*upf_node_profile));
// start_upf_association(n,
// std::static_pointer_cast<upf_profile>(profile));
}
else
{
...
...
@@ -507,7 +506,6 @@ bool amf_app::handle_nf_status_notification(
return
true
;
}
//------------------------------------------------------------------------------
void
amf_app
::
generate_uuid
()
{
amf_instance_id
=
to_string
(
boost
::
uuids
::
random_generator
()());
...
...
src/amf-app/amf_app.hpp
View file @
f5b9161e
...
...
@@ -148,8 +148,7 @@ class amf_app {
*/
bool
handle_nf_status_notification
(
std
::
shared_ptr
<
itti_sbi_notification_data
>&
msg
,
oai
::
amf
::
model
::
ProblemDetails
&
problem_details
,
uint8_t
&
http_code
);
oai
::
amf
::
model
::
ProblemDetails
&
problem_details
,
uint8_t
&
http_code
);
/*
* Generate a random UUID for SMF instance
...
...
src/amf-app/amf_event.hpp
View file @
f5b9161e
...
...
@@ -60,7 +60,6 @@ class amf_event {
bs2
::
connection
subscribe_ue_reachability_status
(
const
ue_reachability_status_sig_t
::
slot_type
&
sig
);
private:
ue_reachability_status_sig_t
ue_reachability_status
;
// Signal for SM Context status update
...
...
src/amf-app/amf_event_sig.hpp
View file @
f5b9161e
...
...
@@ -41,9 +41,8 @@ namespace amf {
// Signal for UE Reachability status
// SCID, HTTP version
typedef
bs2
::
signal_type
<
void
(
scid_t
,
uint8_t
),
bs2
::
keywords
::
mutex_type
<
bs2
::
dummy_mutex
>>::
type
ue_reachability_status_sig_t
;
void
(
scid_t
,
uint8_t
),
bs2
::
keywords
::
mutex_type
<
bs2
::
dummy_mutex
>>::
type
ue_reachability_status_sig_t
;
}
// namespace amf
#endif
src/amf-app/amf_msg.hpp
View file @
f5b9161e
...
...
@@ -36,7 +36,6 @@
namespace
amf
{
class
event_exposure_msg
{
public:
supi_t
get_supi
()
const
;
...
...
src/sbi/amf_server/AMFApiServer.hpp
View file @
f5b9161e
...
...
@@ -31,7 +31,7 @@ class AMFApiServer {
AMFApiServer
(
Pistache
::
Address
address
,
amf_application
::
amf_app
*
amf_app_inst
)
:
m_httpEndpoint
(
std
::
make_shared
<
Pistache
::
Http
::
Endpoint
>
(
address
))
{
m_router
=
std
::
make_shared
<
Pistache
::
Rest
::
Router
>
();
m_router
=
std
::
make_shared
<
Pistache
::
Rest
::
Router
>
();
m_address
=
address
.
host
()
+
":"
+
(
address
.
port
()).
toString
();
m_individualSubscriptionDocumentApiImpl
=
std
::
make_shared
<
IndividualSubscriptionDocumentApiImpl
>
(
...
...
src/sbi/amf_server/api/NFStatusNotifyApi.cpp
View file @
f5b9161e
...
...
@@ -29,7 +29,7 @@ namespace oai {
namespace
amf
{
namespace
api
{
//using namespace oai::amf::helpers;
//
using namespace oai::amf::helpers;
using
namespace
oai
::
amf
::
model
;
NFStatusNotifyApi
::
NFStatusNotifyApi
(
...
...
src/sbi/amf_server/api/SubscriptionsCollectionApi.cpp
View file @
f5b9161e
...
...
@@ -17,7 +17,7 @@ namespace oai {
namespace
amf
{
namespace
api
{
//using namespace oai::amf::helpers;
//
using namespace oai::amf::helpers;
using
namespace
oai
::
amf
::
model
;
SubscriptionsCollectionApi
::
SubscriptionsCollectionApi
(
...
...
src/sbi/amf_server/impl/NFStatusNotifyApiImpl.h
View file @
f5b9161e
...
...
@@ -78,7 +78,7 @@ class NFStatusNotifyApiImpl : public oai::amf::api::NFStatusNotifyApi {
};
}
// namespace api
}
// namespace amf
_server
}
// namespace amf
}
// namespace oai
#endif
src/sbi/amf_server/model/DddStatus.cpp
View file @
f5b9161e
...
...
@@ -32,5 +32,5 @@ void to_json(nlohmann::json& j, const DddStatus& o) {
void
from_json
(
const
nlohmann
::
json
&
j
,
DddStatus
&
o
)
{}
}
// namespace model
}
// namespace amf
r
}
// namespace amf
}
// namespace oai
src/sbi/amf_server/model/DnnUpfInfoItem.cpp
View file @
f5b9161e
...
...
@@ -18,9 +18,9 @@ namespace amf {
namespace
model
{
DnnUpfInfoItem
::
DnnUpfInfoItem
()
{
m_Dnn
=
""
;
m_DnaiListIsSet
=
false
;
//m_PduSessionTypesIsSet = false;
m_Dnn
=
""
;
m_DnaiListIsSet
=
false
;
//
m_PduSessionTypesIsSet = false;
}
DnnUpfInfoItem
::~
DnnUpfInfoItem
()
{}
...
...
@@ -33,7 +33,7 @@ void to_json(nlohmann::json& j, const DnnUpfInfoItem& o) {
j
=
nlohmann
::
json
();
j
[
"dnn"
]
=
o
.
m_Dnn
;
if
(
o
.
dnaiListIsSet
()
||
!
o
.
m_DnaiList
.
empty
())
j
[
"dnaiList"
]
=
o
.
m_DnaiList
;
//if (o.pduSessionTypesIsSet() || !o.m_PduSessionTypes.empty())
//
if (o.pduSessionTypesIsSet() || !o.m_PduSessionTypes.empty())
// j["pduSessionTypes"] = o.m_PduSessionTypes;
}
...
...
@@ -43,7 +43,7 @@ void from_json(const nlohmann::json& j, DnnUpfInfoItem& o) {
j
.
at
(
"dnaiList"
).
get_to
(
o
.
m_DnaiList
);
o
.
m_DnaiListIsSet
=
true
;
}
//if (j.find("pduSessionTypes") != j.end()) {
//
if (j.find("pduSessionTypes") != j.end()) {
// j.at("pduSessionTypes").get_to(o.m_PduSessionTypes);
// o.m_PduSessionTypesIsSet = true;
//}
...
...
@@ -68,18 +68,18 @@ bool DnnUpfInfoItem::dnaiListIsSet() const {
void
DnnUpfInfoItem
::
unsetDnaiList
()
{
m_DnaiListIsSet
=
false
;
}
//std::vector<PduSessionType>& DnnUpfInfoItem::getPduSessionTypes() {
//
std::vector<PduSessionType>& DnnUpfInfoItem::getPduSessionTypes() {
// return m_PduSessionTypes;
//}
//void DnnUpfInfoItem::setPduSessionTypes(
//
void DnnUpfInfoItem::setPduSessionTypes(
// std::vector<PduSessionType> const& value) {
// m_PduSessionTypes = value;
// m_PduSessionTypesIsSet = true;
//}
//bool DnnUpfInfoItem::pduSessionTypesIsSet() const {
//
bool DnnUpfInfoItem::pduSessionTypesIsSet() const {
// return m_PduSessionTypesIsSet;
//}
//void DnnUpfInfoItem::unsetPduSessionTypes() {
//
void DnnUpfInfoItem::unsetPduSessionTypes() {
// m_PduSessionTypesIsSet = false;
//}
...
...
src/sbi/amf_server/model/DnnUpfInfoItem.h
View file @
f5b9161e
...
...
@@ -56,10 +56,10 @@ class DnnUpfInfoItem {
/// <summary>
///
/// </summary>
//std::vector<PduSessionType>& getPduSessionTypes();
//void setPduSessionTypes(std::vector<PduSessionType> const& value);
//bool pduSessionTypesIsSet() const;
//void unsetPduSessionTypes();
//
std::vector<PduSessionType>& getPduSessionTypes();
//
void setPduSessionTypes(std::vector<PduSessionType> const& value);
//
bool pduSessionTypesIsSet() const;
//
void unsetPduSessionTypes();
friend
void
to_json
(
nlohmann
::
json
&
j
,
const
DnnUpfInfoItem
&
o
);
friend
void
from_json
(
const
nlohmann
::
json
&
j
,
DnnUpfInfoItem
&
o
);
...
...
@@ -69,8 +69,8 @@ class DnnUpfInfoItem {
std
::
vector
<
std
::
string
>
m_DnaiList
;
bool
m_DnaiListIsSet
;
//std::vector<PduSessionType> m_PduSessionTypes;
//bool m_PduSessionTypesIsSet;
//
std::vector<PduSessionType> m_PduSessionTypes;
//
bool m_PduSessionTypesIsSet;
};
}
// namespace model
...
...
src/sbi/amf_server/model/EventSubscription.h
View file @
f5b9161e
...
...
@@ -26,7 +26,6 @@
#include <vector>
#include <nlohmann/json.hpp>
namespace
oai
{
namespace
amf
{
namespace
model
{
...
...
src/sbi/amf_server/model/NFProfile.cpp
View file @
f5b9161e
...
...
@@ -18,25 +18,25 @@ namespace amf {
namespace
model
{
NFProfile
::
NFProfile
()
{
m_NfInstanceId
=
""
;
m_NfInstanceName
=
""
;
m_NfInstanceNameIsSet
=
false
;
m_HeartBeatTimer
=
0
;
m_HeartBeatTimerIsSet
=
false
;
//m_PlmnListIsSet = false;
//m_SNssaisIsSet = false;
//m_PerPlmnSnssaiListIsSet = false;
m_NsiListIsSet
=
false
;
m_Fqdn
=
""
;
m_FqdnIsSet
=
false
;
m_InterPlmnFqdn
=
""
;
m_InterPlmnFqdnIsSet
=
false
;
m_Ipv4AddressesIsSet
=
false
;
m_Ipv6AddressesIsSet
=
false
;
//m_AllowedPlmnsIsSet = false;
m_AllowedNfTypesIsSet
=
false
;
m_AllowedNfDomainsIsSet
=
false
;
//m_AllowedNssaisIsSet = false;
m_NfInstanceId
=
""
;
m_NfInstanceName
=
""
;
m_NfInstanceNameIsSet
=
false
;
m_HeartBeatTimer
=
0
;
m_HeartBeatTimerIsSet
=
false
;
//
m_PlmnListIsSet = false;
//
m_SNssaisIsSet = false;
//
m_PerPlmnSnssaiListIsSet = false;
m_NsiListIsSet
=
false
;
m_Fqdn
=
""
;
m_FqdnIsSet
=
false
;
m_InterPlmnFqdn
=
""
;
m_InterPlmnFqdnIsSet
=
false
;
m_Ipv4AddressesIsSet
=
false
;
m_Ipv6AddressesIsSet
=
false
;
//
m_AllowedPlmnsIsSet = false;
m_AllowedNfTypesIsSet
=
false
;
m_AllowedNfDomainsIsSet
=
false
;
//
m_AllowedNssaisIsSet = false;
m_Priority
=
0
;
m_PriorityIsSet
=
false
;
m_Capacity
=
0
;
...
...
@@ -72,9 +72,10 @@ void to_json(nlohmann::json& j, const NFProfile& o) {
j
[
"nfType"
]
=
o
.
m_NfType
;
j
[
"nfStatus"
]
=
o
.
m_NfStatus
;
if
(
o
.
heartBeatTimerIsSet
())
j
[
"heartBeatTimer"
]
=
o
.
m_HeartBeatTimer
;
//if (o.plmnListIsSet() || !o.m_PlmnList.empty()) j["plmnList"] = o.m_PlmnList;
//if (o.sNssaisIsSet() || !o.m_SNssais.empty()) j["sNssais"] = o.m_SNssais;
//if (o.perPlmnSnssaiListIsSet() || !o.m_PerPlmnSnssaiList.empty())
// if (o.plmnListIsSet() || !o.m_PlmnList.empty()) j["plmnList"] =
// o.m_PlmnList; if (o.sNssaisIsSet() || !o.m_SNssais.empty()) j["sNssais"] =
// o.m_SNssais; if (o.perPlmnSnssaiListIsSet() ||
// !o.m_PerPlmnSnssaiList.empty())
// j["perPlmnSnssaiList"] = o.m_PerPlmnSnssaiList;
if
(
o
.
nsiListIsSet
()
||
!
o
.
m_NsiList
.
empty
())
j
[
"nsiList"
]
=
o
.
m_NsiList
;
if
(
o
.
fqdnIsSet
())
j
[
"fqdn"
]
=
o
.
m_Fqdn
;
...
...
@@ -83,13 +84,13 @@ void to_json(nlohmann::json& j, const NFProfile& o) {
j
[
"ipv4Addresses"
]
=
o
.
m_Ipv4Addresses
;
if
(
o
.
ipv6AddressesIsSet
()
||
!
o
.
m_Ipv6Addresses
.
empty
())
j
[
"ipv6Addresses"
]
=
o
.
m_Ipv6Addresses
;
//if (o.allowedPlmnsIsSet() || !o.m_AllowedPlmns.empty())
//
if (o.allowedPlmnsIsSet() || !o.m_AllowedPlmns.empty())
// j["allowedPlmns"] = o.m_AllowedPlmns;
if
(
o
.
allowedNfTypesIsSet
()
||
!
o
.
m_AllowedNfTypes
.
empty
())
j
[
"allowedNfTypes"
]
=
o
.
m_AllowedNfTypes
;
if
(
o
.
allowedNfDomainsIsSet
()
||
!
o
.
m_AllowedNfDomains
.
empty
())
j
[
"allowedNfDomains"
]
=
o
.
m_AllowedNfDomains
;
//if (o.allowedNssaisIsSet() || !o.m_AllowedNssais.empty())
//
if (o.allowedNssaisIsSet() || !o.m_AllowedNssais.empty())
// j["allowedNssais"] = o.m_AllowedNssais;
if
(
o
.
priorityIsSet
())
j
[
"priority"
]
=
o
.
m_Priority
;
if
(
o
.
capacityIsSet
())
j
[
"capacity"
]
=
o
.
m_Capacity
;
...
...
@@ -120,15 +121,15 @@ void from_json(const nlohmann::json& j, NFProfile& o) {
j
.
at
(
"heartBeatTimer"
).
get_to
(
o
.
m_HeartBeatTimer
);
o
.
m_HeartBeatTimerIsSet
=
true
;
}
//if (j.find("plmnList") != j.end()) {
//
if (j.find("plmnList") != j.end()) {
// j.at("plmnList").get_to(o.m_PlmnList);
// o.m_PlmnListIsSet = true;
//}
//if (j.find("sNssais") != j.end()) {
//
if (j.find("sNssais") != j.end()) {
// j.at("sNssais").get_to(o.m_SNssais);
// o.m_SNssaisIsSet = true;
//}
//if (j.find("perPlmnSnssaiList") != j.end()) {
//
if (j.find("perPlmnSnssaiList") != j.end()) {
// j.at("perPlmnSnssaiList").get_to(o.m_PerPlmnSnssaiList);
// o.m_PerPlmnSnssaiListIsSet = true;
//}
...
...
@@ -152,7 +153,7 @@ void from_json(const nlohmann::json& j, NFProfile& o) {
j
.
at
(
"ipv6Addresses"
).
get_to
(
o
.
m_Ipv6Addresses
);
o
.
m_Ipv6AddressesIsSet
=
true
;
}
//if (j.find("allowedPlmns") != j.end()) {
//
if (j.find("allowedPlmns") != j.end()) {
// j.at("allowedPlmns").get_to(o.m_AllowedPlmns);
// o.m_AllowedPlmnsIsSet = true;
//}
...
...
@@ -164,7 +165,7 @@ void from_json(const nlohmann::json& j, NFProfile& o) {
j
.
at
(
"allowedNfDomains"
).
get_to
(
o
.
m_AllowedNfDomains
);
o
.
m_AllowedNfDomainsIsSet
=
true
;
}
//if (j.find("allowedNssais") != j.end()) {
//
if (j.find("allowedNssais") != j.end()) {
// j.at("allowedNssais").get_to(o.m_AllowedNssais);
// o.m_AllowedNssaisIsSet = true;
//}
...
...
@@ -259,43 +260,43 @@ bool NFProfile::heartBeatTimerIsSet() const {
void
NFProfile
::
unsetHeartBeatTimer
()
{
m_HeartBeatTimerIsSet
=
false
;
}
//std::vector<PlmnId>& NFProfile::getPlmnList() {
//
std::vector<PlmnId>& NFProfile::getPlmnList() {
// return m_PlmnList;
//}
//void NFProfile::setPlmnList(std::vector<PlmnId> const& value) {
//
void NFProfile::setPlmnList(std::vector<PlmnId> const& value) {
// m_PlmnList = value;
// m_PlmnListIsSet = true;
//}
//bool NFProfile::plmnListIsSet() const {
//
bool NFProfile::plmnListIsSet() const {
// return m_PlmnListIsSet;
//}
//void NFProfile::unsetPlmnList() {
//
void NFProfile::unsetPlmnList() {
// m_PlmnListIsSet = false;
//}
//std::vector<Snssai> NFProfile::getSNssais() const {
//
std::vector<Snssai> NFProfile::getSNssais() const {
// return m_SNssais;//
//}
//void NFProfile::setSNssais(std::vector<Snssai> const& value) {
//
void NFProfile::setSNssais(std::vector<Snssai> const& value) {
// m_SNssais = value;
// m_SNssaisIsSet = true;
//}
//bool NFProfile::sNssaisIsSet() const {
//
bool NFProfile::sNssaisIsSet() const {
// return m_SNssaisIsSet;
//}
//void NFProfile::unsetSNssais() {
//
void NFProfile::unsetSNssais() {
// m_SNssaisIsSet = false;
//}
//std::vector<PlmnSnssai>& NFProfile::getPerPlmnSnssaiList() {
//
std::vector<PlmnSnssai>& NFProfile::getPerPlmnSnssaiList() {
// return m_PerPlmnSnssaiList;
//}
//void NFProfile::setPerPlmnSnssaiList(std::vector<PlmnSnssai> const& value) {
//
void NFProfile::setPerPlmnSnssaiList(std::vector<PlmnSnssai> const& value) {
// m_PerPlmnSnssaiList = value;
// m_PerPlmnSnssaiListIsSet = true;
//}
//bool NFProfile::perPlmnSnssaiListIsSet() const {
//
bool NFProfile::perPlmnSnssaiListIsSet() const {
// return m_PerPlmnSnssaiListIsSet;
//}
//void NFProfile::unsetPerPlmnSnssaiList() {
//
void NFProfile::unsetPerPlmnSnssaiList() {
// m_PerPlmnSnssaiListIsSet = false;
//}
std
::
vector
<
std
::
string
>&
NFProfile
::
getNsiList
()
{
...
...
@@ -363,17 +364,17 @@ bool NFProfile::ipv6AddressesIsSet() const {
void
NFProfile
::
unsetIpv6Addresses
()
{
m_Ipv6AddressesIsSet
=
false
;
}
//std::vector<PlmnId>& NFProfile::getAllowedPlmns() {
//
std::vector<PlmnId>& NFProfile::getAllowedPlmns() {
// return m_AllowedPlmns;
//}
//void NFProfile::setAllowedPlmns(std::vector<PlmnId> const& value) {
//
void NFProfile::setAllowedPlmns(std::vector<PlmnId> const& value) {
// m_AllowedPlmns = value;
// m_AllowedPlmnsIsSet = true;
//}
//bool NFProfile::allowedPlmnsIsSet() const {
//
bool NFProfile::allowedPlmnsIsSet() const {
// return m_AllowedPlmnsIsSet;
//}
//void NFProfile::unsetAllowedPlmns() {
//
void NFProfile::unsetAllowedPlmns() {
// m_AllowedPlmnsIsSet = false;
//}
std
::
vector
<
std
::
string
>&
NFProfile
::
getAllowedNfTypes
()
{
...
...
@@ -402,17 +403,17 @@ bool NFProfile::allowedNfDomainsIsSet() const {
void
NFProfile
::
unsetAllowedNfDomains
()
{
m_AllowedNfDomainsIsSet
=
false
;
}
//std::vector<Snssai>& NFProfile::getAllowedNssais() {
//
std::vector<Snssai>& NFProfile::getAllowedNssais() {
// return m_AllowedNssais;
//}
//void NFProfile::setAllowedNssais(std::vector<Snssai> const& value) {
//
void NFProfile::setAllowedNssais(std::vector<Snssai> const& value) {
// m_AllowedNssais = value;
// m_AllowedNssaisIsSet = true;
//}
//bool NFProfile::allowedNssaisIsSet() const {
//
bool NFProfile::allowedNssaisIsSet() const {
// return m_AllowedNssaisIsSet;
//}
//void NFProfile::unsetAllowedNssais() {
//
void NFProfile::unsetAllowedNssais() {
// m_AllowedNssaisIsSet = false;
//}
int32_t
NFProfile
::
getPriority
()
const
{
...
...
src/sbi/amf_server/model/NFProfile.h
View file @
f5b9161e
...
...
@@ -92,24 +92,24 @@ class NFProfile {
/// <summary>
///
/// </summary>
//std::vector<PlmnId>& getPlmnList();
//void setPlmnList(std::vector<PlmnId> const& value);
//bool plmnListIsSet() const;
//void unsetPlmnList();
//
std::vector<PlmnId>& getPlmnList();
//
void setPlmnList(std::vector<PlmnId> const& value);
//
bool plmnListIsSet() const;
//
void unsetPlmnList();
/// <summary>
///
/// </summary>
//std::vector<Snssai> getSNssais() const;
//void setSNssais(std::vector<Snssai> const& value);
//bool sNssaisIsSet() const;
//void unsetSNssais();
//
std::vector<Snssai> getSNssais() const;
//
void setSNssais(std::vector<Snssai> const& value);
//
bool sNssaisIsSet() const;
//
void unsetSNssais();
/// <summary>
///
/// </summary>
//std::vector<PlmnSnssai>& getPerPlmnSnssaiList();
//void setPerPlmnSnssaiList(std::vector<PlmnSnssai> const& value);
//bool perPlmnSnssaiListIsSet() const;
//void unsetPerPlmnSnssaiList();
//
std::vector<PlmnSnssai>& getPerPlmnSnssaiList();
//
void setPerPlmnSnssaiList(std::vector<PlmnSnssai> const& value);
//
bool perPlmnSnssaiListIsSet() const;
//
void unsetPerPlmnSnssaiList();
/// <summary>
///
/// </summary>
...
...
@@ -148,10 +148,10 @@ class NFProfile {
/// <summary>
///
/// </summary>
//std::vector<PlmnId>& getAllowedPlmns();
//void setAllowedPlmns(std::vector<PlmnId> const& value);
//bool allowedPlmnsIsSet() const;
//void unsetAllowedPlmns();
//
std::vector<PlmnId>& getAllowedPlmns();
//
void setAllowedPlmns(std::vector<PlmnId> const& value);
//
bool allowedPlmnsIsSet() const;
//
void unsetAllowedPlmns();
/// <summary>
///
/// </summary>
...
...
@@ -169,10 +169,10 @@ class NFProfile {
/// <summary>
///
/// </summary>
//std::vector<Snssai>& getAllowedNssais();
//void setAllowedNssais(std::vector<Snssai> const& value);
//bool allowedNssaisIsSet() const;
//void unsetAllowedNssais();
//
std::vector<Snssai>& getAllowedNssais();
//
void setAllowedNssais(std::vector<Snssai> const& value);
//
bool allowedNssaisIsSet() const;
//
void unsetAllowedNssais();
/// <summary>
///
/// </summary>
...
...
@@ -261,12 +261,12 @@ class NFProfile {
int32_t
m_HeartBeatTimer
;
bool
m_HeartBeatTimerIsSet
;
//std::vector<PlmnId> m_PlmnList;
//bool m_PlmnListIsSet;
//std::vector<Snssai> m_SNssais;
//bool m_SNssaisIsSet;
//std::vector<PlmnSnssai> m_PerPlmnSnssaiList;
//bool m_PerPlmnSnssaiListIsSet;
//
std::vector<PlmnId> m_PlmnList;
//
bool m_PlmnListIsSet;
//
std::vector<Snssai> m_SNssais;
//
bool m_SNssaisIsSet;
//
std::vector<PlmnSnssai> m_PerPlmnSnssaiList;
//
bool m_PerPlmnSnssaiListIsSet;
std
::
vector
<
std
::
string
>
m_NsiList
;
bool
m_NsiListIsSet
;
std
::
string
m_Fqdn
;
...
...
@@ -277,14 +277,14 @@ class NFProfile {
bool
m_Ipv4AddressesIsSet
;
std
::
vector
<
Ipv6Addr
>
m_Ipv6Addresses
;
bool
m_Ipv6AddressesIsSet
;
//std::vector<PlmnId> m_AllowedPlmns;
//
std::vector<PlmnId> m_AllowedPlmns;
// bool m_AllowedPlmnsIsSet;
std
::
vector
<
std
::
string
>
m_AllowedNfTypes
;
bool
m_AllowedNfTypesIsSet
;
std
::
vector
<
std
::
string
>
m_AllowedNfDomains
;
bool
m_AllowedNfDomainsIsSet
;
//std::vector<Snssai> m_AllowedNssais;
//bool m_AllowedNssaisIsSet;
//
std::vector<Snssai> m_AllowedNssais;
//
bool m_AllowedNssaisIsSet;
int32_t
m_Capacity
;
bool
m_CapacityIsSet
;
int32_t
m_Load
;
...
...
src/sbi/amf_server/model/UpfInfo.cpp
View file @
f5b9161e
...
...
@@ -22,10 +22,10 @@ UpfInfo::UpfInfo() {
m_InterfaceUpfInfoListIsSet
=
false
;
m_IwkEpsInd
=
false
;
m_IwkEpsIndIsSet
=
false
;
//m_PduSessionTypesIsSet = false;
m_AtsssCapabilityIsSet
=
false
;
m_UeIpAddrInd
=
false
;
m_UeIpAddrIndIsSet
=
false
;
//
m_PduSessionTypesIsSet = false;
m_AtsssCapabilityIsSet
=
false
;
m_UeIpAddrInd
=
false
;
m_UeIpAddrIndIsSet
=
false
;
}
UpfInfo
::~
UpfInfo
()
{}
...
...
@@ -42,7 +42,7 @@ void to_json(nlohmann::json& j, const UpfInfo& o) {
if
(
o
.
interfaceUpfInfoListIsSet
()
||
!
o
.
m_InterfaceUpfInfoList
.
empty
())
j
[
"interfaceUpfInfoList"
]
=
o
.
m_InterfaceUpfInfoList
;
if
(
o
.
iwkEpsIndIsSet
())
j
[
"iwkEpsInd"
]
=
o
.
m_IwkEpsInd
;
//if (o.pduSessionTypesIsSet() || !o.m_PduSessionTypes.empty())
//
if (o.pduSessionTypesIsSet() || !o.m_PduSessionTypes.empty())
// j["pduSessionTypes"] = o.m_PduSessionTypes;
if
(
o
.
atsssCapabilityIsSet
())
j
[
"atsssCapability"
]
=
o
.
m_AtsssCapability
;
if
(
o
.
ueIpAddrIndIsSet
())
j
[
"ueIpAddrInd"
]
=
o
.
m_UeIpAddrInd
;
...
...
@@ -62,7 +62,7 @@ void from_json(const nlohmann::json& j, UpfInfo& o) {
j
.
at
(
"iwkEpsInd"
).
get_to
(
o
.
m_IwkEpsInd
);
o
.
m_IwkEpsIndIsSet
=
true
;
}
//if (j.find("pduSessionTypes") != j.end()) {
//
if (j.find("pduSessionTypes") != j.end()) {
// j.at("pduSessionTypes").get_to(o.m_PduSessionTypes);
// o.m_PduSessionTypesIsSet = true;
//}
...
...
@@ -123,17 +123,17 @@ bool UpfInfo::iwkEpsIndIsSet() const {
void
UpfInfo
::
unsetIwkEpsInd
()
{
m_IwkEpsIndIsSet
=
false
;
}
//std::vector<PduSessionType>& UpfInfo::getPduSessionTypes() {
//
std::vector<PduSessionType>& UpfInfo::getPduSessionTypes() {
// return m_PduSessionTypes;
//}
//void UpfInfo::setPduSessionTypes(std::vector<PduSessionType> const& value) {
//
void UpfInfo::setPduSessionTypes(std::vector<PduSessionType> const& value) {
// m_PduSessionTypes = value;
// m_PduSessionTypesIsSet = true;
//}
//bool UpfInfo::pduSessionTypesIsSet() const {
//
bool UpfInfo::pduSessionTypesIsSet() const {
// return m_PduSessionTypesIsSet;
//}
//void UpfInfo::unsetPduSessionTypes() {
//
void UpfInfo::unsetPduSessionTypes() {
// m_PduSessionTypesIsSet = false;
//}
AtsssCapability
UpfInfo
::
getAtsssCapability
()
const
{
...
...
src/sbi/amf_server/model/UpfInfo.h
View file @
f5b9161e
...
...
@@ -73,10 +73,10 @@ class UpfInfo {
/// <summary>
///
/// </summary>
//std::vector<PduSessionType>& getPduSessionTypes();
//void setPduSessionTypes(std::vector<PduSessionType> const& value);
//bool pduSessionTypesIsSet() const;
//void unsetPduSessionTypes();
//
std::vector<PduSessionType>& getPduSessionTypes();
//
void setPduSessionTypes(std::vector<PduSessionType> const& value);
//
bool pduSessionTypesIsSet() const;
//
void unsetPduSessionTypes();
/// <summary>
///
/// </summary>
...
...
@@ -104,8 +104,8 @@ class UpfInfo {
bool
m_InterfaceUpfInfoListIsSet
;
bool
m_IwkEpsInd
;
bool
m_IwkEpsIndIsSet
;
//std::vector<PduSessionType> m_PduSessionTypes;
//bool m_PduSessionTypesIsSet;
//
std::vector<PduSessionType> m_PduSessionTypes;
//
bool m_PduSessionTypesIsSet;
AtsssCapability
m_AtsssCapability
;
bool
m_AtsssCapabilityIsSet
;
bool
m_UeIpAddrInd
;
...
...
src/utils/3gpp_conversions.cpp
View file @
f5b9161e
...
...
@@ -44,8 +44,8 @@ void xgpp_conv::data_notification_from_openapi(
"Convert NotificationData (OpenAPI) to "
"Data Notification Msg"
);
//dn_msg.set_notification_event_type(nd.getEvent());
//dn_msg.set_nf_instance_uri(nd.getNfInstanceUri());
//
dn_msg.set_notification_event_type(nd.getEvent());
//
dn_msg.set_nf_instance_uri(nd.getNfInstanceUri());
std
::
shared_ptr
<
amf_application
::
nf_profile
>
p
=
{};
...
...
@@ -56,7 +56,7 @@ void xgpp_conv::data_notification_from_openapi(
nlohmann
::
json
pj
=
{};
to_json
(
pj
,
nd
.
getNfProfile
());
p
.
get
()
->
from_json
(
pj
);
//dn_msg.set_profile(p);
//
dn_msg.set_profile(p);
}
//------------------------------------------------------------------------------
...
...
@@ -75,28 +75,28 @@ void xgpp_conv::amf_event_exposure_notification_from_openapi(
std
::
string
supi_prefix
=
nee
.
getSupi
().
substr
(
0
,
pos
);
amf_string_to_supi
(
&
supi
,
supi_str
.
c_str
());
//eem.set_supi(supi);
//eem.set_supi_prefix(supi_prefix);
//
eem.set_supi(supi);
//
eem.set_supi_prefix(supi_prefix);
Logger
::
amf_server
().
debug
(
"SUPI %s, SUPI Prefix %s, IMSI %s"
,
nee
.
getSupi
().
c_str
(),
supi_prefix
.
c_str
(),
supi_str
.
c_str
());
}
// PDU session ID
//if (nee.pduSeIdIsSet()) {
//
if (nee.pduSeIdIsSet()) {
// Logger::amf_server().debug("PDU Session ID %d", nee.getPduSeId());
// eem.set_pdu_session_id(nee.getPduSeId());
//}
//eem.set_notif_id(nee.getNotifId()); // NotifId
//eem.set_notif_uri(nee.getNotifUri()); // NotifUri
//
eem.set_notif_id(nee.getNotifId()); // NotifId
//
eem.set_notif_uri(nee.getNotifUri()); // NotifUri
// EventSubscription: TODO
event_subscription_t
event_subscription
=
{};
event_subscription
.
amf_event
=
amf_event_t
::
AMF_EVENT_REACH_ST
;
std
::
vector
<
event_subscription_t
>
event_subscriptions
=
{};
event_subscriptions
.
push_back
(
event_subscription
);
//eem.set_event_subs(event_subscriptions);
//
eem.set_event_subs(event_subscriptions);
// std::vector<EventSubscription> eventSubscriptions;
// for (auto it: nee.getEventSubs()){
...
...
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