Commit 1dfa1434 authored by aligungr's avatar aligungr

SRA dev.

parent 63ce8208
......@@ -195,7 +195,7 @@ void NgapTask::receiveNgSetupResponse(int amfId, ASN_NGAP_NGSetupResponse *msg)
update->isNgapUp = true;
m_base->appTask->push(update);
m_base->rrcTask->push(new NwGnbNgapToRrc(NwGnbNgapToRrc::NGAP_LAYER_INITIALIZED));
m_base->rrcTask->push(new NwGnbNgapToRrc(NwGnbNgapToRrc::RADIO_POWER_ON));
}
}
......
......@@ -48,6 +48,7 @@ struct NwGnbRrcToSra : NtsMessage
{
enum PR
{
RADIO_POWER_ON,
RRC_PDU_DELIVERY,
} present;
......@@ -65,7 +66,7 @@ struct NwGnbNgapToRrc : NtsMessage
{
enum PR
{
NGAP_LAYER_INITIALIZED,
RADIO_POWER_ON,
NAS_DELIVERY,
AN_RELEASE,
} present;
......
......@@ -10,6 +10,7 @@
#include <asn/rrc/ASN_RRC_DLInformationTransfer-IEs.h>
#include <asn/rrc/ASN_RRC_DLInformationTransfer.h>
#include <gnb/nts.hpp>
#include <gnb/sra/task.hpp>
#include <rrc/encode.hpp>
namespace nr::gnb
......@@ -56,8 +57,8 @@ void GnbRrcTask::onLoop()
auto *w = dynamic_cast<NwGnbNgapToRrc *>(msg);
switch (w->present)
{
case NwGnbNgapToRrc::NGAP_LAYER_INITIALIZED: {
//m_base->mrTask->push(new NwGnbRrcToMr(NwGnbRrcToMr::NGAP_LAYER_INITIALIZED));
case NwGnbNgapToRrc::RADIO_POWER_ON: {
m_base->sraTask->push(new NwGnbRrcToSra(NwGnbRrcToSra::RADIO_POWER_ON));
break;
}
case NwGnbNgapToRrc::NAS_DELIVERY: {
......
......@@ -60,6 +60,10 @@ void GnbSraTask::onLoop()
OctetString::FromOctet4(static_cast<int>(w->channel)));
break;
}
case NwGnbRrcToSra::RADIO_POWER_ON: {
m_powerOn = true;
break;
}
}
break;
}
......
......@@ -29,6 +29,7 @@ class GnbSraTask : public NtsTask
std::unique_ptr<Logger> m_logger;
udp::UdpServerTask *m_udpTask;
bool m_powerOn;
uint64_t m_sti;
std::unordered_map<int, std::unique_ptr<SraUeContext>> m_ueCtx;
std::unordered_map<uint64_t, int> m_stiToUeId;
......
......@@ -13,6 +13,12 @@ namespace nr::gnb
void GnbSraTask::receiveSraMessage(const InetAddress &addr, sra::SraMessage &msg)
{
if (!m_powerOn)
{
// ignore received SRA message
return;
}
int ueId = updateUeInfo(addr, msg.sti);
switch (msg.msgType)
......
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