Loading...
Searching...
No Matches
ns3::SimulationHelper Class Reference

A helper to make it easier to create example simulation cases. More...

#include "simulation-helper.h"

Inheritance diagram for ns3::SimulationHelper:
Collaboration diagram for ns3::SimulationHelper:

Public Types

enum  CrTxConf_t { CR_NOT_CONFIGURED , CR_PERIODIC_CONTROL , CR_SLOTTED_ALOHA , CR_CRDSA_LOOSE_RC_0 }

Public Member Functions

 SimulationHelper ()
 Default constructor, which is not used.
 SimulationHelper (std::string simulationName)
 Contructor for simulation helper.
virtual ~SimulationHelper ()
 Destructor.
void AddDefaultUiArguments (CommandLine &cmd)
 Add default command line arguments for the simulation.
void AddDefaultUiArguments (CommandLine &cmd, std::string &xmlInputFile)
 Add default command line arguments for the simulation.
void ConfigureAttributesFromFile (std::string filePath, bool overrideManualConfiguration=true)
 Configure this instance after reading input attributes from XML file.
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 ConfigureFrequencyBands ()
 Configure the default setting for the forward and return link frequencies.
void ConfigureFwdLinkBeamHopping ()
 Configure the beam hopping functionality for the FWD link.
void ConfigureLinkBudget ()
 Configure all link budget related attributes.
void CreateDefaultFwdLinkStats ()
 Create stats collectors if needed and set default statistics settings for both FWD link.
void CreateDefaultRtnLinkStats ()
 Create stats collectors if needed and set default statistics settings for both RTN link.
void CreateDefaultStats ()
 Create stats collectors and set default statistics settings for both FWD and RTN links.
Ptr< SatHelperCreateSatScenario (SatHelper::PreDefinedScenario_t scenario=SatHelper::NONE, const std::string &mobileUtsFolder="")
 Create the satellite scenario.
void DisableAcm (SatEnums::SatLinkDir_t dir)
 Disable ACM for a simulation direction.
void DisableAllCapacityAssignmentCategories ()
 Disable all capacity allocation categories: CRA/VBDC/RBDC.
void DisableFca ()
 Disable free capacity allocation.
void DisableProgressLogs ()
 Disables simulation progress logs.
void DisableRandomAccess ()
 Disable random access.
void DoDispose (void)
 Disposing.
void EnableAcm (SatEnums::SatLinkDir_t dir)
 Enable ACM for a simulation direction.
void EnableArq (SatEnums::SatLinkDir_t dir)
 Enable ARQ.
void EnableCrdsa ()
 Enable CRDSA random access.
void EnableExternalFadingInputTrace ()
 Enable external fading input.
void EnableFca ()
 Enable free capacity allocation.
void EnableOnlyConstantRate (uint32_t rcIndex, double rateKbps)
 Enable only CRA for a given RC index.
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 EnableOutputTraces ()
 Enable all output traces.
void EnablePeriodicalControlSlots (Time periodicity)
 Enable periodical control slots.
void EnableProgressLogs ()
 Enables simulation progress logging.
void EnableSlottedAloha ()
 Enable slotted ALOHA random access.
void EnableUtListPositionsFromInputFile (std::string inputFile, bool checkBeams=true)
 Enable reading UT list positions from input file.
const std::set< uint32_t > & GetBeams ()
 Get enabled beams in integer format.
std::set< uint32_t > GetBeamSet (void) const
Ptr< SatCnoHelperGetCnoHelper ()
 Get the C/N0 helper to customize C/N0 on some nodes.
Ptr< SatGroupHelperGetGroupHelper ()
 Get the group helper.
Ptr< SatHelperGetSatelliteHelper ()
 If lower layer API access is required, use this to access SatHelper.
Time & GetSimTime ()
 Get simulation time.
Ptr< SatStatsHelperContainerGetStatisticsContainer ()
 Get the statistics container of this helper.
Ptr< SatTrafficHelperGetTrafficHelper ()
 Get the traffic helper to create more complex traffics.
void LoadScenario (std::string name)
 Load a scenario from data submodule.
void ParseScenarioFolder ()
 parse scenario folder to load all variables that can be
void ReadInputAttributesFromFile (std::string filePath)
 Read input attributes from XML file.
void RunSimulation ()
 Run the simulation.
void SetBeams (const std::string &beamList)
void SetBeamSet (std::set< uint32_t > beamSet)
void SetCommonUtPositionAllocator (Ptr< SatListPositionAllocator > posAllocator)
 Set common UT position allocator for all beams.
void SetCrTxConf (CrTxConf_t crTxConf)
void SetDefaultValues ()
 Set default values shared by all examples using SimulationHelper.
void SetErrorModel (SatPhyRxCarrierConf::ErrorModel em, double errorRate=0.0)
 Set simulation error model.
void SetGwUserCount (uint32_t gwUserCount)
 Set the number of GW users in the scenario.
void SetIdealPhyParameterization ()
 Set ideal channel/physical layer parameterization.
