Commit a5e5c48b authored by aligungr's avatar aligungr

RRC developments

parent 0fbbaa33
//
// 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::onBroadcastTimerExpired()
{
triggerSysInfoBroadcast();
}
void GnbRrcTask::triggerSysInfoBroadcast()
{
// TODO
}
} // namespace nr::gnb
\ No newline at end of file
......@@ -15,6 +15,9 @@
#include <asn/rrc/ASN_RRC_DLInformationTransfer-IEs.h>
#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;
namespace nr::gnb
{
......@@ -25,6 +28,7 @@ GnbRrcTask::GnbRrcTask(TaskBase *base) : m_base{base}, m_ueCtx{}, m_tidCounter{}
void GnbRrcTask::onStart()
{
setTimer(TIMER_ID_SI_BROADCAST, TIMER_PERIOD_SI_BROADCAST);
}
void GnbRrcTask::onQuit()
......@@ -77,6 +81,15 @@ void GnbRrcTask::onLoop()
}
break;
}
case NtsMessageType::TIMER_EXPIRED: {
auto *w = dynamic_cast<NwTimerExpired *>(msg);
if (w->timerId == TIMER_ID_SI_BROADCAST)
{
setTimer(TIMER_ID_SI_BROADCAST, TIMER_PERIOD_SI_BROADCAST);
onBroadcastTimerExpired();
}
break;
}
default:
m_logger->unhandledNts(msg);
break;
......
......@@ -90,6 +90,10 @@ class GnbRrcTask : public NtsTask
void receiveRrcMessage(int ueId, ASN_RRC_UL_CCCH_Message *msg);
void receiveRrcMessage(int ueId, ASN_RRC_UL_CCCH1_Message *msg);
void receiveRrcMessage(int ueId, ASN_RRC_UL_DCCH_Message *msg);
/* System Information Broadcast related */
void onBroadcastTimerExpired();
void triggerSysInfoBroadcast();
};
} // 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