Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
wangjie
OpenXG-RAN
Commits
849196b0
Commit
849196b0
authored
Sep 11, 2020
by
luhan Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add decode in UEContextReleaseCommand
parent
fa45e88b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
0 deletions
+52
-0
ngap/ngapMsgs/UEContextReleaseCommand.cpp
ngap/ngapMsgs/UEContextReleaseCommand.cpp
+50
-0
ngap/ngapMsgs/UEContextReleaseCommand.hpp
ngap/ngapMsgs/UEContextReleaseCommand.hpp
+2
-0
No files found.
ngap/ngapMsgs/UEContextReleaseCommand.cpp
View file @
849196b0
...
@@ -109,4 +109,54 @@ int UEContextReleaseCommandMsg::encode2buffer(uint8_t *buf, int buf_size){
...
@@ -109,4 +109,54 @@ int UEContextReleaseCommandMsg::encode2buffer(uint8_t *buf, int buf_size){
bool
UEContextReleaseCommandMsg
::
decodefrompdu
(
Ngap_NGAP_PDU_t
*
ngap_msg_pdu
){
bool
UEContextReleaseCommandMsg
::
decodefrompdu
(
Ngap_NGAP_PDU_t
*
ngap_msg_pdu
){
pdu
=
ngap_msg_pdu
;
pdu
=
ngap_msg_pdu
;
if
(
pdu
->
present
==
Ngap_NGAP_PDU_PR_initiatingMessage
)
{
if
(
pdu
->
choice
.
initiatingMessage
&&
pdu
->
choice
.
initiatingMessage
->
procedureCode
==
Ngap_ProcedureCode_id_UEContextRelease
&&
pdu
->
choice
.
initiatingMessage
->
criticality
==
Ngap_Criticality_reject
&&
pdu
->
choice
.
initiatingMessage
->
value
.
present
==
Ngap_InitiatingMessage__value_PR_UEContextReleaseCommand
)
{
ies
=
&
pdu
->
choice
.
initiatingMessage
->
value
.
choice
.
UEContextReleaseCommand
;
}
else
{
cout
<<
"Check UEContextReleaseCommand message error"
<<
endl
;
return
false
;
}
}
else
{
cout
<<
"typeOfMessage of UEContextReleaseCommand is not initiatingMessage"
<<
endl
;
return
false
;
}
for
(
int
i
=
0
;
i
<
ies
->
protocolIEs
.
list
.
count
;
i
++
)
{
switch
(
ies
->
protocolIEs
.
list
.
array
[
i
]
->
id
)
{
case
Ngap_ProtocolIE_ID_id_UE_NGAP_IDs
:
{
if
(
ies
->
protocolIEs
.
list
.
array
[
i
]
->
criticality
==
Ngap_Criticality_reject
&&
ies
->
protocolIEs
.
list
.
array
[
i
]
->
value
.
present
==
Ngap_UEContextReleaseCommand_IEs__value_PR_UE_NGAP_IDs
)
{
if
(
!
amfUeNgapId
)
amfUeNgapId
=
new
AMF_UE_NGAP_ID
();
amfUeNgapId
->
decodefromAMF_UE_NGAP_ID
(
ies
->
protocolIEs
.
list
.
array
[
i
]
->
value
.
choice
.
UE_NGAP_IDs
.
choice
.
uE_NGAP_ID_pair
->
aMF_UE_NGAP_ID
);
if
(
!
ranUeNgapId
)
ranUeNgapId
=
new
RAN_UE_NGAP_ID
();
ranUeNgapId
->
decodefromRAN_UE_NGAP_ID
(
ies
->
protocolIEs
.
list
.
array
[
i
]
->
value
.
choice
.
UE_NGAP_IDs
.
choice
.
uE_NGAP_ID_pair
->
rAN_UE_NGAP_ID
);
}
else
{
cout
<<
"IE UE_NGAP_IDs is not correct"
<<
endl
;
return
false
;
}
}
break
;
case
Ngap_ProtocolIE_ID_id_Cause
:
{
if
(
ies
->
protocolIEs
.
list
.
array
[
i
]
->
criticality
==
Ngap_Criticality_ignore
&&
ies
->
protocolIEs
.
list
.
array
[
i
]
->
value
.
present
==
Ngap_UEContextReleaseCommand_IEs__value_PR_Cause
)
{
causeValue
=
new
Cause
();
if
(
!
causeValue
->
decodefromCause
(
&
ies
->
protocolIEs
.
list
.
array
[
i
]
->
value
.
choice
.
Cause
))
{
cout
<<
"decode Cause error"
<<
endl
;
return
false
;
}
}
else
{
cout
<<
"IE Cause is not correct"
<<
endl
;
return
false
;
}
}
break
;
}
}
return
true
;
}
unsigned
long
UEContextReleaseCommandMsg
::
getAmfUeNgapId
()
{
return
amfUeNgapId
->
getAMF_UE_NGAP_ID
();
}
uint32_t
UEContextReleaseCommandMsg
::
getRanUeNgapId
()
{
return
ranUeNgapId
->
getRanUeNgapId
();
}
}
ngap/ngapMsgs/UEContextReleaseCommand.hpp
View file @
849196b0
...
@@ -29,6 +29,8 @@ public:
...
@@ -29,6 +29,8 @@ public:
int
encode2buffer
(
uint8_t
*
buf
,
int
buf_size
);
int
encode2buffer
(
uint8_t
*
buf
,
int
buf_size
);
public:
public:
bool
decodefrompdu
(
Ngap_NGAP_PDU_t
*
ngap_msg_pdu
);
bool
decodefrompdu
(
Ngap_NGAP_PDU_t
*
ngap_msg_pdu
);
unsigned
long
getAmfUeNgapId
();
uint32_t
getRanUeNgapId
();
private:
private:
Ngap_NGAP_PDU_t
*
pdu
;
Ngap_NGAP_PDU_t
*
pdu
;
Ngap_UEContextReleaseCommand_t
*
ies
;
Ngap_UEContextReleaseCommand_t
*
ies
;
...
...
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