void SetInterferenceModel (SatPhyRxCarrierConf::InterferenceModel ifModel, double constantIf=0.0)
 Set simulation interference model.
void SetOutputPath (std::string path)
 Force a output file path to this simulation instead of default satellite/data/sims/.
void SetOutputTag (std::string tag)
 Set simulation output tag, which is the basename of the directory where output files are stored.
void SetSimulationTime (double seconds)
 Set simulation time in seconds.
void SetSimulationTime (Time time)
 Set simulation time.
void SetUserCountPerMobileUt (Ptr< RandomVariableStream > rs)
 Set mobile UT count per beam to be taken from a random variable stream.
void SetUserCountPerMobileUt (uint32_t count)
 Set user count per mobile UT.
void SetUserCountPerUt (Ptr< RandomVariableStream > rs)
 Set UT count per beam to be taken from a random variable stream.
void SetUserCountPerUt (uint32_t count)
 Set user count per UT.
void SetUtCountPerBeam (Ptr< RandomVariableStream > rs)
 Set UT count per beam to be taken from a random variable stream.
void SetUtCountPerBeam (uint32_t beamId, Ptr< RandomVariableStream > rs)
 Set UT count per beam to be taken from a random variable stream.
void SetUtCountPerBeam (uint32_t beamId, uint32_t count)
 Set UT count per beam.
void SetUtCountPerBeam (uint32_t count)
 Set UT count per beam.
void SetUtPositionAllocatorForBeam (uint32_t beamId, Ptr< SatListPositionAllocator > posAllocator)
 Set a list position allocator for UTs of a specific beam.
std::string StoreAttributesToFile (std::string fileName, bool outputAttributes=false)
 Store all used attributes.

Static Public Member Functions

static TypeId GetTypeId (void)
 Derived from Object.

Protected Member Functions

void EnableRandomAccess ()
 Enable random access.
uint32_t GetNextUtCount (uint32_t beamId=0) const
 Get next UT count from internal random variable stream.
uint32_t GetNextUtUserCount () const
 Get next UT user count from internal random variable stream.
bool HasSinkInstalled (Ptr< Node > node, uint16_t port)
 Check if node has a PacketSink installed at certain port.
bool IsBeamEnabled (uint32_t beamId) const
 Check if a beam is enabled.
void ProgressCb ()
 Callback that prints simulation progress to stdout.
void SetupOutputPath ()
 Check if output path has been set.

Private Attributes

Ptr< SatCnoHelperm_cnoHelper
Ptr< SatListPositionAllocatorm_commonUtPositions
std::set< uint32_t > m_enabledBeams
std::string m_enabledBeamsStr
Ptr< SatGroupHelperm_groupHelper
std::string m_inputFileUtListPositions
bool m_inputFileUtPositionsCheckBeams
uint32_t m_numberOfConfiguredFrames
std::string m_outputPath
bool m_progressLoggingEnabled
EventId m_progressReportEvent
Time m_progressUpdateInterval
bool m_randomAccessConfigured
Ptr< SatHelperm_satHelper
std::string m_scenarioPath
Time m_simTime
std::string m_simulationName
std::string m_simulationTag
Ptr< SatStatsHelperContainerm_statContainer
Ptr< SatTrafficHelperm_trafficHelper
std::map< uint32_t, Ptr< RandomVariableStream > > m_utCount
Ptr< RandomVariableStream > m_utMobileUserCount
std::map< uint32_t, Ptr< SatListPositionAllocator > > m_utPositionsByBeam
Ptr< RandomVariableStream > m_utUserCount

Detailed Description

A helper to make it easier to create example simulation cases.

Example usage:

Ptr<SimulationHelper> simulationHelper = CreateObject<SimulationHelper> ("My satellite simulation");

simulationHelper->SetDefaultValues ();

simulationHelper->SetBeams ("28 46 48 50 59"); simulationHelper->SetUtCountPerBeam (20); simulationHelper->SetUserCountPerUt (1); simulationHelper->SetSimulationTime (300);

You may also customize the attribute settings with variety of different public methods grouping several attributes under specific features.

Definition at line 64 of file simulation-helper.h.

Member Enumeration Documentation

◆ CrTxConf_t

Enumerator
CR_NOT_CONFIGURED 
CR_PERIODIC_CONTROL 
CR_SLOTTED_ALOHA 
CR_CRDSA_LOOSE_RC_0 

Definition at line 512 of file simulation-helper.h.

Constructor & Destructor Documentation

◆ SimulationHelper() [1/2]

◆ SimulationHelper() [2/2]

ns3::SimulationHelper::SimulationHelper ( std::string simulationName)

◆ ~SimulationHelper()

ns3::SimulationHelper::~SimulationHelper ( )
virtual

Destructor.

Definition at line 207 of file simulation-helper.cc.

Member Function Documentation

◆ AddDefaultUiArguments() [1/2]

void ns3::SimulationHelper::AddDefaultUiArguments ( CommandLine & cmd)

Add default command line arguments for the simulation.

