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
8fbd98ca
Commit
8fbd98ca
authored
Jan 19, 2023
by
Tien Thinh NGUYEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Process UserLocationInformation in UEContextReleaseComplete msg
parent
113144f6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
13 deletions
+44
-13
src/ngap/ngapIEs/UserLocationInformation.hpp
src/ngap/ngapIEs/UserLocationInformation.hpp
+1
-0
src/ngap/ngapMsgs/UEContextReleaseComplete.cpp
src/ngap/ngapMsgs/UEContextReleaseComplete.cpp
+42
-12
src/ngap/ngapMsgs/UEContextReleaseComplete.hpp
src/ngap/ngapMsgs/UEContextReleaseComplete.hpp
+1
-1
No files found.
src/ngap/ngapIEs/UserLocationInformation.hpp
View file @
8fbd98ca
...
...
@@ -47,6 +47,7 @@ class UserLocationInformation {
// void setInformation(const UserLocationInformationN3IWF&);
// void getInformation(UserLocationInformationN3IWF&);
// TODO: use reference instead of raw pointer
bool
encode
(
Ngap_UserLocationInformation_t
*
user_location_information
);
bool
decode
(
Ngap_UserLocationInformation_t
*
user_location_information
);
Ngap_UserLocationInformation_PR
getChoiceOfUserLocationInformation
();
...
...
src/ngap/ngapMsgs/UEContextReleaseComplete.cpp
View file @
8fbd98ca
...
...
@@ -31,7 +31,8 @@ using namespace ngap;
//------------------------------------------------------------------------------
UEContextReleaseCompleteMsg
::
UEContextReleaseCompleteMsg
()
:
NgapUEMessage
()
{
ies
=
nullptr
;
userLocationInformation
=
nullptr
;
userLocationInformation
=
std
::
nullopt
;
;
pduSessionResourceListCxtRelCpl
=
std
::
nullopt
;
setMessageType
(
NgapMessageType
::
UE_CONTEXT_RELEASE_COMPLETE
);
...
...
@@ -91,8 +92,7 @@ void UEContextReleaseCompleteMsg::setRanUeNgapId(
//------------------------------------------------------------------------------
void
UEContextReleaseCompleteMsg
::
setUserLocationInfoNR
(
const
NrCgi_t
&
cig
,
const
Tai_t
&
tai
)
{
if
(
!
userLocationInformation
)
userLocationInformation
=
new
UserLocationInformation
();
UserLocationInformation
m_userLocationInformation
=
{};
UserLocationInformationNR
information_nr
=
{};
NR_CGI
nr_cgi
=
{};
...
...
@@ -101,7 +101,8 @@ void UEContextReleaseCompleteMsg::setUserLocationInfoNR(
TAI
tai_nr
=
{};
tai_nr
.
setTAI
(
tai
);
information_nr
.
set
(
nr_cgi
,
tai_nr
);
userLocationInformation
->
setInformation
(
information_nr
);
m_userLocationInformation
.
setInformation
(
information_nr
);
Ngap_UEContextReleaseComplete_IEs
*
ie
=
(
Ngap_UEContextReleaseComplete_IEs
*
)
calloc
(
...
...
@@ -111,13 +112,17 @@ void UEContextReleaseCompleteMsg::setUserLocationInfoNR(
ie
->
value
.
present
=
Ngap_UEContextReleaseComplete_IEs__value_PR_UserLocationInformation
;
int
ret
=
userLocationInformation
->
encode
(
int
ret
=
m_userLocationInformation
.
encode
(
&
ie
->
value
.
choice
.
UserLocationInformation
);
if
(
!
ret
)
{
Logger
::
ngap
().
error
(
"Encode NGAP UserLocationInformation IE error"
);
free_wrapper
((
void
**
)
&
ie
);
return
;
}
userLocationInformation
=
std
::
optional
<
UserLocationInformation
>
{
m_userLocationInformation
};
ret
=
ASN_SEQUENCE_ADD
(
&
ies
->
protocolIEs
.
list
,
ie
);
if
(
ret
!=
0
)
Logger
::
ngap
().
error
(
"Encode NGAP UserLocationInformation IE error"
);
...
...
@@ -126,9 +131,9 @@ void UEContextReleaseCompleteMsg::setUserLocationInfoNR(
//------------------------------------------------------------------------------
void
UEContextReleaseCompleteMsg
::
getUserLocationInfoNR
(
NrCgi_t
&
cig
,
Tai_t
&
tai
)
{
if
(
userLocationInformation
)
{
if
(
userLocationInformation
.
has_value
()
)
{
UserLocationInformationNR
information_nr
=
{};
if
(
!
userLocationInformation
->
getInformation
(
information_nr
))
return
;
if
(
!
userLocationInformation
.
value
().
getInformation
(
information_nr
))
return
;
NR_CGI
nr_cgi
=
{};
TAI
tai_nr
=
{};
...
...
@@ -241,9 +246,9 @@ bool UEContextReleaseCompleteMsg::decodeFromPdu(Ngap_NGAP_PDU_t* ngapMsgPdu) {
}
else
{
Logger
::
ngap
().
error
(
"TypeOfMessage of UEContextReleaseComplete is not SuccessfulOutcome"
);
return
false
;
}
for
(
int
i
=
0
;
i
<
ies
->
protocolIEs
.
list
.
count
;
i
++
)
{
switch
(
ies
->
protocolIEs
.
list
.
array
[
i
]
->
id
)
{
case
Ngap_ProtocolIE_ID_id_AMF_UE_NGAP_ID
:
{
...
...
@@ -262,6 +267,7 @@ bool UEContextReleaseCompleteMsg::decodeFromPdu(Ngap_NGAP_PDU_t* ngapMsgPdu) {
return
false
;
}
}
break
;
case
Ngap_ProtocolIE_ID_id_RAN_UE_NGAP_ID
:
{
if
(
ies
->
protocolIEs
.
list
.
array
[
i
]
->
criticality
==
Ngap_Criticality_ignore
&&
...
...
@@ -277,8 +283,31 @@ bool UEContextReleaseCompleteMsg::decodeFromPdu(Ngap_NGAP_PDU_t* ngapMsgPdu) {
return
false
;
}
}
break
;
// TODO: User Location Information
case
Ngap_ProtocolIE_ID_id_UserLocationInformation
:
{
if
(
ies
->
protocolIEs
.
list
.
array
[
i
]
->
criticality
==
Ngap_Criticality_ignore
&&
ies
->
protocolIEs
.
list
.
array
[
i
]
->
value
.
present
==
Ngap_UEContextReleaseComplete_IEs__value_PR_UserLocationInformation
)
{
UserLocationInformation
m_userLocationInformation
=
{};
if
(
!
m_userLocationInformation
.
decode
(
&
ies
->
protocolIEs
.
list
.
array
[
i
]
->
value
.
choice
.
UserLocationInformation
))
{
Logger
::
ngap
().
error
(
"Decode NGAP UserLocationInformation IE error"
);
return
false
;
}
userLocationInformation
=
std
::
optional
<
UserLocationInformation
>
{
m_userLocationInformation
};
}
else
{
Logger
::
ngap
().
error
(
"Decode NGAP UserLocationInformation IE error"
);
return
false
;
}
}
break
;
// TODO: Information on Recommended Cells and RAN Nodes for Paging
case
Ngap_ProtocolIE_ID_id_PDUSessionResourceListCxtRelCpl
:
{
if
(
ies
->
protocolIEs
.
list
.
array
[
i
]
->
criticality
==
Ngap_Criticality_reject
&&
...
...
@@ -307,8 +336,9 @@ bool UEContextReleaseCompleteMsg::decodeFromPdu(Ngap_NGAP_PDU_t* ngapMsgPdu) {
// TODO: Criticality Diagnostics
default:
{
Logger
::
ngap
().
error
(
"Decoded NGAP message PDU error!"
);
return
false
;
Logger
::
ngap
().
error
(
"Unknown IE 0x%x"
,
ies
->
protocolIEs
.
list
.
array
[
i
]
->
id
);
return
true
;
}
}
}
...
...
src/ngap/ngapMsgs/UEContextReleaseComplete.hpp
View file @
8fbd98ca
...
...
@@ -55,7 +55,7 @@ class UEContextReleaseCompleteMsg : public NgapUEMessage {
Ngap_UEContextReleaseComplete_t
*
ies
;
// AMF_UE_NGAP_ID //Mandatory
// RAN_UE_NGAP_ID //Mandatory
UserLocationInformation
*
userLocationInformation
;
// Optional
std
::
optional
<
UserLocationInformation
>
userLocationInformation
;
// Optional
// TODO: Information on Recommended Cells and RAN Nodes for Paging (Optional)
std
::
optional
<
PDUSessionResourceListCxtRelCpl
>
pduSessionResourceListCxtRelCpl
;
// Optional
...
...
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