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. 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< SatHelper > | CreateSatScenario (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< SatCnoHelper > | GetCnoHelper () |
Get the C/N0 helper to customize C/N0 on some nodes. More... | |
Ptr< SatGroupHelper > | GetGroupHelper () |
Get the group helper. More... | |
TypeId | GetInstanceTypeId (void) const |
Derived from Object. More... | |
Ptr< SatHelper > | GetSatelliteHelper () |
If lower layer API access is required, use this to access SatHelper. More... | |
Time & | GetSimTime () |
Get simulation time. More... | |
Ptr< SatStatsHelperContainer > | GetStatisticsContainer () |
Get the statistics container of this helper. More... | |
Ptr< SatTrafficHelper > | GetTrafficHelper () |
Get the traffic helper to create more complex traffics. More... | |
void | LoadScenario (std::string name) |
Load a scenario from data submodule. More... | |
void | ParseScenarioFolder () |
parse scenario folder to load all variables that can be 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 | 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< 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 517 of file simulation-helper.h.
ns3::SimulationHelper::SimulationHelper | ( | ) |
Default constructor, which is not used.
Definition at line 157 of file simulation-helper.cc.
ns3::SimulationHelper::SimulationHelper | ( | std::string | simulationName | ) |
Contructor for simulation helper.
simulationName | Name of the simulation. |
Definition at line 182 of file simulation-helper.cc.
References m_simulationName.
|
virtual |
Destructor.
Definition at line 225 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 355 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 346 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 1659 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 937 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 964 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 989 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 1028 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 744 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 816 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 728 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 1216 of file simulation-helper.cc.
References ns3::SatBeamUserInfo::AppendUt(), ConfigureFwdLinkBeamHopping(), ns3::SatHelper::FULL, GetGroupHelper(), 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 695 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 404 of file simulation-helper.cc.
Referenced by SetDefaultValues().
void ns3::SimulationHelper::DisableFca | ( | ) |
Disable free capacity allocation.
Definition at line 491 of file simulation-helper.cc.
void ns3::SimulationHelper::DisableProgressLogs | ( | ) |
Disables simulation progress logs.
Definition at line 1628 of file simulation-helper.cc.
References m_progressLoggingEnabled, and m_progressReportEvent.
void ns3::SimulationHelper::DisableRandomAccess | ( | ) |
Disable random access.
Definition at line 551 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 231 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 665 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 509 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 580 of file simulation-helper.cc.
References EnableRandomAccess(), and m_randomAccessConfigured.
void ns3::SimulationHelper::EnableExternalFadingInputTrace | ( | ) |
Enable external fading input.
Definition at line 1083 of file simulation-helper.cc.
References ns3::SatEnums::FADING_OFF.
void ns3::SimulationHelper::EnableFca | ( | ) |
Enable free capacity allocation.
Definition at line 483 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 436 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 450 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 466 of file simulation-helper.cc.
Referenced by SetDefaultValues().
void ns3::SimulationHelper::EnableOutputTraces | ( | ) |
Enable all output traces.
Definition at line 1017 of file simulation-helper.cc.
void ns3::SimulationHelper::EnablePeriodicalControlSlots | ( | Time | periodicity | ) |
Enable periodical control slots.
Definition at line 499 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 1607 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 596 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 565 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 1123 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 1553 of file simulation-helper.cc.
References m_enabledBeams.
|
inline |
Definition at line 120 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 1174 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 1161 of file simulation-helper.cc.
References m_groupHelper.
Referenced by CreateSatScenario().
TypeId ns3::SimulationHelper::GetInstanceTypeId | ( | void | ) | const |
Derived from Object.
Definition at line 150 of file simulation-helper.cc.
References GetTypeId().
|
protected |
Get next UT count from internal random variable stream.
Definition at line 1576 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 551 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 486 of file simulation-helper.h.
References m_satHelper.
Referenced by GetTrafficHelper().
|
inline |
Get simulation time.
Definition at line 452 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 1132 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 1147 of file simulation-helper.cc.
References GetSatelliteHelper(), GetStatisticsContainer(), and m_trafficHelper.
Referenced by ConfigureAttributesFromFile().
|
static |
Derived from Object.
Definition at line 142 of file simulation-helper.cc.
Referenced by GetInstanceTypeId().
|
protected |
Check if node has a PacketSink installed at certain port.
Definition at line 1461 of file simulation-helper.cc.
|
protected |
Check if a beam is enabled.
Definition at line 1561 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 1637 of file simulation-helper.cc.
References m_scenarioPath.
void ns3::SimulationHelper::ParseScenarioFolder | ( | ) |
parse scenario folder to load all variables that can be
Definition at line 1653 of file simulation-helper.cc.
Referenced by CreateSatScenario().
|
protected |
Callback that prints simulation progress to stdout.
Definition at line 719 of file simulation-helper.cc.
References GetSimTime(), m_progressReportEvent, and m_progressUpdateInterval.
Referenced by EnableProgressLogs().
void ns3::SimulationHelper::ReadInputAttributesFromFile | ( | std::string | filePath | ) |
Read input attributes from XML file.
filePath | full path to an Input XML file |
Definition at line 1691 of file simulation-helper.cc.
Referenced by ConfigureAttributesFromFile().
void ns3::SimulationHelper::RunSimulation | ( | ) |
Run the simulation.
Definition at line 1590 of file simulation-helper.cc.
References m_enabledBeamsStr, m_simTime, and m_simulationName.
void ns3::SimulationHelper::SetBeams | ( | const std::string & | beamList | ) |
Definition at line 1513 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 1539 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 1108 of file simulation-helper.cc.
References m_commonUtPositions.
void ns3::SimulationHelper::SetCrTxConf | ( | CrTxConf_t | crTxConf | ) |
Definition at line 1482 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 364 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 906 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 312 of file simulation-helper.cc.
void ns3::SimulationHelper::SetIdealPhyParameterization | ( | ) |
Set ideal channel/physical layer parameterization.
Definition at line 643 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 921 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 337 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 328 of file simulation-helper.cc.
References m_simulationTag.
void ns3::SimulationHelper::SetSimulationTime | ( | double | seconds | ) |
Set simulation time in seconds.
seconds |
Definition at line 320 of file simulation-helper.cc.
References m_simTime.
Referenced by ConfigureAttributesFromFile().
|
inline |
Set simulation time.
time |
Definition at line 196 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 1187 of file simulation-helper.cc.
References 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 304 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 295 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 287 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 278 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 251 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 270 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 259 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 240 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 1115 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 1704 of file simulation-helper.cc.
|
private |
Definition at line 573 of file simulation-helper.h.
Referenced by GetCnoHelper().
|
private |
Definition at line 574 of file simulation-helper.h.
Referenced by CreateSatScenario(), DoDispose(), and SetCommonUtPositionAllocator().
|
private |
Definition at line 581 of file simulation-helper.h.
Referenced by GetBeams(), GetBeamSet(), IsBeamEnabled(), SetBeams(), and SetBeamSet().
|
private |
Definition at line 580 of file simulation-helper.h.
Referenced by RunSimulation(), SetBeams(), and SetBeamSet().
|
private |
Definition at line 572 of file simulation-helper.h.
Referenced by CreateSatScenario(), and GetGroupHelper().
|
private |
Definition at line 591 of file simulation-helper.h.
Referenced by CreateSatScenario(), and EnableUtListPositionsFromInputFile().
|
private |
Definition at line 592 of file simulation-helper.h.
Referenced by CreateSatScenario(), and EnableUtListPositionsFromInputFile().
|
private |
Definition at line 589 of file simulation-helper.h.
Referenced by ConfigureFrame().
|
private |
Definition at line 582 of file simulation-helper.h.
Referenced by AddDefaultUiArguments(), SetOutputPath(), and SetupOutputPath().
|
private |
Definition at line 594 of file simulation-helper.h.
Referenced by DisableProgressLogs(), and EnableProgressLogs().
|
private |
Definition at line 596 of file simulation-helper.h.
Referenced by DisableProgressLogs(), EnableProgressLogs(), and ProgressCb().
|
private |
Definition at line 595 of file simulation-helper.h.
Referenced by EnableProgressLogs(), and ProgressCb().
|
private |
Definition at line 590 of file simulation-helper.h.
Referenced by EnableCrdsa(), EnableRandomAccess(), and EnableSlottedAloha().
|
private |
Definition at line 569 of file simulation-helper.h.
Referenced by CreateDefaultFwdLinkStats(), CreateDefaultRtnLinkStats(), CreateDefaultStats(), CreateSatScenario(), GetCnoHelper(), GetSatelliteHelper(), and GetStatisticsContainer().
|
private |
Definition at line 577 of file simulation-helper.h.
Referenced by ConfigureFwdLinkBeamHopping(), CreateSatScenario(), and LoadScenario().
|
private |
Definition at line 588 of file simulation-helper.h.
Referenced by ConfigureAttributesFromFile(), GetSimTime(), RunSimulation(), and SetSimulationTime().
|
private |
Definition at line 578 of file simulation-helper.h.
Referenced by SimulationHelper(), RunSimulation(), and SetupOutputPath().
|
private |
Definition at line 579 of file simulation-helper.h.
Referenced by SetOutputTag(), and SetupOutputPath().
|
private |
Definition at line 570 of file simulation-helper.h.
Referenced by CreateDefaultFwdLinkStats(), CreateDefaultRtnLinkStats(), CreateDefaultStats(), and GetStatisticsContainer().
|
private |
Definition at line 571 of file simulation-helper.h.
Referenced by GetTrafficHelper().
|
private |
Definition at line 584 of file simulation-helper.h.
Referenced by CreateSatScenario(), GetNextUtCount(), and SetUtCountPerBeam().
|
private |
Definition at line 587 of file simulation-helper.h.
Referenced by CreateSatScenario(), and SetUserCountPerMobileUt().
|
private |
Definition at line 575 of file simulation-helper.h.
Referenced by CreateSatScenario(), DoDispose(), and SetUtPositionAllocatorForBeam().
|
private |
Definition at line 586 of file simulation-helper.h.
Referenced by GetNextUtUserCount(), and SetUserCountPerUt().