This method must be called between creation of the CommandLine helper and CommandLine::Parse () call.

Parameters
cmdReference to CommandLine helper instance

Definition at line 337 of file simulation-helper.cc.

References m_outputPath.

Referenced by AddDefaultUiArguments().

Here is the caller graph for this function:

◆ AddDefaultUiArguments() [2/2]

void ns3::SimulationHelper::AddDefaultUiArguments ( CommandLine & cmd,
std::string & xmlInputFile )

Add default command line arguments for the simulation.

This method must be called between creation of the CommandLine helper and CommandLine::Parse () call.

Parameters
cmdReference to CommandLine helper instance
xmlInputFileReference to string containing XML input file name

Definition at line 328 of file simulation-helper.cc.

References AddDefaultUiArguments().

Here is the call graph for this function:

◆ ConfigureAttributesFromFile()

void ns3::SimulationHelper::ConfigureAttributesFromFile ( std::string filePath,
bool overrideManualConfiguration = true )

Configure this instance after reading input attributes from XML file.

Parameters
filePathfull path to an Input XML file
overrideManualConfigurationwhether or not to read some configuration (beams, UT count per beam, user count per UT, simulation time) from XML file

Definition at line 1640 of file simulation-helper.cc.

References CreateDefaultStats(), CreateSatScenario(), EnableProgressLogs(), GetTrafficHelper(), m_simTime, ns3::SatHelper::NONE, ReadInputAttributesFromFile(), SetBeams(), SetSimulationTime(), SetUserCountPerMobileUt(), SetUserCountPerUt(), and SetUtCountPerBeam().

Here is the call graph for this function:

◆ ConfigureFrame()

void ns3::SimulationHelper::ConfigureFrame ( uint32_t superFrameId,
double bw,
double carrierBw,
double rollOff,
double carrierSpacing,
bool isRandomAccess = false )

Configure a frame for a certain superframe id.

Parameters
superFrameIdSuperframe id (currently always 0)
bwFrame bandwidth
carrierBwBandwidth of the carriers within frame
rollOffRoll-off
carrierSpacingCarrier spacing between frames
isRandomAccessIs this a RA or DA frame

Definition at line 919 of file simulation-helper.cc.

References m_numberOfConfiguredFrames.

Referenced by EnableRandomAccess(), and SetDefaultValues().

Here is the caller graph for this function:

◆ ConfigureFrequencyBands()

void ns3::SimulationHelper::ConfigureFrequencyBands ( )

Configure the default setting for the forward and return link frequencies.

Definition at line 946 of file simulation-helper.cc.

Referenced by SetDefaultValues().

Here is the caller graph for this function:

◆ ConfigureFwdLinkBeamHopping()

void ns3::SimulationHelper::ConfigureFwdLinkBeamHopping ( )

Configure the beam hopping functionality for the FWD link.

This includes also setup of the proper frequency configuration related to reuse one in FWD link beam hopping.

Definition at line 971 of file simulation-helper.cc.

References ns3::SatBstpController::BH_STATIC, and m_scenarioPath.

Referenced by CreateSatScenario().

Here is the caller graph for this function:

◆ ConfigureLinkBudget()

void ns3::SimulationHelper::ConfigureLinkBudget ( )

Configure all link budget related attributes.

Definition at line 1010 of file simulation-helper.cc.

◆ CreateDefaultFwdLinkStats()

void ns3::SimulationHelper::CreateDefaultFwdLinkStats ( )

Create stats collectors if needed and set default statistics settings for both FWD link.

Adjust this method to your needs.

Definition at line 726 of file simulation-helper.cc.

References m_satHelper, m_statContainer, ns3::SatStatsHelper::OUTPUT_CDF_FILE, ns3::SatStatsHelper::OUTPUT_SCALAR_FILE, and ns3::SatStatsHelper::OUTPUT_SCATTER_FILE.

Referenced by CreateDefaultStats().

Here is the caller graph for this function:

◆ CreateDefaultRtnLinkStats()

void ns3::SimulationHelper::CreateDefaultRtnLinkStats ( )

Create stats collectors if needed and set default statistics settings for both RTN link.

Adjust this method to your needs.

Definition at line 798 of file simulation-helper.cc.

References m_satHelper, m_statContainer, ns3::SatStatsHelper::OUTPUT_CDF_FILE, ns3::SatStatsHelper::OUTPUT_CDF_PLOT, ns3::SatStatsHelper::OUTPUT_SCALAR_FILE, and ns3::SatStatsHelper::OUTPUT_SCATTER_FILE.

Referenced by CreateDefaultStats().

Here is the caller graph for this function:

◆ CreateDefaultStats()

void ns3::SimulationHelper::CreateDefaultStats ( )

Create stats collectors and set default statistics settings for both FWD and RTN links.

Definition at line 710 of file simulation-helper.cc.

References CreateDefaultFwdLinkStats(), CreateDefaultRtnLinkStats(), m_satHelper, and m_statContainer.

Referenced by ConfigureAttributesFromFile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateSatScenario()

