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
a5a4974a
Commit
a5a4974a
authored
May 23, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
L3 RRC/NAS developments
parent
aaeea510
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
56 additions
and
25 deletions
+56
-25
src/ue/app/task.cpp
src/ue/app/task.cpp
+11
-18
src/ue/nas/sm/sap.cpp
src/ue/nas/sm/sap.cpp
+21
-1
src/ue/nas/sm/sm.hpp
src/ue/nas/sm/sm.hpp
+1
-0
src/ue/nas/task.cpp
src/ue/nas/task.cpp
+12
-0
src/ue/nts.hpp
src/ue/nts.hpp
+7
-2
src/ue/rls/task.cpp
src/ue/rls/task.cpp
+3
-2
src/utils/nts.hpp
src/utils/nts.hpp
+1
-2
No files found.
src/ue/app/task.cpp
View file @
a5a4974a
...
...
@@ -51,24 +51,6 @@ void UeAppTask::onLoop()
switch
(
msg
->
msgType
)
{
case
NtsMessageType
:
:
UE_RLS_TO_APP
:
{
auto
*
w
=
dynamic_cast
<
NmUeRlsToApp
*>
(
msg
);
switch
(
w
->
present
)
{
case
NmUeRlsToApp
:
:
DATA_PDU_DELIVERY
:
{
auto
*
tunTask
=
m_tunTasks
[
w
->
psi
];
if
(
tunTask
)
{
auto
*
m
=
new
NmAppToTun
(
NmAppToTun
::
DATA_PDU_DELIVERY
);
m
->
psi
=
w
->
psi
;
m
->
data
=
std
::
move
(
w
->
pdu
);
tunTask
->
push
(
m
);
}
break
;
}
}
break
;
}
case
NtsMessageType
:
:
UE_TUN_TO_APP
:
{
auto
*
w
=
dynamic_cast
<
NmUeTunToApp
*>
(
msg
);
switch
(
w
->
present
)
...
...
@@ -95,6 +77,17 @@ void UeAppTask::onLoop()
setTimer
(
SWITCH_OFF_TIMER_ID
,
SWITCH_OFF_DELAY
);
break
;
}
case
NmUeNasToApp
:
:
DOWNLINK_DATA_DELIVERY
:
{
auto
*
tunTask
=
m_tunTasks
[
w
->
psi
];
if
(
tunTask
)
{
auto
*
m
=
new
NmAppToTun
(
NmAppToTun
::
DATA_PDU_DELIVERY
);
m
->
psi
=
w
->
psi
;
m
->
data
=
std
::
move
(
w
->
data
);
tunTask
->
push
(
m
);
}
break
;
}
}
break
;
}
...
...
src/ue/nas/sm/sap.cpp
View file @
a5a4974a
...
...
@@ -49,7 +49,11 @@ void NasSm::onTimerTick()
void
NasSm
::
handleUplinkDataRequest
(
int
psi
,
OctetString
&&
data
)
{
if
(
m_mm
->
m_mmState
==
EMmState
::
MM_NULL
)
auto
state
=
m_mm
->
m_mmSubState
;
if
(
state
!=
EMmSubState
::
MM_REGISTERED_INITIATED_PS
&&
state
!=
EMmSubState
::
MM_REGISTERED_NORMAL_SERVICE
&&
state
!=
EMmSubState
::
MM_REGISTERED_NON_ALLOWED_SERVICE
&&
state
!=
EMmSubState
::
MM_REGISTERED_LIMITED_SERVICE
&&
state
!=
EMmSubState
::
MM_DEREGISTERED_INITIATED_PS
&&
state
!=
EMmSubState
::
MM_SERVICE_REQUEST_INITIATED_PS
)
return
;
if
(
m_pduSessions
[
psi
]
->
psState
!=
EPsState
::
ACTIVE
)
...
...
@@ -81,4 +85,20 @@ void NasSm::handleUplinkDataRequest(int psi, OctetString &&data)
}
}
void
NasSm
::
handleDownlinkDataRequest
(
int
psi
,
OctetString
&&
data
)
{
auto
state
=
m_mm
->
m_mmSubState
;
if
(
state
!=
EMmSubState
::
MM_REGISTERED_INITIATED_PS
&&
state
!=
EMmSubState
::
MM_REGISTERED_NORMAL_SERVICE
&&
state
!=
EMmSubState
::
MM_REGISTERED_NON_ALLOWED_SERVICE
&&
state
!=
EMmSubState
::
MM_REGISTERED_LIMITED_SERVICE
&&
state
!=
EMmSubState
::
MM_DEREGISTERED_INITIATED_PS
&&
state
!=
EMmSubState
::
MM_SERVICE_REQUEST_INITIATED_PS
)
return
;
auto
*
w
=
new
NmUeNasToApp
(
NmUeNasToApp
::
DOWNLINK_DATA_DELIVERY
);
w
->
psi
=
psi
;
w
->
data
=
std
::
move
(
data
);
m_base
->
appTask
->
push
(
w
);
}
}
// namespace nr::ue
src/ue/nas/sm/sm.hpp
View file @
a5a4974a
...
...
@@ -93,6 +93,7 @@ class NasSm
void
handleNasEvent
(
const
NmUeNasToNas
&
msg
);
void
onTimerTick
();
void
handleUplinkDataRequest
(
int
psi
,
OctetString
&&
data
);
void
handleDownlinkDataRequest
(
int
psi
,
OctetString
&&
data
);
};
}
// namespace nr::ue
\ No newline at end of file
src/ue/nas/task.cpp
View file @
a5a4974a
...
...
@@ -93,6 +93,18 @@ void NasTask::onLoop()
}
break
;
}
case
NtsMessageType
:
:
UE_RLS_TO_NAS
:
{
auto
*
w
=
dynamic_cast
<
NmUeRlsToNas
*>
(
msg
);
switch
(
w
->
present
)
{
case
NmUeRlsToNas
:
:
DATA_PDU_DELIVERY
:
{
sm
->
handleDownlinkDataRequest
(
w
->
psi
,
std
::
move
(
w
->
pdu
));
break
;
}
}
break
;
}
case
NtsMessageType
:
:
TIMER_EXPIRED
:
{
auto
*
w
=
dynamic_cast
<
NmTimerExpired
*>
(
msg
);
int
timerId
=
w
->
timerId
;
...
...
src/ue/nts.hpp
View file @
a5a4974a
...
...
@@ -187,8 +187,13 @@ struct NmUeNasToApp : NtsMessage
enum
PR
{
PERFORM_SWITCH_OFF
,
DOWNLINK_DATA_DELIVERY
}
present
;
// DOWNLINK_DATA_DELIVERY
int
psi
{};
OctetString
data
;
explicit
NmUeNasToApp
(
PR
present
)
:
NtsMessage
(
NtsMessageType
::
UE_NAS_TO_APP
),
present
(
present
)
{
}
...
...
@@ -226,7 +231,7 @@ struct NmUeNasToRls : NtsMessage
}
};
struct
NmUeRlsTo
App
:
NtsMessage
struct
NmUeRlsTo
Nas
:
NtsMessage
{
enum
PR
{
...
...
@@ -237,7 +242,7 @@ struct NmUeRlsToApp : NtsMessage
int
psi
{};
OctetString
pdu
{};
explicit
NmUeRlsTo
App
(
PR
present
)
:
NtsMessage
(
NtsMessageType
::
UE_RLS_TO_APP
),
present
(
present
)
explicit
NmUeRlsTo
Nas
(
PR
present
)
:
NtsMessage
(
NtsMessageType
::
UE_RLS_TO_NAS
),
present
(
present
)
{
}
};
...
...
src/ue/rls/task.cpp
View file @
a5a4974a
...
...
@@ -9,6 +9,7 @@
#include "task.hpp"
#include <ue/app/task.hpp>
#include <ue/nas/task.hpp>
#include <ue/rrc/task.hpp>
#include <utils/common.hpp>
#include <utils/constants.hpp>
...
...
@@ -55,10 +56,10 @@ void UeRlsTask::onLoop()
break
;
}
case
NmUeRlsToRls
:
:
DOWNLINK_DATA
:
{
auto
*
m
=
new
NmUeRlsTo
App
(
NmUeRlsToApp
::
DATA_PDU_DELIVERY
);
auto
*
m
=
new
NmUeRlsTo
Nas
(
NmUeRlsToNas
::
DATA_PDU_DELIVERY
);
m
->
psi
=
w
->
psi
;
m
->
pdu
=
std
::
move
(
w
->
data
);
m_base
->
app
Task
->
push
(
m
);
m_base
->
nas
Task
->
push
(
m
);
break
;
}
case
NmUeRlsToRls
:
:
DOWNLINK_RRC
:
{
...
...
src/utils/nts.hpp
View file @
a5a4974a
...
...
@@ -45,7 +45,6 @@ enum class NtsMessageType
GNB_NGAP_TO_GTP
,
GNB_SCTP
,
UE_APP_TO_RLS
,
UE_APP_TO_TUN
,
UE_APP_TO_NAS
,
UE_TUN_TO_APP
,
...
...
@@ -55,7 +54,7 @@ enum class NtsMessageType
UE_RRC_TO_RRC
,
UE_NAS_TO_NAS
,
UE_RLS_TO_RRC
,
UE_RLS_TO_
APP
,
UE_RLS_TO_
NAS
,
UE_RLS_TO_RLS
,
UE_NAS_TO_APP
,
UE_NAS_TO_RLS
,
...
...
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