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
94c62c39
Commit
94c62c39
authored
Aug 19, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issue with HO State
parent
bdf89837
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
24 deletions
+34
-24
src/amf-app/amf_n11.cpp
src/amf-app/amf_n11.cpp
+13
-10
src/amf-app/amf_n2.cpp
src/amf-app/amf_n2.cpp
+20
-14
src/itti/msgs/itti_msg_n11.hpp
src/itti/msgs/itti_msg_n11.hpp
+1
-0
No files found.
src/amf-app/amf_n11.cpp
View file @
94c62c39
...
...
@@ -211,23 +211,26 @@ void amf_n11::handle_itti_message(
Logger
::
amf_n11
().
debug
(
"SMF URI: %s"
,
remote_uri
.
c_str
());
nlohmann
::
json
pdu_session_update_request
=
{};
// if (itti_msg.is_n2sm_set)
{
if
(
itti_msg
.
is_n2sm_set
)
{
pdu_session_update_request
[
"n2SmInfoType"
]
=
itti_msg
.
n2sm_info_type
;
pdu_session_update_request
[
"n2SmInfo"
][
"contentId"
]
=
"n2msg"
;
std
::
string
json_part
=
pdu_session_update_request
.
dump
();
std
::
string
n2SmMsg
=
{};
octet_stream_2_hex_stream
(
(
uint8_t
*
)
bdata
(
itti_msg
.
n2sm
),
blength
(
itti_msg
.
n2sm
),
n2SmMsg
);
}
// For N2 HO
if
(
itti_msg
.
n2sm_info_type
.
compare
(
"HANDOVER_REQUIRED
"
)
==
0
)
{
if
(
itti_msg
.
ho_state
.
compare
(
"PREPARING
"
)
==
0
)
{
pdu_session_update_request
[
"hoState"
]
=
"PREPARING"
;
}
else
if
(
itti_msg
.
n2sm_info_type
.
compare
(
"HANDOVER_REQ_ACK
"
)
==
0
)
{
}
else
if
(
itti_msg
.
ho_state
.
compare
(
"PREPARED
"
)
==
0
)
{
pdu_session_update_request
[
"hoState"
]
=
"PREPARED"
;
}
else
if
(
itti_msg
.
n2sm_info_type
.
compare
(
"SECONDARY_RAT_USAGE
"
)
==
0
)
{
}
else
if
(
itti_msg
.
ho_state
.
compare
(
"COMPLETED
"
)
==
0
)
{
pdu_session_update_request
[
"hoState"
]
=
"COMPLETED"
;
}
std
::
string
json_part
=
pdu_session_update_request
.
dump
();
std
::
string
n2SmMsg
=
{};
octet_stream_2_hex_stream
(
(
uint8_t
*
)
bdata
(
itti_msg
.
n2sm
),
blength
(
itti_msg
.
n2sm
),
n2SmMsg
);
curl_http_client
(
remote_uri
,
json_part
,
""
,
n2SmMsg
,
supi
,
itti_msg
.
pdu_session_id
,
itti_msg
.
promise_id
);
...
...
src/amf-app/amf_n2.cpp
View file @
94c62c39
...
...
@@ -1333,6 +1333,7 @@ bool amf_n2::handle_itti_message(itti_handover_required& itti_msg) {
pdu_session_resource
.
HandoverRequiredTransfer
.
size
);
itti_msg
->
is_n2sm_set
=
true
;
itti_msg
->
n2sm_info_type
=
"HANDOVER_REQUIRED"
;
itti_msg
->
ho_state
=
"PREPARING"
;
itti_msg
->
amf_ue_ngap_id
=
amf_ue_ngap_id
;
itti_msg
->
ran_ue_ngap_id
=
ran_ue_ngap_id
;
itti_msg
->
promise_id
=
promise_id
;
...
...
@@ -1512,6 +1513,7 @@ void amf_n2::handle_itti_message(itti_handover_request_Ack& itti_msg) {
pdu_session_resource
.
handoverRequestAcknowledgeTransfer
.
size
);
itti_msg
->
is_n2sm_set
=
true
;
itti_msg
->
n2sm_info_type
=
"HANDOVER_REQ_ACK"
;
itti_msg
->
ho_state
=
"PREPARED"
;
itti_msg
->
amf_ue_ngap_id
=
amf_ue_ngap_id
;
itti_msg
->
ran_ue_ngap_id
=
ran_ue_ngap_id
;
itti_msg
->
promise_id
=
promise_id
;
...
...
@@ -1621,7 +1623,7 @@ void amf_n2::handle_itti_message(itti_handover_request_Ack& itti_msg) {
//------------------------------------------------------------------------------
void
amf_n2
::
handle_itti_message
(
itti_handover_notify
&
itti_msg
)
{
// TODO: Experimental procedure, to be tested
Logger
::
amf_n2
().
debug
(
"Handling
Handover Notify ..."
);
Logger
::
amf_n2
().
info
(
"Handle
Handover Notify ..."
);
unsigned
long
amf_ue_ngap_id
=
itti_msg
.
handovernotify
->
getAmfUeNgapId
();
uint32_t
ran_ue_ngap_id
=
itti_msg
.
handovernotify
->
getRanUeNgapId
();
Logger
::
amf_n2
().
debug
(
...
...
@@ -1661,6 +1663,7 @@ void amf_n2::handle_itti_message(itti_handover_notify& itti_msg) {
std
::
vector
<
std
::
shared_ptr
<
pdu_session_context
>>
sessions_ctx
;
if
(
!
amf_app_inst
->
get_pdu_sessions_context
(
supi
,
sessions_ctx
))
{
Logger
::
amf_n2
().
debug
(
"No PDU Session Context found"
);
}
// Send PDUSessionUpdateSMContextRequest to SMF for accepted PDU sessions
...
...
@@ -1682,26 +1685,28 @@ void amf_n2::handle_itti_message(itti_handover_notify& itti_msg) {
Logger
::
amf_n2
().
debug
(
"Sending ITTI to trigger PDUSessionUpdateSMContextRequest to SMF to "
"task TASK_AMF_N11"
);
itti_nsmf_pdusession_update_sm_context
*
itti_msg
=
new
itti_nsmf_pdusession_update_sm_context
(
TASK_NGAP
,
TASK_AMF_N11
);
itti_msg
->
pdu_session_id
=
pdu_session
.
get
()
->
pdu_session_id
;
std
::
shared_ptr
<
itti_nsmf_pdusession_update_sm_context
>
itti_n11_msg
=
std
::
make_shared
<
itti_nsmf_pdusession_update_sm_context
>
(
TASK_NGAP
,
TASK_AMF_N11
);
itti_n11_msg
->
pdu_session_id
=
pdu_session
.
get
()
->
pdu_session_id
;
// TODO: Secondary RAT Usage
itti_msg
->
n2sm
=
blk2bstr
(
""
,
0
);
itti_msg
->
is_n2sm_set
=
true
;
itti_msg
->
n2sm_info_type
=
"SECONDARY_RAT_USAGE"
;
// itti_n11_msg->n2sm = blk2bstr("Secondary RAT Usage", 19);
// itti_n11_msg->n2sm_info_type = "SECONDARY_RAT_USAGE";
itti_n11_msg
->
is_n2sm_set
=
false
;
itti_n11_msg
->
ho_state
=
"COMPLETED"
;
itti_msg
->
amf_ue_ngap_id
=
amf_ue_ngap_id
;
itti_msg
->
ran_ue_ngap_id
=
ran_ue_ngap_id
;
itti_msg
->
promise_id
=
promise_id
;
itti_
n11_
msg
->
amf_ue_ngap_id
=
amf_ue_ngap_id
;
itti_
n11_
msg
->
ran_ue_ngap_id
=
ran_ue_ngap_id
;
itti_
n11_
msg
->
promise_id
=
promise_id
;
std
::
shared_ptr
<
itti_nsmf_pdusession_update_sm_context
>
i
=
std
::
shared_ptr
<
itti_nsmf_pdusession_update_sm_context
>
(
itti_msg
);
int
ret
=
itti_inst
->
send_msg
(
i
);
int
ret
=
itti_inst
->
send_msg
(
itti_n11_msg
);
if
(
0
!=
ret
)
{
Logger
::
ngap
().
error
(
"Could not send ITTI message %s to task TASK_AMF_N11"
,
i
->
get_msg_name
());
i
tti_n11_msg
->
get_msg_name
());
}
}
}
...
...
@@ -1732,6 +1737,7 @@ void amf_n2::handle_itti_message(itti_handover_notify& itti_msg) {
}
// Send UE Release Command to Source gNB
Logger
::
ngap
().
info
(
"Send UE Release Command to source gNB"
);
std
::
unique_ptr
<
UEContextReleaseCommandMsg
>
ueContextReleaseCommand
=
std
::
make_unique
<
UEContextReleaseCommandMsg
>
();
ueContextReleaseCommand
->
setMessageType
();
...
...
src/itti/msgs/itti_msg_n11.hpp
View file @
94c62c39
...
...
@@ -105,6 +105,7 @@ class itti_nsmf_pdusession_update_sm_context : public itti_msg_n11 {
uint32_t
ran_ue_ngap_id
;
long
amf_ue_ngap_id
;
uint32_t
promise_id
;
std
::
string
ho_state
;
};
class
itti_nsmf_pdusession_release_sm_context
:
public
itti_msg_n11
{
...
...
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