Ptr< SatHelper > ns3::SimulationHelper::CreateSatScenario ( SatHelper::PreDefinedScenario_t scenario = SatHelper::NONE,
const std::string & mobileUtsFolder = "" )

Create the satellite scenario.

Parameters
scenarioKind of scenario to create, if any
mobileUtsFolderFolder from which to load mobile UT traces, if any
Returns
satHelper Satellite helper, which provides e.g. nodes for application installation.

Definition at line 1198 of file simulation-helper.cc.

References ns3::SatBeamUserInfo::AppendUt(), ConfigureFwdLinkBeamHopping(), ns3::SatHelper::FULL, GetGroupHelper(), ns3::SatEnvVariables::GetInstance(), GetNextUtCount(), GetNextUtUserCount(), IsBeamEnabled(), ns3::SatHelper::LARGER, m_commonUtPositions, m_groupHelper, m_inputFileUtListPositions, m_inputFileUtPositionsCheckBeams, m_satHelper, m_scenarioPath, m_utCount, m_utMobileUserCount, m_utPositionsByBeam, ns3::SatHelper::NONE, ParseScenarioFolder(), SetupOutputPath(), and ns3::SatHelper::SIMPLE.

Referenced by ConfigureAttributesFromFile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DisableAcm()

void ns3::SimulationHelper::DisableAcm ( SatEnums::SatLinkDir_t dir)

Disable ACM for a simulation direction.

Parameters
dirDirection

Definition at line 677 of file simulation-helper.cc.

References ns3::SatEnums::LD_FORWARD, and ns3::SatEnums::LD_RETURN.

◆ DisableAllCapacityAssignmentCategories()

void ns3::SimulationHelper::DisableAllCapacityAssignmentCategories ( )

Disable all capacity allocation categories: CRA/VBDC/RBDC.

Definition at line 386 of file simulation-helper.cc.

Referenced by SetDefaultValues().

Here is the caller graph for this function:

◆ DisableFca()

void ns3::SimulationHelper::DisableFca ( )

Disable free capacity allocation.

Definition at line 473 of file simulation-helper.cc.

◆ DisableProgressLogs()

void ns3::SimulationHelper::DisableProgressLogs ( )

Disables simulation progress logs.

Definition at line 1610 of file simulation-helper.cc.

References m_progressLoggingEnabled, and m_progressReportEvent.

◆ DisableRandomAccess()

void ns3::SimulationHelper::DisableRandomAccess ( )

Disable random access.

Definition at line 533 of file simulation-helper.cc.

References ns3::SatPhyRxCarrierConf::IF_CONSTANT, ns3::SatPhyRxCarrierConf::RA_COLLISION_NOT_DEFINED, ns3::SatEnums::RA_MODEL_OFF, and ns3::SatPhyRxCarrierConf::SIC_PERFECT.

Referenced by SetDefaultValues().

Here is the caller graph for this function:

◆ DoDispose()

void ns3::SimulationHelper::DoDispose ( void )

Disposing.

Definition at line 213 of file simulation-helper.cc.

References m_commonUtPositions, and m_utPositionsByBeam.

◆ EnableAcm()

void ns3::SimulationHelper::EnableAcm ( SatEnums::SatLinkDir_t dir)

Enable ACM for a simulation direction.

Parameters
dirDirection

Definition at line 647 of file simulation-helper.cc.

References ns3::SatEnums::LD_FORWARD, and ns3::SatEnums::LD_RETURN.

Referenced by SetDefaultValues().

Here is the caller graph for this function:

◆ EnableArq()

void ns3::SimulationHelper::EnableArq ( SatEnums::SatLinkDir_t dir)

Enable ARQ.

Definition at line 491 of file simulation-helper.cc.

References ns3::SatEnums::LD_FORWARD, and ns3::SatEnums::LD_RETURN.

◆ EnableCrdsa()

void ns3::SimulationHelper::EnableCrdsa ( )

Enable CRDSA random access.

Definition at line 562 of file simulation-helper.cc.

References EnableRandomAccess(), and m_randomAccessConfigured.

Here is the call graph for this function:

◆ EnableExternalFadingInputTrace()

void ns3::SimulationHelper::EnableExternalFadingInputTrace ( )

Enable external fading input.

Definition at line 1065 of file simulation-helper.cc.

References ns3::SatEnums::FADING_OFF.

◆ EnableFca()

void ns3::SimulationHelper::EnableFca ( )

Enable free capacity allocation.

Definition at line 465 of file simulation-helper.cc.

◆ EnableOnlyConstantRate()

void ns3::SimulationHelper::EnableOnlyConstantRate ( uint32_t rcIndex,
double rateKbps )

Enable only CRA for a given RC index.

Parameters
rcIndexRequest class index
rateKbpsCRA rate in kbps

Definition at line 418 of file simulation-helper.cc.

◆ EnableOnlyRbdc()

void ns3::SimulationHelper::EnableOnlyRbdc ( uint32_t rcIndex)

Enable only RBDC for a given RC index.

