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 }
 
enum  LoraTrafficModel_t { ONE_SHOT , PERIODIC , LORA_CBR }
 
enum  TrafficDirection_t { RTN_LINK , FWD_LINK }
 
enum  TrafficModel_t { CBR , ONOFF , HTTP , NRTV }
 
enum  TransportLayerProtocol_t { UDP , TCP }
 

Public Member Functions

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

Static Public Member Functions

static TypeId GetTypeId (void)
 Derived from Object. More...
 

Protected Member Functions

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

Private Attributes

Ptr< SatCnoHelperm_cnoHelper
 
Ptr< SatListPositionAllocatorm_commonUtPositions
 
std::set< uint32_t > m_enabledBeams
 
std::string m_enabledBeamsStr
 
bool m_enableInputFileUtListPositions
 
Ptr< SatGroupHelperm_groupHelper
 
uint32_t m_gwUserId
 
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
 
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 63 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 608 of file simulation-helper.h.

◆ LoraTrafficModel_t

Enumerator
ONE_SHOT 
PERIODIC 
LORA_CBR 

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

◆ TrafficDirection_t

Enumerator
RTN_LINK 
FWD_LINK 

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

◆ TrafficModel_t

Enumerator
CBR 
ONOFF 
HTTP 
NRTV 

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

◆ TransportLayerProtocol_t

Enumerator
UDP 
TCP 

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

Constructor & Destructor Documentation

◆ SimulationHelper() [1/2]

ns3::SimulationHelper::SimulationHelper ( )

Default constructor, which is not used.

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

◆ SimulationHelper() [2/2]

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

Contructor for simulation helper.

Parameters
simulationNameName of the simulation.

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

References m_simulationName.

◆ ~SimulationHelper()

ns3::SimulationHelper::~SimulationHelper ( )
virtual

Destructor.

Definition at line 308 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 438 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 429 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 1915 of file simulation-helper.cc.

References ns3::SimulationHelperConf::BOTH_LINK, CBR, CreateDefaultStats(), CreateSatScenario(), EnableProgressLogs(), FWD_LINK, ns3::SimulationHelperConf::FWD_LINK, HTTP, InstallTrafficModel(), m_simTime, ns3::SatHelper::NONE, NRTV, ONOFF, ns3::SimulationHelperConf::PROTOCOL_BOTH, ns3::SimulationHelperConf::PROTOCOL_TCP, ns3::SimulationHelperConf::PROTOCOL_UDP, ReadInputAttributesFromFile(), RTN_LINK, ns3::SimulationHelperConf::RTN_LINK, SetBeams(), SetSimulationTime(), SetUserCountPerMobileUt(), SetUserCountPerUt(), SetUtCountPerBeam(), TCP, and UDP.

+ 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 1022 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 1049 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 1074 of file simulation-helper.cc.

References ns3::SatBstpController::BH_STATIC.

◆ ConfigureLinkBudget()

void ns3::SimulationHelper::ConfigureLinkBudget ( )

Configure all link budget related attributes.

Definition at line 1117 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 829 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 901 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 813 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 1311 of file simulation-helper.cc.

References ns3::SatBeamUserInfo::AppendUt(), GetGroupHelper(), GetNextUtCount(), GetNextUtUserCount(), IsBeamEnabled(), m_commonUtPositions, m_enableInputFileUtListPositions, m_groupHelper, m_inputFileUtPositionsCheckBeams, m_satHelper, m_utMobileUserCount, m_utPositionsByBeam, ns3::SatHelper::NONE, and SetupOutputPath().

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 779 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 487 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 574 of file simulation-helper.cc.

◆ DisableProgressLogs()

void ns3::SimulationHelper::DisableProgressLogs ( )

Disables simulation progress logs.

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

References m_progressLoggingEnabled, and m_progressReportEvent.

◆ DisableRandomAccess()

void ns3::SimulationHelper::DisableRandomAccess ( )

Disable random access.

Definition at line 634 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 314 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 748 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 592 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 663 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 1172 of file simulation-helper.cc.

References ns3::SatEnums::FADING_OFF.

◆ EnableFca()

void ns3::SimulationHelper::EnableFca ( )

Enable free capacity allocation.

Definition at line 566 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 519 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 533 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 549 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 1106 of file simulation-helper.cc.

◆ EnablePeriodicalControlSlots()

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

Enable periodical control slots.

