Commit 4fe5f473 authored by aligungr's avatar aligungr

L3 RRC/NAS developments

parent bed3766b
...@@ -26,6 +26,8 @@ NasMm::NasMm(TaskBase *base, UeTimers *timers) : m_base{base}, m_timers{timers}, ...@@ -26,6 +26,8 @@ NasMm::NasMm(TaskBase *base, UeTimers *timers) : m_base{base}, m_timers{timers},
m_cmState = ECmState::CM_IDLE; m_cmState = ECmState::CM_IDLE;
m_mmState = EMmState::MM_DEREGISTERED; m_mmState = EMmState::MM_DEREGISTERED;
m_mmSubState = EMmSubState::MM_DEREGISTERED_NA; m_mmSubState = EMmSubState::MM_DEREGISTERED_NA;
m_storage = new MmStorage(m_base);
} }
void NasMm::onStart(NasSm *sm, Usim *usim) void NasMm::onStart(NasSm *sm, Usim *usim)
......
...@@ -253,7 +253,7 @@ void NasMm::receiveDeregistrationRequest(const nas::DeRegistrationRequestUeTermi ...@@ -253,7 +253,7 @@ void NasMm::receiveDeregistrationRequest(const nas::DeRegistrationRequestUeTermi
tai.plmn.isLongMnc = m_usim->m_currentTai->plmn.isLongMnc; tai.plmn.isLongMnc = m_usim->m_currentTai->plmn.isLongMnc;
tai.tac = (int)m_usim->m_currentTai->tac; tai.tac = (int)m_usim->m_currentTai->tac;
m_storage.m_forbiddenTaiListRoaming->add(tai); m_storage->m_forbiddenTaiListRoaming->add(tai);
} }
if (cause == nas::EMmCause::ILLEGAL_UE || cause == nas::EMmCause::FIVEG_SERVICES_NOT_ALLOWED) if (cause == nas::EMmCause::ILLEGAL_UE || cause == nas::EMmCause::FIVEG_SERVICES_NOT_ALLOWED)
......
...@@ -31,7 +31,7 @@ class NasMm ...@@ -31,7 +31,7 @@ class NasMm
std::unique_ptr<Logger> m_logger; std::unique_ptr<Logger> m_logger;
NasSm *m_sm; NasSm *m_sm;
Usim *m_usim; Usim *m_usim;
MmStorage m_storage; MmStorage* m_storage;
ERmState m_rmState; ERmState m_rmState;
ECmState m_cmState; ECmState m_cmState;
......
...@@ -569,7 +569,7 @@ void NasMm::receiveInitialRegistrationReject(const nas::RegistrationReject &msg) ...@@ -569,7 +569,7 @@ void NasMm::receiveInitialRegistrationReject(const nas::RegistrationReject &msg)
tai.plmn.isLongMnc = m_usim->m_currentTai->plmn.isLongMnc; tai.plmn.isLongMnc = m_usim->m_currentTai->plmn.isLongMnc;
tai.tac = (int)m_usim->m_currentTai->tac; tai.tac = (int)m_usim->m_currentTai->tac;
m_storage.m_forbiddenTaiListRoaming->add(tai); m_storage->m_forbiddenTaiListRoaming->add(tai);
} }
if (cause == nas::EMmCause::PLMN_NOT_ALLOWED || cause == nas::EMmCause::SERVING_NETWORK_NOT_AUTHORIZED) if (cause == nas::EMmCause::PLMN_NOT_ALLOWED || cause == nas::EMmCause::SERVING_NETWORK_NOT_AUTHORIZED)
...@@ -733,7 +733,7 @@ void NasMm::receiveMobilityRegistrationReject(const nas::RegistrationReject &msg ...@@ -733,7 +733,7 @@ void NasMm::receiveMobilityRegistrationReject(const nas::RegistrationReject &msg
tai.plmn.isLongMnc = m_usim->m_currentTai->plmn.isLongMnc; tai.plmn.isLongMnc = m_usim->m_currentTai->plmn.isLongMnc;
tai.tac = (int)m_usim->m_currentTai->tac; tai.tac = (int)m_usim->m_currentTai->tac;
m_storage.m_forbiddenTaiListRoaming->add(tai); m_storage->m_forbiddenTaiListRoaming->add(tai);
} }
if (cause == nas::EMmCause::PLMN_NOT_ALLOWED || cause == nas::EMmCause::SERVING_NETWORK_NOT_AUTHORIZED) if (cause == nas::EMmCause::PLMN_NOT_ALLOWED || cause == nas::EMmCause::SERVING_NETWORK_NOT_AUTHORIZED)
......
...@@ -316,7 +316,7 @@ void NasMm::receiveServiceReject(const nas::ServiceReject &msg) ...@@ -316,7 +316,7 @@ void NasMm::receiveServiceReject(const nas::ServiceReject &msg)
tai.plmn.isLongMnc = m_usim->m_currentTai->plmn.isLongMnc; tai.plmn.isLongMnc = m_usim->m_currentTai->plmn.isLongMnc;
tai.tac = (int)m_usim->m_currentTai->tac; tai.tac = (int)m_usim->m_currentTai->tac;
m_storage.m_forbiddenTaiListRps->add(tai); m_storage->m_forbiddenTaiListRps->add(tai);
} }
if (cause == nas::EMmCause::ROAMING_NOT_ALLOWED_IN_TA || cause == nas::EMmCause::NO_SUITIBLE_CELLS_IN_TA) if (cause == nas::EMmCause::ROAMING_NOT_ALLOWED_IN_TA || cause == nas::EMmCause::NO_SUITIBLE_CELLS_IN_TA)
...@@ -327,7 +327,7 @@ void NasMm::receiveServiceReject(const nas::ServiceReject &msg) ...@@ -327,7 +327,7 @@ void NasMm::receiveServiceReject(const nas::ServiceReject &msg)
tai.plmn.isLongMnc = m_usim->m_currentTai->plmn.isLongMnc; tai.plmn.isLongMnc = m_usim->m_currentTai->plmn.isLongMnc;
tai.tac = (int)m_usim->m_currentTai->tac; tai.tac = (int)m_usim->m_currentTai->tac;
m_storage.m_forbiddenTaiListRoaming->add(tai); m_storage->m_forbiddenTaiListRoaming->add(tai);
nas::utils::RemoveFromTaiList(m_usim->m_taiList, *m_usim->m_currentTai); nas::utils::RemoveFromTaiList(m_usim->m_taiList, *m_usim->m_currentTai);
} }
......
...@@ -14,7 +14,7 @@ static constexpr const int64_t FORBIDDEN_TAI_CLEAR_PERIOD = 1000ll * 60ll * 60ll ...@@ -14,7 +14,7 @@ static constexpr const int64_t FORBIDDEN_TAI_CLEAR_PERIOD = 1000ll * 60ll * 60ll
namespace nr::ue namespace nr::ue
{ {
MmStorage::MmStorage() MmStorage::MmStorage(TaskBase *base) : m_base{base}
{ {
m_forbiddenTaiListRoaming = m_forbiddenTaiListRoaming =
std::make_unique<nas::NasListT1<Tai>>(FORBIDDEN_TAI_LIST_SIZE, FORBIDDEN_TAI_CLEAR_PERIOD, std::nullopt); std::make_unique<nas::NasListT1<Tai>>(FORBIDDEN_TAI_LIST_SIZE, FORBIDDEN_TAI_CLEAR_PERIOD, std::nullopt);
......
...@@ -8,18 +8,22 @@ ...@@ -8,18 +8,22 @@
#include <lib/nas/msg.hpp> #include <lib/nas/msg.hpp>
#include <lib/nas/storage.hpp> #include <lib/nas/storage.hpp>
#include <ue/types.hpp>
namespace nr::ue namespace nr::ue
{ {
class MmStorage class MmStorage
{ {
private:
TaskBase *m_base;
public: public:
std::unique_ptr<nas::NasListT1<Tai>> m_forbiddenTaiListRoaming; std::unique_ptr<nas::NasListT1<Tai>> m_forbiddenTaiListRoaming;
std::unique_ptr<nas::NasListT1<Tai>> m_forbiddenTaiListRps; std::unique_ptr<nas::NasListT1<Tai>> m_forbiddenTaiListRps;
public: public:
MmStorage(); explicit MmStorage(TaskBase *base);
}; };
} // namespace nr::ue } // namespace nr::ue
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