Parameters
rcIndexRequest class index

Definition at line 432 of file simulation-helper.cc.

◆ EnableOnlyVbdc()

void ns3::SimulationHelper::EnableOnlyVbdc ( uint32_t rcIndex)

Enable only VBDC for a given RC index.

Parameters
rcIndexRequest class index

Definition at line 448 of file simulation-helper.cc.

Referenced by SetDefaultValues().

Here is the caller graph for this function:

◆ EnableOutputTraces()

void ns3::SimulationHelper::EnableOutputTraces ( )

Enable all output traces.

Definition at line 999 of file simulation-helper.cc.

◆ EnablePeriodicalControlSlots()

void ns3::SimulationHelper::EnablePeriodicalControlSlots ( Time periodicity)

Enable periodical control slots.

Definition at line 481 of file simulation-helper.cc.

Referenced by SetDefaultValues().

Here is the caller graph for this function:

◆ EnableProgressLogs()

void ns3::SimulationHelper::EnableProgressLogs ( )

Enables simulation progress logging.

Progress is logged to stdout in form of 'Progress: (current simulation time)/(simulation length)'.

Definition at line 1589 of file simulation-helper.cc.

References GetSimTime(), m_progressLoggingEnabled, m_progressReportEvent, m_progressUpdateInterval, and ProgressCb().

Referenced by ConfigureAttributesFromFile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EnableRandomAccess()

void ns3::SimulationHelper::EnableRandomAccess ( )
protected

Enable random access.

Definition at line 578 of file simulation-helper.cc.

References ConfigureFrame(), ns3::SatPhyRxCarrierConf::IF_PER_PACKET, m_randomAccessConfigured, ns3::SatPhyRxCarrierConf::RA_COLLISION_CHECK_AGAINST_SINR, ns3::SatEnums::RA_MODEL_RCS2_SPECIFICATION, and ns3::SatPhyRxCarrierConf::SIC_RESIDUAL.

Referenced by EnableCrdsa(), and EnableSlottedAloha().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EnableSlottedAloha()

void ns3::SimulationHelper::EnableSlottedAloha ( )

Enable slotted ALOHA random access.

Definition at line 547 of file simulation-helper.cc.

References EnableRandomAccess(), and m_randomAccessConfigured.

Here is the call graph for this function:

◆ EnableUtListPositionsFromInputFile()

void ns3::SimulationHelper::EnableUtListPositionsFromInputFile ( std::string inputFile,
bool checkBeams = true )

Enable reading UT list positions from input file.

Parameters
inputFileList postion file path (starting from data/)
checkBeam

Definition at line 1105 of file simulation-helper.cc.

References m_inputFileUtListPositions, and m_inputFileUtPositionsCheckBeams.

◆ GetBeams()

const std::set< uint32_t > & ns3::SimulationHelper::GetBeams ( )

Get enabled beams in integer format.

Returns
const set of integers representing beam ids

Definition at line 1535 of file simulation-helper.cc.

References m_enabledBeams.

◆ GetBeamSet()

std::set< uint32_t > ns3::SimulationHelper::GetBeamSet ( void ) const
inline

Definition at line 115 of file simulation-helper.h.

References m_enabledBeams.

◆ GetCnoHelper()

Ptr< SatCnoHelper > ns3::SimulationHelper::GetCnoHelper ( )

Get the C/N0 helper to customize C/N0 on some nodes.

If does not exist, one is created.

Returns
C/N0 Helper

Definition at line 1156 of file simulation-helper.cc.

References m_cnoHelper, and m_satHelper.

◆ GetGroupHelper()

Ptr< SatGroupHelper > ns3::SimulationHelper::GetGroupHelper ( )

Get the group helper.

If does not exist, one is created.

Returns
Group Helper

Definition at line 1143 of file simulation-helper.cc.

References m_groupHelper.

Referenced by CreateSatScenario().

Here is the caller graph for this function:

◆ GetNextUtCount()

uint32_t ns3::SimulationHelper::GetNextUtCount ( uint32_t beamId = 0) const
protected

Get next UT count from internal random variable stream.

Definition at line 1558 of file simulation-helper.cc.

References m_utCount.

Referenced by CreateSatScenario().

Here is the caller graph for this function:

◆ GetNextUtUserCount()

uint32_t ns3::SimulationHelper::GetNextUtUserCount ( ) const
inlineprotected

Get next UT user count from internal random variable stream.

Definition at line 546 of file simulation-helper.h.

References m_utUserCount.

Referenced by CreateSatScenario().

Here is the caller graph for this function:

◆ GetSatelliteHelper()

Ptr< SatHelper > ns3::SimulationHelper::GetSatelliteHelper ( )
inline

If lower layer API access is required, use this to access SatHelper.

You MUST have called CreateSatScenario before calling this method.

Definition at line 481 of file simulation-helper.h.

References m_satHelper.

Referenced by GetTrafficHelper().

Here is the caller graph for this function:

◆ GetSimTime()

Time & ns3::SimulationHelper::GetSimTime ( )
inline

