Commit 26a8e3d0 authored by aligungr's avatar aligungr

RRC developments

parent 5d3bd102
...@@ -38,6 +38,8 @@ void UeRrcTask::notifyCellDetected(int cellId, int dbm) ...@@ -38,6 +38,8 @@ void UeRrcTask::notifyCellDetected(int cellId, int dbm)
m_logger->debug("New signal detected for cell[%d], total [%d] cells in coverage", cellId, m_logger->debug("New signal detected for cell[%d], total [%d] cells in coverage", cellId,
static_cast<int>(m_cellDesc.size())); static_cast<int>(m_cellDesc.size()));
updateAvailablePlmns();
} }
void UeRrcTask::notifyCellLost(int cellId) void UeRrcTask::notifyCellLost(int cellId)
...@@ -50,6 +52,8 @@ void UeRrcTask::notifyCellLost(int cellId) ...@@ -50,6 +52,8 @@ void UeRrcTask::notifyCellLost(int cellId)
m_logger->debug("Signal lost for cell[%d], total [%d] cells in coverage", cellId, m_logger->debug("Signal lost for cell[%d], total [%d] cells in coverage", cellId,
static_cast<int>(m_cellDesc.size())); static_cast<int>(m_cellDesc.size()));
updateAvailablePlmns();
// TODO: handle other operations // TODO: handle other operations
} }
...@@ -58,4 +62,9 @@ bool UeRrcTask::hasSignalToCell(int cellId) ...@@ -58,4 +62,9 @@ bool UeRrcTask::hasSignalToCell(int cellId)
return m_cellDesc.count(cellId); return m_cellDesc.count(cellId);
} }
void UeRrcTask::updateAvailablePlmns()
{
// TODO
}
} // namespace nr::ue } // namespace nr::ue
...@@ -28,6 +28,8 @@ void UeRrcTask::receiveMib(int cellId, const ASN_RRC_MIB &msg) ...@@ -28,6 +28,8 @@ void UeRrcTask::receiveMib(int cellId, const ASN_RRC_MIB &msg)
desc.mib.isBarred = msg.cellBarred == ASN_RRC_MIB__cellBarred_barred; desc.mib.isBarred = msg.cellBarred == ASN_RRC_MIB__cellBarred_barred;
desc.mib.isIntraFreqReselectAllowed = msg.intraFreqReselection == ASN_RRC_MIB__intraFreqReselection_allowed; desc.mib.isIntraFreqReselectAllowed = msg.intraFreqReselection == ASN_RRC_MIB__intraFreqReselection_allowed;
updateAvailablePlmns();
} }
void UeRrcTask::receiveSib1(int cellId, const ASN_RRC_SIB1 &msg) void UeRrcTask::receiveSib1(int cellId, const ASN_RRC_SIB1 &msg)
...@@ -57,6 +59,8 @@ void UeRrcTask::receiveSib1(int cellId, const ASN_RRC_SIB1 &msg) ...@@ -57,6 +59,8 @@ void UeRrcTask::receiveSib1(int cellId, const ASN_RRC_SIB1 &msg)
desc.sib1.aiBarringSet.ai11 = bits::BitAt<4>(barringBits); desc.sib1.aiBarringSet.ai11 = bits::BitAt<4>(barringBits);
desc.sib1.aiBarringSet.ai2 = bits::BitAt<5>(barringBits); desc.sib1.aiBarringSet.ai2 = bits::BitAt<5>(barringBits);
desc.sib1.aiBarringSet.ai1 = bits::BitAt<6>(barringBits); desc.sib1.aiBarringSet.ai1 = bits::BitAt<6>(barringBits);
updateAvailablePlmns();
} }
} // namespace nr::ue } // namespace nr::ue
\ No newline at end of file
...@@ -102,6 +102,7 @@ class UeRrcTask : public NtsTask ...@@ -102,6 +102,7 @@ class UeRrcTask : public NtsTask
void notifyCellDetected(int cellId, int dbm); void notifyCellDetected(int cellId, int dbm);
void notifyCellLost(int cellId); void notifyCellLost(int cellId);
bool hasSignalToCell(int cellId); bool hasSignalToCell(int cellId);
void updateAvailablePlmns();
/* System Information */ /* System Information */
void receiveMib(int cellId, const ASN_RRC_MIB &msg); void receiveMib(int cellId, const ASN_RRC_MIB &msg);
......
...@@ -9,11 +9,13 @@ ...@@ -9,11 +9,13 @@
#pragma once #pragma once
#include <array> #include <array>
#include <atomic>
#include <memory>
#include <lib/app/monitor.hpp> #include <lib/app/monitor.hpp>
#include <lib/app/ue_ctl.hpp> #include <lib/app/ue_ctl.hpp>
#include <lib/nas/nas.hpp> #include <lib/nas/nas.hpp>
#include <lib/nas/timer.hpp> #include <lib/nas/timer.hpp>
#include <memory>
#include <utils/common_types.hpp> #include <utils/common_types.hpp>
#include <utils/json.hpp> #include <utils/json.hpp>
#include <utils/logger.hpp> #include <utils/logger.hpp>
...@@ -134,6 +136,11 @@ struct UeConfig ...@@ -134,6 +136,11 @@ struct UeConfig
} }
}; };
struct UeSharedContext
{
std::array<std::atomic<Plmn>, 16> availablePlmns{};
};
struct TaskBase struct TaskBase
{ {
UserEquipment *ue{}; UserEquipment *ue{};
...@@ -143,6 +150,8 @@ struct TaskBase ...@@ -143,6 +150,8 @@ struct TaskBase
app::INodeListener *nodeListener{}; app::INodeListener *nodeListener{};
NtsTask *cliCallbackTask{}; NtsTask *cliCallbackTask{};
UeSharedContext shCtx{};
UeAppTask *appTask{}; UeAppTask *appTask{};
NasTask *nasTask{}; NasTask *nasTask{};
UeRrcTask *rrcTask{}; UeRrcTask *rrcTask{};
......
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