simulation-helper.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2016 Magister Solutions
4  * Copyright (c) 2018 CNES
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation;
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  *
19  * Author: Lauri Sormunen <lauri.sormunen@magister.fi>
20  * Author: Mathias Ettinger <mettinger@viveris.toulouse.fr>
21  */
22 
23 #ifndef SIMULATION_HELPER_H
24 #define SIMULATION_HELPER_H
25 
26 #include <ns3/command-line.h>
27 #include <ns3/random-variable-stream.h>
28 #include <ns3/satellite-cno-helper.h>
29 #include <ns3/satellite-enums.h>
30 #include <ns3/satellite-group-helper.h>
31 #include <ns3/satellite-helper.h>
32 #include <ns3/satellite-stats-helper-container.h>
33 #include <ns3/satellite-traffic-helper.h>
34 
35 #include <set>
36 
37 #define STRINGIFY(x) #x
38 #define TOSTRING(x) STRINGIFY(x)
39 
40 namespace ns3
41 {
42 
63 class SimulationHelper : public Object
64 {
65  public:
70 
75  SimulationHelper(std::string simulationName);
76 
80  virtual ~SimulationHelper();
81 
85  void DoDispose(void);
86 
90  static TypeId GetTypeId(void);
91 
95  TypeId GetInstanceTypeId(void) const;
96 
101  void SetDefaultValues();
102 
109  void SetBeams(const std::string& beamList);
110 
117  void SetBeamSet(std::set<uint32_t> beamSet);
118 
119  inline std::set<uint32_t> GetBeamSet(void) const
120  {
121  return m_enabledBeams;
122  }
123 
128  const std::set<uint32_t>& GetBeams();
129 
134  void SetUtCountPerBeam(uint32_t count);
135 
140  void SetUtCountPerBeam(Ptr<RandomVariableStream> rs);
141 
146  void SetUtCountPerBeam(uint32_t beamId, uint32_t count);
147 
152  void SetUtCountPerBeam(uint32_t beamId, Ptr<RandomVariableStream> rs);
153 
158  void SetUserCountPerUt(uint32_t count);
159 
164  void SetUserCountPerUt(Ptr<RandomVariableStream> rs);
165 
170  void SetUserCountPerMobileUt(uint32_t count);
171 
176  void SetUserCountPerMobileUt(Ptr<RandomVariableStream> rs);
177 
183  void SetGwUserCount(uint32_t gwUserCount);
184 
189  void SetSimulationTime(double seconds);
190 
195  inline void SetSimulationTime(Time time)
196  {
197  m_simTime = time;
198  }
199 
204 
210 
216 
221 
227  void EnableOnlyConstantRate(uint32_t rcIndex, double rateKbps);
228 
233  void EnableOnlyRbdc(uint32_t rcIndex);
234 
239  void EnableOnlyVbdc(uint32_t rcIndex);
240 
244  void EnableFca();
245 
249  void DisableFca();
250 
254  void EnablePeriodicalControlSlots(Time periodicity);
255 
260 
264  void DisableRandomAccess();
265 
269  void EnableSlottedAloha();
270 
274  void EnableCrdsa();
275 
285  void ConfigureFrame(uint32_t superFrameId,
286  double bw,
287  double carrierBw,
288  double rollOff,
289  double carrierSpacing,
290  bool isRandomAccess = false);
291 
297 
305 
310 
314  void EnableOutputTraces();
315 
319  void ConfigureLinkBudget();
320 
326  void SetErrorModel(SatPhyRxCarrierConf::ErrorModel em, double errorRate = 0.0);
327 
336  double constantIf = 0.0);
337 
343  void EnableProgressLogs();
344 
348  void DisableProgressLogs();
349 
355  void AddDefaultUiArguments(CommandLine& cmd);
356 
363  void AddDefaultUiArguments(CommandLine& cmd, std::string& xmlInputFile);
364 
368  void RunSimulation();
369 
377  const std::string& mobileUtsFolder = "");
378 
383  void CreateDefaultStats();
384 
390 
396 
402  void SetOutputTag(std::string tag);
403 
409  void SetOutputPath(std::string path);
410 
417  void ConfigureAttributesFromFile(std::string filePath, bool overrideManualConfiguration = true);
418 
423  void ReadInputAttributesFromFile(std::string filePath);
424 
432  std::string StoreAttributesToFile(std::string fileName, bool outputAttributes = false);
433 
439  inline Time& GetSimTime()
440  {
441  return m_simTime;
442  }
443 
451  void SetCommonUtPositionAllocator(Ptr<SatListPositionAllocator> posAllocator);
452 
460  void SetUtPositionAllocatorForBeam(uint32_t beamId, Ptr<SatListPositionAllocator> posAllocator);
461 
467  void EnableUtListPositionsFromInputFile(std::string inputFile, bool checkBeams = true);
468 
473  inline Ptr<SatHelper> GetSatelliteHelper()
474  {
475  NS_ASSERT_MSG(m_satHelper != NULL,
476  "CreateSatScenario not called before calling GetSatelliteHelper");
477  return m_satHelper;
478  }
479 
484  Ptr<SatStatsHelperContainer> GetStatisticsContainer();
485 
490  Ptr<SatTrafficHelper> GetTrafficHelper();
491 
496  Ptr<SatGroupHelper> GetGroupHelper();
497 
502  Ptr<SatCnoHelper> GetCnoHelper();
503 
504  typedef enum
505  {
510  } TrafficModel_t;
511 
512  typedef enum
513  {
518 
519  typedef enum
520  {
522  TCP
524 
525  typedef enum
526  {
528  FWD_LINK
530 
543  void InstallTrafficModel(TrafficModel_t trafficModel,
544  TransportLayerProtocol_t protocol,
545  TrafficDirection_t direction,
546  Time startTime,
547  Time stopTime,
548  Time startDelay,
549  double percentage);
550 
552  TransportLayerProtocol_t protocol,
553  TrafficDirection_t direction,
554  Time startTime,
555  Time stopTime,
556  Time startDelay)
557  {
558  InstallTrafficModel(trafficModel,
559  protocol,
560  direction,
561  startTime,
562  stopTime,
563  startDelay,
564  1.0);
565  }
566 
568  TransportLayerProtocol_t protocol,
569  TrafficDirection_t direction,
570  Time startTime,
571  Time stopTime)
572  {
573  InstallTrafficModel(trafficModel, protocol, direction, startTime, stopTime, Seconds(0));
574  }
575 
577  TransportLayerProtocol_t protocol,
578  TrafficDirection_t direction,
579  Time startTime)
580  {
581  InstallTrafficModel(trafficModel,
582  protocol,
583  direction,
584  startTime,
585  m_simTime + Seconds(1),
586  Seconds(0));
587  }
588 
590  TransportLayerProtocol_t protocol,
591  TrafficDirection_t direction)
592  {
593  InstallTrafficModel(trafficModel,
594  protocol,
595  direction,
596  Seconds(0.001),
597  m_simTime + Seconds(1),
598  Seconds(0));
599  }
600 
602  Time interval,
603  uint32_t packetSize,
604  Time startTime,
605  Time stopTime,
606  Time startDelay);
607 
608  typedef enum
609  {
614  } CrTxConf_t;
615 
616  void SetCrTxConf(CrTxConf_t crTxConf);
617 
622  inline void SetGwUserId(uint32_t gwUserId)
623  {
624  m_gwUserId = gwUserId;
625  }
626 
627  protected:
631  void EnableRandomAccess();
632 
636  void ProgressCb();
637 
641  bool IsBeamEnabled(uint32_t beamId) const;
642 
646  uint32_t GetNextUtCount(uint32_t beamId = 0) const;
647 
651  inline uint32_t GetNextUtUserCount() const
652  {
653  NS_ASSERT_MSG(m_utUserCount != NULL, "User count per UT not set");
654  return m_utUserCount->GetInteger();
655  }
656 
660  bool HasSinkInstalled(Ptr<Node> node, uint16_t port);
661 
666  void SetupOutputPath();
667 
668  private:
669  Ptr<SatHelper> m_satHelper;
670  Ptr<SatStatsHelperContainer> m_statContainer;
671  Ptr<SatTrafficHelper> m_trafficHelper;
672  Ptr<SatGroupHelper> m_groupHelper;
673  Ptr<SatCnoHelper> m_cnoHelper;
674  Ptr<SatListPositionAllocator> m_commonUtPositions;
675  std::map<uint32_t, Ptr<SatListPositionAllocator>> m_utPositionsByBeam;
676 
677  std::string m_simulationName;
678  std::string m_simulationTag;
679  std::string m_enabledBeamsStr;
680  std::set<uint32_t> m_enabledBeams;
681  std::string m_outputPath;
682 
683  std::map<uint32_t, Ptr<RandomVariableStream>> m_utCount;
684 
685  Ptr<RandomVariableStream> m_utUserCount;
686  Ptr<RandomVariableStream> m_utMobileUserCount;
687  Time m_simTime;
692  uint32_t m_gwUserId;
693 
697 };
698 
699 class SimulationHelperConf : public Object
700 {
701  public:
706 
710  virtual ~SimulationHelperConf();
711 
715  static TypeId GetTypeId(void);
716 
720  TypeId GetInstanceTypeId(void) const;
721 
722  typedef enum
723  {
728 
729  typedef enum
730  {
733  BOTH_LINK
735 
736  typedef struct TrafficConfiguration_t
737  {
738  double m_percentage;
744 
746  : m_percentage(0.0),
747  m_protocol(SimulationHelperConf::PROTOCOL_UDP),
748  m_direction(SimulationHelperConf::RTN_LINK),
749  m_startTime(0),
750  m_stopTime(0),
751  m_startDelay(0)
752  {
753  // do nothing
754  }
756 
757  Time m_simTime;
758  std::string m_enabledBeams;
759  Ptr<RandomVariableStream> m_utCount;
760  Ptr<RandomVariableStream> m_utUserCount;
761  Ptr<RandomVariableStream> m_utMobileUserCount;
765  std::map<std::string, TrafficConfiguration_t> m_trafficModel;
766  std::string m_mobileUtsFolder;
767 
768  private:
769  void SetTrafficPercentage(std::string trafficModel, double percentage)
770  {
771  std::map<std::string, TrafficConfiguration_t>::iterator it =
772  m_trafficModel.find(trafficModel);
773  if (it == m_trafficModel.end())
774  {
775  TrafficConfiguration_t traffic;
776  traffic.m_percentage = percentage;
777  m_trafficModel.emplace(trafficModel, traffic);
778  }
779  else
780  {
781  it->second.m_percentage = percentage;
782  }
783  }
784 
785  double GetTrafficPercentage(std::string trafficModel) const
786  {
787  std::map<std::string, TrafficConfiguration_t>::const_iterator it =
788  m_trafficModel.find(trafficModel);
789  if (it == m_trafficModel.end())
790  {
791  NS_FATAL_ERROR("Traffic model " << trafficModel << " has not been configured");
792  }
793 
794  return it->second.m_percentage;
795  }
796 
797  void SetTrafficProtocol(std::string trafficModel, TransportLayerProtocol_t protocol)
798  {
799  std::map<std::string, TrafficConfiguration_t>::iterator it =
800  m_trafficModel.find(trafficModel);
801  if (it == m_trafficModel.end())
802  {
803  TrafficConfiguration_t traffic;
804  traffic.m_protocol = protocol;
805  m_trafficModel.emplace(trafficModel, traffic);
806  }
807  else
808  {
809  it->second.m_protocol = protocol;
810  }
811  }
812 
813  TransportLayerProtocol_t GetTrafficProtocol(std::string trafficModel) const
814  {
815  std::map<std::string, TrafficConfiguration_t>::const_iterator it =
816  m_trafficModel.find(trafficModel);
817  if (it == m_trafficModel.end())
818  {
819  NS_FATAL_ERROR("Traffic model " << trafficModel << " has not been configured");
820  }
821 
822  return it->second.m_protocol;
823  }
824 
825  void SetTrafficDirection(std::string trafficModel, TrafficDirection_t direction)
826  {
827  std::map<std::string, TrafficConfiguration_t>::iterator it =
828  m_trafficModel.find(trafficModel);
829  if (it == m_trafficModel.end())
830  {
831  TrafficConfiguration_t traffic;
832  traffic.m_direction = direction;
833  m_trafficModel.emplace(trafficModel, traffic);
834  }
835  else
836  {
837  it->second.m_direction = direction;
838  }
839  }
840 
841  TrafficDirection_t GetTrafficDirection(std::string trafficModel) const
842  {
843  std::map<std::string, TrafficConfiguration_t>::const_iterator it =
844  m_trafficModel.find(trafficModel);
845  if (it == m_trafficModel.end())
846  {
847  NS_FATAL_ERROR("Traffic model " << trafficModel << " has not been configured");
848  }
849 
850  return it->second.m_direction;
851  }
852 
853  void SetTrafficStartTime(std::string trafficModel, Time startTime)
854  {
855  std::map<std::string, TrafficConfiguration_t>::iterator it =
856  m_trafficModel.find(trafficModel);
857  if (it == m_trafficModel.end())
858  {
859  TrafficConfiguration_t traffic;
860  traffic.m_startTime = startTime;
861  m_trafficModel.emplace(trafficModel, traffic);
862  }
863  else
864  {
865  it->second.m_startTime = startTime;
866  }
867  }
868 
869  Time GetTrafficStartTime(std::string trafficModel) const
870  {
871  std::map<std::string, TrafficConfiguration_t>::const_iterator it =
872  m_trafficModel.find(trafficModel);
873  if (it == m_trafficModel.end())
874  {
875  NS_FATAL_ERROR("Traffic model " << trafficModel << " has not been configured");
876  }
877 
878  return it->second.m_startTime;
879  }
880 
881  void SetTrafficStopTime(std::string trafficModel, Time stopTime)
882  {
883  std::map<std::string, TrafficConfiguration_t>::iterator it =
884  m_trafficModel.find(trafficModel);
885  if (it == m_trafficModel.end())
886  {
887  TrafficConfiguration_t traffic;
888  traffic.m_startTime = stopTime;
889  m_trafficModel.emplace(trafficModel, traffic);
890  }
891  else
892  {
893  it->second.m_stopTime = stopTime;
894  }
895  }
896 
897  Time GetTrafficStopTime(std::string trafficModel) const
898  {
899  std::map<std::string, TrafficConfiguration_t>::const_iterator it =
900  m_trafficModel.find(trafficModel);
901  if (it == m_trafficModel.end())
902  {
903  NS_FATAL_ERROR("Traffic model " << trafficModel << " has not been configured");
904  }
905 
906  return it->second.m_stopTime;
907  }
908 
909  void SetTrafficStartDelay(std::string trafficModel, Time startDelay)
910  {
911  std::map<std::string, TrafficConfiguration_t>::iterator it =
912  m_trafficModel.find(trafficModel);
913  if (it == m_trafficModel.end())
914  {
915  TrafficConfiguration_t traffic;
916  traffic.m_startDelay = startDelay;
917  m_trafficModel.emplace(trafficModel, traffic);
918  }
919  else
920  {
921  it->second.m_startDelay = startDelay;
922  }
923  }
924 
925  Time GetTrafficStartDelay(std::string trafficModel) const
926  {
927  std::map<std::string, TrafficConfiguration_t>::const_iterator it =
928  m_trafficModel.find(trafficModel);
929  if (it == m_trafficModel.end())
930  {
931  NS_FATAL_ERROR("Traffic model " << trafficModel << " has not been configured");
932  }
933 
934  return it->second.m_startDelay;
935  }
936 
937 #define TRAFFIC_MODEL_ATTRIBUTE_ACCESSOR_DEFINE(index) \
938  inline void SetTraffic##index##Percentage(double value) \
939  { \
940  return SetTrafficPercentage(TOSTRING(index), value); \
941  } \
942  inline double GetTraffic##index##Percentage() const \
943  { \
944  return GetTrafficPercentage(TOSTRING(index)); \
945  } \
946  inline void SetTraffic##index##Protocol(TransportLayerProtocol_t value) \
947  { \
948  return SetTrafficProtocol(TOSTRING(index), value); \
949  } \
950  inline TransportLayerProtocol_t GetTraffic##index##Protocol() const \
951  { \
952  return GetTrafficProtocol(TOSTRING(index)); \
953  } \
954  inline void SetTraffic##index##Direction(TrafficDirection_t value) \
955  { \
956  return SetTrafficDirection(TOSTRING(index), value); \
957  } \
958  inline TrafficDirection_t GetTraffic##index##Direction() const \
959  { \
960  return GetTrafficDirection(TOSTRING(index)); \
961  } \
962  inline void SetTraffic##index##StartTime(Time value) \
963  { \
964  return SetTrafficStartTime(TOSTRING(index), value); \
965  } \
966  inline Time GetTraffic##index##StartTime() const \
967  { \
968  return GetTrafficStartTime(TOSTRING(index)); \
969  } \
970  inline void SetTraffic##index##StopTime(Time value) \
971  { \
972  return SetTrafficStopTime(TOSTRING(index), value); \
973  } \
974  inline Time GetTraffic##index##StopTime() const \
975  { \
976  return GetTrafficStopTime(TOSTRING(index)); \
977  } \
978  inline void SetTraffic##index##StartDelay(Time value) \
979  { \
980  return SetTrafficStartDelay(TOSTRING(index), value); \
981  } \
982  inline Time GetTraffic##index##StartDelay() const \
983  { \
984  return GetTrafficStartDelay(TOSTRING(index)); \
985  }
986 
991 };
992 
993 } // namespace ns3
994 
995 #endif /* TEST_SCRIPT_INPUT_HELPER_H */
SatLinkDir_t
Link direction used for packet tracing.
PreDefinedScenario_t
Values for pre-defined scenarios to be used by helper when building satellite network topology base.
@ NONE
NONE Not used.
InterferenceModel
Interference model enum.
std::map< std::string, TrafficConfiguration_t > m_trafficModel
Ptr< RandomVariableStream > m_utCount
Ptr< RandomVariableStream > m_utUserCount
void SetTrafficProtocol(std::string trafficModel, TransportLayerProtocol_t protocol)
Time GetTrafficStartDelay(std::string trafficModel) const
void SetTrafficStartTime(std::string trafficModel, Time startTime)
TransportLayerProtocol_t GetTrafficProtocol(std::string trafficModel) const
void SetTrafficStopTime(std::string trafficModel, Time stopTime)
Ptr< RandomVariableStream > m_utMobileUserCount
SimulationHelper::CrTxConf_t m_crTxConf
TrafficDirection_t GetTrafficDirection(std::string trafficModel) const
TRAFFIC_MODEL_ATTRIBUTE_ACCESSOR_DEFINE(Http)
Time GetTrafficStopTime(std::string trafficModel) const
double GetTrafficPercentage(std::string trafficModel) const
TypeId GetInstanceTypeId(void) const
Derived from Object.
TRAFFIC_MODEL_ATTRIBUTE_ACCESSOR_DEFINE(Cbr)
SimulationHelperConf()
Default constructor.
static TypeId GetTypeId(void)
Derived from Object.
Time GetTrafficStartTime(std::string trafficModel) const
TRAFFIC_MODEL_ATTRIBUTE_ACCESSOR_DEFINE(Nrtv)
void SetTrafficStartDelay(std::string trafficModel, Time startDelay)
void SetTrafficDirection(std::string trafficModel, TrafficDirection_t direction)
void SetTrafficPercentage(std::string trafficModel, double percentage)
virtual ~SimulationHelperConf()
Destructor.
TRAFFIC_MODEL_ATTRIBUTE_ACCESSOR_DEFINE(OnOff)
A helper to make it easier to create example simulation cases.
uint32_t GetNextUtCount(uint32_t beamId=0) const
Get next UT count from internal random variable stream.
void EnableCrdsa()
Enable CRDSA random access.
Ptr< SatCnoHelper > m_cnoHelper
void ProgressCb()
Callback that prints simulation progress to stdout.
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.
void SetErrorModel(SatPhyRxCarrierConf::ErrorModel em, double errorRate=0.0)
Set simulation error model.
Ptr< SatTrafficHelper > m_trafficHelper
void SetupOutputPath()
Check if output path has been set.
void SetUserCountPerMobileUt(uint32_t count)
Set user count per mobile UT.
void EnableAcm(SatEnums::SatLinkDir_t dir)
Enable ACM for a simulation direction.
Time & GetSimTime()
Get simulation time.
void InstallTrafficModel(TrafficModel_t trafficModel, TransportLayerProtocol_t protocol, TrafficDirection_t direction)
void DoDispose(void)
Disposing.
void SetSimulationTime(Time time)
Set simulation time.
SimulationHelper()
Default constructor, which is not used.
void ConfigureFrequencyBands()
Configure the default setting for the forward and return link frequencies.
virtual ~SimulationHelper()
Destructor.
void DisableAcm(SatEnums::SatLinkDir_t dir)
Disable ACM for a simulation direction.
void ConfigureAttributesFromFile(std::string filePath, bool overrideManualConfiguration=true)
Configure this instance after reading input attributes from XML file.
std::map< uint32_t, Ptr< RandomVariableStream > > m_utCount
Ptr< SatCnoHelper > GetCnoHelper()
Get the C/N0 helper to customize C/N0 on some nodes.
void DisableProgressLogs()
Disables simulation progress logs.
void SetIdealPhyParameterization()
Set ideal channel/physical layer parameterization.
void DisableFca()
Disable free capacity allocation.
Ptr< SatHelper > m_satHelper
Ptr< SatHelper > CreateSatScenario(SatHelper::PreDefinedScenario_t scenario=SatHelper::NONE, const std::string &mobileUtsFolder="")
Create the satellite scenario.
void CreateDefaultRtnLinkStats()
Create stats collectors if needed and set default statistics settings for both RTN link.
Ptr< SatGroupHelper > m_groupHelper
Ptr< SatListPositionAllocator > m_commonUtPositions
void RunSimulation()
Run the simulation.
void SetSimulationTime(double seconds)
Set simulation time in seconds.
void EnableFca()
Enable free capacity allocation.
std::string StoreAttributesToFile(std::string fileName, bool outputAttributes=false)
Store all used attributes.
void SetCrTxConf(CrTxConf_t crTxConf)
void SetGwUserCount(uint32_t gwUserCount)
Set the number of GW users in the scenario.
void EnableOnlyConstantRate(uint32_t rcIndex, double rateKbps)
Enable only CRA for a given RC index.
void EnableExternalFadingInputTrace()
Enable external fading input.
void EnableOutputTraces()
Enable all output traces.
void ConfigureLinkBudget()
Configure all link budget related attributes.
void EnableSlottedAloha()
Enable slotted ALOHA random access.
void DisableAllCapacityAssignmentCategories()
Disable all capacity allocation categories: CRA/VBDC/RBDC.
void EnableArq(SatEnums::SatLinkDir_t dir)
Enable ARQ.
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 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 SetUtPositionAllocatorForBeam(uint32_t beamId, Ptr< SatListPositionAllocator > posAllocator)
Set a list position allocator for UTs of a specific beam.
void SetUtCountPerBeam(uint32_t count)
Set UT count per beam.
void InstallLoraTrafficModel(LoraTrafficModel_t trafficModel, Time interval, uint32_t packetSize, Time startTime, Time stopTime, Time startDelay)
Ptr< SatHelper > GetSatelliteHelper()
If lower layer API access is required, use this to access SatHelper.
Ptr< SatTrafficHelper > GetTrafficHelper()
Get the traffic helper to create more complex traffics.
void SetGwUserId(uint32_t gwUserId)
Set the ID of the GW user for traffic models.
TypeId GetInstanceTypeId(void) const
Derived from Object.
void ReadInputAttributesFromFile(std::string filePath)
Read input attributes from XML file.
void CreateDefaultFwdLinkStats()
Create stats collectors if needed and set default statistics settings for both FWD link.
void DisableRandomAccess()
Disable random access.
void EnablePeriodicalControlSlots(Time periodicity)
Enable periodical control slots.
Ptr< SatStatsHelperContainer > GetStatisticsContainer()
Get the statistics container of this helper.
void EnableRandomAccess()
Enable random access.
void EnableUtListPositionsFromInputFile(std::string inputFile, bool checkBeams=true)
Enable reading UT list positions from input file.
std::set< uint32_t > m_enabledBeams
void SetUserCountPerUt(uint32_t count)
Set user count per UT.
void CreateDefaultStats()
Create stats collectors and set default statistics settings for both FWD and RTN links.
std::set< uint32_t > GetBeamSet(void) const
void SetOutputPath(std::string path)
Force a output file path to this simulation instead of default satellite/data/sims/.
uint32_t GetNextUtUserCount() const
Get next UT user count from internal random variable stream.
Ptr< SatGroupHelper > GetGroupHelper()
Get the group helper.
void SetInterferenceModel(SatPhyRxCarrierConf::InterferenceModel ifModel, double constantIf=0.0)
Set simulation interference model.
void SetBeams(const std::string &beamList)
Ptr< RandomVariableStream > m_utMobileUserCount
const std::set< uint32_t > & GetBeams()
Get enabled beams in integer format.
bool HasSinkInstalled(Ptr< Node > node, uint16_t port)
Check if node has a PacketSink installed at certain port.
std::map< uint32_t, Ptr< SatListPositionAllocator > > m_utPositionsByBeam
void EnableProgressLogs()
Enables simulation progress logging.
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)
void InstallTrafficModel(TrafficModel_t trafficModel, TransportLayerProtocol_t protocol, TrafficDirection_t direction, Time startTime, Time stopTime, Time startDelay)
bool IsBeamEnabled(uint32_t beamId) const
Check if a beam is enabled.
void SetCommonUtPositionAllocator(Ptr< SatListPositionAllocator > posAllocator)
Set common UT position allocator for all beams.
void ConfigureFwdLinkBeamHopping()
Configure the beam hopping functionality for the FWD link.
void AddDefaultUiArguments(CommandLine &cmd)
Add default command line arguments for the simulation.
Ptr< SatStatsHelperContainer > m_statContainer
void SetOutputTag(std::string tag)
Set simulation output tag, which is the basename of the directory where output files are stored.
Ptr< RandomVariableStream > m_utUserCount
static TypeId GetTypeId(void)
Derived from Object.
void SetDefaultValues()
Set default values shared by all examples using SimulationHelper.
void SetBeamSet(std::set< uint32_t > beamSet)
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.
TrafficDirection_t m_direction
TransportLayerProtocol_t m_protocol