29 #include <ns3/address.h>
30 #include <ns3/cbr-helper.h>
31 #include <ns3/config-store.h>
32 #include <ns3/config.h>
35 #include <ns3/nrtv-helper.h>
36 #include <ns3/packet-sink-helper.h>
37 #include <ns3/packet-sink.h>
38 #include <ns3/pointer.h>
39 #include <ns3/random-variable-stream.h>
40 #include <ns3/satellite-env-variables.h>
41 #include <ns3/satellite-topology.h>
42 #include <ns3/singleton.h>
43 #include <ns3/string.h>
44 #include <ns3/three-gpp-http-satellite-helper.h>
45 #include <ns3/uinteger.h>
55 NS_LOG_COMPONENT_DEFINE(
"SimulationHelper");
60 NS_OBJECT_ENSURE_REGISTERED(SimulationHelperConf);
66 TypeId(
"ns3::SimulationHelperConf")
68 .AddConstructor<SimulationHelperConf>()
69 .AddAttribute(
"SimTime",
71 TimeValue(Seconds(100)),
73 MakeTimeChecker(Seconds(1)))
74 .AddAttribute(
"BeamsIDs",
76 StringValue(
"10 11 12 23 24 25"),
79 .AddAttribute(
"UserCountPerUt",
80 "Amount of user per User Terminal",
81 StringValue(
"ns3::ConstantRandomVariable[Constant=1]"),
83 MakePointerChecker<RandomVariableStream>())
84 .AddAttribute(
"UserCountPerMobileUt",
85 "Amount of user per mobile User Terminal",
86 StringValue(
"ns3::ConstantRandomVariable[Constant=1]"),
88 MakePointerChecker<RandomVariableStream>())
89 .AddAttribute(
"UtCountPerBeam",
90 "Amount of User Terminal associated to each Beam",
91 StringValue(
"ns3::ConstantRandomVariable[Constant=1]"),
93 MakePointerChecker<RandomVariableStream>())
94 .AddAttribute(
"ActivateStatistics",
95 "Enable outputing values from stats helpers",
99 .AddAttribute(
"ActivateProgressLogs",
100 "Enable outputing progress of the simulation",
103 MakeBooleanChecker())
104 .AddAttribute(
"MobileUtsFolder",
105 "Select the folder where mobile UTs traces should be found",
106 StringValue(Singleton<SatEnvVariables>::Get()->LocateDataDirectory() +
107 "/utpositions/mobiles/"),
109 MakeStringChecker());
117 NS_LOG_FUNCTION(
this);
127 m_utMobileUserCount(0),
128 m_activateStatistics(false),
129 m_activateProgressLogging(false)
131 NS_LOG_FUNCTION(
this);
136 NS_LOG_FUNCTION(
this);
145 TypeId(
"ns3::SimulationHelper").SetParent<Object>().AddConstructor<SimulationHelper>();
152 NS_LOG_FUNCTION(
this);
158 : m_satHelper(nullptr),
159 m_statContainer(nullptr),
160 m_commonUtPositions(),
161 m_utPositionsByBeam(),
163 m_simulationName(
""),
164 m_enabledBeamsStr(
""),
169 m_utMobileUserCount(0),
171 m_numberOfConfiguredFrames(0),
172 m_randomAccessConfigured(false),
173 m_inputFileUtListPositions(
""),
174 m_inputFileUtPositionsCheckBeams(true),
175 m_progressLoggingEnabled(false),
176 m_progressUpdateInterval(Seconds(0.5))
179 "SimulationHelper: Default constructor not in use. Please create with simulation name. ");
183 : m_satHelper(nullptr),
184 m_statContainer(nullptr),
185 m_commonUtPositions(),
186 m_utPositionsByBeam(),
187 m_simulationName(
""),
188 m_enabledBeamsStr(
""),
193 m_utMobileUserCount(0),
195 m_numberOfConfiguredFrames(0),
196 m_randomAccessConfigured(false),
197 m_inputFileUtListPositions(
""),
198 m_inputFileUtPositionsCheckBeams(true),
199 m_progressLoggingEnabled(false),
200 m_progressUpdateInterval(Seconds(0.5))
202 NS_LOG_FUNCTION(
this);
204 ObjectBase::ConstructSelf(AttributeConstructionList());
207 Config::SetDefault(
"ns3::SatEnvVariables::SimulationCampaignName",
209 Config::SetDefault(
"ns3::SatEnvVariables::EnableSimulationOutputOverwrite", BooleanValue(
true));
212 Config::SetDefault(
"ns3::SatSuperframeConf0::FrameConfigType", StringValue(
"ConfigType_2"));
213 Config::SetDefault(
"ns3::SatWaveformConf::AcmEnabled", BooleanValue(
true));
216 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService3_ConstantAssignmentProvided",
217 BooleanValue(
false));
218 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService3_RbdcAllowed", BooleanValue(
true));
219 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService3_MinimumServiceRate",
221 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService3_VolumeAllowed",
222 BooleanValue(
false));
227 NS_LOG_FUNCTION(
this);
233 NS_LOG_FUNCTION(
this);
242 NS_LOG_FUNCTION(
this << count);
244 Ptr<RandomVariableStream> utCount = CreateObject<ConstantRandomVariable>();
245 utCount->SetAttribute(
"Constant", DoubleValue(count));
247 m_utCount.insert(std::make_pair(0, utCount));
253 NS_LOG_FUNCTION(
this << &rs);
261 NS_LOG_FUNCTION(
this << beamId << count);
263 Ptr<RandomVariableStream> utCount = CreateObject<ConstantRandomVariable>();
264 utCount->SetAttribute(
"Constant", DoubleValue(count));
266 m_utCount.insert(std::make_pair(beamId, utCount));
272 NS_LOG_FUNCTION(
this << &rs);
274 m_utCount.insert(std::make_pair(beamId, rs));
280 NS_LOG_FUNCTION(
this << count);
289 NS_LOG_FUNCTION(
this << &rs);
297 NS_LOG_FUNCTION(
this << count);
306 NS_LOG_FUNCTION(
this << &rs);
314 NS_LOG_FUNCTION(
this << gwUserCount);
316 Config::SetDefault(
"ns3::SatHelper::GwUsers", UintegerValue(gwUserCount));
322 NS_LOG_FUNCTION(
this << seconds);
330 NS_LOG_FUNCTION(
this << tag);
339 NS_LOG_FUNCTION(
this << path);
348 NS_LOG_FUNCTION(
this);
351 cmd.AddValue(
"InputXml",
"Input attributes in XML file", xmlInputFile);
357 NS_LOG_FUNCTION(
this);
360 cmd.AddValue(
"OutputPath",
"Output path for storing the simulation statistics",
m_outputPath);
366 NS_LOG_FUNCTION(
this);
371 Config::SetDefault(
"ns3::SatConf::SuperFrameConfForSeq0", StringValue(
"Configuration_0"));
372 Config::SetDefault(
"ns3::SatSuperframeConf0::FrameConfigType", StringValue(
"ConfigType_2"));
373 Config::SetDefault(
"ns3::SatSuperframeSeq::TargetDuration", TimeValue(MilliSeconds(100)));
375 Config::SetDefault(
"ns3::SatRequestManager::EvaluationInterval", TimeValue(MilliSeconds(100)));
376 Config::SetDefault(
"ns3::SatRequestManager::EnableOnDemandEvaluation", BooleanValue(
false));
378 Config::SetDefault(
"ns3::SatBbFrameConf::BBFrameUsageMode", StringValue(
"NormalFrames"));
395 Config::SetDefault(
"ns3::SatUtHelper::EnableChannelEstimationError", BooleanValue(
true));
396 Config::SetDefault(
"ns3::SatGwHelper::EnableChannelEstimationError", BooleanValue(
true));
398 Config::SetDefault(
"ns3::SatFwdLinkScheduler::DummyFrameSendingEnabled", BooleanValue(
false));
400 Config::SetDefault(
"ns3::SatQueue::MaxPackets", UintegerValue(10000));
406 NS_LOG_FUNCTION(
this);
408 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaServiceCount", UintegerValue(4));
409 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService0_ConstantAssignmentProvided",
410 BooleanValue(
false));
411 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService0_RbdcAllowed",
412 BooleanValue(
false));
413 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService0_VolumeAllowed",
414 BooleanValue(
false));
415 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService1_ConstantAssignmentProvided",
416 BooleanValue(
false));
417 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService1_RbdcAllowed",
418 BooleanValue(
false));
419 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService1_VolumeAllowed",
420 BooleanValue(
false));
421 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService2_ConstantAssignmentProvided",
422 BooleanValue(
false));
423 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService2_RbdcAllowed",
424 BooleanValue(
false));
425 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService2_VolumeAllowed",
426 BooleanValue(
false));
427 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService3_ConstantAssignmentProvided",
428 BooleanValue(
false));
429 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService3_RbdcAllowed",
430 BooleanValue(
false));
431 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService3_VolumeAllowed",
432 BooleanValue(
false));
438 NS_LOG_FUNCTION(
this << rcIndex << rateKbps);
440 std::stringstream ss;
442 std::string attributeDefault(
"ns3::SatLowerLayerServiceConf::DaService" + ss.str());
444 Config::SetDefault(attributeDefault +
"_ConstantAssignmentProvided", BooleanValue(
true));
445 Config::SetDefault(attributeDefault +
"_RbdcAllowed", BooleanValue(
false));
446 Config::SetDefault(attributeDefault +
"_VolumeAllowed", BooleanValue(
false));
452 NS_LOG_FUNCTION(
this << rcIndex);
454 std::stringstream ss;
456 std::string attributeDefault(
"ns3::SatLowerLayerServiceConf::DaService" + ss.str());
458 Config::SetDefault(attributeDefault +
"_ConstantAssignmentProvided", BooleanValue(
false));
459 Config::SetDefault(attributeDefault +
"_RbdcAllowed", BooleanValue(
true));
460 Config::SetDefault(attributeDefault +
"_VolumeAllowed", BooleanValue(
false));
462 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DynamicRatePersistence", UintegerValue(10));
468 NS_LOG_FUNCTION(
this << rcIndex);
470 std::stringstream ss;
472 std::string attributeDefault(
"ns3::SatLowerLayerServiceConf::DaService" + ss.str());
474 Config::SetDefault(attributeDefault +
"_ConstantAssignmentProvided", BooleanValue(
false));
475 Config::SetDefault(attributeDefault +
"_RbdcAllowed", BooleanValue(
false));
476 Config::SetDefault(attributeDefault +
"_VolumeAllowed", BooleanValue(
true));
478 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::VolumeBacklogPersistence",
485 NS_LOG_FUNCTION(
this);
487 Config::SetDefault(
"ns3::SatSuperframeAllocator::FcaEnabled", BooleanValue(
true));
493 NS_LOG_FUNCTION(
this);
495 Config::SetDefault(
"ns3::SatSuperframeAllocator::FcaEnabled", BooleanValue(
false));
501 NS_LOG_FUNCTION(
this << periodicity.GetSeconds());
504 Config::SetDefault(
"ns3::SatBeamScheduler::ControlSlotsEnabled", BooleanValue(
true));
505 Config::SetDefault(
"ns3::SatBeamScheduler::ControlSlotInterval", TimeValue(periodicity));
511 NS_LOG_FUNCTION(
this << dir);
516 Config::SetDefault(
"ns3::SatLlc::FwdLinkArqEnabled", BooleanValue(
true));
518 Config::SetDefault(
"ns3::SatGenericStreamEncapsulatorArq::MaxNoOfRetransmissions",
520 Config::SetDefault(
"ns3::SatGenericStreamEncapsulatorArq::RetransmissionTimer",
521 TimeValue(MilliSeconds(600)));
522 Config::SetDefault(
"ns3::SatGenericStreamEncapsulatorArq::WindowSize", UintegerValue(10));
523 Config::SetDefault(
"ns3::SatGenericStreamEncapsulatorArq::ArqHeaderSize", UintegerValue(1));
524 Config::SetDefault(
"ns3::SatGenericStreamEncapsulatorArq::RxWaitingTime",
525 TimeValue(Seconds(1.8)));
529 Config::SetDefault(
"ns3::SatLlc::RtnLinkArqEnabled", BooleanValue(
true));
531 Config::SetDefault(
"ns3::SatReturnLinkEncapsulatorArq::MaxRtnArqSegmentSize",
533 Config::SetDefault(
"ns3::SatReturnLinkEncapsulatorArq::MaxNoOfRetransmissions",
535 Config::SetDefault(
"ns3::SatReturnLinkEncapsulatorArq::RetransmissionTimer",
536 TimeValue(MilliSeconds(600)));
537 Config::SetDefault(
"ns3::SatReturnLinkEncapsulatorArq::WindowSize", UintegerValue(10));
538 Config::SetDefault(
"ns3::SatReturnLinkEncapsulatorArq::ArqHeaderSize", UintegerValue(1));
539 Config::SetDefault(
"ns3::SatReturnLinkEncapsulatorArq::RxWaitingTime",
540 TimeValue(Seconds(1.8)));
544 NS_FATAL_ERROR(
"Unsupported SatLinkDir_t!");
554 Config::SetDefault(
"ns3::SatBeamHelper::RaInterferenceModel",
556 Config::SetDefault(
"ns3::SatBeamHelper::RaInterferenceEliminationModel",
558 Config::SetDefault(
"ns3::SatBeamHelper::RaCollisionModel",
560 Config::SetDefault(
"ns3::SatPhyRxCarrierConf::EnableRandomAccessDynamicLoadControl",
561 BooleanValue(
false));
567 NS_LOG_FUNCTION(
this);
571 NS_FATAL_ERROR(
"Random access already configured!");
574 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::RaService0_NumberOfInstances",
582 NS_LOG_FUNCTION(
this);
586 NS_FATAL_ERROR(
"Random access already configured!");
589 Config::SetDefault(
"ns3::SatUtHelper::UseCrdsaOnlyForControlPackets", BooleanValue(
false));
590 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::RaService0_NumberOfInstances",
598 NS_LOG_FUNCTION(
this);
600 Config::SetDefault(
"ns3::SatBeamScheduler::ControlSlotsEnabled", BooleanValue(
false));
602 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DefaultControlRandomizationInterval",
603 TimeValue(MilliSeconds(100)));
604 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::RaServiceCount", UintegerValue(1));
605 Config::SetDefault(
"ns3::SatBeamHelper::RandomAccessModel",
607 Config::SetDefault(
"ns3::SatBeamHelper::RaInterferenceModel",
609 Config::SetDefault(
"ns3::SatBeamHelper::RaInterferenceEliminationModel",
611 Config::SetDefault(
"ns3::SatBeamHelper::RaCollisionModel",
613 Config::SetDefault(
"ns3::SatBeamHelper::RaConstantErrorRate", DoubleValue(0.0));
615 Config::SetDefault(
"ns3::SatPhyRxCarrierConf::EnableRandomAccessDynamicLoadControl",
616 BooleanValue(
false));
618 "ns3::SatPhyRxCarrierConf::RandomAccessAverageNormalizedOfferedLoadMeasurementWindowSize",
621 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::RaService0_MaximumUniquePayloadPerBlock",
623 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::RaService0_MaximumConsecutiveBlockAccessed",
625 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::RaService0_MinimumIdleBlock",
627 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::RaService0_BackOffTimeInMilliSeconds",
629 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::RaService0_BackOffProbability",
631 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::RaService0_HighLoadBackOffProbability",
634 "ns3::SatLowerLayerServiceConf::RaService0_AverageNormalizedOfferedLoadThreshold",
645 NS_LOG_FUNCTION(
this);
647 Config::SetDefault(
"ns3::SatChannel::EnableExternalFadingInputTrace", BooleanValue(
false));
648 Config::SetDefault(
"ns3::SatChannel::ForwardingMode", StringValue(
"OnlyDestNode"));
649 Config::SetDefault(
"ns3::SatChannel::RxPowerCalculationMode",
650 StringValue(
"RxPowerCalculation"));
651 Config::SetDefault(
"ns3::SatBeamHelper::FadingModel", StringValue(
"FadingOff"));
652 Config::SetDefault(
"ns3::SatUtHelper::EnableChannelEstimationError", BooleanValue(
false));
653 Config::SetDefault(
"ns3::SatGwHelper::EnableChannelEstimationError", BooleanValue(
false));
654 Config::SetDefault(
"ns3::SatBeamHelper::RaInterferenceModel", StringValue(
"Constant"));
655 Config::SetDefault(
"ns3::SatBeamHelper::RaInterferenceEliminationModel",
656 StringValue(
"Perfect"));
657 Config::SetDefault(
"ns3::SatBeamHelper::RaCollisionModel",
658 StringValue(
"RaCollisionNotDefined"));
667 NS_LOG_FUNCTION(
this << dir);
672 Config::SetDefault(
"ns3::SatBbFrameConf::AcmEnabled", BooleanValue(
true));
673 Config::SetDefault(
"ns3::SatBbFrameConf::DefaultModCod", StringValue(
"QPSK_1_TO_2"));
674 Config::SetDefault(
"ns3::SatRequestManager::CnoReportInterval", TimeValue(Seconds(0.1)));
675 Config::SetDefault(
"ns3::SatFwdLinkScheduler::CnoEstimationMode",
676 StringValue(
"AverageValueInWindow"));
677 Config::SetDefault(
"ns3::SatFwdLinkScheduler::CnoEstimationWindow", TimeValue(Seconds(2)));
681 Config::SetDefault(
"ns3::SatBeamScheduler::CnoEstimationMode",
682 StringValue(
"MinimumValueInWindow"));
683 Config::SetDefault(
"ns3::SatBeamScheduler::CnoEstimationWindow", TimeValue(Seconds(2)));
684 Config::SetDefault(
"ns3::SatWaveformConf::AcmEnabled", BooleanValue(
true));
688 NS_FATAL_ERROR(
"Unsupported SatLinkDir_t!");
697 NS_LOG_FUNCTION(
this << dir);
702 Config::SetDefault(
"ns3::SatBbFrameConf::AcmEnabled", BooleanValue(
false));
703 Config::SetDefault(
"ns3::SatBbFrameConf::DefaultModCod", StringValue(
"QPSK_1_TO_2"));
704 Config::SetDefault(
"ns3::SatRequestManager::CnoReportInterval", TimeValue(Seconds(100)));
708 Config::SetDefault(
"ns3::SatWaveformConf::AcmEnabled", BooleanValue(
false));
712 NS_FATAL_ERROR(
"Unsupported SatLinkDir_t!");
721 std::cout <<
"Progress: " << Simulator::Now().GetSeconds() <<
"/" <<
GetSimTime().GetSeconds()
730 NS_ASSERT_MSG(
m_satHelper !=
nullptr,
"Satellite scenario not created yet!");
734 Config::SetDefault(
"ns3::SatEnvVariables::EnableSimulationOutputOverwrite",
746 NS_LOG_FUNCTION(
this);
750 Config::SetDefault(
"ns3::SatEnvVariables::EnableSimulationOutputOverwrite",
776 Config::SetDefault(
"ns3::SatStatsThroughputHelper::AveragingMode", BooleanValue(
true));
806 Config::SetDefault(
"ns3::SatStatsFrameTypeUsageHelper::Percentage", BooleanValue(
true));
818 NS_LOG_FUNCTION(
this);
822 Config::SetDefault(
"ns3::SatEnvVariables::EnableSimulationOutputOverwrite",
908 NS_LOG_FUNCTION(
this << em << errorRate);
910 Config::SetDefault(
"ns3::SatUtHelper::FwdLinkErrorModel", EnumValue(em));
911 Config::SetDefault(
"ns3::SatGwHelper::RtnLinkErrorModel", EnumValue(em));
915 Config::SetDefault(
"ns3::SatGwHelper::RtnLinkConstantErrorRate", DoubleValue(errorRate));
916 Config::SetDefault(
"ns3::SatUtHelper::FwdLinkConstantErrorRate", DoubleValue(errorRate));
924 NS_LOG_FUNCTION(
this << ifModel << constantIf);
926 Config::SetDefault(
"ns3::SatUtHelper::DaFwdLinkInterferenceModel", EnumValue(ifModel));
927 Config::SetDefault(
"ns3::SatGwHelper::DaRtnLinkInterferenceModel", EnumValue(ifModel));
931 Config::SetDefault(
"ns3::SatConstantInterference::ConstantInterferencePower",
932 DoubleValue(constantIf));
941 double carrierSpacing,
944 NS_LOG_FUNCTION(
this << bw << carrierBw << rollOff << carrierSpacing << isRandomAccess);
946 std::stringstream sfId, fId;
947 sfId << superFrameId;
949 std::string attributeDefault(
"ns3::SatSuperframeConf" + sfId.str() +
"::Frame" + fId.str());
951 Config::SetDefault(attributeDefault +
"_AllocatedBandwidthHz", DoubleValue(bw));
952 Config::SetDefault(attributeDefault +
"_CarrierAllocatedBandwidthHz", DoubleValue(carrierBw));
953 Config::SetDefault(attributeDefault +
"_CarrierRollOff", DoubleValue(rollOff));
954 Config::SetDefault(attributeDefault +
"_CarrierSpacing", DoubleValue(carrierSpacing));
955 Config::SetDefault(attributeDefault +
"_RandomAccessFrame", BooleanValue(isRandomAccess));
959 Config::SetDefault(
"ns3::SatSuperframeConf" + sfId.str() +
"::FrameCount",
966 NS_LOG_FUNCTION(
this);
968 Config::SetDefault(
"ns3::SatConf::FwdFeederLinkBandwidth", DoubleValue(2e+09));
969 Config::SetDefault(
"ns3::SatConf::FwdFeederLinkBaseFrequency", DoubleValue(2.75e+10));
970 Config::SetDefault(
"ns3::SatConf::FwdUserLinkBandwidth", DoubleValue(5e+08));
971 Config::SetDefault(
"ns3::SatConf::FwdUserLinkBaseFrequency", DoubleValue(1.97e+10));
973 Config::SetDefault(
"ns3::SatConf::RtnFeederLinkBandwidth", DoubleValue(2e+09));
974 Config::SetDefault(
"ns3::SatConf::RtnFeederLinkBaseFrequency", DoubleValue(1.77e+10));
975 Config::SetDefault(
"ns3::SatConf::RtnUserLinkBandwidth", DoubleValue(5e+08));
976 Config::SetDefault(
"ns3::SatConf::RtnUserLinkBaseFrequency", DoubleValue(2.95e+10));
978 Config::SetDefault(
"ns3::SatConf::FwdUserLinkChannels", UintegerValue(4));
979 Config::SetDefault(
"ns3::SatConf::FwdFeederLinkChannels", UintegerValue(16));
980 Config::SetDefault(
"ns3::SatConf::RtnUserLinkChannels", UintegerValue(4));
981 Config::SetDefault(
"ns3::SatConf::RtnFeederLinkChannels", UintegerValue(16));
983 Config::SetDefault(
"ns3::SatConf::FwdCarrierAllocatedBandwidth", DoubleValue(1.25e+08));
984 Config::SetDefault(
"ns3::SatConf::FwdCarrierRollOff", DoubleValue(0.2));
985 Config::SetDefault(
"ns3::SatConf::FwdCarrierSpacing", DoubleValue(0.0));
991 NS_LOG_FUNCTION(
this);
994 Config::SetDefault(
"ns3::SatBeamHelper::EnableFwdLinkBeamHopping", BooleanValue(
true));
996 Config::SetDefault(
"ns3::SatBstpController::BeamHoppingMode",
998 Config::SetDefault(
"ns3::SatBstpController::StaticBeamHoppingConfigFileName",
999 StringValue(
m_scenarioPath +
"/beamhopping/SatBstpConf_GW1.txt"));
1000 Config::SetDefault(
"ns3::SatBstpController::SuperframeDuration", TimeValue(MilliSeconds(1)));
1003 Config::SetDefault(
"ns3::SatConf::FwdFeederLinkBandwidth", DoubleValue(2e+09));
1004 Config::SetDefault(
"ns3::SatConf::FwdFeederLinkBaseFrequency", DoubleValue(2.75e+10));
1005 Config::SetDefault(
"ns3::SatConf::FwdUserLinkBandwidth", DoubleValue(5e+08));
1006 Config::SetDefault(
"ns3::SatConf::FwdUserLinkBaseFrequency", DoubleValue(1.97e+10));
1008 Config::SetDefault(
"ns3::SatConf::FwdUserLinkChannels", UintegerValue(1));
1009 Config::SetDefault(
"ns3::SatConf::FwdFeederLinkChannels", UintegerValue(4));
1011 Config::SetDefault(
"ns3::SatConf::FwdCarrierAllocatedBandwidth", DoubleValue(5e+08));
1012 Config::SetDefault(
"ns3::SatConf::FwdCarrierRollOff", DoubleValue(0.2));
1013 Config::SetDefault(
"ns3::SatConf::FwdCarrierSpacing", DoubleValue(0.0));
1019 NS_LOG_FUNCTION(
this);
1021 Config::SetDefault(
"ns3::SatPhyRxCarrier::EnableCompositeSinrOutputTrace", BooleanValue(
true));
1022 Config::SetDefault(
"ns3::SatPhyRxCarrierConf::EnableIntfOutputTrace", BooleanValue(
true));
1023 Config::SetDefault(
"ns3::SatChannel::EnableRxPowerOutputTrace", BooleanValue(
true));
1024 Config::SetDefault(
"ns3::SatChannel::EnableFadingOutputTrace", BooleanValue(
true));
1030 NS_LOG_FUNCTION(
this);
1032 Config::SetDefault(
"ns3::SatOrbiterFeederPhy::RxTemperatureDbk", DoubleValue(28.4));
1033 Config::SetDefault(
"ns3::SatOrbiterFeederPhy::RxMaxAntennaGainDb", DoubleValue(54));
1034 Config::SetDefault(
"ns3::SatOrbiterFeederPhy::TxMaxAntennaGainDb", DoubleValue(54));
1035 Config::SetDefault(
"ns3::SatOrbiterFeederPhy::TxMaxPowerDbw", DoubleValue(-4.38));
1036 Config::SetDefault(
"ns3::SatOrbiterFeederPhy::TxOutputLossDb", DoubleValue(1.75));
1037 Config::SetDefault(
"ns3::SatOrbiterFeederPhy::TxPointingLossDb", DoubleValue(0));
1038 Config::SetDefault(
"ns3::SatOrbiterFeederPhy::TxOboLossDb", DoubleValue(4));
1039 Config::SetDefault(
"ns3::SatOrbiterFeederPhy::TxAntennaLossDb", DoubleValue(1));
1040 Config::SetDefault(
"ns3::SatOrbiterFeederPhy::RxAntennaLossDb", DoubleValue(1));
1041 Config::SetDefault(
"ns3::SatOrbiterFeederPhy::DefaultFadingValue", DoubleValue(1));
1042 Config::SetDefault(
"ns3::SatOrbiterFeederPhy::ExtNoisePowerDensityDbwhz", DoubleValue(-207));
1043 Config::SetDefault(
"ns3::SatOrbiterFeederPhy::ImIfCOverIDb", DoubleValue(27));
1044 Config::SetDefault(
"ns3::SatOrbiterFeederPhy::FixedAmplificationGainDb", DoubleValue(82));
1045 Config::SetDefault(
"ns3::SatOrbiterUserPhy::RxTemperatureDbk", DoubleValue(28.4));
1046 Config::SetDefault(
"ns3::SatOrbiterUserPhy::RxMaxAntennaGainDb", DoubleValue(54));
1047 Config::SetDefault(
"ns3::SatOrbiterUserPhy::TxMaxAntennaGainDb", DoubleValue(54));
1048 Config::SetDefault(
"ns3::SatOrbiterUserPhy::TxMaxPowerDbw", DoubleValue(15));
1049 Config::SetDefault(
"ns3::SatOrbiterUserPhy::TxOutputLossDb", DoubleValue(2.85));
1050 Config::SetDefault(
"ns3::SatOrbiterUserPhy::TxPointingLossDb", DoubleValue(0));
1051 Config::SetDefault(
"ns3::SatOrbiterUserPhy::TxOboLossDb", DoubleValue(0));
1052 Config::SetDefault(
"ns3::SatOrbiterUserPhy::TxAntennaLossDb", DoubleValue(1));
1053 Config::SetDefault(
"ns3::SatOrbiterUserPhy::RxAntennaLossDb", DoubleValue(1));
1054 Config::SetDefault(
"ns3::SatOrbiterUserPhy::DefaultFadingValue", DoubleValue(1));
1055 Config::SetDefault(
"ns3::SatOrbiterUserPhy::OtherSysIfCOverIDb", DoubleValue(27.5));
1056 Config::SetDefault(
"ns3::SatOrbiterUserPhy::AciIfCOverIDb", DoubleValue(17));
1057 Config::SetDefault(
"ns3::SatGwPhy::RxTemperatureDbk", DoubleValue(24.62));
1058 Config::SetDefault(
"ns3::SatGwPhy::RxMaxAntennaGainDb", DoubleValue(61.5));
1059 Config::SetDefault(
"ns3::SatGwPhy::TxMaxAntennaGainDb", DoubleValue(65.2));
1060 Config::SetDefault(
"ns3::SatGwPhy::TxMaxPowerDbw", DoubleValue(8.97));
1061 Config::SetDefault(
"ns3::SatGwPhy::TxOutputLossDb", DoubleValue(2));
1062 Config::SetDefault(
"ns3::SatGwPhy::TxPointingLossDb", DoubleValue(1.1));
1063 Config::SetDefault(
"ns3::SatGwPhy::TxOboLossDb", DoubleValue(6));
1064 Config::SetDefault(
"ns3::SatGwPhy::TxAntennaLossDb", DoubleValue(0));
1065 Config::SetDefault(
"ns3::SatGwPhy::RxAntennaLossDb", DoubleValue(0));
1066 Config::SetDefault(
"ns3::SatGwPhy::DefaultFadingValue", DoubleValue(1));
1067 Config::SetDefault(
"ns3::SatGwPhy::ImIfCOverIDb", DoubleValue(22));
1068 Config::SetDefault(
"ns3::SatGwPhy::AciIfWrtNoisePercent", DoubleValue(10));
1069 Config::SetDefault(
"ns3::SatUtPhy::RxTemperatureDbk", DoubleValue(24.6));
1070 Config::SetDefault(
"ns3::SatUtPhy::RxMaxAntennaGainDb", DoubleValue(44.6));
1071 Config::SetDefault(
"ns3::SatUtPhy::TxMaxAntennaGainDb", DoubleValue(45.2));
1072 Config::SetDefault(
"ns3::SatUtPhy::TxMaxPowerDbw", DoubleValue(4));
1073 Config::SetDefault(
"ns3::SatUtPhy::TxOutputLossDb", DoubleValue(0.5));
1074 Config::SetDefault(
"ns3::SatUtPhy::TxPointingLossDb", DoubleValue(1));
1075 Config::SetDefault(
"ns3::SatUtPhy::TxOboLossDb", DoubleValue(0.5));
1076 Config::SetDefault(
"ns3::SatUtPhy::TxAntennaLossDb", DoubleValue(1));
1077 Config::SetDefault(
"ns3::SatUtPhy::RxAntennaLossDb", DoubleValue(0));
1078 Config::SetDefault(
"ns3::SatUtPhy::DefaultFadingValue", DoubleValue(1));
1079 Config::SetDefault(
"ns3::SatUtPhy::OtherSysIfCOverIDb", DoubleValue(24.7));
1085 NS_LOG_FUNCTION(
this);
1091 Config::SetDefault(
"ns3::SatFadingExternalInputTraceContainer::UtRtnUpIndexFileName",
1092 StringValue(
"BeamId-1_256_UT_fading_rtnup_trace_index.txt"));
1093 Config::SetDefault(
"ns3::SatFadingExternalInputTraceContainer::UtFwdDownIndexFileName",
1094 StringValue(
"BeamId-1_256_UT_fading_fwddwn_trace_index.txt"));
1100 Config::SetDefault(
"ns3::SatFadingExternalInputTraceContainer::UtInputMode",
1101 StringValue(
"ListMode"));
1104 Config::SetDefault(
"ns3::SatChannel::EnableExternalFadingInputTrace", BooleanValue(
true));
1110 NS_LOG_FUNCTION(
this);
1116 Ptr<SatListPositionAllocator> posAllocator)
1118 NS_LOG_FUNCTION(
this << beamId);
1125 NS_LOG_FUNCTION(
this << inputFile);
1131 Ptr<SatStatsHelperContainer>
1134 NS_LOG_FUNCTION(
this);
1138 Config::SetDefault(
"ns3::SatEnvVariables::EnableSimulationOutputOverwrite",
1139 BooleanValue(
true));
1146 Ptr<SatTrafficHelper>
1149 NS_LOG_FUNCTION(
this);
1163 NS_LOG_FUNCTION(
this);
1176 NS_LOG_FUNCTION(
this);
1189 NS_LOG_FUNCTION(
this);
1192 m_outputPath = Singleton<SatEnvVariables>::Get()->LocateDataDirectory() +
"/sims/" +
1195 if (!Singleton<SatEnvVariables>::Get()->IsValidDirectory(
m_outputPath))
1197 Singleton<SatEnvVariables>::Get()->CreateDirectory(
m_outputPath);
1202 Config::SetDefault(
"ns3::SatEnvVariables::SimulationTag", StringValue(
m_simulationTag));
1206 if (!Singleton<SatEnvVariables>::Get()->IsValidDirectory(
m_outputPath))
1208 Singleton<SatEnvVariables>::Get()->CreateDirectory(
m_outputPath);
1212 Singleton<SatEnvVariables>::Get()->SetOutputPath(
m_outputPath);
1217 const std::string& mobileUtsFolder)
1219 NS_LOG_FUNCTION(
this);
1221 std::stringstream ss;
1222 ss <<
"Created scenario: " << std::endl;
1229 NS_FATAL_ERROR(
"Must specify a scenario folder name from data submodule");
1232 if (Singleton<SatEnvVariables>::Get()->IsValidDirectory(
m_scenarioPath +
"/beamhopping"))
1243 Ptr<SatAntennaGainPatternContainer> antennaGainPatterns =
m_satHelper->GetAntennaGainPatterns();
1244 m_satHelper->GetBeamHelper()->SetAntennaGainPatterns(antennaGainPatterns);
1255 m_satHelper->SetUtPositionAllocatorForBeam(it.first, it.second);
1266 for (uint32_t satId = 0; satId < Singleton<SatTopology>::Get()->GetNOrbiterNodes();
1270 for (uint32_t i = 1; i <=
m_satHelper->GetBeamCount(); i++)
1275 beamInfo.insert(std::make_pair(std::make_pair(satId, i), info));
1282 for (uint32_t satId = 0; satId < Singleton<SatTopology>::Get()->GetNOrbiterNodes();
1286 for (uint32_t i = 1; i <=
m_satHelper->GetBeamCount(); i++)
1289 beamInfo.insert(std::make_pair(std::make_pair(satId, i), info));
1297 NS_FATAL_ERROR(
"Incorrect scenario chosen with a constellation");
1305 std::vector<std::pair<GeoCoordinate, uint32_t>> additionalNodesVector =
1307 std::map<uint32_t, std::vector<std::pair<GeoCoordinate, uint32_t>>> additionalNodes;
1308 for (std::vector<std::pair<GeoCoordinate, uint32_t>>::iterator it =
1309 additionalNodesVector.begin();
1310 it != additionalNodesVector.end();
1313 uint32_t bestBeamId = antennaGainPatterns->GetBestBeamId(0, it->first,
false);
1314 additionalNodes[bestBeamId].push_back(*it);
1317 for (std::map<uint32_t, std::vector<std::pair<GeoCoordinate, uint32_t>>>::iterator it =
1318 additionalNodes.begin();
1319 it != additionalNodes.end();
1324 NS_LOG_WARN(
"Beam ID " << it->first <<
" is not enabled, cannot add "
1325 << it->second.size() <<
" UTs from SatGroupHelper");
1326 std::cout <<
"Beam ID " << it->first <<
" is not enabled, cannot add "
1327 << it->second.size() <<
" UTs from SatGroupHelper" << std::endl;
1330 beamInfo[std::make_pair(0, it->first)].SetPositions(it->second);
1331 for (uint32_t i = 0; i < it->second.size(); i++)
1337 if (mobileUtsFolder !=
"")
1346 m_satHelper->CreateUserDefinedScenarioFromListPositions(
1362 for (uint32_t i = 1; i <=
m_satHelper->GetBeamCount(); i++)
1369 std::map<uint32_t, Ptr<RandomVariableStream>>::iterator iti =
m_utCount.find(i);
1370 std::map<uint32_t, Ptr<RandomVariableStream>>::iterator it0 =
m_utCount.find(0);
1373 NS_LOG_WARN(
"No UT count per beam set. Must be set for GEO scenarios");
1381 ss <<
" Beam " << i <<
": UT count= " << utCount;
1383 for (uint32_t j = 1; j < utCount + 1; j++)
1387 ss <<
", " << j <<
". UT user count= " << utUserCount;
1390 beamInfo.insert(std::make_pair(std::make_pair(0, i), info));
1396 std::vector<std::pair<GeoCoordinate, uint32_t>> additionalNodesVector =
1398 std::map<uint32_t, std::vector<std::pair<GeoCoordinate, uint32_t>>> additionalNodes;
1399 for (std::vector<std::pair<GeoCoordinate, uint32_t>>::iterator it =
1400 additionalNodesVector.begin();
1401 it != additionalNodesVector.end();
1404 uint32_t bestBeamId = antennaGainPatterns->GetBestBeamId(0, it->first,
false);
1405 additionalNodes[bestBeamId].push_back(*it);
1408 for (std::map<uint32_t, std::vector<std::pair<GeoCoordinate, uint32_t>>>::iterator it =
1409 additionalNodes.begin();
1410 it != additionalNodes.end();
1415 NS_LOG_WARN(
"Beam ID " << it->first <<
" is not enabled, cannot add "
1416 << it->second.size() <<
" UTs from SatGroupHelper");
1417 std::cout <<
"Beam ID " << it->first <<
" is not enabled, cannot add "
1418 << it->second.size() <<
" UTs from SatGroupHelper" << std::endl;
1421 beamInfo[std::make_pair(0, it->first)].SetPositions(it->second);
1422 for (uint32_t i = 0; i < it->second.size(); i++)
1428 if (mobileUtsFolder !=
"")
1437 m_satHelper->CreateUserDefinedScenarioFromListPositions(
1453 NS_LOG_INFO(ss.str());
1463 NS_LOG_FUNCTION(
this << node->GetId() << port);
1465 for (uint32_t i = 0; i < node->GetNApplications(); i++)
1467 auto sink = DynamicCast<PacketSink>(node->GetApplication(i));
1468 if (sink !=
nullptr)
1471 sink->GetAttribute(
"Local", av);
1472 if (InetSocketAddress::ConvertFrom(av.Get()).GetPort() == port)
1487 Config::SetDefault(
"ns3::SatBeamHelper::RandomAccessModel",
1489 Config::SetDefault(
"ns3::SatBeamScheduler::ControlSlotsEnabled", BooleanValue(
true));
1493 Config::SetDefault(
"ns3::SatBeamHelper::RandomAccessModel",
1495 Config::SetDefault(
"ns3::SatBeamScheduler::ControlSlotsEnabled", BooleanValue(
false));
1499 Config::SetDefault(
"ns3::SatBeamHelper::RandomAccessModel",
1501 Config::SetDefault(
"ns3::SatBeamScheduler::ControlSlotsEnabled", BooleanValue(
false));
1502 Config::SetDefault(
"ns3::SatUtHelper::UseCrdsaOnlyForControlPackets", BooleanValue(
false));
1506 NS_FATAL_ERROR(
"Unsupported crTxConf: " << crTxConf);
1515 NS_LOG_FUNCTION(
this << enabledBeams);
1519 std::stringstream bss(enabledBeams);
1528 std::string garbage;
1541 NS_LOG_FUNCTION(
this);
1544 std::stringstream bss;
1545 for (
auto beamId : beamSet)
1547 bss << beamId <<
" ";
1552 const std::set<uint32_t>&
1555 NS_LOG_FUNCTION(
this);
1563 NS_LOG_FUNCTION(
this << beamId);
1565 bool beamEnabled =
false;
1578 NS_LOG_FUNCTION(
this << beamId);
1583 return m_utCount.at(beamId)->GetInteger();
1592 NS_LOG_FUNCTION(
this);
1595 NS_LOG_INFO(
" Simulation length: " <<
m_simTime.GetSeconds());
1597 NS_LOG_INFO(
" Number of UTs: " << Singleton<SatTopology>::Get()->GetNGwUserNodes());
1598 NS_LOG_INFO(
" Number of end users: " << Singleton<SatTopology>::Get()->GetNUtUserNodes());
1603 Simulator::Destroy();
1609 NS_LOG_FUNCTION(
this);
1630 NS_LOG_FUNCTION(
this);
1639 NS_LOG_FUNCTION(
this << name);
1642 Singleton<SatEnvVariables>::Get()->LocateDataDirectory() +
"/scenarios/" + name;
1644 if (!Singleton<SatEnvVariables>::Get()->IsValidFile(path))
1646 NS_FATAL_ERROR(
"Scenario in " << path <<
" does not exist");
1655 NS_LOG_FUNCTION(
this);
1660 bool overrideManualConfiguration)
1663 Ptr<SimulationHelperConf> simulationConf = CreateObject<SimulationHelperConf>();
1665 if (overrideManualConfiguration)
1667 SetBeams(simulationConf->m_enabledBeams);
1675 if (simulationConf->m_activateProgressLogging)
1680 Ptr<SatTrafficHelperConf> satTrafficHelperConf =
1682 satTrafficHelperConf->InstallTrafficModels();
1684 if (simulationConf->m_activateStatistics)
1693 NS_LOG_FUNCTION(
this << filePath);
1696 Config::SetDefault(
"ns3::ConfigStore::Filename", StringValue(filePath));
1697 Config::SetDefault(
"ns3::ConfigStore::Mode", StringValue(
"Load"));
1698 Config::SetDefault(
"ns3::ConfigStore::FileFormat", StringValue(
"Xml"));
1699 ConfigStore inputConfig;
1700 inputConfig.ConfigureDefaults();
1706 NS_LOG_FUNCTION(
this);
1708 std::string outputPath;
1709 outputPath = Singleton<SatEnvVariables>::Get()->GetOutputPath();
1712 Config::SetDefault(
"ns3::ConfigStore::Filename", StringValue(outputPath +
"/" + fileName));
1713 Config::SetDefault(
"ns3::ConfigStore::FileFormat", StringValue(
"Xml"));
1714 Config::SetDefault(
"ns3::ConfigStore::Mode", StringValue(
"Save"));
1715 ConfigStore outputConfig;
1716 outputConfig.ConfigureDefaults();
1718 if (outputAttributes)
1720 outputConfig.ConfigureAttributes();
Class that holds information for each beam regarding UTs and their users camped in each beam.
void AppendUt(uint32_t userCount)
Appends new UT to end of the list with given user count for the appended UT.
SatLinkDir_t
Link direction used for packet tracing.
@ RA_MODEL_RCS2_SPECIFICATION
PreDefinedScenario_t
Values for pre-defined scenarios to be used by helper when building satellite network topology base.
@ LARGER
LARGER Larger scenario used as base.
@ FULL
FULL Full scenario used as base.
@ SIMPLE
SIMPLE Simple scenario used as base.
std::map< std::pair< uint32_t, uint32_t >, SatBeamUserInfo > BeamUserInfoMap_t
definition for beam map key is pair sat ID / beam ID and value is UT/user info.
ErrorModel
Error model enum.
@ RA_COLLISION_CHECK_AGAINST_SINR
@ RA_COLLISION_NOT_DEFINED
InterferenceModel
Interference model enum.
Ptr< RandomVariableStream > m_utCount
Ptr< RandomVariableStream > m_utUserCount
std::string m_enabledBeams
bool m_activateStatistics
Ptr< RandomVariableStream > m_utMobileUserCount
std::string m_mobileUtsFolder
TypeId GetInstanceTypeId(void) const
Derived from Object.
SimulationHelperConf()
Default constructor.
static TypeId GetTypeId(void)
Derived from Object.
bool m_activateProgressLogging
virtual ~SimulationHelperConf()
Destructor.
A helper to make it easier to create example simulation cases.
uint32_t GetNextUtCount(uint32_t beamId=0) const
Get next UT count from internal random variable stream.
void EnableCrdsa()
Enable CRDSA random access.
Ptr< SatCnoHelper > m_cnoHelper
void ProgressCb()
Callback that prints simulation progress to stdout.
std::string m_simulationName
void SetErrorModel(SatPhyRxCarrierConf::ErrorModel em, double errorRate=0.0)
Set simulation error model.
Ptr< SatTrafficHelper > m_trafficHelper
void SetupOutputPath()
Check if output path has been set.
void SetUserCountPerMobileUt(uint32_t count)
Set user count per mobile UT.
void EnableAcm(SatEnums::SatLinkDir_t dir)
Enable ACM for a simulation direction.
Time & GetSimTime()
Get simulation time.
void DoDispose(void)
Disposing.
void ParseScenarioFolder()
parse scenario folder to load all variables that can be
SimulationHelper()
Default constructor, which is not used.
void ConfigureFrequencyBands()
Configure the default setting for the forward and return link frequencies.
std::string m_inputFileUtListPositions
virtual ~SimulationHelper()
Destructor.
void DisableAcm(SatEnums::SatLinkDir_t dir)
Disable ACM for a simulation direction.
void ConfigureAttributesFromFile(std::string filePath, bool overrideManualConfiguration=true)
Configure this instance after reading input attributes from XML file.
std::map< uint32_t, Ptr< RandomVariableStream > > m_utCount
Ptr< SatCnoHelper > GetCnoHelper()
Get the C/N0 helper to customize C/N0 on some nodes.
void DisableProgressLogs()
Disables simulation progress logs.
void SetIdealPhyParameterization()
Set ideal channel/physical layer parameterization.
void DisableFca()
Disable free capacity allocation.
Ptr< SatHelper > m_satHelper
Ptr< SatHelper > CreateSatScenario(SatHelper::PreDefinedScenario_t scenario=SatHelper::NONE, const std::string &mobileUtsFolder="")
Create the satellite scenario.
void CreateDefaultRtnLinkStats()
Create stats collectors if needed and set default statistics settings for both RTN link.
Ptr< SatGroupHelper > m_groupHelper
Ptr< SatListPositionAllocator > m_commonUtPositions
void RunSimulation()
Run the simulation.
void SetSimulationTime(double seconds)
Set simulation time in seconds.
void EnableFca()
Enable free capacity allocation.
std::string StoreAttributesToFile(std::string fileName, bool outputAttributes=false)
Store all used attributes.
void SetCrTxConf(CrTxConf_t crTxConf)
void SetGwUserCount(uint32_t gwUserCount)
Set the number of GW users in the scenario.
void EnableOnlyConstantRate(uint32_t rcIndex, double rateKbps)
Enable only CRA for a given RC index.
EventId m_progressReportEvent
void EnableExternalFadingInputTrace()
Enable external fading input.
void EnableOutputTraces()
Enable all output traces.
void ConfigureLinkBudget()
Configure all link budget related attributes.
void EnableSlottedAloha()
Enable slotted ALOHA random access.
void DisableAllCapacityAssignmentCategories()
Disable all capacity allocation categories: CRA/VBDC/RBDC.
void EnableArq(SatEnums::SatLinkDir_t dir)
Enable ARQ.
void ConfigureFrame(uint32_t superFrameId, double bw, double carrierBw, double rollOff, double carrierSpacing, bool isRandomAccess=false)
Configure a frame for a certain superframe id.
void EnableOnlyRbdc(uint32_t rcIndex)
Enable only RBDC for a given RC index.
void EnableOnlyVbdc(uint32_t rcIndex)
Enable only VBDC for a given RC index.
void SetUtPositionAllocatorForBeam(uint32_t beamId, Ptr< SatListPositionAllocator > posAllocator)
Set a list position allocator for UTs of a specific beam.
void SetUtCountPerBeam(uint32_t count)
Set UT count per beam.
Time m_progressUpdateInterval
bool m_progressLoggingEnabled
Ptr< SatHelper > GetSatelliteHelper()
If lower layer API access is required, use this to access SatHelper.
Ptr< SatTrafficHelper > GetTrafficHelper()
Get the traffic helper to create more complex traffics.
TypeId GetInstanceTypeId(void) const
Derived from Object.
void ReadInputAttributesFromFile(std::string filePath)
Read input attributes from XML file.
void CreateDefaultFwdLinkStats()
Create stats collectors if needed and set default statistics settings for both FWD link.
void DisableRandomAccess()
Disable random access.
void EnablePeriodicalControlSlots(Time periodicity)
Enable periodical control slots.
Ptr< SatStatsHelperContainer > GetStatisticsContainer()
Get the statistics container of this helper.
void EnableRandomAccess()
Enable random access.
void EnableUtListPositionsFromInputFile(std::string inputFile, bool checkBeams=true)
Enable reading UT list positions from input file.
std::set< uint32_t > m_enabledBeams
void SetUserCountPerUt(uint32_t count)
Set user count per UT.
void CreateDefaultStats()
Create stats collectors and set default statistics settings for both FWD and RTN links.
std::string m_simulationTag
void SetOutputPath(std::string path)
Force a output file path to this simulation instead of default satellite/data/sims/.
uint32_t GetNextUtUserCount() const
Get next UT user count from internal random variable stream.
Ptr< SatGroupHelper > GetGroupHelper()
Get the group helper.
void SetInterferenceModel(SatPhyRxCarrierConf::InterferenceModel ifModel, double constantIf=0.0)
Set simulation interference model.
void LoadScenario(std::string name)
Load a scenario from data submodule.
void SetBeams(const std::string &beamList)
Ptr< RandomVariableStream > m_utMobileUserCount
const std::set< uint32_t > & GetBeams()
Get enabled beams in integer format.
bool HasSinkInstalled(Ptr< Node > node, uint16_t port)
Check if node has a PacketSink installed at certain port.
std::map< uint32_t, Ptr< SatListPositionAllocator > > m_utPositionsByBeam
void EnableProgressLogs()
Enables simulation progress logging.
bool m_inputFileUtPositionsCheckBeams
std::string m_scenarioPath
bool IsBeamEnabled(uint32_t beamId) const
Check if a beam is enabled.
void SetCommonUtPositionAllocator(Ptr< SatListPositionAllocator > posAllocator)
Set common UT position allocator for all beams.
void ConfigureFwdLinkBeamHopping()
Configure the beam hopping functionality for the FWD link.
void AddDefaultUiArguments(CommandLine &cmd)
Add default command line arguments for the simulation.
Ptr< SatStatsHelperContainer > m_statContainer
void SetOutputTag(std::string tag)
Set simulation output tag, which is the basename of the directory where output files are stored.
Ptr< RandomVariableStream > m_utUserCount
bool m_randomAccessConfigured
uint32_t m_numberOfConfiguredFrames
static TypeId GetTypeId(void)
Derived from Object.
std::string m_enabledBeamsStr
void SetDefaultValues()
Set default values shared by all examples using SimulationHelper.
void SetBeamSet(std::set< uint32_t > beamSet)
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.