Definition at line 582 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 1885 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 679 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 648 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 1212 of file simulation-helper.cc.

References m_enableInputFileUtListPositions, 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 1831 of file simulation-helper.cc.

References m_enabledBeams.

◆ GetBeamSet()

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

Definition at line 119 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 1269 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 1256 of file simulation-helper.cc.

References m_groupHelper.

Referenced by CreateSatScenario().

+ Here is the caller graph for this function:

◆ GetInstanceTypeId()

TypeId ns3::SimulationHelper::GetInstanceTypeId ( void  ) const

Derived from Object.

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

References GetTypeId().

+ Here is the call 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 1854 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 651 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 473 of file simulation-helper.h.

References m_satHelper.

Referenced by GetTrafficHelper(), and InstallLoraTrafficModel().

+ Here is the caller graph for this function:

◆ GetSimTime()

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

Get simulation time.

Returns
errorRate Simulation time

Definition at line 439 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 1227 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 1242 of file simulation-helper.cc.

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

+ Here is the call graph for this function:

◆ GetTypeId()

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

Derived from Object.

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

Referenced by GetInstanceTypeId().

+ Here is the caller graph for this function:

◆ 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 1455 of file simulation-helper.cc.

Referenced by InstallLoraTrafficModel(), and InstallTrafficModel().

+ Here is the caller graph for this function:

◆ InstallLoraTrafficModel()

void ns3::SimulationHelper::InstallLoraTrafficModel ( LoraTrafficModel_t  trafficModel,
Time  interval,
uint32_t  packetSize,
Time  startTime,
Time  stopTime,
Time  startDelay 
)

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

References GetSatelliteHelper(), HasSinkInstalled(), LORA_CBR, m_gwUserId, m_satHelper, ONE_SHOT, and PERIODIC.

+ Here is the call graph for this function:

◆ InstallTrafficModel() [1/5]

void ns3::SimulationHelper::InstallTrafficModel ( TrafficModel_t  trafficModel,
TransportLayerProtocol_t  protocol,
TrafficDirection_t  direction 
)
inline

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

References InstallTrafficModel(), and m_simTime.

+ Here is the call graph for this function:

◆ InstallTrafficModel() [2/5]

void ns3::SimulationHelper::InstallTrafficModel ( TrafficModel_t  trafficModel,
TransportLayerProtocol_t  protocol,
TrafficDirection_t  direction,
Time  startTime 
)
inline

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

References InstallTrafficModel(), and m_simTime.

+ Here is the call graph for this function:

◆ InstallTrafficModel() [3/5]

void ns3::SimulationHelper::InstallTrafficModel ( TrafficModel_t  trafficModel,
TransportLayerProtocol_t  protocol,
TrafficDirection_t  direction,
Time  startTime,
Time  stopTime 
)
inline

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

References InstallTrafficModel().

+ Here is the call graph for this function:

◆ InstallTrafficModel() [4/5]

void ns3::SimulationHelper::InstallTrafficModel ( TrafficModel_t  trafficModel,
TransportLayerProtocol_t  protocol,
TrafficDirection_t  direction,
Time  startTime,
Time  stopTime,
Time  startDelay 
)
inline

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

References InstallTrafficModel().

+ Here is the call graph for this function:

◆ InstallTrafficModel() [5/5]

void ns3::SimulationHelper::InstallTrafficModel ( TrafficModel_t  trafficModel,
TransportLayerProtocol_t  protocol,
TrafficDirection_t  direction,
Time  startTime,
Time  stopTime,
Time  startDelay,
double  percentage 
)

Install simple traffic model from GW users to UT users or vice versa.

If traffic source/target is a single GW user, then its ID can be changed with SetGwUserId ().

Parameters
trafficModelTraffic models
protocolTransport layer protocol
directionDirection of traffic
startTimeApplication Start time
stopTimeApplication stop time
startDelayapplication start delay between each user
percentageratio of users on which this traffic model will be installed

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

References CBR, FWD_LINK, HasSinkInstalled(), HTTP, ns3::SatOnOffHelper::Install(), m_gwUserId, m_satHelper, NRTV, ONOFF, RTN_LINK, ns3::SatOnOffHelper::SetAttribute(), and TCP.

Referenced by ConfigureAttributesFromFile(), and InstallTrafficModel().

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

◆ IsBeamEnabled()

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

Check if a beam is enabled.

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

References m_enabledBeams.

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 804 of file simulation-helper.cc.