Get simulation time.

Returns
errorRate Simulation time

Definition at line 447 of file simulation-helper.h.

References m_simTime.

Referenced by EnableProgressLogs(), and ProgressCb().

Here is the caller graph for this function:

◆ GetStatisticsContainer()

Ptr< SatStatsHelperContainer > ns3::SimulationHelper::GetStatisticsContainer ( )

Get the statistics container of this helper.

If does not exist, one is created.

Returns
Statistics helper container

Definition at line 1114 of file simulation-helper.cc.

References m_satHelper, and m_statContainer.

Referenced by GetTrafficHelper().

Here is the caller graph for this function:

◆ GetTrafficHelper()

Ptr< SatTrafficHelper > ns3::SimulationHelper::GetTrafficHelper ( )

Get the traffic helper to create more complex traffics.

If does not exist, one is created.

Returns
Traffic Helper

Definition at line 1129 of file simulation-helper.cc.

References GetSatelliteHelper(), GetStatisticsContainer(), and m_trafficHelper.

Referenced by ConfigureAttributesFromFile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetTypeId()

TypeId ns3::SimulationHelper::GetTypeId ( void )
static

Derived from Object.

Definition at line 134 of file simulation-helper.cc.

◆ HasSinkInstalled()

bool ns3::SimulationHelper::HasSinkInstalled ( Ptr< Node > node,
uint16_t port )
protected

Check if node has a PacketSink installed at certain port.

Definition at line 1443 of file simulation-helper.cc.

◆ IsBeamEnabled()

bool ns3::SimulationHelper::IsBeamEnabled ( uint32_t beamId) const
protected

Check if a beam is enabled.

Definition at line 1543 of file simulation-helper.cc.

References m_enabledBeams.

Referenced by CreateSatScenario().

Here is the caller graph for this function:

◆ LoadScenario()

void ns3::SimulationHelper::LoadScenario ( std::string name)

Load a scenario from data submodule.

Parameters
nameThe scenario name. Must be a folder located in data/scenarios

Definition at line 1619 of file simulation-helper.cc.

References ns3::SatEnvVariables::GetInstance(), and m_scenarioPath.

Here is the call graph for this function:

◆ ParseScenarioFolder()

void ns3::SimulationHelper::ParseScenarioFolder ( )

parse scenario folder to load all variables that can be

Definition at line 1634 of file simulation-helper.cc.

Referenced by CreateSatScenario().

Here is the caller graph for this function:

◆ ProgressCb()

void ns3::SimulationHelper::ProgressCb ( )
protected

Callback that prints simulation progress to stdout.

Definition at line 701 of file simulation-helper.cc.

References GetSimTime(), m_progressReportEvent, m_progressUpdateInterval, and ProgressCb().

Referenced by EnableProgressLogs(), and ProgressCb().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadInputAttributesFromFile()

void ns3::SimulationHelper::ReadInputAttributesFromFile ( std::string filePath)

Read input attributes from XML file.

Parameters
filePathfull path to an Input XML file

Definition at line 1672 of file simulation-helper.cc.

Referenced by ConfigureAttributesFromFile().

Here is the caller graph for this function:

◆ RunSimulation()

void ns3::SimulationHelper::RunSimulation ( )

Run the simulation.

Definition at line 1572 of file simulation-helper.cc.

References m_enabledBeamsStr, m_simTime, and m_simulationName.

◆ SetBeams()

void ns3::SimulationHelper::SetBeams ( const std::string & beamList)

Definition at line 1495 of file simulation-helper.cc.

References m_enabledBeams, and m_enabledBeamsStr.

Referenced by ConfigureAttributesFromFile().

Here is the caller graph for this function:

◆ SetBeamSet()

void ns3::SimulationHelper::SetBeamSet ( std::set< uint32_t > beamSet)

Definition at line 1521 of file simulation-helper.cc.

References m_enabledBeams, and m_enabledBeamsStr.

◆ SetCommonUtPositionAllocator()

void ns3::SimulationHelper::SetCommonUtPositionAllocator ( Ptr< SatListPositionAllocator > posAllocator)

Set common UT position allocator for all beams.

The position allocator is used to draw UT position geocoordinates in order of the beam IDs and number of UTs configured. No validation is done.

Parameters
posAllocator

Definition at line 1090 of file simulation-helper.cc.

References m_commonUtPositions.

◆ SetCrTxConf()

◆ SetDefaultValues()

◆ SetErrorModel()

void ns3::SimulationHelper::SetErrorModel ( SatPhyRxCarrierConf::ErrorModel em,
double errorRate = 0.0 )

Set simulation error model.

Parameters
emError model.
errorRateStatic error rate if constant error model used

Definition at line 888 of file simulation-helper.cc.

References ns3::SatPhyRxCarrierConf::EM_CONSTANT.

Referenced by SetDefaultValues(), and SetIdealPhyParameterization().

Here is the caller graph for this function:

◆ SetGwUserCount()

void ns3::SimulationHelper::SetGwUserCount ( uint32_t gwUserCount)

