Commit 31f77086 authored by aligungr's avatar aligungr

L3 RRC/NAS developments

parent 250f5738
......@@ -22,16 +22,24 @@ 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())
{
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, "
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);
......@@ -40,10 +48,16 @@ void UeRrcTask::performCellSelection()
{
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