References GetSimTime(), m_progressReportEvent, and m_progressUpdateInterval.

Referenced by EnableProgressLogs().

+ 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 2045 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 1868 of file simulation-helper.cc.

References m_enabledBeamsStr, m_satHelper, m_simTime, and m_simulationName.

◆ SetBeams()

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

Definition at line 1791 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 1817 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 1197 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 991 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 395 of file simulation-helper.cc.

◆ SetGwUserId()

void ns3::SimulationHelper::SetGwUserId ( uint32_t  gwUserId)
inline

Set the ID of the GW user for traffic models.

Parameters
gwUserIdGW user's ID

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

References m_gwUserId.

◆ SetIdealPhyParameterization()

void ns3::SimulationHelper::SetIdealPhyParameterization ( )

Set ideal channel/physical layer parameterization.

Definition at line 726 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 1006 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 420 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 411 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 403 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 195 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 1282 of file simulation-helper.cc.

References m_outputPath, m_simulationName, and m_simulationTag.

Referenced by CreateSatScenario().

+ 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 387 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 378 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 370 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 361 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 334 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 353 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 342 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 323 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 1204 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 2058 of file simulation-helper.cc.

Member Data Documentation

◆ m_cnoHelper

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

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

Referenced by GetCnoHelper().

◆ m_commonUtPositions

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

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

Referenced by CreateSatScenario(), DoDispose(), and SetCommonUtPositionAllocator().

◆ m_enabledBeams

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

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

Referenced by GetBeams(), GetBeamSet(), IsBeamEnabled(), SetBeams(), and SetBeamSet().

◆ m_enabledBeamsStr

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

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

Referenced by RunSimulation(), SetBeams(), and SetBeamSet().

◆ m_enableInputFileUtListPositions

bool ns3::SimulationHelper::m_enableInputFileUtListPositions
private

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

Referenced by CreateSatScenario(), and EnableUtListPositionsFromInputFile().

◆ m_groupHelper

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

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

Referenced by CreateSatScenario(), and GetGroupHelper().

◆ m_gwUserId

uint32_t ns3::SimulationHelper::m_gwUserId
private

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

Referenced by InstallLoraTrafficModel(), InstallTrafficModel(), and SetGwUserId().

◆ m_inputFileUtPositionsCheckBeams

bool ns3::SimulationHelper::m_inputFileUtPositionsCheckBeams
private

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

Referenced by CreateSatScenario(), and EnableUtListPositionsFromInputFile().

◆ m_numberOfConfiguredFrames

uint32_t ns3::SimulationHelper::m_numberOfConfiguredFrames
private

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

Referenced by ConfigureFrame().

◆ m_outputPath

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

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

Referenced by AddDefaultUiArguments(), SetOutputPath(), and SetupOutputPath().

◆ m_progressLoggingEnabled

bool ns3::SimulationHelper::m_progressLoggingEnabled
private

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

Referenced by DisableProgressLogs(), and EnableProgressLogs().

◆ m_progressReportEvent

EventId ns3::SimulationHelper::m_progressReportEvent
private

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

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

◆ m_progressUpdateInterval

Time ns3::SimulationHelper::m_progressUpdateInterval
private

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

Referenced by EnableProgressLogs(), and ProgressCb().

◆ m_randomAccessConfigured

bool ns3::SimulationHelper::m_randomAccessConfigured
private

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

Referenced by EnableCrdsa(), EnableRandomAccess(), and EnableSlottedAloha().

◆ m_satHelper

◆ m_simTime

Time ns3::SimulationHelper::m_simTime
private

◆ m_simulationName

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

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

Referenced by SimulationHelper(), RunSimulation(), and SetupOutputPath().

◆ m_simulationTag

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

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

Referenced by SetOutputTag(), and SetupOutputPath().

◆ m_statContainer

Ptr<SatStatsHelperContainer> ns3::SimulationHelper::m_statContainer
private

◆ m_trafficHelper

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

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

Referenced by GetTrafficHelper().

◆ m_utCount

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

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

Referenced by GetNextUtCount(), and SetUtCountPerBeam().

◆ m_utMobileUserCount

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

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

Referenced by CreateSatScenario(), and SetUserCountPerMobileUt().

◆ m_utPositionsByBeam

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

◆ m_utUserCount

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

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

Referenced by GetNextUtUserCount(), and SetUserCountPerUt().


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