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
f8f15b20
Commit
f8f15b20
authored
Apr 04, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SRA dev.
parent
2b737b43
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
43 additions
and
18 deletions
+43
-18
src/ue/app/cmd_handler.cpp
src/ue/app/cmd_handler.cpp
+2
-0
src/ue/nas/mm/base.cpp
src/ue/nas/mm/base.cpp
+16
-4
src/ue/nas/mm/radio.cpp
src/ue/nas/mm/radio.cpp
+9
-2
src/ue/nts.hpp
src/ue/nts.hpp
+2
-1
src/ue/rrc/task.cpp
src/ue/rrc/task.cpp
+4
-11
src/ue/sra/measurement.cpp
src/ue/sra/measurement.cpp
+10
-0
No files found.
src/ue/app/cmd_handler.cpp
View file @
f8f15b20
...
@@ -114,6 +114,8 @@ void UeCmdHandler::handleCmdImpl(NwUeCliCommand &msg)
...
@@ -114,6 +114,8 @@ void UeCmdHandler::handleCmdImpl(NwUeCliCommand &msg)
{
"rm-state"
,
ToJson
(
m_base
->
nasTask
->
mm
->
m_rmState
)},
{
"rm-state"
,
ToJson
(
m_base
->
nasTask
->
mm
->
m_rmState
)},
{
"mm-state"
,
ToJson
(
m_base
->
nasTask
->
mm
->
m_mmSubState
)},
{
"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_usim
->
m_uState
)},
{
"camped-cell"
,
::
ToJson
(
m_base
->
sraTask
->
m_servingCell
.
has_value
()
?
m_base
->
sraTask
->
m_servingCell
->
gnbName
:
""
)},
{
"sim-inserted"
,
m_base
->
nasTask
->
mm
->
m_usim
->
isValid
()},
{
"sim-inserted"
,
m_base
->
nasTask
->
mm
->
m_usim
->
isValid
()},
{
"stored-suci"
,
ToJson
(
m_base
->
nasTask
->
mm
->
m_usim
->
m_storedSuci
)},
{
"stored-suci"
,
ToJson
(
m_base
->
nasTask
->
mm
->
m_usim
->
m_storedSuci
)},
{
"stored-guti"
,
ToJson
(
m_base
->
nasTask
->
mm
->
m_usim
->
m_storedGuti
)},
{
"stored-guti"
,
ToJson
(
m_base
->
nasTask
->
mm
->
m_usim
->
m_storedGuti
)},
...
...
src/ue/nas/mm/base.cpp
View file @
f8f15b20
...
@@ -70,10 +70,14 @@ void NasMm::performMmCycle()
...
@@ -70,10 +70,14 @@ void NasMm::performMmCycle()
if
(
m_mmSubState
==
EMmSubState
::
MM_DEREGISTERED_PLMN_SEARCH
||
if
(
m_mmSubState
==
EMmSubState
::
MM_DEREGISTERED_PLMN_SEARCH
||
m_mmSubState
==
EMmSubState
::
MM_DEREGISTERED_NO_CELL_AVAILABLE
||
m_mmSubState
==
EMmSubState
::
MM_DEREGISTERED_NO_CELL_AVAILABLE
||
m_mmSubState
==
EMmSubState
::
MM_REGISTERED_PLMN_SEARCH
||
m_mmSubState
==
EMmSubState
::
MM_REGISTERED_NO_CELL_AVAILABLE
)
m_mmSubState
==
EMmSubState
::
MM_REGISTERED_NO_CELL_AVAILABLE
)
{
{
int64_t
current
=
utils
::
CurrentTimeMillis
();
int64_t
current
=
utils
::
CurrentTimeMillis
();
int64_t
backoff
=
m_mmSubState
==
EMmSubState
::
MM_DEREGISTERED_PLMN_SEARCH
?
-
1
:
1500
;
int64_t
backoff
=
(
m_mmSubState
==
EMmSubState
::
MM_DEREGISTERED_PLMN_SEARCH
||
m_mmSubState
==
EMmSubState
::
MM_REGISTERED_PLMN_SEARCH
)
?
-
1
:
1500
;
if
(
current
-
m_lastPlmnSearchTrigger
>
backoff
)
if
(
current
-
m_lastPlmnSearchTrigger
>
backoff
)
{
{
...
@@ -145,6 +149,9 @@ void NasMm::switchCmState(ECmState state)
...
@@ -145,6 +149,9 @@ void NasMm::switchCmState(ECmState state)
ECmState
oldState
=
m_cmState
;
ECmState
oldState
=
m_cmState
;
m_cmState
=
state
;
m_cmState
=
state
;
if
(
state
!=
oldState
)
m_logger
->
info
(
"UE switches to state [%s]"
,
ToJson
(
state
).
str
().
c_str
());
onSwitchCmState
(
oldState
,
m_cmState
);
onSwitchCmState
(
oldState
,
m_cmState
);
if
(
m_base
->
nodeListener
)
if
(
m_base
->
nodeListener
)
...
@@ -153,9 +160,6 @@ void NasMm::switchCmState(ECmState state)
...
@@ -153,9 +160,6 @@ void NasMm::switchCmState(ECmState state)
ToJson
(
oldState
).
str
(),
ToJson
(
m_cmState
).
str
());
ToJson
(
oldState
).
str
(),
ToJson
(
m_cmState
).
str
());
}
}
if
(
state
!=
oldState
)
m_logger
->
info
(
"UE switches to state [%s]"
,
ToJson
(
state
).
str
().
c_str
());
triggerMmCycle
();
triggerMmCycle
();
}
}
...
@@ -242,6 +246,14 @@ void NasMm::onSwitchCmState(ECmState oldState, ECmState newState)
...
@@ -242,6 +246,14 @@ void NasMm::onSwitchCmState(ECmState oldState, ECmState newState)
switchRmState
(
ERmState
::
RM_DEREGISTERED
);
switchRmState
(
ERmState
::
RM_DEREGISTERED
);
}
}
else
if
(
m_mmState
==
EMmState
::
MM_REGISTERED
)
{
switchMmState
(
EMmState
::
MM_REGISTERED
,
EMmSubState
::
MM_REGISTERED_PLMN_SEARCH
);
}
else
if
(
m_mmState
==
EMmState
::
MM_DEREGISTERED
)
{
switchMmState
(
EMmState
::
MM_DEREGISTERED
,
EMmSubState
::
MM_DEREGISTERED_PLMN_SEARCH
);
}
}
}
}
}
...
...
src/ue/nas/mm/radio.cpp
View file @
f8f15b20
...
@@ -10,8 +10,8 @@
...
@@ -10,8 +10,8 @@
#include <algorithm>
#include <algorithm>
#include <nas/utils.hpp>
#include <nas/utils.hpp>
#include <ue/app/task.hpp>
#include <ue/app/task.hpp>
#include <ue/rrc/task.hpp>
#include <ue/nas/sm/sm.hpp>
#include <ue/nas/sm/sm.hpp>
#include <ue/rrc/task.hpp>
namespace
nr
::
ue
namespace
nr
::
ue
{
{
...
@@ -199,7 +199,14 @@ void NasMm::handleRrcConnectionRelease()
...
@@ -199,7 +199,14 @@ void NasMm::handleRrcConnectionRelease()
void
NasMm
::
handleRadioLinkFailure
()
void
NasMm
::
handleRadioLinkFailure
()
{
{
m_logger
->
debug
(
"Radio link failure detected"
);
if
(
m_cmState
==
ECmState
::
CM_CONNECTED
)
{
m_logger
->
err
(
"Radio link failure detected"
);
}
m_usim
->
m_servingCell
=
std
::
nullopt
;
m_usim
->
m_currentPlmn
=
std
::
nullopt
;
handleRrcConnectionRelease
();
handleRrcConnectionRelease
();
}
}
...
...
src/ue/nts.hpp
View file @
f8f15b20
...
@@ -138,7 +138,8 @@ struct NwUeSraToRrc : NtsMessage
...
@@ -138,7 +138,8 @@ struct NwUeSraToRrc : NtsMessage
{
{
PLMN_SEARCH_RESPONSE
,
PLMN_SEARCH_RESPONSE
,
SERVING_CELL_CHANGE
,
SERVING_CELL_CHANGE
,
RRC_PDU_DELIVERY
RRC_PDU_DELIVERY
,
RADIO_LINK_FAILURE
}
present
;
}
present
;
// PLMN_SEARCH_RESPONSE
// PLMN_SEARCH_RESPONSE
...
...
src/ue/rrc/task.cpp
View file @
f8f15b20
...
@@ -44,17 +44,6 @@ void UeRrcTask::onLoop()
...
@@ -44,17 +44,6 @@ void UeRrcTask::onLoop()
switch
(
msg
->
msgType
)
switch
(
msg
->
msgType
)
{
{
//case NtsMessageType::UE_MR_TO_RRC: {
// auto *w = dynamic_cast<NwUeMrToRrc *>(msg);
// switch (w->present)
// {
// case NwUeMrToRrc::RADIO_LINK_FAILURE: {
// handleRadioLinkFailure();
// break;
// }
// }
// break;
//}
case
NtsMessageType
:
:
UE_NAS_TO_RRC
:
{
case
NtsMessageType
:
:
UE_NAS_TO_RRC
:
{
auto
*
w
=
dynamic_cast
<
NwUeNasToRrc
*>
(
msg
);
auto
*
w
=
dynamic_cast
<
NwUeNasToRrc
*>
(
msg
);
switch
(
w
->
present
)
switch
(
w
->
present
)
...
@@ -106,6 +95,10 @@ void UeRrcTask::onLoop()
...
@@ -106,6 +95,10 @@ void UeRrcTask::onLoop()
handleDownlinkRrc
(
w
->
channel
,
w
->
pdu
);
handleDownlinkRrc
(
w
->
channel
,
w
->
pdu
);
break
;
break
;
}
}
case
NwUeSraToRrc
:
:
RADIO_LINK_FAILURE
:
{
handleRadioLinkFailure
();
break
;
}
}
}
break
;
break
;
}
}
...
...
src/ue/sra/measurement.cpp
View file @
f8f15b20
...
@@ -63,6 +63,16 @@ void UeSraTask::onCoverageChange(const std::vector<GlobalNci> &entered, const st
...
@@ -63,6 +63,16 @@ void UeSraTask::onCoverageChange(const std::vector<GlobalNci> &entered, const st
{
{
m_logger
->
debug
(
"Coverage change detected. [%d] cell entered, [%d] cell exited"
,
static_cast
<
int
>
(
entered
.
size
()),
m_logger
->
debug
(
"Coverage change detected. [%d] cell entered, [%d] cell exited"
,
static_cast
<
int
>
(
entered
.
size
()),
static_cast
<
int
>
(
exited
.
size
()));
static_cast
<
int
>
(
exited
.
size
()));
bool
campedCellLost
=
m_servingCell
.
has_value
()
&&
std
::
any_of
(
exited
.
begin
(),
exited
.
end
(),
[
this
](
auto
&
i
)
{
return
i
==
m_servingCell
->
cellId
;
});
if
(
campedCellLost
)
{
m_logger
->
warn
(
"Signal lost from camped cell"
);
m_servingCell
=
std
::
nullopt
;
m_base
->
rrcTask
->
push
(
new
NwUeSraToRrc
(
NwUeSraToRrc
::
RADIO_LINK_FAILURE
));
}
}
}
void
UeSraTask
::
plmnSearchRequested
()
void
UeSraTask
::
plmnSearchRequested
()
...
...
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