Commit 739be8b1 authored by aligungr's avatar aligungr

RLS improvements

parent 79d9171f
//
// 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 "ctl_task.hpp"
namespace nr::gnb
{
RlsControlTask::RlsControlTask(TaskBase *base) : m_udpTask{}
{
m_logger = base->logBase->makeUniqueLogger("rls-ctl");
}
void RlsControlTask::initialize(RlsUdpTask *udpTask)
{
m_udpTask = udpTask;
}
void RlsControlTask::onStart()
{
}
void RlsControlTask::onLoop()
{
NtsMessage *msg = take();
if (!msg)
return;
switch (msg->msgType)
{
case NtsMessageType::GNB_RLS_TO_RLS: {
auto *w = dynamic_cast<NwGnbRlsToRls *>(msg);
switch (w->present)
{
case NwGnbRlsToRls::SIGNAL_DETECTED:
// TODO
break;
case NwGnbRlsToRls::SIGNAL_LOST:
// TODO
break;
case NwGnbRlsToRls::RECEIVE_RLS_MESSAGE:
// TODO
break;
default:
m_logger->unhandledNts(msg);
break;
}
break;
}
default:
m_logger->unhandledNts(msg);
break;
}
delete msg;
}
void RlsControlTask::onQuit()
{
}
} // namespace nr::gnb
//
// 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.
//
#pragma once
#include "udp_task.hpp"
#include <gnb/nts.hpp>
#include <gnb/types.hpp>
#include <utils/nts.hpp>
namespace nr::gnb
{
class RlsControlTask : public NtsTask
{
private:
std::unique_ptr<Logger> m_logger;
RlsUdpTask *m_udpTask;
public:
explicit RlsControlTask(TaskBase *base);
~RlsControlTask() override = default;
protected:
void onStart() override;
void onLoop() override;
void onQuit() override;
public:
void initialize(RlsUdpTask *udpTask);
};
} // namespace nr::ue
\ No newline at end of file
...@@ -44,7 +44,7 @@ namespace nr::gnb ...@@ -44,7 +44,7 @@ namespace nr::gnb
RlsUdpTask::RlsUdpTask(TaskBase *base, uint64_t sti, Vector3 phyLocation) RlsUdpTask::RlsUdpTask(TaskBase *base, uint64_t sti, Vector3 phyLocation)
: m_ctlTask{}, m_sti{sti}, m_phyLocation{phyLocation}, m_lastLoop{}, m_stiToUe{}, m_ueMap{}, m_newIdCounter{} : m_ctlTask{}, m_sti{sti}, m_phyLocation{phyLocation}, m_lastLoop{}, m_stiToUe{}, m_ueMap{}, m_newIdCounter{}
{ {
m_logger = base->logBase->makeUniqueLogger("rls"); m_logger = base->logBase->makeUniqueLogger("rls-udp");
try try
{ {
......
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