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
fdc269b7
Commit
fdc269b7
authored
Aug 04, 2022
by
Tien Thinh NGUYEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issue for UE Context Release Complete Msg
parent
7f1380a5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
17 deletions
+50
-17
src/ngap/ngapIEs/PDUSessionResourceListCxtRelCpl.cpp
src/ngap/ngapIEs/PDUSessionResourceListCxtRelCpl.cpp
+10
-4
src/ngap/ngapIEs/PDUSessionResourceListCxtRelCpl.hpp
src/ngap/ngapIEs/PDUSessionResourceListCxtRelCpl.hpp
+1
-1
src/ngap/ngapMsgs/UEContextReleaseComplete.cpp
src/ngap/ngapMsgs/UEContextReleaseComplete.cpp
+36
-11
src/ngap/ngapMsgs/UEContextReleaseComplete.hpp
src/ngap/ngapMsgs/UEContextReleaseComplete.hpp
+3
-1
No files found.
src/ngap/ngapIEs/PDUSessionResourceListCxtRelCpl.cpp
View file @
fdc269b7
...
...
@@ -32,25 +32,31 @@ PDUSessionResourceListCxtRelCpl::~PDUSessionResourceListCxtRelCpl() {}
//------------------------------------------------------------------------------
void
PDUSessionResourceListCxtRelCpl
::
setPDUSessionResourceListCxtRelCpl
(
const
std
::
vector
<
PDUSessionResourceItemCxtRelCpl
>&
list
)
{
cxtRelCplList
=
list
;
cxtRelCplList
.
clear
();
for
(
auto
i
:
list
)
{
cxtRelCplList
.
push_back
(
i
);
}
}
//------------------------------------------------------------------------------
void
PDUSessionResourceListCxtRelCpl
::
getPDUSessionResourceListCxtRelCpl
(
std
::
vector
<
PDUSessionResourceItemCxtRelCpl
>&
list
)
{
list
=
cxtRelCplList
;
list
.
clear
();
for
(
auto
i
:
cxtRelCplList
)
{
list
.
push_back
(
i
);
}
}
//------------------------------------------------------------------------------
bool
PDUSessionResourceListCxtRelCpl
::
encode2PDUSessionResourceListCxtRelCpl
(
Ngap_PDUSessionResourceListCxtRelCpl_t
*
pduSessionResourceListCxtRelCpl
)
{
Ngap_PDUSessionResourceListCxtRelCpl_t
&
pduSessionResourceListCxtRelCpl
)
{
for
(
auto
&
cxtRelCpl
:
cxtRelCplList
)
{
Ngap_PDUSessionResourceItemCxtRelCpl_t
*
item
=
(
Ngap_PDUSessionResourceItemCxtRelCpl_t
*
)
calloc
(
1
,
sizeof
(
Ngap_PDUSessionResourceItemCxtRelCpl_t
));
if
(
!
item
)
return
false
;
if
(
!
cxtRelCpl
.
encode2PDUSessionResourceItemCxtRelCpl
(
item
))
return
false
;
if
(
ASN_SEQUENCE_ADD
(
&
pduSessionResourceListCxtRelCpl
->
list
,
item
)
!=
0
)
if
(
ASN_SEQUENCE_ADD
(
&
pduSessionResourceListCxtRelCpl
.
list
,
item
)
!=
0
)
return
false
;
}
return
true
;
...
...
src/ngap/ngapIEs/PDUSessionResourceListCxtRelCpl.hpp
View file @
fdc269b7
...
...
@@ -44,7 +44,7 @@ class PDUSessionResourceListCxtRelCpl {
std
::
vector
<
PDUSessionResourceItemCxtRelCpl
>&
list
);
bool
encode2PDUSessionResourceListCxtRelCpl
(
Ngap_PDUSessionResourceListCxtRelCpl_t
*
pduSessionResourceListCxtRelCpl
);
Ngap_PDUSessionResourceListCxtRelCpl_t
&
pduSessionResourceListCxtRelCpl
);
bool
decodefromPDUSessionResourceListCxtRelCpl
(
const
Ngap_PDUSessionResourceListCxtRelCpl_t
&
...
...
src/ngap/ngapMsgs/UEContextReleaseComplete.cpp
View file @
fdc269b7
...
...
@@ -30,8 +30,9 @@ using namespace ngap;
//------------------------------------------------------------------------------
UEContextReleaseCompleteMsg
::
UEContextReleaseCompleteMsg
()
:
NgapUEMessage
()
{
ies
=
nullptr
;
userLocationInformation
=
nullptr
;
ies
=
nullptr
;
userLocationInformation
=
nullptr
;
pduSessionResourceListCxtRelCpl
=
std
::
nullopt
;
setMessageType
(
NgapMessageType
::
UE_CONTEXT_RELEASE_COMPLETE
);
initialize
();
}
...
...
@@ -152,7 +153,14 @@ void UEContextReleaseCompleteMsg::getUserLocationInfoNR(
//------------------------------------------------------------------------------
void
UEContextReleaseCompleteMsg
::
setPduSessionResourceCxtRelCplList
(
const
std
::
vector
<
PDUSessionResourceCxtRelCplItem_t
>&
list
)
{
PDUSessionResourceListCxtRelCpl
m_pduSessionResourceListCxtRelCpl
=
{};
// if (pduSessionResourceListCxtRelCpl)
// PDUSessionResourceListCxtRelCpl* pduSessionResourceListCxtRelCpl = new
// PDUSessionResourceListCxtRelCpl();
std
::
vector
<
PDUSessionResourceItemCxtRelCpl
>
cxtRelCplList
;
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++
)
{
PDUSessionResourceItemCxtRelCpl
item
=
{};
PDUSessionID
pDUSessionID
=
{};
...
...
@@ -162,7 +170,7 @@ void UEContextReleaseCompleteMsg::setPduSessionResourceCxtRelCplList(
cxtRelCplList
.
push_back
(
item
);
}
pduSessionResourceListCxtRelCpl
->
setPDUSessionResourceListCxtRelCpl
(
m_pduSessionResourceListCxtRelCpl
.
setPDUSessionResourceListCxtRelCpl
(
cxtRelCplList
);
Ngap_UEContextReleaseComplete_IEs
*
ie
=
...
...
@@ -175,14 +183,19 @@ void UEContextReleaseCompleteMsg::setPduSessionResourceCxtRelCplList(
Ngap_UEContextReleaseComplete_IEs__value_PR_PDUSessionResourceListCxtRelCpl
;
int
ret
=
pduSessionResourceListCxtRelCpl
->
encode2PDUSessionResourceListCxtRelCpl
(
&
ie
->
value
.
choice
.
PDUSessionResourceListCxtRelCpl
);
m_pduSessionResourceListCxtRelCpl
.
encode2PDUSessionResourceListCxtRelCpl
(
ie
->
value
.
choice
.
PDUSessionResourceListCxtRelCpl
);
if
(
!
ret
)
{
Logger
::
ngap
().
error
(
"Encode NGAP PDUSessionResourceReleasedListRelRes IE error"
);
free_wrapper
((
void
**
)
&
ie
);
return
;
}
pduSessionResourceListCxtRelCpl
=
std
::
optional
<
PDUSessionResourceListCxtRelCpl
>
{
m_pduSessionResourceListCxtRelCpl
};
ret
=
ASN_SEQUENCE_ADD
(
&
ies
->
protocolIEs
.
list
,
ie
);
if
(
ret
!=
0
)
Logger
::
ngap
().
error
(
...
...
@@ -193,8 +206,13 @@ void UEContextReleaseCompleteMsg::setPduSessionResourceCxtRelCplList(
bool
UEContextReleaseCompleteMsg
::
getPduSessionResourceCxtRelCplList
(
std
::
vector
<
PDUSessionResourceCxtRelCplItem_t
>&
list
)
{
std
::
vector
<
PDUSessionResourceItemCxtRelCpl
>
cxtRelCplList
;
pduSessionResourceListCxtRelCpl
->
getPDUSessionResourceListCxtRelCpl
(
cxtRelCplList
);
if
(
pduSessionResourceListCxtRelCpl
.
has_value
())
{
pduSessionResourceListCxtRelCpl
.
value
().
getPDUSessionResourceListCxtRelCpl
(
cxtRelCplList
);
}
else
{
return
false
;
}
for
(
auto
&
item
:
cxtRelCplList
)
{
PDUSessionResourceCxtRelCplItem_t
rel
=
{};
...
...
@@ -273,16 +291,23 @@ bool UEContextReleaseCompleteMsg::decodeFromPdu(Ngap_NGAP_PDU_t* ngapMsgPdu) {
Ngap_Criticality_reject
&&
ies
->
protocolIEs
.
list
.
array
[
i
]
->
value
.
present
==
Ngap_UEContextReleaseComplete_IEs__value_PR_PDUSessionResourceListCxtRelCpl
)
{
pduSessionResourceListCxtRelCpl
=
new
PDUSessionResourceListCxtRelCpl
();
if
(
!
pduSessionResourceListCxtRelCpl
->
decodefromPDUSessionResourceListCxtRelCpl
(
// pduSessionResourceListCxtRelCpl =
// new PDUSessionResourceListCxtRelCpl();
PDUSessionResourceListCxtRelCpl
m_pduSessionResourceListCxtRelCpl
=
{};
if
(
!
m_pduSessionResourceListCxtRelCpl
.
decodefromPDUSessionResourceListCxtRelCpl
(
ies
->
protocolIEs
.
list
.
array
[
i
]
->
value
.
choice
.
PDUSessionResourceListCxtRelCpl
))
{
Logger
::
ngap
().
error
(
"Decode NGAP PDUSessionResourceListCxtRelCpl IE error"
);
return
false
;
}
pduSessionResourceListCxtRelCpl
=
std
::
optional
<
PDUSessionResourceListCxtRelCpl
>
{
m_pduSessionResourceListCxtRelCpl
};
}
else
{
Logger
::
ngap
().
error
(
"Decode NGAP PDUSessionResourceListCxtRelCpl IE error"
);
...
...
src/ngap/ngapMsgs/UEContextReleaseComplete.hpp
View file @
fdc269b7
...
...
@@ -25,6 +25,7 @@
#include "NgapUEMessage.hpp"
#include "UserLocationInformation.hpp"
#include "PDUSessionResourceListCxtRelCpl.hpp"
#include <optional>
extern
"C"
{
#include "Ngap_UEContextReleaseComplete.h"
...
...
@@ -56,7 +57,8 @@ class UEContextReleaseCompleteMsg : public NgapUEMessage {
// RAN_UE_NGAP_ID //Mandatory
UserLocationInformation
*
userLocationInformation
;
// Optional
// TODO: Information on Recommended Cells and RAN Nodes for Paging (Optional)
PDUSessionResourceListCxtRelCpl
*
pduSessionResourceListCxtRelCpl
;
// Optional
std
::
optional
<
PDUSessionResourceListCxtRelCpl
>
pduSessionResourceListCxtRelCpl
;
// Optional
// TODO: Criticality Diagnostics (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