Commit 22aca1d6 authored by aligungr's avatar aligungr

L3 RRC/NAS developments

parent aee8e2b6
...@@ -151,7 +151,7 @@ void NasMm::performMmCycle() ...@@ -151,7 +151,7 @@ void NasMm::performMmCycle()
if (!nas::utils::TaiListContains(m_storage->taiList->get(), nas::VTrackingAreaIdentity{currentTai})) if (!nas::utils::TaiListContains(m_storage->taiList->get(), nas::VTrackingAreaIdentity{currentTai}))
{ {
if (m_rmState == ERmState::RM_REGISTERED) if (m_rmState == ERmState::RM_REGISTERED)
sendMobilityRegistration(ERegUpdateCause::ENTER_UNLISTED_TRACKING_AREA); mobilityUpdatingRequired(ERegUpdateCause::ENTER_UNLISTED_TRACKING_AREA);
} }
else else
m_storage->lastVisitedRegisteredTai->set(currentTai); m_storage->lastVisitedRegisteredTai->set(currentTai);
...@@ -165,7 +165,7 @@ void NasMm::performMmCycle() ...@@ -165,7 +165,7 @@ void NasMm::performMmCycle()
if (m_mmSubState == EMmSubState::MM_DEREGISTERED_NORMAL_SERVICE) if (m_mmSubState == EMmSubState::MM_DEREGISTERED_NORMAL_SERVICE)
{ {
if (!m_timers->t3346.isRunning()) if (!m_timers->t3346.isRunning())
sendInitialRegistration(EInitialRegCause::MM_DEREG_NORMAL_SERVICE); initialRegistrationRequired(EInitialRegCause::MM_DEREG_NORMAL_SERVICE);
return; return;
} }
else if (m_mmSubState == EMmSubState::MM_DEREGISTERED_LIMITED_SERVICE) else if (m_mmSubState == EMmSubState::MM_DEREGISTERED_LIMITED_SERVICE)
......
...@@ -184,6 +184,7 @@ class NasMm ...@@ -184,6 +184,7 @@ class NasMm
void onTimerExpire(UeTimer &timer); void onTimerExpire(UeTimer &timer);
private: /* Procedure Control */ private: /* Procedure Control */
void initialRegistrationRequired(EInitialRegCause cause);
void mobilityUpdatingRequired(ERegUpdateCause cause); void mobilityUpdatingRequired(ERegUpdateCause cause);
private: /* Service Access Point */ private: /* Service Access Point */
......
...@@ -319,7 +319,7 @@ void NasMm::handlePaging(const std::vector<GutiMobileIdentity> &tmsiIds) ...@@ -319,7 +319,7 @@ void NasMm::handlePaging(const std::vector<GutiMobileIdentity> &tmsiIds)
m_logger->debug("Responding to received Paging"); m_logger->debug("Responding to received Paging");
if (m_cmState == ECmState::CM_CONNECTED) if (m_cmState == ECmState::CM_CONNECTED)
sendMobilityRegistration(ERegUpdateCause::PAGING_OR_NOTIFICATION); mobilityUpdatingRequired(ERegUpdateCause::PAGING_OR_NOTIFICATION);
else else
sendServiceRequest(EServiceReqCause::IDLE_PAGING); sendServiceRequest(EServiceReqCause::IDLE_PAGING);
} }
......
...@@ -398,13 +398,13 @@ void NasMm::receiveServiceReject(const nas::ServiceReject &msg) ...@@ -398,13 +398,13 @@ void NasMm::receiveServiceReject(const nas::ServiceReject &msg)
if (cause == nas::EMmCause::UE_IDENTITY_CANNOT_BE_DERIVED_FROM_NETWORK) if (cause == nas::EMmCause::UE_IDENTITY_CANNOT_BE_DERIVED_FROM_NETWORK)
{ {
if (m_lastServiceReqCause != EServiceReqCause::EMERGENCY_FALLBACK) if (m_lastServiceReqCause != EServiceReqCause::EMERGENCY_FALLBACK)
sendInitialRegistration(EInitialRegCause::DUE_TO_SERVICE_REJECT); initialRegistrationRequired(EInitialRegCause::DUE_TO_SERVICE_REJECT);
} }
if (cause == nas::EMmCause::IMPLICITY_DEREGISTERED) if (cause == nas::EMmCause::IMPLICITY_DEREGISTERED)
{ {
if (!hasEmergency()) if (!hasEmergency())
sendInitialRegistration(EInitialRegCause::DUE_TO_SERVICE_REJECT); initialRegistrationRequired(EInitialRegCause::DUE_TO_SERVICE_REJECT);
} }
if (cause == nas::EMmCause::CONGESTION) if (cause == nas::EMmCause::CONGESTION)
...@@ -436,7 +436,7 @@ void NasMm::receiveServiceReject(const nas::ServiceReject &msg) ...@@ -436,7 +436,7 @@ void NasMm::receiveServiceReject(const nas::ServiceReject &msg)
switchMmState(EMmSubState::MM_REGISTERED_NON_ALLOWED_SERVICE); switchMmState(EMmSubState::MM_REGISTERED_NON_ALLOWED_SERVICE);
if (m_lastServiceRequest->serviceType.serviceType != nas::EServiceType::ELEVATED_SIGNALLING) if (m_lastServiceRequest->serviceType.serviceType != nas::EServiceType::ELEVATED_SIGNALLING)
sendMobilityRegistration(ERegUpdateCause::RESTRICTED_SERVICE_AREA); mobilityUpdatingRequired(ERegUpdateCause::RESTRICTED_SERVICE_AREA);
} }
if (hasEmergency()) if (hasEmergency())
...@@ -461,15 +461,17 @@ void NasMm::receiveServiceReject(const nas::ServiceReject &msg) ...@@ -461,15 +461,17 @@ void NasMm::receiveServiceReject(const nas::ServiceReject &msg)
void NasMm::serviceNeededForUplinkData() void NasMm::serviceNeededForUplinkData()
{ {
static constexpr const int64_t SERVICE_REQUEST_NEEDED_FOR_DATA_THRESHOLD = 1000; static constexpr const int64_t SERVICE_REQUEST_NEEDED_FOR_DATA_THRESHOLD = 1000;
auto currentTime = utils::CurrentTimeMillis(); auto currentTime = utils::CurrentTimeMillis();
if (currentTime - m_lastTimeServiceReqNeededIndForData > SERVICE_REQUEST_NEEDED_FOR_DATA_THRESHOLD) if (currentTime - m_lastTimeServiceReqNeededIndForData > SERVICE_REQUEST_NEEDED_FOR_DATA_THRESHOLD)
{ {
sendServiceRequest(m_cmState == ECmState::CM_CONNECTED ? EServiceReqCause::CONNECTED_UPLINK_DATA_PENDING sendServiceRequest(m_cmState == ECmState::CM_CONNECTED ? EServiceReqCause::CONNECTED_UPLINK_DATA_PENDING
: EServiceReqCause::IDLE_UPLINK_DATA_PENDING); : EServiceReqCause::IDLE_UPLINK_DATA_PENDING);
m_lastTimeServiceReqNeededIndForData = currentTime; m_lastTimeServiceReqNeededIndForData = currentTime;
triggerMmCycle();
} }
} }
......
...@@ -28,7 +28,7 @@ void NasMm::onTimerExpire(UeTimer &timer) ...@@ -28,7 +28,7 @@ void NasMm::onTimerExpire(UeTimer &timer)
if (m_mmSubState == EMmSubState::MM_DEREGISTERED_NORMAL_SERVICE) if (m_mmSubState == EMmSubState::MM_DEREGISTERED_NORMAL_SERVICE)
{ {
logExpired(); logExpired();
sendInitialRegistration(EInitialRegCause::T3346_EXPIRY); initialRegistrationRequired(EInitialRegCause::T3346_EXPIRY);
} }
else if (m_mmSubState == EMmSubState::MM_REGISTERED_ATTEMPTING_REGISTRATION_UPDATE) else if (m_mmSubState == EMmSubState::MM_REGISTERED_ATTEMPTING_REGISTRATION_UPDATE)
{ {
......
...@@ -83,7 +83,7 @@ void NasMm::receiveDlNasTransport(const nas::DlNasTransport &msg) ...@@ -83,7 +83,7 @@ void NasMm::receiveDlNasTransport(const nas::DlNasTransport &msg)
if (m_rmState == ERmState::RM_REGISTERED) if (m_rmState == ERmState::RM_REGISTERED)
{ {
switchMmState(EMmSubState::MM_REGISTERED_NON_ALLOWED_SERVICE); switchMmState(EMmSubState::MM_REGISTERED_NON_ALLOWED_SERVICE);
sendMobilityRegistration(ERegUpdateCause::RESTRICTED_SERVICE_AREA); mobilityUpdatingRequired(ERegUpdateCause::RESTRICTED_SERVICE_AREA);
} }
m_sm->receiveForwardingFailure(smMessage, msg.mmCause->value, std::nullopt); m_sm->receiveForwardingFailure(smMessage, msg.mmCause->value, std::nullopt);
break; break;
......
...@@ -79,7 +79,7 @@ void NasSm::onTransactionTimerExpire(int pti) ...@@ -79,7 +79,7 @@ void NasSm::onTransactionTimerExpire(int pti)
{ {
m_logger->err("PDU Session Release procedure failure, no response from the network after 5 attempts"); m_logger->err("PDU Session Release procedure failure, no response from the network after 5 attempts");
abortProcedureByPti(pti); abortProcedureByPti(pti);
m_mm->sendMobilityRegistration(ERegUpdateCause::PS_STATUS_INFORM); m_mm->mobilityUpdatingRequired(ERegUpdateCause::PS_STATUS_INFORM);
} }
break; break;
} }
......
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