void
NrHelper::AttachToEnb(const Ptr<NetDevice>& ueDevice, const Ptr<NetDevice>& gnbDevice)
{
Ptr<NrGnbNetDevice> enbNetDev = gnbDevice->GetObject<NrGnbNetDevice>();
Ptr<NrUeNetDevice> ueNetDev = ueDevice->GetObject<NrUeNetDevice>();
NS_ABORT_IF(enbNetDev == nullptr || ueNetDev == nullptr);
for (uint32_t i = 0; i < enbNetDev->GetCcMapSize(); ++i)
{
enbNetDev->GetPhy(i)->RegisterUe(ueNetDev->GetImsi(), ueNetDev);
ueNetDev->GetPhy(i)->RegisterToEnb(enbNetDev->GetBwpId(i));
ueNetDev->GetPhy(i)->SetDlAmc(
DynamicCast<NrMacSchedulerNs3>(enbNetDev->GetScheduler(i))->GetDlAmc());
ueNetDev->GetPhy(i)->SetDlCtrlSyms(enbNetDev->GetMac(i)->GetDlCtrlSyms());
ueNetDev->GetPhy(i)->SetUlCtrlSyms(enbNetDev->GetMac(i)->GetUlCtrlSyms());
ueNetDev->GetPhy(i)->SetNumRbPerRbg(enbNetDev->GetMac(i)->GetNumRbPerRbg());
ueNetDev->GetPhy(i)->SetRbOverhead(enbNetDev->GetPhy(i)->GetRbOverhead());
ueNetDev->GetPhy(i)->SetSymbolsPerSlot(enbNetDev->GetPhy(i)->GetSymbolsPerSlot());
ueNetDev->GetPhy(i)->SetNumerology(enbNetDev->GetPhy(i)->GetNumerology());
ueNetDev->GetPhy(i)->SetPattern(enbNetDev->GetPhy(i)->GetPattern());
Ptr<EpcUeNas> ueNas = ueNetDev->GetNas();
ueNas->Connect(enbNetDev->GetBwpId(i), enbNetDev->GetEarfcn(i));
if (m_enableMimoFeedback)
{
// Initialize parameters for MIMO precoding matrix search (PMI feedback)
auto pmSearch = m_pmSearchFactory.Create<NrPmSearch>();
ueNetDev->GetPhy(i)->SetPmSearch(pmSearch);
auto gnbAnt =
enbNetDev->GetPhy(i)->GetSpectrumPhy()->GetAntenna()->GetObject<PhasedArrayModel>();
auto ueAnt =
ueNetDev->GetPhy(i)->GetSpectrumPhy()->GetAntenna()->GetObject<PhasedArrayModel>();
pmSearch->SetGnbParams(gnbAnt->IsDualPol(),
gnbAnt->GetNumHorizontalPorts(),
gnbAnt->GetNumVerticalPorts());
pmSearch->SetUeParams(ueAnt->GetNumPorts());
pmSearch->InitCodebooks();
}
}
if (m_epcHelper)
{
// activate default EPS bearer
m_epcHelper->ActivateEpsBearer(ueDevice,
ueNetDev->GetImsi(),
EpcTft::Default(),
EpsBearer(EpsBearer::NGBR_VIDEO_TCP_DEFAULT));
}
// tricks needed for the simplified LTE-only simulations
// if (m_epcHelper == 0)
//{
ueNetDev->SetTargetEnb(enbNetDev);
//}
if (m_beamformingHelper)
{
m_beamformingHelper->AddBeamformingTask(enbNetDev, ueNetDev);
}
}
so whatever already implimented in the nr module , beamforming is done between ue and gnb as you cab see
, and what i want is between two gnb so i think i have to add that functionality as well.