Set the number of GW users in the scenario.

Must be called before creation of satellite scenario.

Parameters
gwUserCount

Definition at line 294 of file simulation-helper.cc.

◆ SetIdealPhyParameterization()

void ns3::SimulationHelper::SetIdealPhyParameterization ( )

Set ideal channel/physical layer parameterization.

Definition at line 625 of file simulation-helper.cc.

References ns3::SatPhyRxCarrierConf::EM_NONE, ns3::SatPhyRxCarrierConf::IF_CONSTANT, SetErrorModel(), and SetInterferenceModel().

Here is the call graph for this function:

◆ SetInterferenceModel()

void ns3::SimulationHelper::SetInterferenceModel ( SatPhyRxCarrierConf::InterferenceModel ifModel,
double constantIf = 0.0 )

Set simulation interference model.

Parameters
ifModelInterference model.
ifEliminationModelInterference elimination model.
constantIfStatic interference if constant interference model used
residualSamplingErrorSampling error if residual interference elimination model used

Definition at line 903 of file simulation-helper.cc.

References ns3::SatPhyRxCarrierConf::IF_CONSTANT.

Referenced by SetDefaultValues(), and SetIdealPhyParameterization().

Here is the caller graph for this function:

◆ SetOutputPath()

void ns3::SimulationHelper::SetOutputPath ( std::string path)

Force a output file path to this simulation instead of default satellite/data/sims/.

Parameters
pathOutput file path.

Definition at line 319 of file simulation-helper.cc.

References m_outputPath.

◆ SetOutputTag()

void ns3::SimulationHelper::SetOutputTag ( std::string tag)

Set simulation output tag, which is the basename of the directory where output files are stored.

Parameters
tagSimulation tag.

Definition at line 310 of file simulation-helper.cc.

References m_simulationTag.

◆ SetSimulationTime() [1/2]

void ns3::SimulationHelper::SetSimulationTime ( double seconds)

Set simulation time in seconds.

Parameters
seconds

Definition at line 302 of file simulation-helper.cc.

References m_simTime.

Referenced by ConfigureAttributesFromFile().

Here is the caller graph for this function:

◆ SetSimulationTime() [2/2]

void ns3::SimulationHelper::SetSimulationTime ( Time time)
inline

Set simulation time.

Parameters
time

Definition at line 191 of file simulation-helper.h.

References m_simTime.

◆ SetupOutputPath()

void ns3::SimulationHelper::SetupOutputPath ( )
protected

Check if output path has been set.

If not, then create a default output directory inside satellite/data/sims/campaign-name/tag-name.

Definition at line 1169 of file simulation-helper.cc.

References ns3::SatEnvVariables::GetInstance(), m_outputPath, m_simulationName, and m_simulationTag.

Referenced by CreateSatScenario().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetUserCountPerMobileUt() [1/2]

void ns3::SimulationHelper::SetUserCountPerMobileUt ( Ptr< RandomVariableStream > rs)

Set mobile UT count per beam to be taken from a random variable stream.

Parameters
rsRandomVariableStream to be used, must implement GetInteger.

Definition at line 286 of file simulation-helper.cc.

References m_utMobileUserCount.

◆ SetUserCountPerMobileUt() [2/2]

void ns3::SimulationHelper::SetUserCountPerMobileUt ( uint32_t count)

Set user count per mobile UT.

Parameters
countNumber of users per mobile UT.

Definition at line 277 of file simulation-helper.cc.

References m_utMobileUserCount.

Referenced by ConfigureAttributesFromFile().

Here is the caller graph for this function:

◆ SetUserCountPerUt() [1/2]

void ns3::SimulationHelper::SetUserCountPerUt ( Ptr< RandomVariableStream > rs)

Set UT count per beam to be taken from a random variable stream.

Parameters
rsRandomVariableStream to be used, must implement GetInteger.

Definition at line 269 of file simulation-helper.cc.

References m_utUserCount.

◆ SetUserCountPerUt() [2/2]

void ns3::SimulationHelper::SetUserCountPerUt ( uint32_t count)

Set user count per UT.

Parameters
countNumber of users per UT.

Definition at line 260 of file simulation-helper.cc.

References m_utUserCount.

Referenced by ConfigureAttributesFromFile().

Here is the caller graph for this function:

◆ SetUtCountPerBeam() [1/4]

void ns3::SimulationHelper::SetUtCountPerBeam ( Ptr< RandomVariableStream > rs)

Set UT count per beam to be taken from a random variable stream.

Parameters
rsRandomVariableStream to be used, must implement GetInteger.

Definition at line 233 of file simulation-helper.cc.

References m_utCount.

◆ SetUtCountPerBeam() [2/4]

void ns3::SimulationHelper::SetUtCountPerBeam ( uint32_t beamId,
Ptr< RandomVariableStream > rs )

Set UT count per beam to be taken from a random variable stream.

Parameters
rsRandomVariableStream to be used, must implement GetInteger.

Definition at line 252 of file simulation-helper.cc.

