Commit f4ba25f0 authored by aligungr's avatar aligungr

NAS MM refactor

parent cc15b66d
......@@ -50,12 +50,6 @@ void NasMm::performMmCycle()
if (m_mmState == EMmState::MM_NULL)
return;
if (!m_usim->isValid())
{
switchMmState(EMmState::MM_DEREGISTERED, EMmSubState::MM_DEREGISTERED_NO_SUPI);
return;
}
if (m_mmSubState == EMmSubState::MM_DEREGISTERED_NA)
{
if (switchToECallInactivityIfNeeded())
......@@ -63,25 +57,20 @@ void NasMm::performMmCycle()
if (m_usim->isValid())
{
if (m_cmState == ECmState::CM_IDLE)
switchMmState(EMmState::MM_DEREGISTERED, EMmSubState::MM_DEREGISTERED_PLMN_SEARCH);
else
if (m_usim->m_servingCell.has_value())
{
if (m_usim->m_servingCell.has_value())
{
auto cellCategory = m_usim->m_servingCell->cellCategory;
if (cellCategory == ECellCategory::SUITABLE_CELL)
switchMmState(EMmState::MM_DEREGISTERED, EMmSubState::MM_DEREGISTERED_NORMAL_SERVICE);
else if (cellCategory == ECellCategory::ACCEPTABLE_CELL)
switchMmState(EMmState::MM_DEREGISTERED, EMmSubState::MM_DEREGISTERED_LIMITED_SERVICE);
else
switchMmState(EMmState::MM_DEREGISTERED, EMmSubState::MM_DEREGISTERED_PLMN_SEARCH);
}
auto cellCategory = m_usim->m_servingCell->cellCategory;
if (cellCategory == ECellCategory::SUITABLE_CELL)
switchMmState(EMmState::MM_DEREGISTERED, EMmSubState::MM_DEREGISTERED_NORMAL_SERVICE);
else if (cellCategory == ECellCategory::ACCEPTABLE_CELL)
switchMmState(EMmState::MM_DEREGISTERED, EMmSubState::MM_DEREGISTERED_LIMITED_SERVICE);
else
{
switchMmState(EMmState::MM_DEREGISTERED, EMmSubState::MM_DEREGISTERED_PLMN_SEARCH);
}
}
else
{
switchMmState(EMmState::MM_DEREGISTERED, EMmSubState::MM_DEREGISTERED_PLMN_SEARCH);
}
}
else
......
......@@ -67,7 +67,7 @@ class Usim
std::optional<nas::IETimeZoneAndTime> m_universalTimeAndLocalTimeZone{};
std::optional<nas::IEDaylightSavingTime> m_networkDaylightSavingTime{};
// eCall related
// Others
bool m_isECallOnly{};
public:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment