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
5df62e5d
Commit
5df62e5d
authored
Sep 07, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
First version for UE Reachability Status
parent
aeddeef3
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
78 additions
and
13 deletions
+78
-13
src/amf-app/amf_app.cpp
src/amf-app/amf_app.cpp
+0
-1
src/amf-app/amf_app.hpp
src/amf-app/amf_app.hpp
+0
-2
src/amf-app/amf_event.cpp
src/amf-app/amf_event.cpp
+1
-2
src/amf-app/amf_event.hpp
src/amf-app/amf_event.hpp
+3
-3
src/amf-app/amf_event_sig.hpp
src/amf-app/amf_event_sig.hpp
+2
-2
src/amf-app/amf_n1.cpp
src/amf-app/amf_n1.cpp
+38
-0
src/amf-app/amf_n1.hpp
src/amf-app/amf_n1.hpp
+9
-1
src/amf-app/amf_subscription.hpp
src/amf-app/amf_subscription.hpp
+2
-2
src/itti/itti_msg.hpp
src/itti/itti_msg.hpp
+1
-0
src/itti/msgs/itti_msg_sbi.hpp
src/itti/msgs/itti_msg_sbi.hpp
+22
-0
No files found.
src/amf-app/amf_app.cpp
View file @
5df62e5d
...
...
@@ -48,7 +48,6 @@ using namespace ngap;
using
namespace
nas
;
using
namespace
amf_application
;
using
namespace
config
;
using
namespace
amf
;
extern
void
print_buffer
(
const
std
::
string
app
,
const
std
::
string
commit
,
uint8_t
*
buf
,
int
len
);
...
...
src/amf-app/amf_app.hpp
View file @
5df62e5d
...
...
@@ -59,8 +59,6 @@ static uint32_t amf_app_ue_ngap_id_generator = 1;
namespace
amf_application
{
using
namespace
amf
;
#define TASK_AMF_APP_PERIODIC_STATISTICS (0)
class
amf_app
{
...
...
src/amf-app/amf_event.cpp
View file @
5df62e5d
...
...
@@ -28,8 +28,7 @@
*/
#include "amf_event.hpp"
#include "amf_app.hpp"
using
namespace
amf_application
;
//------------------------------------------------------------------------------
bs2
::
connection
amf_event
::
subscribe_ue_reachability_status
(
const
ue_reachability_status_sig_t
::
slot_type
&
sig
)
{
...
...
src/amf-app/amf_event.hpp
View file @
5df62e5d
...
...
@@ -33,7 +33,7 @@ namespace bs2 = boost::signals2;
#include "amf.hpp"
#include "amf_event_sig.hpp"
namespace
amf
{
namespace
amf
_application
{
class
amf_event
{
public:
amf_event
(){};
...
...
@@ -47,7 +47,7 @@ class amf_event {
// class register/handle event
friend
class
amf_app
;
friend
class
amf_
context
;
friend
class
amf_
n1
;
friend
class
amf_profile
;
/*
...
...
@@ -64,4 +64,4 @@ class amf_event {
ue_reachability_status_sig_t
ue_reachability_status
;
// Signal for UE Reachability Report
};
}
// namespace amf
}
// namespace amf
_application
src/amf-app/amf_event_sig.hpp
View file @
5df62e5d
...
...
@@ -35,7 +35,7 @@
namespace
bs2
=
boost
::
signals2
;
namespace
amf
{
namespace
amf
_application
{
// Signal for UE Reachability Report
// SUPI, HTTP version
...
...
@@ -44,5 +44,5 @@ typedef bs2::signal_type<
bs2
::
keywords
::
mutex_type
<
bs2
::
dummy_mutex
>>::
type
ue_reachability_status_sig_t
;
}
// namespace amf
}
// namespace amf
_application
#endif
src/amf-app/amf_n1.cpp
View file @
5df62e5d
...
...
@@ -125,6 +125,11 @@ amf_n1::amf_n1() {
throw
std
::
runtime_error
(
"Cannot create task TASK_AMF_N1"
);
}
Logger
::
amf_n1
().
startup
(
"amf_n1 started"
);
// Subscribe to UE Reachability Status change
ee_ue_reachability_status_connection
=
event_sub
.
subscribe_ue_reachability_status
(
boost
::
bind
(
&
amf_n1
::
handle_ue_reachability_status_change
,
this
,
_1
,
_2
));
}
//------------------------------------------------------------------------------
...
...
@@ -417,6 +422,14 @@ void amf_n1::nas_signalling_establishment_request_handle(
nc
.
get
()
->
ran_ue_ngap_id
=
ran_ue_ngap_id
;
nc
.
get
()
->
serving_network
=
snn
;
// stacs.UE_connected += 1;
// Trigger UE Reachability Status Notify
string
supi
=
"imsi-"
+
nc
.
get
()
->
imsi
;
Logger
::
amf_n1
().
debug
(
"Signal the UE Reachability Status Event notification for SUPI %s"
,
supi
.
c_str
());
event_sub
.
ue_reachability_status
(
supi
,
1
);
}
else
{
// Logger::amf_n1().debug("existing nas_context with amf_ue_ngap_id(0x%x)
// --> Update",amf_ue_ngap_id); nc =
...
...
@@ -2793,3 +2806,28 @@ void amf_n1::get_5gmm_state(
// TODO:
state
=
nc
.
get
()
->
_5gmm_state
;
}
//------------------------------------------------------------------------------
void
amf_n1
::
handle_ue_reachability_status_change
(
std
::
string
supi
,
uint8_t
http_version
)
{
Logger
::
amf_n1
().
debug
(
"Send request to SBI to triger UE Reachability Status Notification (SUPI "
"%s )"
,
supi
.
c_str
());
std
::
shared_ptr
<
itti_sbi_notify_subscribed_event
>
itti_msg
=
std
::
make_shared
<
itti_sbi_notify_subscribed_event
>
(
TASK_AMF_N1
,
TASK_AMF_N11
);
// TODO:
itti_msg
->
notif_id
=
""
;
itti_msg
->
http_version
=
1
;
// std::vector<amf_application::event_notification> event_notifs;
int
ret
=
itti_inst
->
send_msg
(
itti_msg
);
if
(
0
!=
ret
)
{
Logger
::
amf_n1
().
error
(
"Could not send ITTI message %s to task TASK_AMF_N11"
,
itti_msg
->
get_msg_name
());
}
}
src/amf-app/amf_n1.hpp
View file @
5df62e5d
...
...
@@ -44,6 +44,7 @@
#include "mysql_db.hpp"
#include "nas_context.hpp"
#include "pdu_session_context.hpp"
#include "amf_event.hpp"
namespace
amf_application
{
...
...
@@ -154,7 +155,10 @@ class amf_n1 {
void
set_5gmm_state
(
std
::
shared_ptr
<
nas_context
>
nc
,
_5gmm_state_t
state
);
void
get_5gmm_state
(
std
::
shared_ptr
<
nas_context
>
nc
,
_5gmm_state_t
&
state
);
private:
// nas message handlers
void
handle_ue_reachability_status_change
(
std
::
string
supi
,
uint8_t
http_version
);
private:
void
ue_initiate_de_registration_handle
(
uint32_t
ran_ue_ngap_id
,
long
amf_ue_ngap_id
,
bstring
nas
);
void
registration_request_handle
(
...
...
@@ -188,6 +192,10 @@ class amf_n1 {
// response message
void
response_registration_reject_msg
(
uint8_t
cause_value
,
uint32_t
ran_ue_ngap_id
,
long
amf_ue_ngap_id
);
// for Event Handling
amf_event
event_sub
;
bs2
::
connection
ee_ue_reachability_status_connection
;
};
}
// namespace amf_application
...
...
src/amf-app/amf_subscription.hpp
View file @
5df62e5d
...
...
@@ -30,7 +30,7 @@
#include "3gpp_29.518.h"
#include "amf.hpp"
namespace
amf
{
namespace
amf
_application
{
/*
* Manage the Subscription Info
...
...
@@ -48,4 +48,4 @@ class amf_subscription {
std
::
string
nf_id
;
};
}
// namespace amf
}
// namespace amf
_application
src/itti/itti_msg.hpp
View file @
5df62e5d
...
...
@@ -87,6 +87,7 @@ typedef enum {
N11_DEREGISTER_NF_INSTANCE
,
SBI_EVENT_EXPOSURE_REQUEST
,
SBI_NOTIFICATION_DATA
,
SBI_NOTIFY_SUBSCRIBED_EVENT
,
UE_CONTEXT_RELEASE_COMMAND
,
NSMF_PDU_SESSION_RELEASE_SM_CTX
,
HANDOVER_REQUIRED
,
...
...
src/itti/msgs/itti_msg_sbi.hpp
View file @
5df62e5d
...
...
@@ -93,4 +93,26 @@ class itti_sbi_notification_data : public itti_sbi_msg {
uint8_t
http_version
;
};
//-----------------------------------------------------------------------------
class
itti_sbi_notify_subscribed_event
:
public
itti_sbi_msg
{
public:
itti_sbi_notify_subscribed_event
(
const
task_id_t
orig
,
const
task_id_t
dest
)
:
itti_sbi_msg
(
SBI_NOTIFY_SUBSCRIBED_EVENT
,
orig
,
dest
),
notif_id
(),
http_version
()
{}
itti_sbi_notify_subscribed_event
(
const
itti_sbi_notify_subscribed_event
&
i
)
:
itti_sbi_msg
(
i
),
notif_id
(
i
.
notif_id
),
http_version
(
i
.
http_version
)
{}
itti_sbi_notify_subscribed_event
(
const
itti_sbi_notify_subscribed_event
&
i
,
const
task_id_t
orig
,
const
task_id_t
dest
)
:
itti_sbi_msg
(
i
,
orig
,
dest
),
notif_id
(
i
.
notif_id
),
http_version
(
i
.
http_version
)
{}
const
char
*
get_msg_name
()
{
return
"SBI_NOTIFY_SUBSCRIBED_EVENT"
;
};
std
::
string
notif_id
;
std
::
vector
<
amf_application
::
event_notification
>
event_notifs
;
uint8_t
http_version
;
};
#endif
/* ITTI_MSG_SBI_HPP_INCLUDED_ */
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