Commit 8748cc21 authored by aligungr's avatar aligungr

RRC developments

parent 80bf2caa
......@@ -145,7 +145,6 @@ struct NwGnbRrcToRls : NtsMessage
{
enum PR
{
RADIO_POWER_ON,
RRC_PDU_DELIVERY,
} present;
......
......@@ -8,6 +8,7 @@
#include "ctl_task.hpp"
#include <stdexcept>
#include <utils/common.hpp>
static constexpr const size_t MAX_PDU_COUNT = 4096;
......@@ -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)
{
if (ueId == 0 && pduId != 0)
{
// PDU ID must be not set in case of broadcast
throw std::runtime_error("");
}
if (pduId != 0)
{
if (m_pduMap.count(pduId))
......
......@@ -74,6 +74,22 @@ void GnbRlsTask::onLoop()
}
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:
m_logger->unhandledNts(msg);
break;
......
......@@ -182,6 +182,13 @@ void RlsUdpTask::initialize(NtsTask *ctlTask)
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))
{
// ignore the message
......
......@@ -16,7 +16,7 @@
#include <asn/rrc/ASN_RRC_DLInformationTransfer.h>
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
{
......@@ -64,7 +64,8 @@ void GnbRrcTask::onLoop()
switch (w->present)
{
case NwGnbNgapToRrc::RADIO_POWER_ON: {
m_base->rlsTask->push(new NwGnbRrcToRls(NwGnbRrcToRls::RADIO_POWER_ON));
m_isBarred = false;
triggerSysInfoBroadcast();
break;
}
case NwGnbNgapToRrc::NAS_DELIVERY: {
......
......@@ -46,8 +46,8 @@ class GnbRrcTask : public NtsTask
std::unordered_map<int, RrcUeContext *> m_ueCtx;
int m_tidCounter;
bool m_isBarred = false;
bool m_intraFreqReselectAllowed = false;
bool m_isBarred = true;
bool m_intraFreqReselectAllowed = true;
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