Commit 8d211623 authored by aligungr's avatar aligungr

UE SAS dev.

parent 7a34a73f
......@@ -215,6 +215,33 @@ struct NwUeRrcToMr : NtsMessage
}
};
struct NwUeRrcToSas : NtsMessage
{
enum PR
{
PLMN_SEARCH_REQUEST,
} present;
explicit NwUeRrcToSas(PR present) : NtsMessage(NtsMessageType::UE_RRC_TO_SAS), present(present)
{
}
};
struct NwUeSasToRrc : NtsMessage
{
enum PR
{
PLMN_SEARCH_RESPONSE,
} present;
// PLMN_SEARCH_RESPONSE
std::vector<UeCellMeasurement> measurements{};
explicit NwUeSasToRrc(PR present) : NtsMessage(NtsMessageType::UE_SAS_TO_RRC), present(present)
{
}
};
struct NwUeNasToNas : NtsMessage
{
enum PR
......
......@@ -15,6 +15,7 @@
#include <ue/app/task.hpp>
#include <ue/mr/task.hpp>
#include <ue/nas/task.hpp>
#include <ue/sas/task.hpp>
#include <utils/common.hpp>
namespace nr::ue
......@@ -74,7 +75,7 @@ void UeRrcTask::onLoop()
switch (w->present)
{
case NwUeNasToRrc::PLMN_SEARCH_REQUEST: {
m_base->mrTask->push(new NwUeRrcToMr(NwUeRrcToMr::PLMN_SEARCH_REQUEST));
m_base->sasTask->push(new NwUeRrcToSas(NwUeRrcToSas::PLMN_SEARCH_REQUEST));
break;
}
case NwUeNasToRrc::INITIAL_NAS_DELIVERY:
......
......@@ -7,6 +7,8 @@
//
#include "task.hpp"
#include <ue/nts.hpp>
#include <ue/rrc/task.hpp>
#include <utils/common.hpp>
namespace nr::ue
......@@ -61,4 +63,15 @@ void UeSasTask::onCoverageChange(const std::vector<GlobalNci> &entered, const st
static_cast<int>(exited.size()));
}
void UeSasTask::plmnSearchRequested()
{
std::vector<UeCellMeasurement> measurements{};
for (auto &m : m_activeMeasurements)
measurements.push_back(m.second);
auto *w = new NwUeSasToRrc(NwUeSasToRrc::PLMN_SEARCH_RESPONSE);
w->measurements = std::move(measurements);
m_base->rrcTask->push(w);
}
} // namespace nr::ue
......@@ -7,6 +7,7 @@
//
#include "task.hpp"
#include <ue/nts.hpp>
#include <utils/constants.hpp>
static const int TIMER_ID_MEASUREMENT = 1;
......@@ -46,6 +47,12 @@ void UeSasTask::onLoop()
switch (msg->msgType)
{
case NtsMessageType::UE_RRC_TO_SAS: {
auto *w = dynamic_cast<NwUeRrcToSas *>(msg);
if (w->present == NwUeRrcToSas::PLMN_SEARCH_REQUEST)
plmnSearchRequested();
break;
}
case NtsMessageType::TIMER_EXPIRED: {
auto *w = dynamic_cast<NwTimerExpired *>(msg);
if (w->timerId == TIMER_ID_MEASUREMENT)
......
......@@ -52,6 +52,7 @@ class UeSasTask : public NtsTask
void onMeasurement();
void receiveCellInfoResponse(const sas::SasCellInfoResponse &msg);
void onCoverageChange(const std::vector<GlobalNci> &entered, const std::vector<GlobalNci> &exited);
void plmnSearchRequested();
};
} // namespace nr::ue
\ No newline at end of file
......@@ -53,7 +53,9 @@ enum class NtsMessageType
UE_RRC_TO_NAS,
UE_NAS_TO_RRC,
UE_RRC_TO_MR,
UE_RRC_TO_SAS,
UE_NAS_TO_NAS,
UE_SAS_TO_RRC,
UE_NAS_TO_APP,
};
......
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