Commit eea0f10f authored by aligungr's avatar aligungr

PLMN search response improvements

parent 8a91c817
......@@ -44,6 +44,20 @@ void UeRlsTask::onMeasurement()
rls::RlsCellInfoRequest req{m_sti};
sendRlsMessage(ip, req);
}
// Send PLMN search response to the RRC if it is requested
if (m_pendingPlmnResponse)
{
m_pendingPlmnResponse = false;
std::vector<UeCellMeasurement> measurements{};
for (auto &m : m_activeMeasurements)
measurements.push_back(m.second);
auto *w = new NwUeRlsToRrc(NwUeRlsToRrc::PLMN_SEARCH_RESPONSE);
w->measurements = std::move(measurements);
m_base->rrcTask->push(w);
}
}
void UeRlsTask::receiveCellInfoResponse(const rls::RlsCellInfoResponse &msg)
......@@ -77,13 +91,7 @@ void UeRlsTask::onCoverageChange(const std::vector<GlobalNci> &entered, const st
void UeRlsTask::plmnSearchRequested()
{
std::vector<UeCellMeasurement> measurements{};
for (auto &m : m_activeMeasurements)
measurements.push_back(m.second);
auto *w = new NwUeRlsToRrc(NwUeRlsToRrc::PLMN_SEARCH_RESPONSE);
w->measurements = std::move(measurements);
m_base->rrcTask->push(w);
m_pendingPlmnResponse = true;
}
void UeRlsTask::handleCellSelectionCommand(const GlobalNci &cellId, bool isSuitable)
......
......@@ -18,7 +18,8 @@ namespace nr::ue
{
UeRlsTask::UeRlsTask(TaskBase *base)
: m_base{base}, m_udpTask{}, m_cellSearchSpace{}, m_pendingMeasurements{}, m_activeMeasurements{}, m_servingCell{}
: m_base{base}, m_udpTask{}, m_cellSearchSpace{}, m_pendingMeasurements{}, m_activeMeasurements{},
m_pendingPlmnResponse{}, m_servingCell{}
{
m_logger = m_base->logBase->makeUniqueLogger(m_base->config->getLoggerPrefix() + "rls");
......
......@@ -34,6 +34,7 @@ class UeRlsTask : public NtsTask
std::vector<InetAddress> m_cellSearchSpace;
std::unordered_map<GlobalNci, UeCellMeasurement> m_pendingMeasurements;
std::unordered_map<GlobalNci, UeCellMeasurement> m_activeMeasurements;
bool m_pendingPlmnResponse;
uint64_t m_sti;
std::optional<UeCellInfo> m_servingCell;
......
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