Commit 31f77086 authored by aligungr's avatar aligungr

L3 RRC/NAS developments

parent 250f5738
......@@ -22,28 +22,42 @@ void UeRrcTask::performCellSelection()
if (m_state == ERrcState::RRC_CONNECTED)
return;
if (utils::CurrentTimeMillis() - m_startedTime <= 1000LL && m_cellDesc.empty())
return;
int lastCell = m_base->shCtx.currentCell.get<int>([](auto &value) { return value.cellId; });
CurrentCellInfo cellInfo;
CellSelectionReport report;
if (!lookForSuitableCell(cellInfo, report))
bool cellFound = false;
if (m_base->shCtx.selectedPlmn.get().hasValue())
{
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
cellFound = lookForSuitableCell(cellInfo, report);
if (!cellFound)
{
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");
}
}
}
if (!cellFound)
{
report = {};
if (!lookForAcceptableCell(cellInfo, report))
cellFound = lookForAcceptableCell(cellInfo, report);
if (!cellFound)
{
if (!m_cellDesc.empty())
{
......
......@@ -27,6 +27,8 @@ UeRrcTask::UeRrcTask(TaskBase *base) : m_base{base}
{
m_logger = base->logBase->makeUniqueLogger(base->config->getLoggerPrefix() + "rrc");
m_startedTime = utils::CurrentTimeMillis();
m_state = ERrcState::RRC_IDLE;
}
......
......@@ -50,14 +50,15 @@ class UeRrcTask : public NtsTask
private:
TaskBase *m_base;
std::unique_ptr<Logger> m_logger;
int64_t m_startedTime;
ERrcState m_state;
std::unordered_map<int, UeCellDesc> m_cellDesc{};
ERrcLastSetupRequest m_lastSetupReq{};
ASN_RRC_InitialUE_Identity_t m_initialId{};
OctetString m_initialNasPdu{};
std::unordered_map<int, UeCellDesc> m_cellDesc{};
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