Commit 8748cc21 authored by aligungr's avatar aligungr

RRC developments

parent 80bf2caa
...@@ -145,7 +145,6 @@ struct NwGnbRrcToRls : NtsMessage ...@@ -145,7 +145,6 @@ struct NwGnbRrcToRls : NtsMessage
{ {
enum PR enum PR
{ {
RADIO_POWER_ON,
RRC_PDU_DELIVERY, RRC_PDU_DELIVERY,
} present; } present;
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include "ctl_task.hpp" #include "ctl_task.hpp"
#include <stdexcept>
#include <utils/common.hpp> #include <utils/common.hpp>
static constexpr const size_t MAX_PDU_COUNT = 4096; static constexpr const size_t MAX_PDU_COUNT = 4096;
...@@ -156,6 +157,12 @@ void RlsControlTask::handleRlsMessage(int ueId, rls::RlsMessage &msg) ...@@ -156,6 +157,12 @@ void RlsControlTask::handleRlsMessage(int ueId, rls::RlsMessage &msg)
void RlsControlTask::handleDownlinkRrcDelivery(int ueId, uint32_t pduId, rrc::RrcChannel channel, OctetString &&data) void RlsControlTask::handleDownlinkRrcDelivery(int ueId, uint32_t pduId, rrc::RrcChannel channel, OctetString &&data)
{ {
if (ueId == 0 && pduId != 0)
{
// PDU ID must be not set in case of broadcast
throw std::runtime_error("");
}
if (pduId != 0) if (pduId != 0)
{ {
if (m_pduMap.count(pduId)) if (m_pduMap.count(pduId))
......
...@@ -74,6 +74,22 @@ void GnbRlsTask::onLoop() ...@@ -74,6 +74,22 @@ void GnbRlsTask::onLoop()
} }
break; break;
} }
case NtsMessageType::GNB_RRC_TO_RLS: {
auto *w = dynamic_cast<NwGnbRrcToRls *>(msg);
switch (w->present)
{
case NwGnbRrcToRls::RRC_PDU_DELIVERY: {
auto *m = new NwGnbRlsToRls(NwGnbRlsToRls::DOWNLINK_RRC);
m->ueId = w->ueId;
m->rrcChannel = w->channel;
m->pduId = 0;
m->data = std::move(w->pdu);
m_ctlTask->push(m);
break;
}
}
break;
}
default: default:
m_logger->unhandledNts(msg); m_logger->unhandledNts(msg);
break; break;
......
...@@ -182,6 +182,13 @@ void RlsUdpTask::initialize(NtsTask *ctlTask) ...@@ -182,6 +182,13 @@ void RlsUdpTask::initialize(NtsTask *ctlTask)
void RlsUdpTask::send(int ueId, const rls::RlsMessage &msg) void RlsUdpTask::send(int ueId, const rls::RlsMessage &msg)
{ {
if (ueId == 0)
{
for (auto &ue : m_ueMap)
send(ue.first, msg);
return;
}
if (!m_ueMap.count(ueId)) if (!m_ueMap.count(ueId))
{ {
// ignore the message // ignore the message
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#include <asn/rrc/ASN_RRC_DLInformationTransfer.h> #include <asn/rrc/ASN_RRC_DLInformationTransfer.h>
static constexpr const int TIMER_ID_SI_BROADCAST = 1; static constexpr const int TIMER_ID_SI_BROADCAST = 1;
static constexpr const int TIMER_PERIOD_SI_BROADCAST = 5000; static constexpr const int TIMER_PERIOD_SI_BROADCAST = 10'000;
namespace nr::gnb namespace nr::gnb
{ {
...@@ -64,7 +64,8 @@ void GnbRrcTask::onLoop() ...@@ -64,7 +64,8 @@ void GnbRrcTask::onLoop()
switch (w->present) switch (w->present)
{ {
case NwGnbNgapToRrc::RADIO_POWER_ON: { case NwGnbNgapToRrc::RADIO_POWER_ON: {
m_base->rlsTask->push(new NwGnbRrcToRls(NwGnbRrcToRls::RADIO_POWER_ON)); m_isBarred = false;
triggerSysInfoBroadcast();
break; break;
} }
case NwGnbNgapToRrc::NAS_DELIVERY: { case NwGnbNgapToRrc::NAS_DELIVERY: {
......
...@@ -46,8 +46,8 @@ class GnbRrcTask : public NtsTask ...@@ -46,8 +46,8 @@ class GnbRrcTask : public NtsTask
std::unordered_map<int, RrcUeContext *> m_ueCtx; std::unordered_map<int, RrcUeContext *> m_ueCtx;
int m_tidCounter; int m_tidCounter;
bool m_isBarred = false; bool m_isBarred = true;
bool m_intraFreqReselectAllowed = false; bool m_intraFreqReselectAllowed = true;
friend class GnbCmdHandler; friend class GnbCmdHandler;
......
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