A helper to make it easier to create example simulation cases. More...
#include "simulation-helper.h"
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< SatHelper > | CreateSatScenario (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< SatCnoHelper > | GetCnoHelper () |
| Get the C/N0 helper to customize C/N0 on some nodes. | |
| Ptr< SatGroupHelper > | GetGroupHelper () |
| Get the group helper. | |
| Ptr< SatHelper > | GetSatelliteHelper () |
| If lower layer API access is required, use this to access SatHelper. | |
| Time & | GetSimTime () |
| Get simulation time. | |
| Ptr< SatStatsHelperContainer > | GetStatisticsContainer () |
| Get the statistics container of this helper. | |
| Ptr< SatTrafficHelper > | GetTrafficHelper () |
| 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< SatCnoHelper > | m_cnoHelper |
| Ptr< SatListPositionAllocator > | m_commonUtPositions |
| std::set< uint32_t > | m_enabledBeams |
| std::string | m_enabledBeamsStr |
| Ptr< SatGroupHelper > | m_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< SatHelper > | m_satHelper |
| std::string | m_scenarioPath |
| Time | m_simTime |
| std::string | m_simulationName |
| std::string | m_simulationTag |
| Ptr< SatStatsHelperContainer > | m_statContainer |
| Ptr< SatTrafficHelper > | m_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 |
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.
| Enumerator | |
|---|---|
| CR_NOT_CONFIGURED | |
| CR_PERIODIC_CONTROL | |
| CR_SLOTTED_ALOHA | |
| CR_CRDSA_LOOSE_RC_0 | |
Definition at line 512 of file simulation-helper.h.
| ns3::SimulationHelper::SimulationHelper | ( | ) |
Default constructor, which is not used.
Definition at line 141 of file simulation-helper.cc.
References m_commonUtPositions, m_enabledBeams, m_enabledBeamsStr, m_inputFileUtListPositions, m_inputFileUtPositionsCheckBeams, m_numberOfConfiguredFrames, m_outputPath, m_progressLoggingEnabled, m_progressUpdateInterval, m_randomAccessConfigured, m_satHelper, m_scenarioPath, m_simTime, m_simulationName, m_statContainer, m_utCount, m_utMobileUserCount, m_utPositionsByBeam, and m_utUserCount.
| ns3::SimulationHelper::SimulationHelper | ( | std::string | simulationName | ) |
Contructor for simulation helper.
| simulationName | Name of the simulation. |
Definition at line 166 of file simulation-helper.cc.
References m_commonUtPositions, m_enabledBeams, m_enabledBeamsStr, m_inputFileUtListPositions, m_inputFileUtPositionsCheckBeams, m_numberOfConfiguredFrames, m_outputPath, m_progressLoggingEnabled, m_progressUpdateInterval, m_randomAccessConfigured, m_satHelper, m_simTime, m_simulationName, m_statContainer, m_utCount, m_utMobileUserCount, m_utPositionsByBeam, and m_utUserCount.
|
virtual |
Destructor.
Definition at line 207 of file simulation-helper.cc.
| 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.
| cmd | Reference to CommandLine helper instance |
Definition at line 337 of file simulation-helper.cc.
References m_outputPath.
Referenced by AddDefaultUiArguments().
| 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.
| cmd | Reference to CommandLine helper instance |
| xmlInputFile | Reference to string containing XML input file name |
Definition at line 328 of file simulation-helper.cc.
References AddDefaultUiArguments().
| void ns3::SimulationHelper::ConfigureAttributesFromFile | ( | std::string | filePath, |
| bool | overrideManualConfiguration = true ) |
Configure this instance after reading input attributes from XML file.
| filePath | full path to an Input XML file |
| overrideManualConfiguration | whether 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().
| 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.
| superFrameId | Superframe id (currently always 0) |
| bw | Frame bandwidth |
| carrierBw | Bandwidth of the carriers within frame |
| rollOff | Roll-off |
| carrierSpacing | Carrier spacing between frames |
| isRandomAccess | Is this a RA or DA frame |
Definition at line 919 of file simulation-helper.cc.
References m_numberOfConfiguredFrames.
Referenced by EnableRandomAccess(), and SetDefaultValues().
| 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().
| 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().
| void ns3::SimulationHelper::ConfigureLinkBudget | ( | ) |
Configure all link budget related attributes.
Definition at line 1010 of file simulation-helper.cc.
| 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().
| 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().
| 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().
| Ptr< SatHelper > ns3::SimulationHelper::CreateSatScenario | ( | SatHelper::PreDefinedScenario_t | scenario = SatHelper::NONE, |
| const std::string & | mobileUtsFolder = "" ) |
Create the satellite scenario.
| scenario | Kind of scenario to create, if any |
| mobileUtsFolder | Folder from which to load mobile UT traces, if any |
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().
| void ns3::SimulationHelper::DisableAcm | ( | SatEnums::SatLinkDir_t | dir | ) |
Disable ACM for a simulation direction.
| dir | Direction |
Definition at line 677 of file simulation-helper.cc.
References ns3::SatEnums::LD_FORWARD, and ns3::SatEnums::LD_RETURN.
| void ns3::SimulationHelper::DisableAllCapacityAssignmentCategories | ( | ) |
Disable all capacity allocation categories: CRA/VBDC/RBDC.
Definition at line 386 of file simulation-helper.cc.
Referenced by SetDefaultValues().
| void ns3::SimulationHelper::DisableFca | ( | ) |
Disable free capacity allocation.
Definition at line 473 of file simulation-helper.cc.
| void ns3::SimulationHelper::DisableProgressLogs | ( | ) |
Disables simulation progress logs.
Definition at line 1610 of file simulation-helper.cc.
References m_progressLoggingEnabled, and m_progressReportEvent.
| 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().
| void ns3::SimulationHelper::DoDispose | ( | void | ) |
Disposing.
Definition at line 213 of file simulation-helper.cc.
References m_commonUtPositions, and m_utPositionsByBeam.
| void ns3::SimulationHelper::EnableAcm | ( | SatEnums::SatLinkDir_t | dir | ) |
Enable ACM for a simulation direction.
| dir | Direction |
Definition at line 647 of file simulation-helper.cc.
References ns3::SatEnums::LD_FORWARD, and ns3::SatEnums::LD_RETURN.
Referenced by SetDefaultValues().
| 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.
| void ns3::SimulationHelper::EnableCrdsa | ( | ) |
Enable CRDSA random access.
Definition at line 562 of file simulation-helper.cc.
References EnableRandomAccess(), and m_randomAccessConfigured.
| void ns3::SimulationHelper::EnableExternalFadingInputTrace | ( | ) |
Enable external fading input.
Definition at line 1065 of file simulation-helper.cc.
References ns3::SatEnums::FADING_OFF.
| void ns3::SimulationHelper::EnableFca | ( | ) |
Enable free capacity allocation.
Definition at line 465 of file simulation-helper.cc.
| void ns3::SimulationHelper::EnableOnlyConstantRate | ( | uint32_t | rcIndex, |
| double | rateKbps ) |
Enable only CRA for a given RC index.
| rcIndex | Request class index |
| rateKbps | CRA rate in kbps |
Definition at line 418 of file simulation-helper.cc.
| void ns3::SimulationHelper::EnableOnlyRbdc | ( | uint32_t | rcIndex | ) |
Enable only RBDC for a given RC index.
| rcIndex | Request class index |
Definition at line 432 of file simulation-helper.cc.
| void ns3::SimulationHelper::EnableOnlyVbdc | ( | uint32_t | rcIndex | ) |
Enable only VBDC for a given RC index.
| rcIndex | Request class index |
Definition at line 448 of file simulation-helper.cc.
Referenced by SetDefaultValues().
| void ns3::SimulationHelper::EnableOutputTraces | ( | ) |
Enable all output traces.
Definition at line 999 of file simulation-helper.cc.
| void ns3::SimulationHelper::EnablePeriodicalControlSlots | ( | Time | periodicity | ) |
Enable periodical control slots.
Definition at line 481 of file simulation-helper.cc.
Referenced by SetDefaultValues().
| 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().
|
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().
| void ns3::SimulationHelper::EnableSlottedAloha | ( | ) |
Enable slotted ALOHA random access.
Definition at line 547 of file simulation-helper.cc.
References EnableRandomAccess(), and m_randomAccessConfigured.
| void ns3::SimulationHelper::EnableUtListPositionsFromInputFile | ( | std::string | inputFile, |
| bool | checkBeams = true ) |
Enable reading UT list positions from input file.
| inputFile | List postion file path (starting from data/) |
| checkBeam |
Definition at line 1105 of file simulation-helper.cc.
References m_inputFileUtListPositions, and m_inputFileUtPositionsCheckBeams.
| const std::set< uint32_t > & ns3::SimulationHelper::GetBeams | ( | ) |
Get enabled beams in integer format.
Definition at line 1535 of file simulation-helper.cc.
References m_enabledBeams.
|
inline |
Definition at line 115 of file simulation-helper.h.
References m_enabledBeams.
| Ptr< SatCnoHelper > ns3::SimulationHelper::GetCnoHelper | ( | ) |
Get the C/N0 helper to customize C/N0 on some nodes.
If does not exist, one is created.
Definition at line 1156 of file simulation-helper.cc.
References m_cnoHelper, and m_satHelper.
| Ptr< SatGroupHelper > ns3::SimulationHelper::GetGroupHelper | ( | ) |
Get the group helper.
If does not exist, one is created.
Definition at line 1143 of file simulation-helper.cc.
References m_groupHelper.
Referenced by CreateSatScenario().
|
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().
|
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().
|
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().
|
inline |
Get simulation time.
Definition at line 447 of file simulation-helper.h.
References m_simTime.
Referenced by EnableProgressLogs(), and ProgressCb().
| Ptr< SatStatsHelperContainer > ns3::SimulationHelper::GetStatisticsContainer | ( | ) |
Get the statistics container of this helper.
If does not exist, one is created.
Definition at line 1114 of file simulation-helper.cc.
References m_satHelper, and m_statContainer.
Referenced by GetTrafficHelper().
| Ptr< SatTrafficHelper > ns3::SimulationHelper::GetTrafficHelper | ( | ) |
Get the traffic helper to create more complex traffics.
If does not exist, one is created.
Definition at line 1129 of file simulation-helper.cc.
References GetSatelliteHelper(), GetStatisticsContainer(), and m_trafficHelper.
Referenced by ConfigureAttributesFromFile().
|
static |
Derived from Object.
Definition at line 134 of file simulation-helper.cc.
|
protected |
Check if node has a PacketSink installed at certain port.
Definition at line 1443 of file simulation-helper.cc.
|
protected |
Check if a beam is enabled.
Definition at line 1543 of file simulation-helper.cc.
References m_enabledBeams.
Referenced by CreateSatScenario().
| void ns3::SimulationHelper::LoadScenario | ( | std::string | name | ) |
Load a scenario from data submodule.
| name | The 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.
| 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().
|
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().
| void ns3::SimulationHelper::ReadInputAttributesFromFile | ( | std::string | filePath | ) |
Read input attributes from XML file.
| filePath | full path to an Input XML file |
Definition at line 1672 of file simulation-helper.cc.
Referenced by ConfigureAttributesFromFile().
| void ns3::SimulationHelper::RunSimulation | ( | ) |
Run the simulation.
Definition at line 1572 of file simulation-helper.cc.
References m_enabledBeamsStr, m_simTime, and m_simulationName.
| 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().
| void ns3::SimulationHelper::SetBeamSet | ( | std::set< uint32_t > | beamSet | ) |
Definition at line 1521 of file simulation-helper.cc.
References m_enabledBeams, and m_enabledBeamsStr.
| 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.
| posAllocator |
Definition at line 1090 of file simulation-helper.cc.
References m_commonUtPositions.
| void ns3::SimulationHelper::SetCrTxConf | ( | CrTxConf_t | crTxConf | ) |
Definition at line 1464 of file simulation-helper.cc.
References CR_CRDSA_LOOSE_RC_0, CR_PERIODIC_CONTROL, CR_SLOTTED_ALOHA, ns3::SatEnums::RA_MODEL_CRDSA, ns3::SatEnums::RA_MODEL_OFF, and ns3::SatEnums::RA_MODEL_SLOTTED_ALOHA.
| void ns3::SimulationHelper::SetDefaultValues | ( | ) |
Set default values shared by all examples using SimulationHelper.
Adjust to your needs.
Definition at line 346 of file simulation-helper.cc.
References ConfigureFrame(), ConfigureFrequencyBands(), DisableAllCapacityAssignmentCategories(), DisableRandomAccess(), ns3::SatPhyRxCarrierConf::EM_AVI, EnableAcm(), EnableOnlyVbdc(), EnablePeriodicalControlSlots(), ns3::SatEnums::FADING_OFF, ns3::SatPhyRxCarrierConf::IF_PER_PACKET, ns3::SatEnums::LD_FORWARD, ns3::SatEnums::LD_RETURN, SetErrorModel(), and SetInterferenceModel().
| void ns3::SimulationHelper::SetErrorModel | ( | SatPhyRxCarrierConf::ErrorModel | em, |
| double | errorRate = 0.0 ) |
Set simulation error model.
| em | Error model. |
| errorRate | Static 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().
| void ns3::SimulationHelper::SetGwUserCount | ( | uint32_t | gwUserCount | ) |
Set the number of GW users in the scenario.
Must be called before creation of satellite scenario.
| gwUserCount |
Definition at line 294 of file simulation-helper.cc.
| 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().
| void ns3::SimulationHelper::SetInterferenceModel | ( | SatPhyRxCarrierConf::InterferenceModel | ifModel, |
| double | constantIf = 0.0 ) |
Set simulation interference model.
| ifModel | Interference model. |
| ifEliminationModel | Interference elimination model. |
| constantIf | Static interference if constant interference model used |
| residualSamplingError | Sampling 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().
| void ns3::SimulationHelper::SetOutputPath | ( | std::string | path | ) |
Force a output file path to this simulation instead of default satellite/data/sims/.
| path | Output file path. |
Definition at line 319 of file simulation-helper.cc.
References m_outputPath.
| void ns3::SimulationHelper::SetOutputTag | ( | std::string | tag | ) |
Set simulation output tag, which is the basename of the directory where output files are stored.
| tag | Simulation tag. |
Definition at line 310 of file simulation-helper.cc.
References m_simulationTag.
| void ns3::SimulationHelper::SetSimulationTime | ( | double | seconds | ) |
Set simulation time in seconds.
| seconds |
Definition at line 302 of file simulation-helper.cc.
References m_simTime.
Referenced by ConfigureAttributesFromFile().
|
inline |
Set simulation time.
| time |
Definition at line 191 of file simulation-helper.h.
References m_simTime.
|
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().
| void ns3::SimulationHelper::SetUserCountPerMobileUt | ( | Ptr< RandomVariableStream > | rs | ) |
Set mobile UT count per beam to be taken from a random variable stream.
| rs | RandomVariableStream to be used, must implement GetInteger. |
Definition at line 286 of file simulation-helper.cc.
References m_utMobileUserCount.
| void ns3::SimulationHelper::SetUserCountPerMobileUt | ( | uint32_t | count | ) |
Set user count per mobile UT.
| count | Number of users per mobile UT. |
Definition at line 277 of file simulation-helper.cc.
References m_utMobileUserCount.
Referenced by ConfigureAttributesFromFile().
| void ns3::SimulationHelper::SetUserCountPerUt | ( | Ptr< RandomVariableStream > | rs | ) |
Set UT count per beam to be taken from a random variable stream.
| rs | RandomVariableStream to be used, must implement GetInteger. |
Definition at line 269 of file simulation-helper.cc.
References m_utUserCount.
| void ns3::SimulationHelper::SetUserCountPerUt | ( | uint32_t | count | ) |
Set user count per UT.
| count | Number of users per UT. |
Definition at line 260 of file simulation-helper.cc.
References m_utUserCount.
Referenced by ConfigureAttributesFromFile().
| void ns3::SimulationHelper::SetUtCountPerBeam | ( | Ptr< RandomVariableStream > | rs | ) |
Set UT count per beam to be taken from a random variable stream.
| rs | RandomVariableStream to be used, must implement GetInteger. |
Definition at line 233 of file simulation-helper.cc.
References m_utCount.
| void ns3::SimulationHelper::SetUtCountPerBeam | ( | uint32_t | beamId, |
| Ptr< RandomVariableStream > | rs ) |
Set UT count per beam to be taken from a random variable stream.
| rs | RandomVariableStream to be used, must implement GetInteger. |
Definition at line 252 of file simulation-helper.cc.
References m_utCount.
| void ns3::SimulationHelper::SetUtCountPerBeam | ( | uint32_t | beamId, |
| uint32_t | count ) |
Set UT count per beam.
| count | Number of UTs per beam. |
Definition at line 241 of file simulation-helper.cc.
References m_utCount.
| void ns3::SimulationHelper::SetUtCountPerBeam | ( | uint32_t | count | ) |
Set UT count per beam.
| count | Number of UTs per beam. |
Definition at line 222 of file simulation-helper.cc.
References m_utCount.
Referenced by ConfigureAttributesFromFile().
| 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-
| beamId | Beam ID |
| posAllocator | List of UT positions, must match the number of UTs configured |
Definition at line 1097 of file simulation-helper.cc.
References m_utPositionsByBeam.
| std::string ns3::SimulationHelper::StoreAttributesToFile | ( | std::string | fileName, |
| bool | outputAttributes = false ) |
Store all used attributes.
| fileName | Output filename |
| outputAttributes | Whether or not to store individual objects attributes to file |
Definition at line 1685 of file simulation-helper.cc.
References ns3::SatEnvVariables::GetInstance().
|
private |
Definition at line 568 of file simulation-helper.h.
Referenced by GetCnoHelper().
|
private |
Definition at line 569 of file simulation-helper.h.
Referenced by SimulationHelper(), SimulationHelper(), CreateSatScenario(), DoDispose(), and SetCommonUtPositionAllocator().
|
private |
Definition at line 576 of file simulation-helper.h.
Referenced by SimulationHelper(), SimulationHelper(), GetBeams(), GetBeamSet(), IsBeamEnabled(), SetBeams(), and SetBeamSet().
|
private |
Definition at line 575 of file simulation-helper.h.
Referenced by SimulationHelper(), SimulationHelper(), RunSimulation(), SetBeams(), and SetBeamSet().
|
private |
Definition at line 567 of file simulation-helper.h.
Referenced by CreateSatScenario(), and GetGroupHelper().
|
private |
Definition at line 586 of file simulation-helper.h.
Referenced by SimulationHelper(), SimulationHelper(), CreateSatScenario(), and EnableUtListPositionsFromInputFile().
|
private |
Definition at line 587 of file simulation-helper.h.
Referenced by SimulationHelper(), SimulationHelper(), CreateSatScenario(), and EnableUtListPositionsFromInputFile().
|
private |
Definition at line 584 of file simulation-helper.h.
Referenced by SimulationHelper(), SimulationHelper(), and ConfigureFrame().
|
private |
Definition at line 577 of file simulation-helper.h.
Referenced by SimulationHelper(), SimulationHelper(), AddDefaultUiArguments(), SetOutputPath(), and SetupOutputPath().
|
private |
Definition at line 589 of file simulation-helper.h.
Referenced by SimulationHelper(), SimulationHelper(), DisableProgressLogs(), and EnableProgressLogs().
|
private |
Definition at line 591 of file simulation-helper.h.
Referenced by DisableProgressLogs(), EnableProgressLogs(), and ProgressCb().
|
private |
Definition at line 590 of file simulation-helper.h.
Referenced by SimulationHelper(), SimulationHelper(), EnableProgressLogs(), and ProgressCb().
|
private |
Definition at line 585 of file simulation-helper.h.
Referenced by SimulationHelper(), SimulationHelper(), EnableCrdsa(), EnableRandomAccess(), and EnableSlottedAloha().
|
private |
Definition at line 564 of file simulation-helper.h.
Referenced by SimulationHelper(), SimulationHelper(), CreateDefaultFwdLinkStats(), CreateDefaultRtnLinkStats(), CreateDefaultStats(), CreateSatScenario(), GetCnoHelper(), GetSatelliteHelper(), and GetStatisticsContainer().
|
private |
Definition at line 572 of file simulation-helper.h.
Referenced by SimulationHelper(), ConfigureFwdLinkBeamHopping(), CreateSatScenario(), and LoadScenario().
|
private |
Definition at line 583 of file simulation-helper.h.
Referenced by SimulationHelper(), SimulationHelper(), ConfigureAttributesFromFile(), GetSimTime(), RunSimulation(), SetSimulationTime(), and SetSimulationTime().
|
private |
Definition at line 573 of file simulation-helper.h.
Referenced by SimulationHelper(), SimulationHelper(), RunSimulation(), and SetupOutputPath().
|
private |
Definition at line 574 of file simulation-helper.h.
Referenced by SetOutputTag(), and SetupOutputPath().
|
private |
Definition at line 565 of file simulation-helper.h.
Referenced by SimulationHelper(), SimulationHelper(), CreateDefaultFwdLinkStats(), CreateDefaultRtnLinkStats(), CreateDefaultStats(), and GetStatisticsContainer().
|
private |
Definition at line 566 of file simulation-helper.h.
Referenced by GetTrafficHelper().
|
private |
Definition at line 579 of file simulation-helper.h.
Referenced by SimulationHelper(), SimulationHelper(), CreateSatScenario(), GetNextUtCount(), SetUtCountPerBeam(), SetUtCountPerBeam(), SetUtCountPerBeam(), and SetUtCountPerBeam().
|
private |
Definition at line 582 of file simulation-helper.h.
Referenced by SimulationHelper(), SimulationHelper(), CreateSatScenario(), SetUserCountPerMobileUt(), and SetUserCountPerMobileUt().
|
private |
Definition at line 570 of file simulation-helper.h.
Referenced by SimulationHelper(), SimulationHelper(), CreateSatScenario(), DoDispose(), and SetUtPositionAllocatorForBeam().
|
private |
Definition at line 581 of file simulation-helper.h.
Referenced by SimulationHelper(), SimulationHelper(), GetNextUtUserCount(), SetUserCountPerUt(), and SetUserCountPerUt().