References m_utCount.

◆ SetUtCountPerBeam() [3/4]

void ns3::SimulationHelper::SetUtCountPerBeam ( uint32_t beamId,
uint32_t count )

Set UT count per beam.

Parameters
countNumber of UTs per beam.

Definition at line 241 of file simulation-helper.cc.

References m_utCount.

◆ SetUtCountPerBeam() [4/4]

void ns3::SimulationHelper::SetUtCountPerBeam ( uint32_t count)

Set UT count per beam.

Parameters
countNumber of UTs per beam.

Definition at line 222 of file simulation-helper.cc.

References m_utCount.

Referenced by ConfigureAttributesFromFile().

Here is the caller graph for this function:

◆ SetUtPositionAllocatorForBeam()

void ns3::SimulationHelper::SetUtPositionAllocatorForBeam ( uint32_t beamId,
Ptr< SatListPositionAllocator > posAllocator )

Set a list position allocator for UTs of a specific beam.

The position allocator is used to draw UT position geocoordinates when UTs are created for that specific beam-

Parameters
beamIdBeam ID
posAllocatorList of UT positions, must match the number of UTs configured

Definition at line 1097 of file simulation-helper.cc.

References m_utPositionsByBeam.

◆ StoreAttributesToFile()

std::string ns3::SimulationHelper::StoreAttributesToFile ( std::string fileName,
bool outputAttributes = false )

Store all used attributes.

Parameters
fileNameOutput filename
outputAttributesWhether or not to store individual objects attributes to file
Returns
string Output path

Definition at line 1685 of file simulation-helper.cc.

References ns3::SatEnvVariables::GetInstance().

Here is the call graph for this function:

Member Data Documentation

◆ m_cnoHelper

Ptr<SatCnoHelper> ns3::SimulationHelper::m_cnoHelper
private

Definition at line 568 of file simulation-helper.h.

Referenced by GetCnoHelper().

◆ m_commonUtPositions

Ptr<SatListPositionAllocator> ns3::SimulationHelper::m_commonUtPositions
private

◆ m_enabledBeams

std::set<uint32_t> ns3::SimulationHelper::m_enabledBeams
private

◆ m_enabledBeamsStr

std::string ns3::SimulationHelper::m_enabledBeamsStr
private

◆ m_groupHelper

Ptr<SatGroupHelper> ns3::SimulationHelper::m_groupHelper
private

Definition at line 567 of file simulation-helper.h.

Referenced by CreateSatScenario(), and GetGroupHelper().

◆ m_inputFileUtListPositions

std::string ns3::SimulationHelper::m_inputFileUtListPositions
private

◆ m_inputFileUtPositionsCheckBeams

bool ns3::SimulationHelper::m_inputFileUtPositionsCheckBeams
private

◆ m_numberOfConfiguredFrames

uint32_t ns3::SimulationHelper::m_numberOfConfiguredFrames
private

Definition at line 584 of file simulation-helper.h.

Referenced by SimulationHelper(), SimulationHelper(), and ConfigureFrame().

◆ m_outputPath

std::string ns3::SimulationHelper::m_outputPath
private

◆ m_progressLoggingEnabled

bool ns3::SimulationHelper::m_progressLoggingEnabled
private

◆ m_progressReportEvent

EventId ns3::SimulationHelper::m_progressReportEvent
private

Definition at line 591 of file simulation-helper.h.

Referenced by DisableProgressLogs(), EnableProgressLogs(), and ProgressCb().

◆ m_progressUpdateInterval

Time ns3::SimulationHelper::m_progressUpdateInterval
private

◆ m_randomAccessConfigured

bool ns3::SimulationHelper::m_randomAccessConfigured
private

◆ m_satHelper

◆ m_scenarioPath

std::string ns3::SimulationHelper::m_scenarioPath
private

◆ m_simTime

Time ns3::SimulationHelper::m_simTime
private

◆ m_simulationName

std::string ns3::SimulationHelper::m_simulationName
private

◆ m_simulationTag

std::string ns3::SimulationHelper::m_simulationTag
private

Definition at line 574 of file simulation-helper.h.

Referenced by SetOutputTag(), and SetupOutputPath().

◆ m_statContainer

◆ m_trafficHelper

Ptr<SatTrafficHelper> ns3::SimulationHelper::m_trafficHelper
private

Definition at line 566 of file simulation-helper.h.

Referenced by GetTrafficHelper().

◆ m_utCount

std::map<uint32_t, Ptr<RandomVariableStream> > ns3::SimulationHelper::m_utCount
private

◆ m_utMobileUserCount

Ptr<RandomVariableStream> ns3::SimulationHelper::m_utMobileUserCount
private

◆ m_utPositionsByBeam

std::map<uint32_t, Ptr<SatListPositionAllocator> > ns3::SimulationHelper::m_utPositionsByBeam
private

◆ m_utUserCount

Ptr<RandomVariableStream> ns3::SimulationHelper::m_utUserCount
private

The documentation for this class was generated from the following files: