NrMacSchedulerNs3Slicing::BeamSymbolMap
NrMacSchedulerOfdmaSlicing::AssignDLRBG (uint32_t symAvail, const ActiveUeMap &activeDl) const
{
NS_LOG_FUNCTION (this);
NS_LOG_DEBUG ("# beams active flows: " << activeDl.size () << ", # sym: " << symAvail);
GetFirst GetBeamId;
GetSecond GetUeVector;
BeamSymbolMap symPerBeam = GetSymPerBeam (symAvail, activeDl);
// Iterate through the different beams
for (const auto &el : activeDl)
{
// Distribute the RBG evenly among UEs of the same beam
uint32_t beamSym = symPerBeam.at (GetBeamId (el));
uint32_t rbgAssignable = 1 * beamSym;
std::vector<UePtrAndBufferReq> ueVector;
FTResources assigned (0,0);
const std::vector<uint8_t> dlNotchedRBGsMask = GetDlNotchedRbgMask ();
uint32_t resources = dlNotchedRBGsMask.size () > 0 ? std::count (dlNotchedRBGsMask.begin (),
dlNotchedRBGsMask.end (), 1) : GetBandwidthInRbg ();
NS_ASSERT (resources > 0);
for (const auto &ue : GetUeVector (el))
{
ueVector.emplace_back (ue);
}
for (auto & ue : ueVector)
{
BeforeDlSched (ue, FTResources (rbgAssignable * beamSym, beamSym));
}
// more code follows