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
9b36a7da
Commit
9b36a7da
authored
May 23, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
L3 RRC/NAS developments
parent
5dc2ae1a
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
18 additions
and
19 deletions
+18
-19
src/ue/app/cmd_handler.cpp
src/ue/app/cmd_handler.cpp
+5
-5
src/ue/nas/mm/base.cpp
src/ue/nas/mm/base.cpp
+4
-4
src/ue/nas/mm/register.cpp
src/ue/nas/mm/register.cpp
+2
-2
src/ue/nas/mm/service.cpp
src/ue/nas/mm/service.cpp
+1
-1
src/ue/nas/storage.cpp
src/ue/nas/storage.cpp
+3
-1
src/ue/nas/storage.hpp
src/ue/nas/storage.hpp
+2
-0
src/ue/nas/usim/usim.cpp
src/ue/nas/usim/usim.cpp
+0
-2
src/ue/nas/usim/usim.hpp
src/ue/nas/usim/usim.hpp
+0
-3
src/ue/types.hpp
src/ue/types.hpp
+1
-1
No files found.
src/ue/app/cmd_handler.cpp
View file @
9b36a7da
...
...
@@ -10,8 +10,8 @@
#include <ue/app/task.hpp>
#include <ue/nas/task.hpp>
#include <ue/rrc/task.hpp>
#include <ue/rls/task.hpp>
#include <ue/rrc/task.hpp>
#include <ue/tun/task.hpp>
#include <utils/common.hpp>
#include <utils/printer.hpp>
...
...
@@ -106,8 +106,8 @@ void UeCmdHandler::handleCmdImpl(NmUeCliCommand &msg)
{
case
app
:
:
UeCliCommand
::
STATUS
:
{
// TODO
//std::vector<Json> pduSessions{};
//for (auto &pduSession : m_base->appTask->m_pduSessions)
//
std::vector<Json> pduSessions{};
//
for (auto &pduSession : m_base->appTask->m_pduSessions)
// if (pduSession.has_value())
// pduSessions.push_back(ToJson(*pduSession));
...
...
@@ -115,12 +115,12 @@ void UeCmdHandler::handleCmdImpl(NmUeCliCommand &msg)
{
"cm-state"
,
ToJson
(
m_base
->
nasTask
->
mm
->
m_cmState
)},
{
"rm-state"
,
ToJson
(
m_base
->
nasTask
->
mm
->
m_rmState
)},
{
"mm-state"
,
ToJson
(
m_base
->
nasTask
->
mm
->
m_mmSubState
)},
{
"5u-state"
,
ToJson
(
m_base
->
nasTask
->
mm
->
m_
usim
->
m_uState
)},
{
"5u-state"
,
ToJson
(
m_base
->
nasTask
->
mm
->
m_
storage
->
uState
->
get
()
)},
{
"sim-inserted"
,
m_base
->
nasTask
->
mm
->
m_usim
->
isValid
()},
{
"stored-suci"
,
ToJson
(
m_base
->
nasTask
->
mm
->
m_storage
->
storedSuci
->
get
())},
{
"stored-guti"
,
ToJson
(
m_base
->
nasTask
->
mm
->
m_storage
->
storedGuti
->
get
())},
{
"has-emergency"
,
::
ToJson
(
m_base
->
nasTask
->
mm
->
hasEmergency
())},
//TODO {"pdu-sessions", Json::Arr(std::move(pduSessions))},
//
TODO {"pdu-sessions", Json::Arr(std::move(pduSessions))},
});
sendResult
(
msg
.
address
,
json
.
dumpYaml
());
break
;
...
...
src/ue/nas/mm/base.cpp
View file @
9b36a7da
...
...
@@ -306,15 +306,15 @@ void NasMm::switchCmState(ECmState state)
void
NasMm
::
switchUState
(
E5UState
state
)
{
E5UState
oldState
=
m_
usim
->
m_uState
;
m_
usim
->
m_uState
=
state
;
E5UState
oldState
=
m_
storage
->
uState
->
get
()
;
m_
storage
->
uState
->
set
(
state
)
;
onSwitchUState
(
oldState
,
m_usim
->
m_uS
tate
);
onSwitchUState
(
oldState
,
s
tate
);
if
(
m_base
->
nodeListener
)
{
m_base
->
nodeListener
->
onSwitch
(
app
::
NodeType
::
UE
,
m_base
->
config
->
getNodeName
(),
app
::
StateType
::
U5
,
ToJson
(
oldState
).
str
(),
ToJson
(
m_usim
->
m_uS
tate
).
str
());
ToJson
(
oldState
).
str
(),
ToJson
(
s
tate
).
str
());
}
if
(
state
!=
oldState
)
...
...
src/ue/nas/mm/register.cpp
View file @
9b36a7da
...
...
@@ -907,7 +907,7 @@ void NasMm::handleAbnormalMobilityRegFailure(nas::ERegistrationType regType)
// "If the TAI of the current serving cell is not included in the TAI list or the 5GS update status is different
// to 5U1 UPDATED"
if
(
!
includedInTaiList
||
m_
usim
->
m_uState
!=
E5UState
::
U1_UPDATED
)
if
(
!
includedInTaiList
||
m_
storage
->
uState
->
get
()
!=
E5UState
::
U1_UPDATED
)
{
// "The UE shall start timer T3511, shall set the 5GS update status to 5U2 NOT UPDATED and change to state
// 5GMM-REGISTERED.ATTEMPTING-REGISTRATION-UPDATE. When timer T3511 expires and the registration update
...
...
@@ -920,7 +920,7 @@ void NasMm::handleAbnormalMobilityRegFailure(nas::ERegistrationType regType)
// "If the TAI of the current serving cell is included in the TAI list, the 5GS update status is equal to 5U1
// UPDATED, and the UE is not performing the registration procedure after an inter-system change from S1 mode to
// N1 mode"
if
(
includedInTaiList
&&
m_
usim
->
m_uState
==
E5UState
::
U1_UPDATED
)
if
(
includedInTaiList
&&
m_
storage
->
uState
->
get
()
==
E5UState
::
U1_UPDATED
)
{
// "The UE shall keep the 5GS update status to 5U1 UPDATED and enter state 5GMM-REGISTERED.NORMAL-SERVICE."
switchMmState
(
EMmSubState
::
MM_REGISTERED_NORMAL_SERVICE
);
...
...
src/ue/nas/mm/service.cpp
View file @
9b36a7da
...
...
@@ -29,7 +29,7 @@ void NasMm::sendServiceRequest(EServiceReqCause reqCause)
m_logger
->
debug
(
"Service Request canceled, already in 5GMM-SERVICE-REQUEST-INITIATED"
);
return
;
}
if
(
m_
usim
->
m_uState
!=
E5UState
::
U1_UPDATED
)
if
(
m_
storage
->
uState
->
get
()
!=
E5UState
::
U1_UPDATED
)
{
m_logger
->
err
(
"Service Request canceled, UE not in 5U1 UPDATED state"
);
return
;
...
...
src/ue/nas/storage.cpp
View file @
9b36a7da
...
...
@@ -22,7 +22,9 @@ namespace nr::ue
MmStorage
::
MmStorage
(
TaskBase
*
base
)
:
m_base
{
base
}
{
storedSuci
=
std
::
make_unique
<
nas
::
NasSlot
<
nas
::
IE5gsMobileIdentity
>>
(
0
,
std
::
nullopt
);
uState
=
std
::
make_unique
<
nas
::
NasSlot
<
E5UState
>>
(
0
,
std
::
nullopt
);
storedSuci
=
std
::
make_unique
<
nas
::
NasSlot
<
nas
::
IE5gsMobileIdentity
>>
(
0
,
std
::
nullopt
);
storedGuti
=
std
::
make_unique
<
nas
::
NasSlot
<
nas
::
IE5gsMobileIdentity
>>
(
0
,
std
::
nullopt
);
...
...
src/ue/nas/storage.hpp
View file @
9b36a7da
...
...
@@ -19,6 +19,8 @@ class MmStorage
TaskBase
*
m_base
;
public:
std
::
unique_ptr
<
nas
::
NasSlot
<
E5UState
>>
uState
;
std
::
unique_ptr
<
nas
::
NasSlot
<
nas
::
IE5gsMobileIdentity
>>
storedSuci
;
std
::
unique_ptr
<
nas
::
NasSlot
<
nas
::
IE5gsMobileIdentity
>>
storedGuti
;
...
...
src/ue/nas/usim/usim.cpp
View file @
9b36a7da
...
...
@@ -15,8 +15,6 @@ void ue::Usim::initialize(bool hasSupi, const UeConfig::Initials &initials)
{
m_isValid
=
hasSupi
;
m_uState
=
E5UState
::
U1_UPDATED
;
m_defConfiguredNssai
=
initials
.
defaultConfiguredNssai
;
m_configuredNssai
=
initials
.
configuredNssai
;
...
...
src/ue/nas/usim/usim.hpp
View file @
9b36a7da
...
...
@@ -27,9 +27,6 @@ class Usim
bool
m_isValid
{};
public:
// State related
E5UState
m_uState
{};
// Security related
std
::
unique_ptr
<
NasSecurityContext
>
m_currentNsCtx
{};
std
::
unique_ptr
<
NasSecurityContext
>
m_nonCurrentNsCtx
{};
...
...
src/ue/types.hpp
View file @
9b36a7da
...
...
@@ -237,7 +237,7 @@ enum class ECmState
enum
class
E5UState
{
U1_UPDATED
,
U1_UPDATED
=
0
,
U2_NOT_UPDATED
,
U3_ROAMING_NOT_ALLOWED
};
...
...
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