Commit 4391f92c authored by aligungr's avatar aligungr

L3 RRC/NAS developments

parent 6416362c
......@@ -42,7 +42,7 @@ void NasMm::performPlmnSelection()
int64_t loggingThreshold = m_mmSubState == EMmSubState::MM_DEREGISTERED_PLMN_SEARCH ||
m_mmSubState == EMmSubState::MM_REGISTERED_PLMN_SEARCH
? 2'000LL
: 15'000LL;
: 30'000LL;
bool logFailures = currentTime - m_lastTimePlmnSearchFailureLogged >= loggingThreshold;
......
......@@ -22,11 +22,15 @@ void UeRrcTask::performCellSelection()
if (m_state == ERrcState::RRC_CONNECTED)
return;
if (utils::CurrentTimeMillis() - m_startedTime <= 1000LL && m_cellDesc.empty())
int64_t currentTime = utils::CurrentTimeMillis();
if (currentTime - m_startedTime <= 1000LL && m_cellDesc.empty())
return;
int lastCell = m_base->shCtx.currentCell.get<int>([](auto &value) { return value.cellId; });
bool shouldLogErrors = lastCell != 0 || (currentTime - m_lastTimePlmnSearchFailureLogged >= 30'000LL);
CurrentCellInfo cellInfo;
CellSelectionReport report;
......@@ -36,17 +40,22 @@ void UeRrcTask::performCellSelection()
cellFound = lookForSuitableCell(cellInfo, report);
if (!cellFound)
{
if (!m_cellDesc.empty())
{
m_logger->warn(
"Suitable cell selection failed in [%d] cells. [%d] out of PLMN, [%d] no SI, [%d] reserved, "
"[%d] barred, ftai [%d]",
static_cast<int>(m_cellDesc.size()), report.outOfPlmnCells, report.sib1MissingCells,
report.reservedCells, report.barredCells, report.forbiddenTaiCells);
}
else
if (shouldLogErrors)
{
m_logger->warn("Suitable cell selection failed, no cell is in coverage");
if (!m_cellDesc.empty())
{
m_logger->warn(
"Suitable cell selection failed in [%d] cells. [%d] out of PLMN, [%d] no SI, [%d] reserved, "
"[%d] barred, ftai [%d]",
static_cast<int>(m_cellDesc.size()), report.outOfPlmnCells, report.sib1MissingCells,
report.reservedCells, report.barredCells, report.forbiddenTaiCells);
}
else
{
m_logger->warn("Suitable cell selection failed, no cell is in coverage");
}
m_lastTimePlmnSearchFailureLogged = currentTime;
}
}
}
......@@ -59,19 +68,24 @@ void UeRrcTask::performCellSelection()
if (!cellFound)
{
if (!m_cellDesc.empty())
if (shouldLogErrors)
{
m_logger->warn(
"Acceptable cell selection failed in [%d] cells. [%d] no SI, [%d] reserved, [%d] barred, ftai [%d]",
static_cast<int>(m_cellDesc.size()), report.sib1MissingCells, report.reservedCells,
report.barredCells, report.forbiddenTaiCells);
if (!m_cellDesc.empty())
{
m_logger->warn("Acceptable cell selection failed in [%d] cells. [%d] no SI, [%d] reserved, [%d] "
"barred, ftai [%d]",
static_cast<int>(m_cellDesc.size()), report.sib1MissingCells, report.reservedCells,
report.barredCells, report.forbiddenTaiCells);
}
else
{
m_logger->warn("Acceptable cell selection failed, no cell is in coverage");
}
m_logger->err("Cell selection failure, no suitable or acceptable cell found");
m_lastTimePlmnSearchFailureLogged = currentTime;
}
else
{
m_logger->warn("Acceptable cell selection failed, no cell is in coverage");
}
m_logger->err("Cell selection failure, no suitable or acceptable cell found");
}
}
......
......@@ -59,6 +59,7 @@ class UeRrcTask : public NtsTask
ASN_RRC_InitialUE_Identity_t m_initialId{};
OctetString m_initialNasPdu{};
int64_t m_lastTimePlmnSearchFailureLogged{};
friend class UeCmdHandler;
......
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