292 Ptr<SatSuperframeConf> superFrameConf)
294 NS_LOG_FUNCTION(
this);
297 Ptr<SatPhyRxCarrier> rxc(
nullptr);
298 bool isRandomAccessCarrier(
false);
303 for (uint32_t i = 0; i < carrierConf->GetCarrierCount(); ++i)
305 NS_LOG_INFO(
this <<
" Create carrier: " << i);
306 Ptr<SatWaveformConf> waveformConf =
307 superFrameConf->GetCarrierFrameConf(i)->GetWaveformConf();
311 switch (carrierConf->GetChannelType())
315 rxc = CreateObject<SatPhyRxCarrierUplink>(i, carrierConf, waveformConf,
false);
320 rxc = CreateObject<SatPhyRxCarrierPerSlot>(i, carrierConf, waveformConf,
false);
324 isRandomAccessCarrier = superFrameConf->IsRandomAccessCarrier(i);
327 rxc = CreateObject<SatPhyRxCarrierUplink>(i,
330 isRandomAccessCarrier);
334 isRandomAccessCarrier = superFrameConf->IsRandomAccessCarrier(i);
337 if (!isRandomAccessCarrier)
339 rxc = CreateObject<SatPhyRxCarrierPerSlot>(i, carrierConf, waveformConf,
false);
344 rxc = CreateObject<SatPhyRxCarrierPerSlot>(i, carrierConf, waveformConf,
true);
345 DynamicCast<SatPhyRxCarrierPerSlot>(rxc)->SetRandomAccessAllocationChannelId(
346 superFrameConf->GetRaChannel(i));
355 rxc = CreateObject<SatPhyRxCarrierPerFrame>(i, carrierConf, waveformConf,
true);
356 DynamicCast<SatPhyRxCarrierPerSlot>(rxc)->SetRandomAccessAllocationChannelId(
357 superFrameConf->GetRaChannel(i));
361 rxc = CreateObject<SatPhyRxCarrierMarsala>(i, carrierConf, waveformConf,
true);
362 DynamicCast<SatPhyRxCarrierPerSlot>(rxc)->SetRandomAccessAllocationChannelId(
363 superFrameConf->GetRaChannel(i));
368 CreateObject<SatPhyRxCarrierPerWindow>(i, carrierConf, waveformConf,
true);
369 DynamicCast<SatPhyRxCarrierPerSlot>(rxc)->SetRandomAccessAllocationChannelId(
370 superFrameConf->GetRaChannel(i));
376 NS_FATAL_ERROR(
"SatPhyRx::ConfigurePhyRxCarriers - Invalid channel type!");
384 switch (carrierConf->GetChannelType())
388 rxc = CreateObject<SatPhyRxCarrierPerSlot>(i, carrierConf, waveformConf,
false);
393 rxc = CreateObject<SatPhyRxCarrierPerSlot>(i, carrierConf, waveformConf,
false);
397 isRandomAccessCarrier = superFrameConf->IsRandomAccessCarrier(i);
400 if (!isRandomAccessCarrier)
402 rxc = CreateObject<SatPhyRxCarrierPerSlot>(i, carrierConf, waveformConf,
false);
407 rxc = CreateObject<SatPhyRxCarrierPerSlot>(i, carrierConf, waveformConf,
true);
408 DynamicCast<SatPhyRxCarrierPerSlot>(rxc)->SetRandomAccessAllocationChannelId(
409 superFrameConf->GetRaChannel(i));
418 rxc = CreateObject<SatPhyRxCarrierPerFrame>(i, carrierConf, waveformConf,
true);
419 DynamicCast<SatPhyRxCarrierPerSlot>(rxc)->SetRandomAccessAllocationChannelId(
420 superFrameConf->GetRaChannel(i));
424 rxc = CreateObject<SatPhyRxCarrierMarsala>(i, carrierConf, waveformConf,
true);
425 DynamicCast<SatPhyRxCarrierPerSlot>(rxc)->SetRandomAccessAllocationChannelId(
426 superFrameConf->GetRaChannel(i));
431 CreateObject<SatPhyRxCarrierPerWindow>(i, carrierConf, waveformConf,
true);
432 DynamicCast<SatPhyRxCarrierPerSlot>(rxc)->SetRandomAccessAllocationChannelId(
433 superFrameConf->GetRaChannel(i));
438 rxc = CreateObject<SatPhyRxCarrierPerSlot>(i, carrierConf, waveformConf,
false);
443 NS_FATAL_ERROR(
"SatPhyRx::ConfigurePhyRxCarriers - Invalid channel type!");
449 NS_FATAL_ERROR(
"SatPhyRx::ConfigurePhyRxCarriers - Unknown RX mode!");
452 NS_LOG_INFO(
this <<
" added carrier " << rxc <<
" on channel "
453 << carrierConf->GetChannelType() <<
" being random access "
454 << superFrameConf->IsRandomAccessCarrier(i));