Commit cba865df authored by aligungr's avatar aligungr

MM refactor

parent 61d09a6e
......@@ -47,4 +47,16 @@ void NasMm::handleRrcEvent(const NwUeRrcToNas &msg)
}
}
void NasMm::handleNasEvent(const NwUeNasToNas &msg)
{
switch (msg.present)
{
case NwUeNasToNas::NAS_TIMER_EXPIRE:
onTimerExpire(*msg.timer);
break;
default:
break;
}
}
} // namespace nr::ue
......@@ -157,11 +157,12 @@ class NasMm
bool startECallInactivityIfNeeded();
bool switchToECallInactivityIfNeeded();
public: /* Timer */
private: /* Timer */
void onTimerExpire(nas::NasTimer &timer);
public: /* Interface */
void handleRrcEvent(const NwUeRrcToNas &msg);
void handleNasEvent(const NwUeNasToNas &msg);
};
} // namespace nr::ue
\ No newline at end of file
......@@ -67,7 +67,12 @@ void NasTask::onLoop()
mm->performMmCycle();
break;
case NwUeNasToNas::NAS_TIMER_EXPIRE:
onTimerExpire(*w->timer);
if (w->timer->isMmTimer())
mm->handleNasEvent(*w);
else
{
// TODO, handle SM timer
}
break;
case NwUeNasToNas::ESTABLISH_INITIAL_SESSIONS:
sm->establishInitialSessions();
......@@ -98,16 +103,6 @@ void NasTask::onLoop()
delete msg;
}
void NasTask::onTimerExpire(nas::NasTimer &timer)
{
if (timer.isMmTimer())
mm->onTimerExpire(timer);
else
{
// TODO
}
}
void NasTask::performTick()
{
auto sendExpireMsg = [this](nas::NasTimer *timer) {
......
......@@ -42,7 +42,6 @@ class NasTask : public NtsTask
void onQuit() override;
private:
void onTimerExpire(nas::NasTimer &timer);
void performTick();
};
......
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