Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
UERANSIM
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
Libraries
UERANSIM
Commits
38b92d1f
Commit
38b92d1f
authored
Mar 30, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SM cause send implementation
parent
bae4d5c5
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
5 deletions
+17
-5
src/ue/sm/sm.hpp
src/ue/sm/sm.hpp
+1
-1
src/ue/sm/transport.cpp
src/ue/sm/transport.cpp
+14
-2
src/ue/sm/utils.cpp
src/ue/sm/utils.cpp
+2
-2
No files found.
src/ue/sm/sm.hpp
View file @
38b92d1f
...
...
@@ -55,7 +55,7 @@ class NasSm
void
sendSmMessage
(
int
psi
,
const
nas
::
SmMessage
&
msg
);
void
receiveSmStatus
(
const
nas
::
FiveGSmStatus
&
msg
);
void
receiveSmCause
(
const
nas
::
IE5gSmCause
&
msg
);
void
sendSmCause
(
const
nas
::
ESmCause
&
cause
,
int
psi
);
void
sendSmCause
(
const
nas
::
ESmCause
&
cause
,
int
p
ti
,
int
p
si
);
/* Allocation */
int
allocatePduSessionId
(
const
SessionConfig
&
config
);
...
...
src/ue/sm/transport.cpp
View file @
38b92d1f
...
...
@@ -72,10 +72,22 @@ void NasSm::receiveSmCause(const nas::IE5gSmCause &msg)
m_logger
->
err
(
"SM cause received: %s"
,
nas
::
utils
::
EnumToString
(
msg
.
value
));
}
void
NasSm
::
sendSmCause
(
const
nas
::
ESmCause
&
cause
,
int
psi
)
void
NasSm
::
sendSmCause
(
const
nas
::
ESmCause
&
cause
,
int
p
ti
,
int
p
si
)
{
m_logger
->
warn
(
"Sending SM Cause[%s] for PSI[%d]"
,
nas
::
utils
::
EnumToString
(
cause
),
psi
);
// TODO
nas
::
FiveGSmStatus
smStatus
{};
smStatus
.
smCause
.
value
=
cause
;
smStatus
.
pti
=
pti
;
smStatus
.
pduSessionId
=
psi
;
nas
::
UlNasTransport
ulTransport
{};
ulTransport
.
payloadContainerType
.
payloadContainerType
=
nas
::
EPayloadContainerType
::
N1_SM_INFORMATION
;
nas
::
EncodeNasMessage
(
smStatus
,
ulTransport
.
payloadContainer
.
data
);
ulTransport
.
pduSessionId
=
nas
::
IEPduSessionIdentity2
{};
ulTransport
.
pduSessionId
->
value
=
psi
;
m_mm
->
deliverUlTransport
(
ulTransport
);
}
}
// namespace nr::ue
\ No newline at end of file
src/ue/sm/utils.cpp
View file @
38b92d1f
...
...
@@ -19,7 +19,7 @@ bool NasSm::checkPtiAndPsi(const nas::SmMessage &msg)
if
(
msg
.
pti
<
ProcedureTransaction
::
MIN_ID
||
msg
.
pti
>
ProcedureTransaction
::
MAX_ID
)
{
m_logger
->
err
(
"Received PTI [%d] value is invalid"
,
msg
.
pti
);
sendSmCause
(
nas
::
ESmCause
::
INVALID_PTI_VALUE
,
msg
.
pduSessionId
);
sendSmCause
(
nas
::
ESmCause
::
INVALID_PTI_VALUE
,
msg
.
p
ti
,
msg
.
p
duSessionId
);
return
false
;
}
...
...
@@ -27,7 +27,7 @@ bool NasSm::checkPtiAndPsi(const nas::SmMessage &msg)
{
m_logger
->
err
(
"Received PSI value [%d] is invalid, expected was [%d]"
,
msg
.
pduSessionId
,
m_procedureTransactions
[
msg
.
pti
].
psi
);
sendSmCause
(
nas
::
ESmCause
::
INVALID_PTI_VALUE
,
msg
.
pduSessionId
);
sendSmCause
(
nas
::
ESmCause
::
INVALID_PTI_VALUE
,
msg
.
p
ti
,
msg
.
p
duSessionId
);
return
false
;
}
...
...
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