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 } |
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< 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 | 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< SatCnoHelper > | m_cnoHelper |
Ptr< SatListPositionAllocator > | m_commonUtPositions |
std::set< uint32_t > | m_enabledBeams |
std::string | m_enabledBeamsStr |
bool | m_enableInputFileUtListPositions |
Ptr< SatGroupHelper > | m_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< SatHelper > | m_satHelper |
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 63 of file simulation-helper.h.
Enumerator | |
---|---|
CR_NOT_CONFIGURED | |
CR_PERIODIC_CONTROL | |
CR_SLOTTED_ALOHA | |
CR_CRDSA_LOOSE_RC_0 |
Definition at line 608 of file simulation-helper.h.
Enumerator | |
---|---|
ONE_SHOT | |
PERIODIC | |
LORA_CBR |
Definition at line 512 of file simulation-helper.h.
Enumerator | |
---|---|
RTN_LINK | |
FWD_LINK |
Definition at line 525 of file simulation-helper.h.
Enumerator | |
---|---|
CBR | |
ONOFF | |
HTTP | |
NRTV |
Definition at line 504 of file simulation-helper.h.
Enumerator | |
---|---|
UDP | |
TCP |
Definition at line 519 of file simulation-helper.h.
ns3::SimulationHelper::SimulationHelper | ( | ) |
Default constructor, which is not used.
Definition at line 239 of file simulation-helper.cc.
ns3::SimulationHelper::SimulationHelper | ( | std::string | simulationName | ) |
Contructor for simulation helper.
simulationName | Name of the simulation. |
Definition at line 264 of file simulation-helper.cc.
References m_simulationName.
|
virtual |
Destructor.
Definition at line 308 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 438 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 429 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 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.
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 1022 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 1049 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 1074 of file simulation-helper.cc.
References ns3::SatBstpController::BH_STATIC.
void ns3::SimulationHelper::ConfigureLinkBudget | ( | ) |
Configure all link budget related attributes.
Definition at line 1117 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 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().
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().
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().
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 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().
void ns3::SimulationHelper::DisableAcm | ( | SatEnums::SatLinkDir_t | dir | ) |
Disable ACM for a simulation direction.
dir | Direction |
Definition at line 779 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 487 of file simulation-helper.cc.
Referenced by SetDefaultValues().
void ns3::SimulationHelper::DisableFca | ( | ) |
Disable free capacity allocation.
Definition at line 574 of file simulation-helper.cc.
void ns3::SimulationHelper::DisableProgressLogs | ( | ) |
Disables simulation progress logs.
Definition at line 1906 of file simulation-helper.cc.
References m_progressLoggingEnabled, and m_progressReportEvent.
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().
void ns3::SimulationHelper::DoDispose | ( | void | ) |
Disposing.
Definition at line 314 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 748 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 592 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 663 of file simulation-helper.cc.
References EnableRandomAccess(), and m_randomAccessConfigured.
void ns3::SimulationHelper::EnableExternalFadingInputTrace | ( | ) |
Enable external fading input.
Definition at line 1172 of file simulation-helper.cc.
References ns3::SatEnums::FADING_OFF.
void ns3::SimulationHelper::EnableFca | ( | ) |
Enable free capacity allocation.
Definition at line 566 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 519 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 533 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 549 of file simulation-helper.cc.
Referenced by SetDefaultValues().
void ns3::SimulationHelper::EnableOutputTraces | ( | ) |
Enable all output traces.
Definition at line 1106 of file simulation-helper.cc.
void ns3::SimulationHelper::EnablePeriodicalControlSlots | ( | Time | periodicity | ) |
Enable periodical control slots.
Definition at line 582 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 1885 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 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().
void ns3::SimulationHelper::EnableSlottedAloha | ( | ) |
Enable slotted ALOHA random access.
Definition at line 648 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 1212 of file simulation-helper.cc.
References m_enableInputFileUtListPositions, and m_inputFileUtPositionsCheckBeams.
const std::set< uint32_t > & ns3::SimulationHelper::GetBeams | ( | ) |
Get enabled beams in integer format.
Definition at line 1831 of file simulation-helper.cc.
References m_enabledBeams.
|
inline |
Definition at line 119 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 1269 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 1256 of file simulation-helper.cc.
References m_groupHelper.
Referenced by CreateSatScenario().
TypeId ns3::SimulationHelper::GetInstanceTypeId | ( | void | ) | const |
Derived from Object.
Definition at line 232 of file simulation-helper.cc.
References GetTypeId().
|
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().
|
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().
|
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().
|
inline |
Get simulation time.
Definition at line 439 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 1227 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 1242 of file simulation-helper.cc.
References GetSatelliteHelper(), GetStatisticsContainer(), and m_trafficHelper.
|
static |
Derived from Object.
Definition at line 224 of file simulation-helper.cc.
Referenced by GetInstanceTypeId().
|
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().
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.
|
inline |
Definition at line 589 of file simulation-helper.h.
References InstallTrafficModel(), and m_simTime.
|
inline |
Definition at line 576 of file simulation-helper.h.
References InstallTrafficModel(), and m_simTime.
|
inline |
Definition at line 567 of file simulation-helper.h.
References InstallTrafficModel().
|
inline |
Definition at line 551 of file simulation-helper.h.
References InstallTrafficModel().
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 ().
trafficModel | Traffic models |
protocol | Transport layer protocol |
direction | Direction of traffic |
startTime | Application Start time |
stopTime | Application stop time |
startDelay | application start delay between each user |
percentage | ratio 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().
|
protected |
Check if a beam is enabled.
Definition at line 1839 of file simulation-helper.cc.
References m_enabledBeams.
Referenced by CreateSatScenario().
|
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().
void ns3::SimulationHelper::ReadInputAttributesFromFile | ( | std::string | filePath | ) |
Read input attributes from XML file.
filePath | full path to an Input XML file |
Definition at line 2045 of file simulation-helper.cc.
Referenced by ConfigureAttributesFromFile().
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.
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().
void ns3::SimulationHelper::SetBeamSet | ( | std::set< uint32_t > | beamSet | ) |
Definition at line 1817 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 1197 of file simulation-helper.cc.
References m_commonUtPositions.
void ns3::SimulationHelper::SetCrTxConf | ( | CrTxConf_t | crTxConf | ) |
Definition at line 1760 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 447 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 991 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 395 of file simulation-helper.cc.
|
inline |
Set the ID of the GW user for traffic models.
gwUserId | GW user's ID |
Definition at line 622 of file simulation-helper.h.
References m_gwUserId.
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().
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 1006 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 420 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 411 of file simulation-helper.cc.
References m_simulationTag.
void ns3::SimulationHelper::SetSimulationTime | ( | double | seconds | ) |
Set simulation time in seconds.
seconds |
Definition at line 403 of file simulation-helper.cc.
References m_simTime.
Referenced by ConfigureAttributesFromFile().
|
inline |
Set simulation time.
time |
Definition at line 195 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 1282 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 387 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 378 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 370 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 361 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 334 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 353 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 342 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 323 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 1204 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 2058 of file simulation-helper.cc.
|
private |
Definition at line 673 of file simulation-helper.h.
Referenced by GetCnoHelper().
|
private |
Definition at line 674 of file simulation-helper.h.
Referenced by CreateSatScenario(), DoDispose(), and SetCommonUtPositionAllocator().
|
private |
Definition at line 680 of file simulation-helper.h.
Referenced by GetBeams(), GetBeamSet(), IsBeamEnabled(), SetBeams(), and SetBeamSet().
|
private |
Definition at line 679 of file simulation-helper.h.
Referenced by RunSimulation(), SetBeams(), and SetBeamSet().
|
private |
Definition at line 690 of file simulation-helper.h.
Referenced by CreateSatScenario(), and EnableUtListPositionsFromInputFile().
|
private |
Definition at line 672 of file simulation-helper.h.
Referenced by CreateSatScenario(), and GetGroupHelper().
|
private |
Definition at line 692 of file simulation-helper.h.
Referenced by InstallLoraTrafficModel(), InstallTrafficModel(), and SetGwUserId().
|
private |
Definition at line 691 of file simulation-helper.h.
Referenced by CreateSatScenario(), and EnableUtListPositionsFromInputFile().
|
private |
Definition at line 688 of file simulation-helper.h.
Referenced by ConfigureFrame().
|
private |
Definition at line 681 of file simulation-helper.h.
Referenced by AddDefaultUiArguments(), SetOutputPath(), and SetupOutputPath().
|
private |
Definition at line 694 of file simulation-helper.h.
Referenced by DisableProgressLogs(), and EnableProgressLogs().
|
private |
Definition at line 696 of file simulation-helper.h.
Referenced by DisableProgressLogs(), EnableProgressLogs(), and ProgressCb().
|
private |
Definition at line 695 of file simulation-helper.h.
Referenced by EnableProgressLogs(), and ProgressCb().
|
private |
Definition at line 689 of file simulation-helper.h.
Referenced by EnableCrdsa(), EnableRandomAccess(), and EnableSlottedAloha().
|
private |
Definition at line 669 of file simulation-helper.h.
Referenced by CreateDefaultFwdLinkStats(), CreateDefaultRtnLinkStats(), CreateDefaultStats(), CreateSatScenario(), GetCnoHelper(), GetSatelliteHelper(), GetStatisticsContainer(), InstallLoraTrafficModel(), InstallTrafficModel(), and RunSimulation().
|
private |
Definition at line 687 of file simulation-helper.h.
Referenced by ConfigureAttributesFromFile(), GetSimTime(), InstallTrafficModel(), RunSimulation(), and SetSimulationTime().
|
private |
Definition at line 677 of file simulation-helper.h.
Referenced by SimulationHelper(), RunSimulation(), and SetupOutputPath().
|
private |
Definition at line 678 of file simulation-helper.h.
Referenced by SetOutputTag(), and SetupOutputPath().
|
private |
Definition at line 670 of file simulation-helper.h.
Referenced by CreateDefaultFwdLinkStats(), CreateDefaultRtnLinkStats(), CreateDefaultStats(), and GetStatisticsContainer().
|
private |
Definition at line 671 of file simulation-helper.h.
Referenced by GetTrafficHelper().
|
private |
Definition at line 683 of file simulation-helper.h.
Referenced by GetNextUtCount(), and SetUtCountPerBeam().
|
private |
Definition at line 686 of file simulation-helper.h.
Referenced by CreateSatScenario(), and SetUserCountPerMobileUt().
|
private |
Definition at line 675 of file simulation-helper.h.
Referenced by CreateSatScenario(), DoDispose(), and SetUtPositionAllocatorForBeam().
|
private |
Definition at line 685 of file simulation-helper.h.
Referenced by GetNextUtUserCount(), and SetUserCountPerUt().