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
c5bb895b
Commit
c5bb895b
authored
May 21, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
L3 RRC/NAS developments
parent
9cc4615f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
36 deletions
+54
-36
src/ue/nas/mm/radio.cpp
src/ue/nas/mm/radio.cpp
+51
-34
src/ue/nas/sm/base.cpp
src/ue/nas/sm/base.cpp
+1
-1
src/ue/rrc/idle.cpp
src/ue/rrc/idle.cpp
+2
-1
No files found.
src/ue/nas/mm/radio.cpp
View file @
c5bb895b
...
...
@@ -105,7 +105,7 @@ void NasMm::performPlmnSelection()
}
else
if
(
lastSelectedPlmn
!=
selected
)
{
m_logger
->
info
(
"Selected
PLMN
[%s]"
,
ToJson
(
selected
).
str
().
c_str
());
m_logger
->
info
(
"Selected
plmn
[%s]"
,
ToJson
(
selected
).
str
().
c_str
());
m_base
->
rrcTask
->
push
(
new
NwUeNasToRrc
(
NwUeNasToRrc
::
RRC_NOTIFY
));
}
...
...
@@ -151,46 +151,60 @@ void NasMm::handleActiveCellChange(const Tai &lastTai)
return
;
}
Tai
currentTai
=
m_base
->
shCtx
.
getCurrentTai
();
auto
currentCell
=
m_base
->
shCtx
.
currentCell
.
get
();
Tai
currentTai
=
Tai
{
currentCell
.
plmn
,
currentCell
.
tac
};
}
/*void NasMm::handleServingCellChange(const UeCellInfo &servingCell)
{
if (m_cmState == ECmState::CM_CONNECTED)
if
(
m_mmState
==
EMmState
::
MM_REGISTERED
)
{
m_logger->err("Serving cell change in CM-CONNECTED");
return;
if
(
currentCell
.
cellId
==
0
)
{
if
(
m_mmSubState
!=
EMmSubState
::
MM_REGISTERED_PLMN_SEARCH
&&
m_mmSubState
!=
EMmSubState
::
MM_REGISTERED_NO_CELL_AVAILABLE
)
{
switchMmState
(
EMmSubState
::
MM_REGISTERED_PLMN_SEARCH
);
}
}
else
{
if
(
currentCell
.
category
==
ECellCategory
::
SUITABLE_CELL
)
switchMmState
(
EMmSubState
::
MM_REGISTERED_NORMAL_SERVICE
);
else
if
(
currentCell
.
category
==
ECellCategory
::
ACCEPTABLE_CELL
)
switchMmState
(
EMmSubState
::
MM_REGISTERED_LIMITED_SERVICE
);
else
switchMmState
(
EMmSubState
::
MM_REGISTERED_PS
);
if (servingCell.cellCategory != ECellCategory::ACCEPTABLE_CELL &&
servingCell.cellCategory != ECellCategory::SUITABLE_CELL)
if
(
!
nas
::
utils
::
TaiListContains
(
m_usim
->
m_taiList
,
nas
::
VTrackingAreaIdentity
{
currentTai
}))
sendMobilityRegistration
(
ERegUpdateCause
::
ENTER_UNLISTED_TRACKING_AREA
);
}
}
else
if
(
m_mmState
==
EMmState
::
MM_DEREGISTERED
)
{
m_logger->err("Serving cell change with unhandled cell category");
return;
if
(
currentCell
.
cellId
==
0
)
{
if
(
m_mmSubState
!=
EMmSubState
::
MM_DEREGISTERED_PLMN_SEARCH
&&
m_mmSubState
!=
EMmSubState
::
MM_DEREGISTERED_NO_CELL_AVAILABLE
)
{
switchMmState
(
EMmSubState
::
MM_DEREGISTERED_PLMN_SEARCH
);
}
m_logger->info("Serving cell determined [%s]", servingCell.gnbName.c_str());
if (m_mmState == EMmState::MM_REGISTERED || m_mmState == EMmState::MM_DEREGISTERED)
}
else
{
bool isSuitable = servingCell.cellCategory == ECellCategory::SUITABLE_CELL;
if (m_mmState == EMmState::MM_REGISTERED)
switchMmState(EMmState::MM_REGISTERED, isSuitable ? EMmSubState::MM_REGISTERED_NORMAL_SERVICE
: EMmSubState::MM_REGISTERED_LIMITED_SERVICE);
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(EMmState::MM_DEREGISTERED, isSuitable ? EMmSubState::MM_DEREGISTERED_NORMAL_SERVICE
: EMmSubState::MM_DEREGISTERED_LIMITED_SERVICE);
switchMmState
(
EMmSubState
::
MM_DEREGISTERED_PS
);
}
// todo: else, other states abnormal case
resetRegAttemptCounter();
m_usim->m_servingCell = servingCell;
m_usim->m_currentTai =
nas::VTrackingAreaIdentity{nas::utils::PlmnFrom(servingCell.cellId.plmn), octet3{servingCell.tac}};
}*/
}
else
if
(
m_mmState
==
EMmState
::
MM_REGISTERED_INITIATED
||
m_mmState
==
EMmState
::
MM_DEREGISTERED_INITIATED
||
m_mmState
==
EMmState
::
MM_SERVICE_REQUEST_INITIATED
)
{
// This should never happen
m_logger
->
err
(
"Active cell change in [CM-IDLE] state while MM specific procedure is ongoing"
);
localReleaseConnection
();
}
}
void
NasMm
::
handleRrcConnectionSetup
()
{
...
...
@@ -219,6 +233,9 @@ void NasMm::handleRadioLinkFailure()
void
NasMm
::
localReleaseConnection
()
{
if
(
m_cmState
==
ECmState
::
CM_IDLE
)
return
;
m_logger
->
info
(
"Performing local release of NAS connection"
);
m_base
->
rrcTask
->
push
(
new
NwUeNasToRrc
(
NwUeNasToRrc
::
LOCAL_RELEASE_CONNECTION
));
...
...
src/ue/nas/sm/base.cpp
View file @
c5bb895b
...
...
@@ -37,7 +37,7 @@ void NasSm::establishInitialSessions()
return
;
}
m_logger
->
info
(
"Initial PDU sessions are establishing [%d#]"
,
m_base
->
config
->
initSessions
.
size
());
m_logger
->
debug
(
"Initial PDU sessions are establishing [%d#]"
,
m_base
->
config
->
initSessions
.
size
());
for
(
auto
&
sess
:
m_base
->
config
->
initSessions
)
sendEstablishmentRequest
(
sess
);
...
...
src/ue/rrc/idle.cpp
View file @
c5bb895b
...
...
@@ -94,7 +94,8 @@ void UeRrcTask::performCellSelection()
m_base
->
shCtx
.
currentCell
.
set
(
cellInfo
);
if
(
selectedCell
!=
0
&&
selectedCell
!=
lastCell
)
m_logger
->
info
(
"Selected cell id[%d] category[%s]"
,
selectedCell
,
ToJson
(
cellInfo
.
category
).
str
().
c_str
());
m_logger
->
info
(
"Selected cell plmn[%s] tac[%d] category[%s]"
,
ToJson
(
cellInfo
.
plmn
).
str
().
c_str
(),
cellInfo
.
tac
,
ToJson
(
cellInfo
.
category
).
str
().
c_str
());
if
(
selectedCell
!=
lastCell
)
{
...
...
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