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
020b415f
Commit
020b415f
authored
Mar 17, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UL NAS transport improvement
parent
5b72232c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
8 deletions
+20
-8
src/ue/sm/sm.hpp
src/ue/sm/sm.hpp
+4
-2
src/ue/sm/transport.cpp
src/ue/sm/transport.cpp
+16
-6
No files found.
src/ue/sm/sm.hpp
View file @
020b415f
...
@@ -28,8 +28,8 @@ class NasSm
...
@@ -28,8 +28,8 @@ class NasSm
std
::
unique_ptr
<
Logger
>
m_logger
;
std
::
unique_ptr
<
Logger
>
m_logger
;
NasMm
*
m_mm
;
NasMm
*
m_mm
;
std
::
array
<
PduSession
,
16
>
m_pduSessions
{};
std
::
array
<
PduSession
*
,
16
>
m_pduSessions
{};
ProcedureTransaction
m_procedureTransactions
[
255
]
{};
std
::
array
<
ProcedureTransaction
,
255
>
m_procedureTransactions
{};
friend
class
UeCmdHandler
;
friend
class
UeCmdHandler
;
...
@@ -48,12 +48,14 @@ class NasSm
...
@@ -48,12 +48,14 @@ class NasSm
/* Resource */
/* Resource */
void
localReleaseSession
(
int
psi
);
void
localReleaseSession
(
int
psi
);
void
localReleaseAllSessions
();
void
localReleaseAllSessions
();
bool
anyEmergencySession
();
private:
private:
/* Transport */
/* Transport */
void
sendSmMessage
(
int
psi
,
const
nas
::
SmMessage
&
msg
);
void
sendSmMessage
(
int
psi
,
const
nas
::
SmMessage
&
msg
);
void
receiveSmStatus
(
const
nas
::
FiveGSmStatus
&
msg
);
void
receiveSmStatus
(
const
nas
::
FiveGSmStatus
&
msg
);
void
receiveSmCause
(
const
nas
::
IE5gSmCause
&
msg
);
void
receiveSmCause
(
const
nas
::
IE5gSmCause
&
msg
);
void
sendSmCause
(
const
nas
::
ESmCause
&
cause
,
int
psi
);
/* Allocation */
/* Allocation */
int
allocatePduSessionId
(
const
SessionConfig
&
config
);
int
allocatePduSessionId
(
const
SessionConfig
&
config
);
...
...
src/ue/sm/transport.cpp
View file @
020b415f
...
@@ -7,8 +7,8 @@
...
@@ -7,8 +7,8 @@
//
//
#include "sm.hpp"
#include "sm.hpp"
#include <ue/mm/mm.hpp>
#include <nas/utils.hpp>
#include <nas/utils.hpp>
#include <ue/mm/mm.hpp>
namespace
nr
::
ue
namespace
nr
::
ue
{
{
...
@@ -23,13 +23,17 @@ void NasSm::sendSmMessage(int psi, const nas::SmMessage &msg)
...
@@ -23,13 +23,17 @@ void NasSm::sendSmMessage(int psi, const nas::SmMessage &msg)
m
.
pduSessionId
=
nas
::
IEPduSessionIdentity2
{};
m
.
pduSessionId
=
nas
::
IEPduSessionIdentity2
{};
m
.
pduSessionId
->
value
=
psi
;
m
.
pduSessionId
->
value
=
psi
;
m
.
requestType
=
nas
::
IERequestType
{};
m
.
requestType
=
nas
::
IERequestType
{};
m
.
requestType
->
requestType
=
nas
::
ERequestType
::
INITIAL_REQUEST
;
// TODO
m
.
requestType
->
requestType
=
session
->
isEmergency
?
nas
::
ERequestType
::
INITIAL_EMERGENCY_REQUEST
:
nas
::
ERequestType
::
INITIAL_REQUEST
;
if
(
session
.
sNssai
.
has_value
())
if
(
!
session
->
isEmergency
)
m
.
sNssa
=
nas
::
utils
::
SNssaiFrom
(
*
session
.
sNssai
);
{
if
(
session
->
sNssai
.
has_value
())
m
.
sNssa
=
nas
::
utils
::
SNssaiFrom
(
*
session
->
sNssai
);
if
(
session
.
apn
.
has_value
())
if
(
session
->
apn
.
has_value
())
m
.
dnn
=
nas
::
utils
::
DnnFromApn
(
*
session
.
apn
);
m
.
dnn
=
nas
::
utils
::
DnnFromApn
(
*
session
->
apn
);
}
m_mm
->
deliverUlTransport
(
m
);
m_mm
->
deliverUlTransport
(
m
);
}
}
...
@@ -65,4 +69,10 @@ void NasSm::receiveSmCause(const nas::IE5gSmCause &msg)
...
@@ -65,4 +69,10 @@ void NasSm::receiveSmCause(const nas::IE5gSmCause &msg)
m_logger
->
err
(
"SM cause received: %s"
,
nas
::
utils
::
EnumToString
(
msg
.
value
));
m_logger
->
err
(
"SM cause received: %s"
,
nas
::
utils
::
EnumToString
(
msg
.
value
));
}
}
void
NasSm
::
sendSmCause
(
const
nas
::
ESmCause
&
cause
,
int
psi
)
{
m_logger
->
warn
(
"Sending SM Cause[%s] for PSI[%d]"
,
nas
::
utils
::
EnumToString
(
cause
),
psi
);
// TODO
}
}
// namespace nr::ue
}
// namespace nr::ue
\ No newline at end of file
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