Commit 85da3bc4 authored by aligungr's avatar aligungr

RRC developments

parent aec9c136
......@@ -36,18 +36,12 @@ struct NwGnbRlsToRrc : NtsMessage
{
enum PR
{
RRC_PDU_DELIVERY,
SIGNAL_LOST
SIGNAL_DETECTED,
} present;
// RRC_PDU_DELIVERY
// SIGNAL_LOST
// SIGNAL_DETECTED
int ueId{};
// RRC_PDU_DELIVERY
rrc::RrcChannel channel{};
OctetString pdu{};
explicit NwGnbRlsToRrc(PR present) : NtsMessage(NtsMessageType::GNB_RLS_TO_RRC), present(present)
{
}
......
......@@ -8,6 +8,7 @@
#include "task.hpp"
#include <gnb/rrc/task.hpp>
#include <utils/common.hpp>
namespace nr::gnb
......@@ -44,7 +45,9 @@ void GnbRlsTask::onLoop()
switch (w->present)
{
case NwGnbRlsToRls::SIGNAL_DETECTED: {
m_logger->debug("new UE[%d] detected", w->ueId);
auto *m = new NwGnbRlsToRrc(NwGnbRlsToRrc::SIGNAL_DETECTED);
m->ueId = w->ueId;
m_base->rrcTask->push(m);
break;
}
case NwGnbRlsToRls::SIGNAL_LOST: {
......
//
// This file is a part of UERANSIM open source project.
// Copyright (c) 2021 ALİ GÜNGÖR.
//
// The software and all associated files are licensed under GPL-3.0
// and subject to the terms and conditions defined in LICENSE file.
//
#include "task.hpp"
#include <gnb/ngap/task.hpp>
#include <lib/rrc/encode.hpp>
namespace nr::gnb
{
void GnbRrcTask::handleRlsSapMessage(NwGnbRlsToRrc &msg)
{
switch (msg.present)
{
case NwGnbRlsToRrc::SIGNAL_DETECTED: {
m_logger->info("UE[%d] new signal detected", msg.ueId);
triggerSysInfoBroadcast();
break;
}
}
}
} // namespace nr::gnb
......@@ -46,18 +46,7 @@ void GnbRrcTask::onLoop()
switch (msg->msgType)
{
case NtsMessageType::GNB_RLS_TO_RRC: {
auto *w = dynamic_cast<NwGnbRlsToRrc *>(msg);
switch (w->present)
{
case NwGnbRlsToRrc::RRC_PDU_DELIVERY: {
handleUplinkRrc(w->ueId, w->channel, w->pdu);
break;
}
case NwGnbRlsToRrc::SIGNAL_LOST: {
handleRadioLinkFailure(w->ueId);
break;
}
}
handleRlsSapMessage(*dynamic_cast<NwGnbRlsToRrc *>(msg));
break;
}
case NtsMessageType::GNB_NGAP_TO_RRC: {
......
......@@ -101,6 +101,9 @@ class GnbRrcTask : public NtsTask
/* System Information Broadcast related */
void onBroadcastTimerExpired();
void triggerSysInfoBroadcast();
/* RLS Service Access Point */
void handleRlsSapMessage(NwGnbRlsToRrc &msg);
};
} // namespace nr::gnb
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