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
04899872
Commit
04899872
authored
May 23, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
L3 RRC/NAS developments
parent
9b36a7da
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
67 additions
and
58 deletions
+67
-58
src/ue/nas/mm/base.cpp
src/ue/nas/mm/base.cpp
+67
-50
src/ue/nas/mm/radio.cpp
src/ue/nas/mm/radio.cpp
+0
-8
No files found.
src/ue/nas/mm/base.cpp
View file @
04899872
...
...
@@ -86,43 +86,83 @@ void NasMm::triggerMmCycle()
void
NasMm
::
performMmCycle
()
{
/* Do nothing in case of MM-NULL */
if
(
m_mmState
==
EMmState
::
MM_NULL
)
return
;
if
(
m_sm
->
anyUplinkDataPending
()
&&
missingSessionBearer
())
serviceNeededForUplinkData
()
;
auto
currentCell
=
m_base
->
shCtx
.
currentCell
.
get
();
Tai
currentTai
=
Tai
{
currentCell
.
plmn
,
currentCell
.
tac
}
;
if
(
m_mmState
==
EMmState
::
MM_DEREGISTERED
)
/* Perform substate selection in case of primary substate */
if
(
m_mmSubState
==
EMmSubState
::
MM_DEREGISTERED_PS
)
{
if
(
switchToECallInactivityIfNeeded
())
return
;
if
(
m_mmSubState
==
EMmSubState
::
MM_DEREGISTERED_PS
)
if
(
m_cmState
==
ECmState
::
CM_IDLE
)
switchMmState
(
EMmSubState
::
MM_DEREGISTERED_PLMN_SEARCH
);
else
{
if
(
m_cmState
==
ECmState
::
CM_IDLE
)
switchMmState
(
EMmSubState
::
MM_DEREGISTERED_PLMN_SEARCH
);
else
if
(
currentCell
.
hasValue
())
{
auto
cell
=
m_base
->
shCtx
.
currentCell
.
get
();
if
(
cell
.
hasValue
())
{
if
(
!
m_usim
->
isValid
())
switchMmState
(
EMmSubState
::
MM_DEREGISTERED_NO_SUPI
);
else
if
(
cell
.
category
==
ECellCategory
::
SUITABLE_CELL
)
switchMmState
(
EMmSubState
::
MM_DEREGISTERED_NORMAL_SERVICE
);
else
if
(
cell
.
category
==
ECellCategory
::
ACCEPTABLE_CELL
)
switchMmState
(
EMmSubState
::
MM_DEREGISTERED_LIMITED_SERVICE
);
else
switchMmState
(
EMmSubState
::
MM_DEREGISTERED_PLMN_SEARCH
);
}
if
(
!
m_usim
->
isValid
())
switchMmState
(
EMmSubState
::
MM_DEREGISTERED_NO_SUPI
);
else
if
(
currentCell
.
category
==
ECellCategory
::
SUITABLE_CELL
)
switchMmState
(
EMmSubState
::
MM_DEREGISTERED_NORMAL_SERVICE
);
else
if
(
currentCell
.
category
==
ECellCategory
::
ACCEPTABLE_CELL
)
switchMmState
(
EMmSubState
::
MM_DEREGISTERED_LIMITED_SERVICE
);
else
{
switchMmState
(
EMmSubState
::
MM_DEREGISTERED_PLMN_SEARCH
);
}
}
return
;
else
{
switchMmState
(
EMmSubState
::
MM_DEREGISTERED_PLMN_SEARCH
);
}
}
return
;
}
if
(
m_mmSubState
==
EMmSubState
::
MM_REGISTERED_PS
)
{
if
(
m_cmState
==
ECmState
::
CM_IDLE
)
switchMmState
(
EMmSubState
::
MM_REGISTERED_PLMN_SEARCH
);
else
{
auto
cell
=
m_base
->
shCtx
.
currentCell
.
get
();
if
(
cell
.
hasValue
())
{
if
(
cell
.
category
==
ECellCategory
::
SUITABLE_CELL
)
switchMmState
(
EMmSubState
::
MM_REGISTERED_NORMAL_SERVICE
);
else
if
(
cell
.
category
==
ECellCategory
::
ACCEPTABLE_CELL
)
switchMmState
(
EMmSubState
::
MM_REGISTERED_LIMITED_SERVICE
);
else
switchMmState
(
EMmSubState
::
MM_REGISTERED_PLMN_SEARCH
);
}
else
{
switchMmState
(
EMmSubState
::
MM_REGISTERED_PLMN_SEARCH
);
}
}
else
if
(
m_mmSubState
==
EMmSubState
::
MM_DEREGISTERED_NORMAL_SERVICE
)
return
;
}
/* Check for uplink data pending */
if
(
m_sm
->
anyUplinkDataPending
()
&&
missingSessionBearer
())
serviceNeededForUplinkData
();
/* Process TAI changes if any */
if
(
!
nas
::
utils
::
TaiListContains
(
m_storage
->
taiList
->
get
(),
nas
::
VTrackingAreaIdentity
{
currentTai
}))
{
if
(
m_rmState
==
ERmState
::
RM_REGISTERED
)
sendMobilityRegistration
(
ERegUpdateCause
::
ENTER_UNLISTED_TRACKING_AREA
);
}
else
m_storage
->
lastVisitedRegisteredTai
->
set
(
currentTai
);
/* Other operations */
if
(
m_mmState
==
EMmState
::
MM_DEREGISTERED
)
{
if
(
switchToECallInactivityIfNeeded
())
return
;
if
(
m_mmSubState
==
EMmSubState
::
MM_DEREGISTERED_NORMAL_SERVICE
)
{
if
(
!
m_timers
->
t3346
.
isRunning
())
sendInitialRegistration
(
EInitialRegCause
::
MM_DEREG_NORMAL_SERVICE
);
...
...
@@ -166,30 +206,7 @@ void NasMm::performMmCycle()
if
(
startECallInactivityIfNeeded
())
return
;
if
(
m_mmSubState
==
EMmSubState
::
MM_REGISTERED_PS
)
{
if
(
m_cmState
==
ECmState
::
CM_IDLE
)
switchMmState
(
EMmSubState
::
MM_REGISTERED_PLMN_SEARCH
);
else
{
auto
cell
=
m_base
->
shCtx
.
currentCell
.
get
();
if
(
cell
.
hasValue
())
{
if
(
cell
.
category
==
ECellCategory
::
SUITABLE_CELL
)
switchMmState
(
EMmSubState
::
MM_REGISTERED_NORMAL_SERVICE
);
else
if
(
cell
.
category
==
ECellCategory
::
ACCEPTABLE_CELL
)
switchMmState
(
EMmSubState
::
MM_REGISTERED_LIMITED_SERVICE
);
else
switchMmState
(
EMmSubState
::
MM_REGISTERED_PLMN_SEARCH
);
}
else
{
switchMmState
(
EMmSubState
::
MM_REGISTERED_PLMN_SEARCH
);
}
}
return
;
}
else
if
(
m_mmSubState
==
EMmSubState
::
MM_REGISTERED_NORMAL_SERVICE
)
if
(
m_mmSubState
==
EMmSubState
::
MM_REGISTERED_NORMAL_SERVICE
)
{
return
;
}
...
...
src/ue/nas/mm/radio.cpp
View file @
04899872
...
...
@@ -194,11 +194,6 @@ void NasMm::handleActiveCellChange(const Tai &prevTai)
switchMmState
(
EMmSubState
::
MM_REGISTERED_LIMITED_SERVICE
);
else
switchMmState
(
EMmSubState
::
MM_REGISTERED_PS
);
if
(
!
nas
::
utils
::
TaiListContains
(
m_storage
->
taiList
->
get
(),
nas
::
VTrackingAreaIdentity
{
currentTai
}))
sendMobilityRegistration
(
ERegUpdateCause
::
ENTER_UNLISTED_TRACKING_AREA
);
else
m_storage
->
lastVisitedRegisteredTai
->
set
(
currentTai
);
}
}
else
if
(
m_mmState
==
EMmState
::
MM_DEREGISTERED
)
...
...
@@ -219,9 +214,6 @@ void NasMm::handleActiveCellChange(const Tai &prevTai)
switchMmState
(
EMmSubState
::
MM_DEREGISTERED_LIMITED_SERVICE
);
else
switchMmState
(
EMmSubState
::
MM_DEREGISTERED_PS
);
if
(
nas
::
utils
::
TaiListContains
(
m_storage
->
taiList
->
get
(),
nas
::
VTrackingAreaIdentity
{
currentTai
}))
m_storage
->
lastVisitedRegisteredTai
->
set
(
currentTai
);
}
}
else
if
(
m_mmState
==
EMmState
::
MM_REGISTERED_INITIATED
||
m_mmState
==
EMmState
::
MM_DEREGISTERED_INITIATED
||
...
...
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