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