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
96e00243
Commit
96e00243
authored
Jul 16, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add HandoverPreparationFailure
parent
40420fef
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
360 additions
and
4 deletions
+360
-4
src/amf-app/amf_n2.cpp
src/amf-app/amf_n2.cpp
+19
-3
src/amf-app/amf_n2.hpp
src/amf-app/amf_n2.hpp
+3
-1
src/ngap/ngapMsgs/HandoverPreparationFailure.cpp
src/ngap/ngapMsgs/HandoverPreparationFailure.cpp
+270
-0
src/ngap/ngapMsgs/HandoverPreparationFailure.hpp
src/ngap/ngapMsgs/HandoverPreparationFailure.hpp
+68
-0
No files found.
src/amf-app/amf_n2.cpp
View file @
96e00243
...
@@ -41,6 +41,7 @@
...
@@ -41,6 +41,7 @@
#include "PduSessionResourceReleaseCommand.hpp"
#include "PduSessionResourceReleaseCommand.hpp"
#include "PduSessionResourceSetupRequest.hpp"
#include "PduSessionResourceSetupRequest.hpp"
#include "UEContextReleaseCommand.hpp"
#include "UEContextReleaseCommand.hpp"
#include "HandoverPreparationFailure.hpp"
#include "amf_app.hpp"
#include "amf_app.hpp"
#include "amf_config.hpp"
#include "amf_config.hpp"
#include "amf_n1.hpp"
#include "amf_n1.hpp"
...
@@ -170,7 +171,9 @@ void amf_n2_task(void* args_p) {
...
@@ -170,7 +171,9 @@ void amf_n2_task(void* args_p) {
Logger
::
amf_n2
().
info
(
"Received HANDOVER_REQUIRED message,handling"
);
Logger
::
amf_n2
().
info
(
"Received HANDOVER_REQUIRED message,handling"
);
itti_handover_required
*
m
=
dynamic_cast
<
itti_handover_required
*>
(
msg
);
itti_handover_required
*
m
=
dynamic_cast
<
itti_handover_required
*>
(
msg
);
if
(
!
amf_n2_inst
->
handle_itti_message
(
ref
(
*
m
)))
if
(
!
amf_n2_inst
->
handle_itti_message
(
ref
(
*
m
)))
amf_n2_inst
->
send_handover_preparation_failure
(
m
->
assoc_id
);
amf_n2_inst
->
send_handover_preparation_failure
(
m
->
handoverReq
->
getAmfUeNgapId
(),
m
->
handoverReq
->
getRanUeNgapId
(),
m
->
assoc_id
);
}
break
;
}
break
;
case
HANDOVER_REQUEST_ACK
:
{
case
HANDOVER_REQUEST_ACK
:
{
Logger
::
amf_n2
().
info
(
"Received HANDOVER_REQUEST_ACK message,handling"
);
Logger
::
amf_n2
().
info
(
"Received HANDOVER_REQUEST_ACK message,handling"
);
...
@@ -1517,9 +1520,22 @@ void amf_n2::handle_itti_message(itti_uplinkranstatsutransfer& itti_msg) {
...
@@ -1517,9 +1520,22 @@ void amf_n2::handle_itti_message(itti_uplinkranstatsutransfer& itti_msg) {
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
amf_n2
::
send_handover_preparation_failure
(
void
amf_n2
::
send_handover_preparation_failure
(
const
unsigned
long
amf_ue_ngap_id
,
const
uint32_t
ran_ue_ngap_id
,
const
sctp_assoc_id_t
&
gnb_assoc_id
)
{
const
sctp_assoc_id_t
&
gnb_assoc_id
)
{
// TODO:
// Create HandoverPreparationFailure message to be sent to target gNB
return
;
std
::
unique_ptr
<
HandoverPreparationFailure
>
hoPreparationFailure
=
std
::
make_unique
<
HandoverPreparationFailure
>
();
hoPreparationFailure
->
setMessageType
();
hoPreparationFailure
->
setAmfUeNgapId
(
amf_ue_ngap_id
);
hoPreparationFailure
->
setRanUeNgapId
(
amf_ue_ngap_id
);
hoPreparationFailure
->
setCause
(
Ngap_Cause_PR_NOTHING
);
uint8_t
buffer
[
BUFFER_SIZE_1024
];
int
encoded_size
=
hoPreparationFailure
->
encode2buffer
(
buffer
,
BUFFER_SIZE_1024
);
bstring
b
=
blk2bstr
(
buffer
,
encoded_size
);
sctp_s_38412
.
sctp_send_msg
(
gnb_assoc_id
,
0
,
&
b
);
}
}
// Context management functions
// Context management functions
...
...
src/amf-app/amf_n2.hpp
View file @
96e00243
...
@@ -62,7 +62,9 @@ class amf_n2 : public ngap::ngap_app {
...
@@ -62,7 +62,9 @@ class amf_n2 : public ngap::ngap_app {
void
handle_itti_message
(
itti_handover_request_Ack
&
itti_msg
);
void
handle_itti_message
(
itti_handover_request_Ack
&
itti_msg
);
void
handle_itti_message
(
itti_handover_notify
&
itti_msg
);
void
handle_itti_message
(
itti_handover_notify
&
itti_msg
);
void
handle_itti_message
(
itti_uplinkranstatsutransfer
&
itti_msg
);
void
handle_itti_message
(
itti_uplinkranstatsutransfer
&
itti_msg
);
void
send_handover_preparation_failure
(
const
sctp_assoc_id_t
&
gnb_assoc_id
);
void
send_handover_preparation_failure
(
const
unsigned
long
amf_ue_ngap_id
,
const
uint32_t
ran_ue_ngap_id
,
const
sctp_assoc_id_t
&
gnb_assoc_id
);
bool
verifyPlmn
(
std
::
vector
<
SupportedItem_t
>
list
);
bool
verifyPlmn
(
std
::
vector
<
SupportedItem_t
>
list
);
std
::
vector
<
SupportedItem_t
>
get_common_plmn
(
std
::
vector
<
SupportedItem_t
>
get_common_plmn
(
...
...
src/ngap/ngapMsgs/HandoverPreparationFailure.cpp
0 → 100644
View file @
96e00243
This diff is collapsed.
Click to expand it.
src/ngap/ngapMsgs/HandoverPreparationFailure.hpp
0 → 100644
View file @
96e00243
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the
* License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef _HANDOVER_PREPARATION_FAILURE_H_
#define _HANDOVER_PREPARATION_FAILURE_H_
#include "AMF-UE-NGAP-ID.hpp"
#include "Cause.hpp"
#include "MessageType.hpp"
#include "NgapIEsStruct.hpp"
#include "RAN-UE-NGAP-ID.hpp"
extern
"C"
{
#include "Ngap_NGAP-PDU.h"
#include "Ngap_ProtocolIE-Field.h"
}
namespace
ngap
{
class
HandoverPreparationFailure
{
public:
HandoverPreparationFailure
();
virtual
~
HandoverPreparationFailure
();
void
setMessageType
();
// Initialize the PDU and populate the MessageType;
void
setAmfUeNgapId
(
unsigned
long
id
);
// 40 bits
unsigned
long
getAmfUeNgapId
()
const
;
void
setRanUeNgapId
(
uint32_t
id
);
// 32 bits
uint32_t
getRanUeNgapId
()
const
;
int
encode2buffer
(
uint8_t
*
buf
,
int
buf_size
);
bool
decodefrompdu
(
Ngap_NGAP_PDU_t
*
ngap_msg_pdu
);
void
getCause
(
Cause
&
cause
)
const
;
void
setCause
(
Ngap_Cause_PR
m_causePresent
,
long
value
=
0
);
Ngap_Cause_PR
getChoiceOfCause
()
const
;
private:
Ngap_NGAP_PDU_t
*
hoPreparationFailurePdu
;
Ngap_HandoverPreparationFailure_t
*
hoPreparationFailureIEs
;
AMF_UE_NGAP_ID
*
amfUeNgapId
;
RAN_UE_NGAP_ID
*
ranUeNgapId
;
Cause
*
cause
;
Ngap_CriticalityDiagnostics_t
*
CriticalityDiagnostics
;
};
}
// namespace ngap
#endif
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