satellite-beam-helper.cc
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2013 Magister Solutions Ltd
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: Sami Rantanen <sami.rantanen@magister.fi>
20  * Author: Mathias Ettinger <mettinger@viveris.toulouse.fr>
21  */
22 
23 #include "satellite-beam-helper.h"
24 
25 #include <ns3/config.h>
26 #include <ns3/enum.h>
27 #include <ns3/internet-stack-helper.h>
28 #include <ns3/ipv4-interface.h>
29 #include <ns3/ipv4-static-routing-helper.h>
30 #include <ns3/log.h>
31 #include <ns3/mobility-helper.h>
32 #include <ns3/pointer.h>
33 #include <ns3/satellite-antenna-gain-pattern-container.h>
34 #include <ns3/satellite-arp-cache.h>
35 #include <ns3/satellite-bstp-controller.h>
36 #include <ns3/satellite-channel.h>
37 #include <ns3/satellite-const-variables.h>
38 #include <ns3/satellite-enums.h>
39 #include <ns3/satellite-fading-input-trace-container.h>
40 #include <ns3/satellite-fading-input-trace.h>
41 #include <ns3/satellite-geo-net-device.h>
42 #include <ns3/satellite-gw-llc.h>
43 #include <ns3/satellite-gw-mac.h>
44 #include <ns3/satellite-id-mapper.h>
45 #include <ns3/satellite-lorawan-net-device.h>
46 #include <ns3/satellite-mobility-model.h>
47 #include <ns3/satellite-packet-trace.h>
48 #include <ns3/satellite-phy-rx.h>
49 #include <ns3/satellite-phy-tx.h>
50 #include <ns3/satellite-phy.h>
51 #include <ns3/satellite-point-to-point-isl-helper.h>
52 #include <ns3/satellite-propagation-delay-model.h>
53 #include <ns3/satellite-sgp4-mobility-model.h>
54 #include <ns3/satellite-typedefs.h>
55 #include <ns3/satellite-ut-llc.h>
56 #include <ns3/satellite-ut-mac.h>
57 #include <ns3/satellite-utils.h>
58 #include <ns3/singleton.h>
59 #include <ns3/string.h>
60 #include <ns3/traffic-control-helper.h>
61 
62 NS_LOG_COMPONENT_DEFINE("SatBeamHelper");
63 
64 namespace ns3
65 {
66 
67 NS_OBJECT_ENSURE_REGISTERED(SatBeamHelper);
68 
69 TypeId
71 {
72  static TypeId tid =
73  TypeId("ns3::SatBeamHelper")
74  .SetParent<Object>()
75  .AddConstructor<SatBeamHelper>()
76  .AddAttribute("CarrierFrequencyConverter",
77  "Callback to convert carrier id to generate frequency.",
78  CallbackValue(),
79  MakeCallbackAccessor(&SatBeamHelper::m_carrierFreqConverter),
80  MakeCallbackChecker())
81  .AddAttribute("FadingModel",
82  "Fading model",
83  EnumValue(SatEnums::FADING_OFF),
84  MakeEnumAccessor(&SatBeamHelper::m_fadingModel),
85  MakeEnumChecker(SatEnums::FADING_OFF,
86  "FadingOff",
88  "FadingTrace",
90  "FadingMarkov"))
91  .AddAttribute("RandomAccessModel",
92  "Random Access Model",
93  EnumValue(SatEnums::RA_MODEL_OFF),
94  MakeEnumAccessor(&SatBeamHelper::m_randomAccessModel),
95  MakeEnumChecker(SatEnums::RA_MODEL_OFF,
96  "RaOff",
98  "RaSlottedAloha",
100  "RaCrdsa",
102  "RaRcs2Specification",
104  "RaMarsala",
106  "RaEssa"))
107  .AddAttribute("RaInterferenceModel",
108  "Interference model for random access",
110  MakeEnumAccessor(&SatBeamHelper::m_raInterferenceModel),
111  MakeEnumChecker(SatPhyRxCarrierConf::IF_CONSTANT,
112  "Constant",
114  "Trace",
116  "PerPacket",
118  "PerFragment"))
119  .AddAttribute("RaInterferenceEliminationModel",
120  "Interference elimination model for random access",
123  MakeEnumChecker(SatPhyRxCarrierConf::SIC_PERFECT,
124  "Perfect",
126  "Residual"))
127  .AddAttribute(
128  "RaCollisionModel",
129  "Collision model for random access",
131  MakeEnumAccessor(&SatBeamHelper::m_raCollisionModel),
133  "RaCollisionNotDefined",
135  "RaCollisionAlwaysDropCollidingPackets",
137  "RaCollisionCheckAgainstSinr",
139  "RaCollisionConstantErrorProbability"))
140  .AddAttribute("RaConstantErrorRate",
141  "Constant error rate for random access",
142  DoubleValue(0.0),
143  MakeDoubleAccessor(&SatBeamHelper::m_raConstantErrorRate),
144  MakeDoubleChecker<double>())
145  .AddAttribute("PropagationDelayModel",
146  "Propagation delay model",
147  EnumValue(SatEnums::PD_CONSTANT_SPEED),
148  MakeEnumAccessor(&SatBeamHelper::m_propagationDelayModel),
149  MakeEnumChecker(SatEnums::PD_CONSTANT_SPEED,
150  "ConstantSpeed",
152  "Constant"))
153  .AddAttribute("ConstantPropagationDelay",
154  "Constant propagation delay",
155  TimeValue(Seconds(0.13)),
157  MakeTimeChecker())
158  .AddAttribute(
159  "PrintDetailedInformationToCreationTraces",
160  "Print detailed information to creation traces",
161  BooleanValue(true),
163  MakeBooleanChecker())
164  .AddAttribute("CtrlMsgStoreTimeInFwdLink",
165  "Time to store a control message in container for forward link.",
166  TimeValue(MilliSeconds(10000)),
167  MakeTimeAccessor(&SatBeamHelper::m_ctrlMsgStoreTimeFwdLink),
168  MakeTimeChecker())
169  .AddAttribute("CtrlMsgStoreTimeInRtnLink",
170  "Time to store a control message in container for return link.",
171  TimeValue(MilliSeconds(10000)),
172  MakeTimeAccessor(&SatBeamHelper::m_ctrlMsgStoreTimeRtnLink),
173  MakeTimeChecker())
174  .AddAttribute("EnableFwdLinkBeamHopping",
175  "Enable beam hopping in forward link.",
176  BooleanValue(false),
177  MakeBooleanAccessor(&SatBeamHelper::m_enableFwdLinkBeamHopping),
178  MakeBooleanChecker())
179  .AddAttribute("EnableTracesOnUserReturnLink",
180  "Use traces files on the user return channel only",
181  BooleanValue(false),
182  MakeBooleanAccessor(&SatBeamHelper::m_enableTracesOnReturnLink),
183  MakeBooleanChecker())
184  .AddAttribute("DvbVersion",
185  "Indicates if using DVB-S2 or DVB-S2X",
186  EnumValue(SatEnums::DVB_S2),
187  MakeEnumAccessor(&SatBeamHelper::m_dvbVersion),
188  MakeEnumChecker(SatEnums::DVB_S2, "DVB_S2", SatEnums::DVB_S2X, "DVB_S2X"))
189  .AddAttribute("ReturnLinkLinkResults",
190  "Protocol used for the return link link results.",
191  EnumValue(SatEnums::LR_RCS2),
192  MakeEnumAccessor(&SatBeamHelper::m_rlLinkResultsType),
193  MakeEnumChecker(SatEnums::LR_RCS2,
194  "RCS2",
196  "FSIM",
198  "LORA"))
199  .AddTraceSource("Creation",
200  "Creation traces",
201  MakeTraceSourceAccessor(&SatBeamHelper::m_creationTrace),
202  "ns3::SatTypedefs::CreationCallback");
203  return tid;
204 }
205 
206 TypeId
208 {
209  NS_LOG_FUNCTION(this);
210 
211  return GetTypeId();
212 }
213 
215  : m_printDetailedInformationToCreationTraces(false),
216  m_fadingModel(),
217  m_propagationDelayModel(SatEnums::PD_CONSTANT_SPEED),
218  m_constantPropagationDelay(Seconds(0.13)),
219  m_randomAccessModel(SatEnums::RA_MODEL_OFF),
220  m_raInterferenceModel(SatPhyRxCarrierConf::IF_CONSTANT),
221  m_raInterferenceEliminationModel(SatPhyRxCarrierConf::SIC_PERFECT),
222  m_raCollisionModel(SatPhyRxCarrierConf::RA_COLLISION_NOT_DEFINED),
223  m_raConstantErrorRate(0.0),
224  m_enableFwdLinkBeamHopping(false),
225  m_bstpController(),
226  m_forwardLinkRegenerationMode(SatEnums::TRANSPARENT),
227  m_returnLinkRegenerationMode(SatEnums::TRANSPARENT)
228 {
229  NS_LOG_FUNCTION(this);
230 
231  // this default constructor should not be called...
232  NS_FATAL_ERROR("SatBeamHelper::SatBeamHelper - Constructor not in use");
233 }
234 
235 SatBeamHelper::SatBeamHelper(NodeContainer geoNodes,
236  std::vector<std::pair<uint32_t, uint32_t>> isls,
237  SatTypedefs::CarrierBandwidthConverter_t bandwidthConverterCb,
238  uint32_t rtnLinkCarrierCount,
239  uint32_t fwdLinkCarrierCount,
240  Ptr<SatSuperframeSeq> seq,
241  SatEnums::RegenerationMode_t forwardLinkRegenerationMode,
242  SatEnums::RegenerationMode_t returnLinkRegenerationMode)
243  : m_carrierBandwidthConverter(bandwidthConverterCb),
244  m_superframeSeq(seq),
245  m_printDetailedInformationToCreationTraces(false),
246  m_fadingModel(SatEnums::FADING_MARKOV),
247  m_propagationDelayModel(SatEnums::PD_CONSTANT_SPEED),
248  m_constantPropagationDelay(Seconds(0.13)),
249  m_randomAccessModel(SatEnums::RA_MODEL_OFF),
250  m_raInterferenceModel(SatPhyRxCarrierConf::IF_CONSTANT),
251  m_raInterferenceEliminationModel(SatPhyRxCarrierConf::SIC_PERFECT),
252  m_raCollisionModel(SatPhyRxCarrierConf::RA_COLLISION_CHECK_AGAINST_SINR),
253  m_raConstantErrorRate(0.0),
254  m_enableFwdLinkBeamHopping(false),
255  m_bstpController(),
256  m_forwardLinkRegenerationMode(forwardLinkRegenerationMode),
257  m_returnLinkRegenerationMode(returnLinkRegenerationMode),
258  m_isls(isls)
259 {
260  NS_LOG_FUNCTION(this << rtnLinkCarrierCount << fwdLinkCarrierCount << seq);
261 
262  // uncomment next code line, if attributes are needed already in construction phase.
263  // E.g attributes set by object factory affecting object creation
264  ObjectBase::ConstructSelf(AttributeConstructionList());
265 
266  m_channelFactory.SetTypeId("ns3::SatChannel");
267 
268  // create SatChannel containers
269  m_ulChannels = Create<SatChannelPair>();
270  m_flChannels = Create<SatChannelPair>();
271 
272  // create link specific control message containers
273  Ptr<SatControlMsgContainer> rtnCtrlMsgContainer =
274  Create<SatControlMsgContainer>(m_ctrlMsgStoreTimeRtnLink, true);
275  Ptr<SatControlMsgContainer> fwdCtrlMsgContainer =
276  Create<SatControlMsgContainer>(m_ctrlMsgStoreTimeFwdLink, false);
277 
278  SatMac::ReadCtrlMsgCallback rtnReadCtrlCb =
279  MakeCallback(&SatControlMsgContainer::Read, rtnCtrlMsgContainer);
280  SatMac::ReserveCtrlMsgCallback rtnReserveCtrlCb =
281  MakeCallback(&SatControlMsgContainer::ReserveIdAndStore, rtnCtrlMsgContainer);
282  SatMac::SendCtrlMsgCallback rtnSendCtrlCb =
283  MakeCallback(&SatControlMsgContainer::Send, rtnCtrlMsgContainer);
284 
285  SatMac::ReadCtrlMsgCallback fwdReadCtrlCb =
286  MakeCallback(&SatControlMsgContainer::Read, fwdCtrlMsgContainer);
287  SatMac::ReserveCtrlMsgCallback fwdReserveCtrlCb =
288  MakeCallback(&SatControlMsgContainer::ReserveIdAndStore, fwdCtrlMsgContainer);
289  SatMac::SendCtrlMsgCallback fwdSendCtrlCb =
290  MakeCallback(&SatControlMsgContainer::Send, fwdCtrlMsgContainer);
291 
297  geoRaSettings.m_raCollisionModel = m_raCollisionModel;
298 
303  gwRaSettings.m_raCollisionModel = m_raCollisionModel;
304 
305  // Error rate is valid only at the GW for random access
307 
312  utRaSettings.m_raCollisionModel = m_raCollisionModel;
313 
315  {
318  Config::SetDefault("ns3::SatGeoHelper::DaRtnLinkInterferenceModel", StringValue("Trace"));
319  Config::SetDefault("ns3::SatGwHelper::DaRtnLinkInterferenceModel", StringValue("Trace"));
320  }
321 
322  // create needed low level satellite helpers
323  m_geoHelper = CreateObject<SatGeoHelper>(bandwidthConverterCb,
324  rtnLinkCarrierCount,
325  fwdLinkCarrierCount,
326  seq,
327  fwdReadCtrlCb,
328  rtnReadCtrlCb,
329  geoRaSettings);
330  m_gwHelper = CreateObject<SatGwHelper>(bandwidthConverterCb,
331  rtnLinkCarrierCount,
332  seq,
333  rtnReadCtrlCb,
334  fwdReserveCtrlCb,
335  fwdSendCtrlCb,
336  gwRaSettings);
337  m_utHelper = CreateObject<SatUtHelper>(bandwidthConverterCb,
338  fwdLinkCarrierCount,
339  seq,
340  fwdReadCtrlCb,
341  rtnReserveCtrlCb,
342  rtnSendCtrlCb,
343  utRaSettings);
344 
345  // Two usage of link results is two-fold: on the other hand they are needed in the
346  // packet reception for packet decoding, but on the other hand they are utilized in
347  // transmission side in ACM for deciding the best MODCOD.
348  //
349  // Return link results:
350  // - Packet reception at the GW
351  // - RTN link packet scheduling at the NCC
352  // DVB-S2 link results:
353  // - Packet reception at the UT
354  // - FWD link packet scheduling at the GW
355  //
356  Ptr<SatLinkResultsFwd> linkResultsFwd;
357  switch (m_dvbVersion)
358  {
359  case SatEnums::DVB_S2:
360  linkResultsFwd = CreateObject<SatLinkResultsDvbS2>();
361  break;
362  case SatEnums::DVB_S2X:
363  linkResultsFwd = CreateObject<SatLinkResultsDvbS2X>();
364  break;
365  default:
366  NS_FATAL_ERROR("The DVB version does not exist");
367  }
368 
369  Ptr<SatLinkResultsRtn> linkResultsReturnLink;
370  switch (m_rlLinkResultsType)
371  {
372  case SatEnums::LR_RCS2: {
373  linkResultsReturnLink = CreateObject<SatLinkResultsDvbRcs2>();
374  break;
375  }
376  case SatEnums::LR_FSIM: {
377  linkResultsReturnLink = CreateObject<SatLinkResultsFSim>();
378  break;
379  }
380  case SatEnums::LR_LORA: {
381  linkResultsReturnLink = CreateObject<SatLinkResultsLora>();
382  break;
383  }
384  default: {
385  NS_FATAL_ERROR("Invalid address for multicast group");
386  break;
387  }
388  }
389 
390  linkResultsFwd->Initialize();
391  linkResultsReturnLink->Initialize();
392 
395 
396  // DVB-S2 link results for packet decoding at the UT
397  m_utHelper->Initialize(linkResultsFwd);
398  // DVB-RCS2 link results for packet decoding at the GW +
399  // DVB-S2 link results for FWD link RRM
400  m_gwHelper->Initialize(linkResultsReturnLink, linkResultsFwd, m_dvbVersion, useScpc);
401  // link results on satellite, to use if regeneration
402  m_geoHelper->Initialize(linkResultsFwd, linkResultsReturnLink);
403  // DVB-RCS2 link results for RTN link waveform configurations
404  m_superframeSeq->GetWaveformConf()->InitializeEbNoRequirements(linkResultsReturnLink);
405 
406  m_geoNodes = geoNodes;
407  m_geoHelper->Install(m_geoNodes);
408 
409  m_ncc = CreateObject<SatNcc>();
410 
412  {
413  PointerValue llsConf;
414  m_utHelper->GetAttribute("LowerLayerServiceConf", llsConf);
415  uint8_t allocationChannelCount =
416  llsConf.Get<SatLowerLayerServiceConf>()->GetRaServiceCount();
417 
419  for (uint8_t i = 0; i < allocationChannelCount; i++)
420  {
421  m_ncc->SetRandomAccessLowLoadBackoffProbability(
422  i,
424  m_ncc->SetRandomAccessHighLoadBackoffProbability(
425  i,
427  m_ncc->SetRandomAccessLowLoadBackoffTime(
428  i,
430  m_ncc->SetRandomAccessHighLoadBackoffTime(
431  i,
433  m_ncc->SetRandomAccessAverageNormalizedOfferedLoadThreshold(
434  i,
436  i));
437  }
438  }
439 
440  switch (m_fadingModel)
441  {
444  m_markovConf = CreateObject<SatMarkovConf>();
445  break;
446  }
449  default: {
450  m_markovConf = NULL;
451  break;
452  }
453  }
454 
456  {
457  m_bstpController = CreateObject<SatBstpController>();
458  }
459 }
460 
461 void
463 {
464  NS_LOG_FUNCTION(this);
465 
466  m_beam.clear();
467  m_gwNode.clear();
468  m_ulChannels = NULL;
469  m_flChannels = NULL;
470  m_beamFreqs.clear();
471  m_markovConf = NULL;
472  m_ncc = NULL;
473  m_geoHelper = NULL;
474  m_gwHelper = NULL;
475  m_utHelper = NULL;
476  m_antennaGainPatterns = NULL;
477 }
478 
479 void
481 {
482  NS_LOG_FUNCTION(this);
483 
484  if (m_bstpController)
485  {
486  m_bstpController->Initialize();
487  }
488 }
489 
490 void
492 {
493  m_standard = standard;
494 }
495 
496 void
497 SatBeamHelper::SetAntennaGainPatterns(Ptr<SatAntennaGainPatternContainer> antennaPatterns)
498 {
499  NS_LOG_FUNCTION(this << antennaPatterns);
500 
501  m_antennaGainPatterns = antennaPatterns;
502 }
503 
504 void
505 SatBeamHelper::SetDeviceAttribute(std::string n1, const AttributeValue& v1)
506 {
507  NS_LOG_FUNCTION(this << n1);
508 }
509 
510 void
511 SatBeamHelper::SetChannelAttribute(std::string n1, const AttributeValue& v1)
512 {
513  NS_LOG_FUNCTION(this << n1);
514 
515  m_channelFactory.Set(n1, v1);
516 }
517 
518 void
520 {
521  NS_LOG_FUNCTION(this << &cb);
522 
523  m_ncc->SetUpdateRoutingCallback(cb);
524 }
525 
526 std::pair<Ptr<NetDevice>, NetDeviceContainer>
527 SatBeamHelper::Install(NodeContainer ut,
528  Ptr<Node> gwNode,
529  uint32_t gwId,
530  uint32_t satId,
531  uint32_t beamId,
532  uint32_t rtnUlFreqId,
533  uint32_t rtnFlFreqId,
534  uint32_t fwdUlFreqId,
535  uint32_t fwdFlFreqId,
536  SatMac::RoutingUpdateCallback routingCallback)
537 {
538  NS_LOG_FUNCTION(this << gwNode << gwId << satId << beamId << rtnUlFreqId << rtnFlFreqId
539  << fwdUlFreqId << fwdFlFreqId);
540 
541  // add pair satId / beamId as key and gwId as value to beam map. In case it's there already,
542  // assertion failure is caused
543  std::pair<std::map<std::pair<uint32_t, uint32_t>, uint32_t>::iterator, bool> beam =
544  m_beam.insert(std::make_pair(std::make_pair(satId, beamId), gwId));
545  NS_ASSERT(beam.second == true);
546 
547  // TODO: Update channels to store 4 frequency ID
548  // save frequency pair to map with beam ID
549  // FrequencyPair_t freqPair = FrequencyPair_t (ulFreqId, flFreqId);
550  // m_beamFreqs.insert (std::pair<uint32_t, FrequencyPair_t > (beamId, freqPair));
551 
552  // next it is found feeder link channels and if not found channels are created and saved to map
553  SatChannelPair::ChannelPair_t feederLink =
554  GetChannelPair(satId, beamId, fwdFlFreqId, rtnFlFreqId, false);
555 
556  // next it is found user link channels and if not found channels are created and saved to map
558  GetChannelPair(satId, beamId, fwdUlFreqId, rtnUlFreqId, true);
559 
560  Ptr<Node> geoNode = m_geoNodes.Get(satId);
561 
562  NS_ASSERT(geoNode != NULL);
563 
564  // Get the position of the GW serving this beam, get the best beam based on antenna patterns
565  // for this position, and set the antenna patterns to the feeder PHY objects via
566  // AttachChannels method.
567  GeoCoordinate gwPos = gwNode->GetObject<SatMobilityModel>()->GetGeoPosition();
568  uint32_t feederBeamId = m_antennaGainPatterns->GetBestBeamId(satId, gwPos, true);
569 
570  // attach channels to geo satellite device
571  m_geoHelper->AttachChannels(geoNode->GetDevice(0),
572  feederLink.first,
573  feederLink.second,
574  userLink.first,
575  userLink.second,
576  m_antennaGainPatterns->GetAntennaGainPattern(beamId),
577  m_antennaGainPatterns->GetAntennaGainPattern(feederBeamId),
578  satId,
579  gwId,
580  beamId,
583 
584  Ptr<SatMobilityModel> gwMobility = gwNode->GetObject<SatMobilityModel>();
585  NS_ASSERT(gwMobility != NULL);
586 
587  // enable timing advance in observers of the UTs
588  for (NodeContainer::Iterator i = ut.Begin(); i != ut.End(); i++)
589  {
590  // enable timing advance observing in nodes.
591 
592  Ptr<SatMobilityObserver> observer = (*i)->GetObject<SatMobilityObserver>();
593  NS_ASSERT(observer != NULL);
594  observer->ObserveTimingAdvance(userLink.second->GetPropagationDelayModel(),
595  feederLink.second->GetPropagationDelayModel(),
596  gwMobility);
597 
599  {
601  }
602 
603  // save UT node pointer to multimap container
604  m_utNode.insert(std::make_pair(std::make_pair(satId, beamId), *i));
605  }
606 
607  Ptr<NetDevice> gwNd = InstallFeeder(DynamicCast<SatGeoNetDevice>(geoNode->GetDevice(0)),
608  gwNode,
609  gwId,
610  satId,
611  beamId,
612  feederLink,
613  rtnFlFreqId,
614  fwdFlFreqId,
615  routingCallback);
616 
617  NetDeviceContainer utNd;
620  {
621  if (m_gwNdMap.count(gwId) == 0)
622  {
623  // If first time we create a Net Device for this GW ID, store it
624  m_gwNdMap[gwId] = gwNd;
625  }
626  utNd = InstallUser(DynamicCast<SatGeoNetDevice>(geoNode->GetDevice(0)),
627  ut,
628  m_gwNdMap[gwId],
629  satId,
630  beamId,
631  userLink,
632  rtnUlFreqId,
633  fwdUlFreqId,
634  routingCallback);
635  }
636  else
637  {
638  utNd = InstallUser(DynamicCast<SatGeoNetDevice>(geoNode->GetDevice(0)),
639  ut,
640  gwNd,
641  satId,
642  beamId,
643  userLink,
644  rtnUlFreqId,
645  fwdUlFreqId,
646  routingCallback);
647  }
648 
649  if (m_bstpController)
650  {
652  MakeCallback(&SatNetDevice::ToggleState, DynamicCast<SatNetDevice>(gwNd));
653 
654  m_bstpController->AddNetDeviceCallback(beamId, fwdUlFreqId, fwdFlFreqId, gwId, gwNdCb);
655  }
656 
657  return std::make_pair(gwNd, utNd);
658 }
659 
660 Ptr<NetDevice>
661 SatBeamHelper::InstallFeeder(Ptr<SatGeoNetDevice> geoNetDevice,
662  Ptr<Node> gwNode,
663  uint32_t gwId,
664  uint32_t satId,
665  uint32_t beamId,
667  uint32_t rtnFlFreqId,
668  uint32_t fwdFlFreqId,
669  SatUtMac::RoutingUpdateCallback routingCallback)
670 {
671  NS_LOG_FUNCTION(this << gwNode << gwId << satId << beamId << rtnFlFreqId << fwdFlFreqId);
672 
673  // Set trace files if options ask for it
675  {
676  feederLink.second->SetAttribute("RxPowerCalculationMode",
677  EnumValue(SatEnums::RX_PWR_INPUT_TRACE));
678  }
679 
680  // store GW node
681  bool storedOk = StoreGwNode(gwId, gwNode);
682  NS_ASSERT(storedOk);
683 
684  // install fading container to GW
686  {
687  InstallFadingContainer(gwNode);
688  }
689 
690  // install GW
691  PointerValue llsConf;
692  m_utHelper->GetAttribute("LowerLayerServiceConf", llsConf);
693  Ptr<NetDevice> gwNd;
694  switch (m_standard)
695  {
696  case SatEnums::DVB:
697  gwNd = m_gwHelper->InstallDvb(gwNode,
698  gwId,
699  satId,
700  beamId,
701  feederLink.first,
702  feederLink.second,
703  m_ncc,
704  llsConf.Get<SatLowerLayerServiceConf>(),
707  break;
708  case SatEnums::LORA:
709  gwNd = m_gwHelper->InstallLora(gwNode,
710  gwId,
711  satId,
712  beamId,
713  feederLink.first,
714  feederLink.second,
715  m_ncc,
716  llsConf.Get<SatLowerLayerServiceConf>(),
719 
720  break;
721  default:
722  NS_FATAL_ERROR("Incorrect standard chosen");
723  }
724 
725  // calculate maximum size of the BB frame with the most robust MODCOD
726  Ptr<SatBbFrameConf> bbFrameConf = m_gwHelper->GetBbFrameConf();
727 
729 
730  if (bbFrameConf->GetBbFrameUsageMode() == SatEnums::SHORT_FRAMES)
731  {
732  frameType = SatEnums::SHORT_FRAME;
733  }
734 
735  uint32_t maxBbFrameDataSizeInBytes =
736  (bbFrameConf->GetBbFramePayloadBits(bbFrameConf->GetMostRobustModcod(frameType),
737  frameType) /
739  bbFrameConf->GetBbFrameHeaderSizeInBytes();
740 
741  switch (m_standard)
742  {
743  case SatEnums::DVB:
744  m_ncc->AddBeam(
745  satId,
746  beamId,
747  MakeCallback(&SatNetDevice::SendControlMsg, DynamicCast<SatNetDevice>(gwNd)),
748  MakeCallback(&SatGwMac::TbtpSent,
749  DynamicCast<SatGwMac>(DynamicCast<SatNetDevice>(gwNd)->GetMac())),
751  maxBbFrameDataSizeInBytes,
752  gwNd->GetAddress());
753  break;
754  case SatEnums::LORA:
755  m_ncc->AddBeam(satId,
756  beamId,
758  DynamicCast<SatLorawanNetDevice>(gwNd)),
759  MakeNullCallback<void, Ptr<SatTbtpMessage>>(),
761  maxBbFrameDataSizeInBytes,
762  gwNd->GetAddress());
763  break;
764  default:
765  NS_FATAL_ERROR("Incorrect standard chosen");
766  }
767 
768  // Add satellite addresses to GW MAC layers.
771  {
772  Mac48Address satFeederAddress = geoNetDevice->GetSatelliteFeederAddress(beamId);
773  DynamicCast<SatGwMac>(DynamicCast<SatNetDevice>(gwNd)->GetMac())
774  ->SetSatelliteAddress(satFeederAddress);
775  }
776 
777  // Add satellite addresses to GW LLC layers.
779  {
780  Mac48Address satFeederAddress = geoNetDevice->GetSatelliteFeederAddress(beamId);
781  DynamicCast<SatGwLlc>(DynamicCast<SatNetDevice>(gwNd)->GetLlc())
782  ->SetSatelliteAddress(satFeederAddress);
783  }
784 
785  return gwNd;
786 }
787 
788 NetDeviceContainer
789 SatBeamHelper::InstallUser(Ptr<SatGeoNetDevice> geoNetDevice,
790  NodeContainer ut,
791  Ptr<NetDevice> gwNd,
792  uint32_t satId,
793  uint32_t beamId,
795  uint32_t rtnUlFreqId,
796  uint32_t fwdUlFreqId,
797  SatUtMac::RoutingUpdateCallback routingCallback)
798 {
799  NS_LOG_FUNCTION(this << beamId << rtnUlFreqId << fwdUlFreqId);
800 
801  // Set trace files if options ask for it
803  {
804  userLink.second->SetAttribute("RxPowerCalculationMode",
805  EnumValue(SatEnums::RX_PWR_INPUT_TRACE));
806  }
807 
808  Address satUserAddress = Address();
811  {
812  satUserAddress = geoNetDevice->GetUserMac(beamId)->GetAddress();
813  }
814 
815  // install UTs
816  NetDeviceContainer utNd;
817  switch (m_standard)
818  {
819  case SatEnums::DVB:
820  utNd = m_utHelper->InstallDvb(ut,
821  satId,
822  beamId,
823  userLink.first,
824  userLink.second,
825  DynamicCast<SatNetDevice>(gwNd),
826  m_ncc,
827  satUserAddress,
829  routingCallback,
832  break;
833  case SatEnums::LORA:
834  utNd = m_utHelper->InstallLora(ut,
835  satId,
836  beamId,
837  userLink.first,
838  userLink.second,
839  DynamicCast<SatNetDevice>(gwNd),
840  m_ncc,
841  satUserAddress,
843  routingCallback,
846  break;
847  default:
848  NS_FATAL_ERROR("Incorrect standard chosen");
849  }
850 
851  // Add satellite addresses UT MAC layers.
854  {
855  for (NetDeviceContainer::Iterator i = utNd.Begin(); i != utNd.End(); i++)
856  {
857  DynamicCast<SatUtMac>(DynamicCast<SatNetDevice>(*i)->GetMac())
858  ->SetSatelliteAddress(satUserAddress);
859  }
860  }
861 
862  // Add satellite addresses UT LLC layers.
864  {
865  for (NetDeviceContainer::Iterator i = utNd.Begin(); i != utNd.End(); i++)
866  {
867  DynamicCast<SatUtLlc>(DynamicCast<SatNetDevice>(*i)->GetLlc())
868  ->SetSatelliteAddress(Mac48Address::ConvertFrom(satUserAddress));
869  }
870  }
871 
872  return utNd;
873 }
874 
875 void
877 {
878  NS_LOG_FUNCTION(this);
879 
880  Ptr<PointToPointIslHelper> p2pIslHelper = CreateObject<PointToPointIslHelper>();
881  TrafficControlHelper tchIsl;
882 
883  for (std::vector<std::pair<uint32_t, uint32_t>>::iterator it = m_isls.begin();
884  it != m_isls.end();
885  it++)
886  {
887  Ptr<Node> sat1 = m_geoNodes.Get(it->first);
888  Ptr<Node> sat2 = m_geoNodes.Get(it->second);
889 
890  // Install a p2p ISL link between these two satellites
891  NetDeviceContainer netDevices = p2pIslHelper->Install(sat1, sat2);
892  Ptr<PointToPointIslNetDevice> islNdSat1 =
893  DynamicCast<PointToPointIslNetDevice>(netDevices.Get(0));
894  Ptr<PointToPointIslNetDevice> islNdSat2 =
895  DynamicCast<PointToPointIslNetDevice>(netDevices.Get(1));
896 
897  Ptr<SatGeoNetDevice> geoNdSat1 = DynamicCast<SatGeoNetDevice>(sat1->GetDevice(0));
898  Ptr<SatGeoNetDevice> geoNdSat2 = DynamicCast<SatGeoNetDevice>(sat2->GetDevice(0));
899 
900  geoNdSat1->AddIslsNetDevice(islNdSat1);
901  geoNdSat2->AddIslsNetDevice(islNdSat2);
902 
903  islNdSat1->SetGeoNetDevice(geoNdSat1);
904  islNdSat2->SetGeoNetDevice(geoNdSat2);
905  }
906 }
907 
908 void
910 {
911  NS_LOG_FUNCTION(this);
912 
913  m_geoHelper->SetIslRoutes(m_geoNodes, m_isls);
914 }
915 
916 uint32_t
917 SatBeamHelper::GetGwId(uint32_t satId, uint32_t beamId) const
918 {
919  std::map<std::pair<uint32_t, uint32_t>, uint32_t>::const_iterator i =
920  m_beam.find(std::make_pair(satId, beamId));
921 
922  if (i == m_beam.end())
923  {
924  return 0;
925  }
926  else
927  {
928  return i->second;
929  }
930 }
931 
932 Ptr<Node>
933 SatBeamHelper::GetGwNode(uint32_t gwId) const
934 {
935  NS_LOG_FUNCTION(this << gwId);
936 
937  std::map<uint32_t, Ptr<Node>>::const_iterator gwIterator = m_gwNode.find(gwId);
938  Ptr<Node> node = NULL;
939 
940  if (gwIterator != m_gwNode.end())
941  {
942  node = gwIterator->second;
943  }
944 
945  return node;
946 }
947 
948 NodeContainer
950 {
951  NS_LOG_FUNCTION(this);
952  return m_geoNodes;
953 }
954 
955 Ptr<SatUtHelper>
957 {
958  NS_LOG_FUNCTION(this);
959  return m_utHelper;
960 }
961 
962 Ptr<SatGwHelper>
964 {
965  NS_LOG_FUNCTION(this);
966  return m_gwHelper;
967 }
968 
969 Ptr<SatGeoHelper>
971 {
972  NS_LOG_FUNCTION(this);
973  return m_geoHelper;
974 }
975 
976 NodeContainer
978 {
979  NS_LOG_FUNCTION(this);
980 
981  NodeContainer gwNodes;
982 
983  for (std::map<uint32_t, Ptr<Node>>::const_iterator i = m_gwNode.begin(); i != m_gwNode.end();
984  ++i)
985  {
986  gwNodes.Add(i->second);
987  }
988 
989  return gwNodes;
990 }
991 
992 NodeContainer
994 {
995  NS_LOG_FUNCTION(this);
996 
997  NodeContainer utNodes;
998 
999  for (std::multimap<std::pair<uint32_t, uint32_t>, Ptr<Node>>::const_iterator i =
1000  m_utNode.begin();
1001  i != m_utNode.end();
1002  ++i)
1003  {
1004  utNodes.Add(i->second);
1005  }
1006 
1007  return utNodes;
1008 }
1009 
1010 NodeContainer
1011 SatBeamHelper::GetUtNodes(uint32_t satId, uint32_t beamId) const
1012 {
1013  NS_LOG_FUNCTION(this << beamId);
1014 
1015  NodeContainer utNodes;
1016 
1017  // find all entries with the specified beamId
1018  std::pair<std::multimap<std::pair<uint32_t, uint32_t>, Ptr<Node>>::const_iterator,
1019  std::multimap<std::pair<uint32_t, uint32_t>, Ptr<Node>>::const_iterator>
1020  range;
1021  range = m_utNode.equal_range(std::make_pair(satId, beamId));
1022 
1023  for (std::map<std::pair<uint32_t, uint32_t>, Ptr<Node>>::const_iterator i = range.first;
1024  i != range.second;
1025  ++i)
1026  {
1027  utNodes.Add(i->second);
1028  }
1029 
1030  return utNodes;
1031 }
1032 
1033 std::list<std::pair<uint32_t, uint32_t>>
1035 {
1036  NS_LOG_FUNCTION(this);
1037 
1038  std::list<std::pair<uint32_t, uint32_t>> ret;
1039 
1040  for (std::map<std::pair<uint32_t, uint32_t>, uint32_t>::const_iterator it = m_beam.begin();
1041  it != m_beam.end();
1042  ++it)
1043  {
1044  ret.push_back(it->first);
1045  }
1046 
1047  return ret;
1048 }
1049 
1050 Ptr<SatNcc>
1052 {
1053  NS_LOG_FUNCTION(this);
1054 
1055  return m_ncc;
1056 }
1057 
1058 uint32_t
1059 SatBeamHelper::GetUtBeamId(Ptr<Node> utNode) const
1060 {
1061  NS_LOG_FUNCTION(this);
1062 
1063  uint32_t beamId = 0;
1064 
1065  for (std::multimap<std::pair<uint32_t, uint32_t>, Ptr<Node>>::const_iterator it =
1066  m_utNode.begin();
1067  ((it != m_utNode.end()) && (beamId == 0));
1068  it++)
1069  {
1070  if (it->second == utNode)
1071  {
1072  beamId = it->first.second;
1073  }
1074  }
1075 
1076  return beamId;
1077 }
1078 
1081 {
1082  NS_LOG_FUNCTION(this);
1083 
1085 }
1086 
1087 NetDeviceContainer
1089  Ptr<Node> sourceUtNode,
1090  Ipv4Address sourceAddress,
1091  Ipv4Address groupAddress,
1092  bool routeToGwUsers,
1093  Ptr<NetDevice>& gwOutputDev)
1094 {
1095  NS_LOG_FUNCTION(this);
1096 
1097  Mac48Address groupMacAddress;
1098  Ipv4StaticRoutingHelper multicast;
1099  NetDeviceContainer gwInputDevices;
1100  NetDeviceContainer routerGwOutputDevices;
1101  Ptr<NetDevice> routerDev = NULL;
1102 
1103  uint32_t sourceBeamId = GetUtBeamId(sourceUtNode);
1104  gwOutputDev = NULL;
1105 
1106  // Check the address sanity
1107  if (groupAddress.IsMulticast())
1108  {
1109  groupMacAddress = Mac48Address::GetMulticast(groupAddress);
1110  NS_LOG_INFO("IP address for multicast group: "
1111  << groupAddress << ", MAC address for multicast group: " << groupMacAddress);
1112  }
1113  else
1114  {
1115  NS_FATAL_ERROR("Invalid address for multicast group");
1116  }
1117 
1118  NodeContainer gwNodes = GetGwNodes();
1119 
1120  // go through all GW nodes and devices in them
1121  for (NodeContainer::Iterator it = gwNodes.Begin(); it != gwNodes.End(); it++)
1122  {
1123  bool routerGw = false;
1124  NetDeviceContainer gwOutputDevices;
1125  Ptr<NetDevice> gwInputDev = NULL;
1126 
1127  // go through devices in GW node
1128  for (uint32_t i = 1; i < (*it)->GetNDevices(); i++)
1129  {
1130  Ptr<NetDevice> dev = (*it)->GetDevice(i);
1131  int32_t beamId = Singleton<SatIdMapper>::Get()->GetBeamIdWithMac(dev->GetAddress());
1132  MulticastBeamInfo_t::iterator beamIt = beamInfo.find(beamId);
1133 
1134  // device is device serving source UT. (UT source is in question)
1135  if (beamId == (int32_t)sourceBeamId)
1136  {
1137  routerGw = true; // GW node is routing GW
1138  routerDev = dev; // save device routing multicast traffic from UT
1139  }
1140 
1141  // device needs to serve multicast receiving UT(s) in the beam (beam is among of the
1142  // multicast group)
1143  if (beamIt != beamInfo.end())
1144  {
1145  // device must be also SatNetDevice, just sanity check it
1146  if (dev->GetInstanceTypeId().GetName() == "ns3::SatNetDevice")
1147  {
1148  // add device to GW's output list (container) to route multicast traffic to
1149  // beam's UTs
1150  gwOutputDevices.Add(dev);
1151 
1152  // go through UTs receiving multicast traffic in the beam
1153  // to route multicast traffic toward public network (UT users)
1154  for (std::set<Ptr<Node>>::iterator utIt = beamIt->second.begin();
1155  utIt != beamIt->second.end();
1156  utIt++)
1157  {
1158  AddMulticastRouteToUt(*utIt, sourceAddress, groupAddress, false);
1159  }
1160  }
1161  else
1162  {
1163  NS_FATAL_ERROR("Not a satellite net device!!!");
1164  }
1165  }
1166  else if (dev->GetInstanceTypeId().GetName() != "ns3::SatNetDevice")
1167  {
1168  // save device receiving traffic from IP router
1169  gwInputDev = dev;
1170  }
1171  }
1172 
1173  if (routerGw)
1174  {
1175  // in case that GW is source beam serving (routing) GW
1176  // traffic is going to IP router, so input is output
1177  gwOutputDev = gwInputDev;
1178 
1179  // GW output devices to satellite network UTs are saved here to set later.
1180  // In router case it is needed to check later that if traffic is needed to route
1181  // IP router too. (GW user or some other beam behind another GW is receiving traffic)
1182  routerGwOutputDevices = gwOutputDevices;
1183  }
1184  else if (gwOutputDevices.GetN() >
1185  0) // no router GW some device in GW belong to beam receiving multicast traffic
1186  {
1187  // route traffic from source beam to receiving beams
1188  multicast.AddMulticastRoute(*it,
1189  sourceAddress,
1190  groupAddress,
1191  gwInputDev,
1192  gwOutputDevices);
1193 
1194  // save devices receiving traffic from IP router (backbone network)
1195  gwInputDevices.Add(gwInputDev);
1196  }
1197  }
1198 
1199  // source is UT and traffic is needed to route toward backbone network
1200  // add output device to routing GW's output container (list)
1201  if (sourceUtNode && ((gwInputDevices.GetN() > 0) || routeToGwUsers))
1202  {
1203  if (!routerDev)
1204  {
1205  NS_FATAL_ERROR("Router device shall exist!!!");
1206  }
1207 
1208  routerGwOutputDevices.Add(gwOutputDev);
1209  }
1210  else
1211  {
1212  gwOutputDev = NULL;
1213  }
1214 
1215  // route traffic from source beam satellite net device to satellite net devices forwarding
1216  // traffic to receiving beams inside router GW and/or to backbone network (GW users). add also
1217  // route to UT from public network to satellite network
1218  if (routerDev && (routerGwOutputDevices.GetN() > 0))
1219  {
1220  multicast.AddMulticastRoute(routerDev->GetNode(),
1221  sourceAddress,
1222  groupAddress,
1223  routerDev,
1224  routerGwOutputDevices);
1225  AddMulticastRouteToUt(sourceUtNode, sourceAddress, groupAddress, true);
1226  }
1227 
1228  // return list of GW net devices receiving traffic from IP router (backbone network)
1229  return gwInputDevices;
1230 }
1231 
1232 void
1233 SatBeamHelper::EnableCreationTraces(Ptr<OutputStreamWrapper> stream, CallbackBase& cb)
1234 {
1235  NS_LOG_FUNCTION(this);
1236 
1237  TraceConnect("Creation", "SatBeamHelper", cb);
1238  m_geoHelper->EnableCreationTraces(stream, cb);
1239  m_gwHelper->EnableCreationTraces(stream, cb);
1240  m_utHelper->EnableCreationTraces(stream, cb);
1241 }
1242 
1243 uint32_t
1245 {
1246  NS_LOG_FUNCTION(this);
1247 
1248  double distanceMin = std::numeric_limits<double>::max();
1249  uint32_t indexDistanceMin = 0;
1250 
1251  for (uint32_t i = 0; i < m_geoNodes.GetN(); i++)
1252  {
1253  GeoCoordinate satPos =
1254  m_geoNodes.Get(i)->GetObject<SatSGP4MobilityModel>()->GetGeoPosition();
1255  double distance = CalculateDistance(position.ToVector(), satPos.ToVector());
1256  if (distance < distanceMin)
1257  {
1258  distanceMin = distance;
1259  indexDistanceMin = i;
1260  }
1261  }
1262  return indexDistanceMin;
1263 }
1264 
1265 void
1267 {
1268  // Create packet trace instance
1269  m_packetTrace = CreateObject<SatPacketTrace>();
1270 
1280  SatEnums::RegenerationMode_t maxRegeneration =
1282 
1288  Config::ConnectWithoutContext("/NodeList/*/DeviceList/*/PacketTrace",
1290  Config::ConnectWithoutContext("/NodeList/*/DeviceList/*/SatPhy/PacketTrace",
1292  Config::ConnectWithoutContext("/NodeList/*/DeviceList/*/UserPhy/*/PacketTrace",
1294  Config::ConnectWithoutContext("/NodeList/*/DeviceList/*/FeederPhy/*/PacketTrace",
1296  Config::ConnectWithoutContext("/NodeList/*/DeviceList/*/SatMac/PacketTrace",
1298  if (maxRegeneration == SatEnums::REGENERATION_LINK ||
1299  maxRegeneration == SatEnums::REGENERATION_NETWORK)
1300  {
1301  Config::ConnectWithoutContext("/NodeList/*/DeviceList/*/UserMac/*/PacketTrace",
1303  Config::ConnectWithoutContext("/NodeList/*/DeviceList/*/FeederMac/*/PacketTrace",
1305  }
1306  if (m_standard == SatEnums::DVB)
1307  {
1308  Config::ConnectWithoutContext("/NodeList/*/DeviceList/*/SatLlc/PacketTrace",
1310  }
1311 }
1312 
1313 std::string
1315 {
1316  NS_LOG_FUNCTION(this);
1317 
1318  std::ostringstream oss;
1319  oss << "--- Beam Info, "
1320  << "number of created beams: " << m_beam.size() << " ---" << std::endl;
1321 
1322  if (m_beam.size() > 0)
1323  {
1324  oss << CreateBeamInfo();
1325  }
1326 
1327  return oss.str();
1328 }
1329 
1330 std::string
1332 {
1333  NS_LOG_FUNCTION(this);
1334 
1335  std::ostringstream oss;
1336 
1337  for (std::multimap<std::pair<uint32_t, uint32_t>, Ptr<Node>>::const_iterator i =
1338  m_utNode.begin();
1339  i != m_utNode.end();
1340  ++i)
1341  {
1342  Ptr<SatMobilityModel> model = i->second->GetObject<SatMobilityModel>();
1343  GeoCoordinate pos = model->GetGeoPosition();
1344 
1345  Address devAddress;
1346  Ptr<Ipv4> ipv4 = i->second->GetObject<Ipv4>(); // Get Ipv4 instance of the node
1347 
1348  std::vector<Ipv4Address> IPAddressVector;
1349  std::vector<std::string> devNameVector;
1350  std::vector<Address> devAddressVector;
1351 
1352  for (uint32_t j = 0; j < i->second->GetNDevices(); j++)
1353  {
1354  Ptr<NetDevice> device = i->second->GetDevice(j);
1355 
1356  if (device->GetInstanceTypeId().GetName() == "ns3::SatNetDevice")
1357  {
1358  devAddress = device->GetAddress();
1359  }
1360  IPAddressVector.push_back(
1361  ipv4->GetAddress(j, 0).GetLocal()); // Get Ipv4InterfaceAddress of interface
1362  devNameVector.push_back(device->GetInstanceTypeId().GetName());
1363  devAddressVector.push_back(device->GetAddress());
1364  }
1365 
1367  {
1368  oss << i->first.second << " "
1369  << Singleton<SatIdMapper>::Get()->GetUtIdWithMac(devAddress) << " "
1370  << pos.GetLatitude() << " " << pos.GetLongitude() << " " << pos.GetAltitude()
1371  << " ";
1372 
1373  for (uint32_t j = 0; j < i->second->GetNDevices(); j++)
1374  {
1375  oss << devNameVector[j] << " " << devAddressVector[j] << " " << IPAddressVector[j]
1376  << " ";
1377  }
1378 
1379  oss << std::endl;
1380  }
1381  else
1382  {
1383  oss << i->first.second << " "
1384  << Singleton<SatIdMapper>::Get()->GetUtIdWithMac(devAddress) << " "
1385  << pos.GetLatitude() << " " << pos.GetLongitude() << " " << pos.GetAltitude()
1386  << std::endl;
1387  }
1388  }
1389 
1390  return oss.str();
1391 }
1392 
1393 std::string
1395 {
1396  NS_LOG_FUNCTION(this);
1397 
1398  std::ostringstream oss;
1399 
1400  oss << std::endl << " -- Beam details --";
1401 
1402  for (std::map<std::pair<uint32_t, uint32_t>, uint32_t>::const_iterator i = m_beam.begin();
1403  i != m_beam.end();
1404  ++i)
1405  {
1406  uint32_t satId = i->first.first;
1407  uint32_t beamId = i->first.second;
1408 
1409  oss << std::endl << "Sat ID: " << satId << " ";
1410  oss << "Beam ID: " << beamId << " ";
1411 
1412  std::map<std::pair<uint32_t, uint32_t>, FrequencyPair_t>::const_iterator freqIds =
1413  m_beamFreqs.find(std::make_pair(satId, beamId));
1414 
1415  if (freqIds != m_beamFreqs.end())
1416  {
1417  oss << "user link frequency ID: " << (*freqIds).second.first << ", ";
1418  oss << "feeder link frequency ID: " << (*freqIds).second.second;
1419  }
1420 
1421  oss << ", GW ID: " << (*i).second;
1422  }
1423 
1424  oss << std::endl << std::endl << " -- GW details --" << std::endl;
1425 
1426  oss.precision(8);
1427  oss.setf(std::ios::fixed, std::ios::floatfield);
1428 
1429  for (std::map<uint32_t, Ptr<Node>>::const_iterator i = m_gwNode.begin(); i != m_gwNode.end();
1430  ++i)
1431  {
1432  Ptr<SatMobilityModel> model = i->second->GetObject<SatMobilityModel>();
1433  GeoCoordinate pos = model->GetGeoPosition();
1434 
1435  Address devAddress;
1436  Ptr<Ipv4> ipv4 = i->second->GetObject<Ipv4>(); // Get Ipv4 instance of the node
1437 
1438  std::vector<Ipv4Address> IPAddressVector;
1439  std::vector<std::string> devNameVector;
1440  std::vector<Address> devAddressVector;
1441 
1442  for (uint32_t j = 0; j < i->second->GetNDevices(); j++)
1443  {
1444  Ptr<NetDevice> device = i->second->GetDevice(j);
1445 
1446  if (device->GetInstanceTypeId().GetName() == "ns3::SatNetDevice")
1447  {
1448  devAddress = device->GetAddress();
1449  }
1450 
1451  IPAddressVector.push_back(
1452  ipv4->GetAddress(j, 0).GetLocal()); // Get Ipv4InterfaceAddress of interface
1453  devNameVector.push_back(device->GetInstanceTypeId().GetName());
1454  devAddressVector.push_back(device->GetAddress());
1455  }
1456 
1458  {
1459  oss << "GW=" << i->first << " "
1460  << Singleton<SatIdMapper>::Get()->GetUtIdWithMac(devAddress) << " "
1461  << " latitude=" << pos.GetLatitude() << " longitude=" << pos.GetLongitude()
1462  << " altitude=" << pos.GetAltitude() << " ";
1463 
1464  for (uint32_t j = 0; j < i->second->GetNDevices(); j++)
1465  {
1466  oss << devNameVector[j] << " " << devAddressVector[j] << " " << IPAddressVector[j]
1467  << " ";
1468  }
1469 
1470  oss << std::endl;
1471  }
1472  else
1473  {
1474  oss << "GW=" << i->first << " "
1475  << Singleton<SatIdMapper>::Get()->GetUtIdWithMac(devAddress) << " "
1476  << " latitude=" << pos.GetLatitude() << " longitude=" << pos.GetLongitude()
1477  << " altitude=" << pos.GetAltitude() << std::endl;
1478  }
1479  }
1480 
1481  oss << std::endl << " -- Geo Satellite position --" << std::endl;
1482 
1483  Ptr<SatMobilityModel> model = m_geoNodes.Get(0)->GetObject<SatMobilityModel>();
1484  GeoCoordinate pos = model->GetGeoPosition();
1485  oss << "latitude=" << pos.GetLatitude() << ", longitude=" << pos.GetLongitude()
1486  << ", altitude=" << pos.GetAltitude() << std::endl;
1487 
1488  return oss.str();
1489 }
1490 
1493  uint32_t beamId,
1494  uint32_t fwdFrequencyId,
1495  uint32_t rtnFrequencyId,
1496  bool isUserLink)
1497 {
1498  NS_LOG_FUNCTION(this << satId << beamId << fwdFrequencyId << rtnFrequencyId << isUserLink);
1499 
1500  Ptr<SatChannelPair> chPairs = isUserLink ? m_ulChannels : m_flChannels;
1501 
1502  bool hasFwdChannel = chPairs->HasFwdChannel(satId, fwdFrequencyId);
1503  bool hasRtnChannel = chPairs->HasRtnChannel(satId, rtnFrequencyId);
1504 
1505  if (hasFwdChannel && hasRtnChannel)
1506  {
1507  chPairs->UpdateBeamsForFrequency(satId, beamId, fwdFrequencyId, rtnFrequencyId);
1508  }
1509  else
1510  {
1511  Ptr<SatFreeSpaceLoss> pFsl;
1512  Ptr<PropagationDelayModel> pDelay;
1513  Ptr<SatChannel> forwardCh;
1514  Ptr<SatChannel> returnCh;
1515 
1516  if (hasFwdChannel)
1517  {
1518  forwardCh = chPairs->GetForwardChannel(satId, fwdFrequencyId);
1519  pDelay = forwardCh->GetPropagationDelayModel();
1520  pFsl = forwardCh->GetFreeSpaceLoss();
1521  }
1522  else if (hasRtnChannel)
1523  {
1524  returnCh = chPairs->GetReturnChannel(satId, rtnFrequencyId);
1525  pDelay = returnCh->GetPropagationDelayModel();
1526  pFsl = returnCh->GetFreeSpaceLoss();
1527  }
1528  else
1529  {
1531  {
1532  // Signal propagates at the speed of light
1533  pDelay = CreateObject<ConstantSpeedPropagationDelayModel>();
1534  DynamicCast<ConstantSpeedPropagationDelayModel>(pDelay)->SetSpeed(
1536  }
1538  {
1539  pDelay = CreateObject<SatConstantPropagationDelayModel>();
1540  DynamicCast<SatConstantPropagationDelayModel>(pDelay)->SetDelay(
1542  }
1543  else
1544  {
1545  NS_FATAL_ERROR("Unsupported propagation delay model!");
1546  }
1547 
1548  pFsl = CreateObject<SatFreeSpaceLoss>();
1549  }
1550 
1551  if (!hasFwdChannel)
1552  {
1553  forwardCh = m_channelFactory.Create<SatChannel>();
1554  forwardCh->SetChannelType(isUserLink ? SatEnums::FORWARD_USER_CH
1556  forwardCh->SetFrequencyConverter(m_carrierFreqConverter);
1557  forwardCh->SetBandwidthConverter(m_carrierBandwidthConverter);
1558  forwardCh->SetFrequencyId(fwdFrequencyId);
1559  forwardCh->SetPropagationDelayModel(pDelay);
1560  forwardCh->SetFreeSpaceLoss(pFsl);
1561  }
1562 
1563  if (!hasRtnChannel)
1564  {
1565  returnCh = m_channelFactory.Create<SatChannel>();
1566  returnCh->SetChannelType(isUserLink ? SatEnums::RETURN_USER_CH
1568  returnCh->SetFrequencyConverter(m_carrierFreqConverter);
1569  returnCh->SetBandwidthConverter(m_carrierBandwidthConverter);
1570  returnCh->SetFrequencyId(rtnFrequencyId);
1571  returnCh->SetPropagationDelayModel(pDelay);
1572  returnCh->SetFreeSpaceLoss(pFsl);
1573  }
1574 
1575  chPairs
1576  ->StoreChannelPair(satId, beamId, fwdFrequencyId, forwardCh, rtnFrequencyId, returnCh);
1577  }
1578 
1579  return chPairs->GetChannelPair(satId, beamId);
1580 }
1581 
1582 bool
1583 SatBeamHelper::StoreGwNode(uint32_t id, Ptr<Node> node)
1584 {
1585  NS_LOG_FUNCTION(this << id << node);
1586 
1587  bool storingSuccess = false;
1588 
1589  Ptr<Node> storedNode = GetGwNode(id);
1590 
1591  if (storedNode != NULL) // nGW node with id already stored
1592  {
1593  if (storedNode == node) // check that node is same
1594  {
1595  storingSuccess = true;
1596  }
1597  }
1598  else // try to store if not stored
1599  {
1600  std::pair<std::map<uint32_t, Ptr<Node>>::iterator, bool> result =
1601  m_gwNode.insert(std::make_pair(id, node));
1602  storingSuccess = result.second;
1603  }
1604 
1605  return storingSuccess;
1606 }
1607 
1608 Ptr<SatBaseFading>
1610 {
1611  NS_LOG_FUNCTION(this << node);
1612 
1613  Ptr<SatBaseFading> fadingContainer = node->GetObject<SatBaseFading>();
1614 
1615  if (fadingContainer == nullptr)
1616  {
1617  switch (m_fadingModel)
1618  {
1619  case SatEnums::FADING_MARKOV: {
1620  Ptr<SatMobilityObserver> observer = node->GetObject<SatMobilityObserver>();
1621  NS_ASSERT(observer != NULL);
1622 
1623  SatBaseFading::ElevationCallback elevationCb =
1624  MakeCallback(&SatMobilityObserver::GetElevationAngle, observer);
1625  SatBaseFading::VelocityCallback velocityCb =
1626  MakeCallback(&SatMobilityObserver::GetVelocity, observer);
1627 
1629  fadingContainer =
1630  CreateObject<SatMarkovContainer>(m_markovConf, elevationCb, velocityCb);
1631  node->AggregateObject(fadingContainer);
1632  break;
1633  }
1634  case SatEnums::FADING_TRACE: {
1636 
1637  fadingContainer =
1638  CreateObject<SatFadingInputTrace>(Singleton<SatFadingInputTraceContainer>::Get());
1639 
1640  node->AggregateObject(fadingContainer);
1641  break;
1642  }
1644  case SatEnums::FADING_OFF:
1645  default: {
1646  NS_FATAL_ERROR("SatBeamHelper::InstallFadingContainer - Incorrect fading model");
1647  break;
1648  }
1649  }
1650  }
1651  return fadingContainer;
1652 }
1653 
1654 void
1656  Ipv4Address sourceAddress,
1657  Ipv4Address groupAddress,
1658  bool routeToSatellite)
1659 {
1660  NS_LOG_FUNCTION(this);
1661 
1662  Ptr<NetDevice> satDev = NULL;
1663  Ptr<NetDevice> publicDev = NULL;
1664 
1665  for (uint32_t i = 1; i < utNode->GetNDevices(); i++)
1666  {
1667  Ptr<NetDevice> dev = utNode->GetDevice(i);
1668 
1669  // in UT SatNetDevice is routing traffic to public network NetDevice e.g. CSMA
1670  if (dev->GetInstanceTypeId().GetName() == "ns3::SatNetDevice")
1671  {
1672  satDev = dev;
1673  }
1674  else
1675  {
1676  // just save last non SatNetDevice (in practice there should be only one)
1677  publicDev = dev;
1678  }
1679  }
1680 
1681  if (satDev && publicDev)
1682  {
1683  Ipv4StaticRoutingHelper multicast;
1684 
1685  if (routeToSatellite)
1686  {
1687  multicast.AddMulticastRoute(utNode, sourceAddress, groupAddress, publicDev, satDev);
1688  }
1689  else
1690  {
1691  multicast.AddMulticastRoute(utNode, sourceAddress, groupAddress, satDev, publicDev);
1692  }
1693 
1694  // Add multicast route to UT
1695  }
1696  else
1697  {
1698  NS_FATAL_ERROR("Input of output device not found in UT node!!!");
1699  }
1700 }
1701 
1702 Ptr<PropagationDelayModel>
1704  uint32_t beamId,
1705  SatEnums::ChannelType_t channelType)
1706 {
1707  Ptr<SatChannel> channel = NULL;
1708  switch (channelType)
1709  {
1711  channel = m_flChannels->GetChannelPair(satId, beamId).first;
1712  break;
1713  }
1715  channel = m_ulChannels->GetChannelPair(satId, beamId).first;
1716  break;
1717  }
1718  case SatEnums::RETURN_USER_CH: {
1719  channel = m_ulChannels->GetChannelPair(satId, beamId).second;
1720  break;
1721  }
1723  channel = m_flChannels->GetChannelPair(satId, beamId).second;
1724  break;
1725  }
1726  default: {
1727  return NULL;
1728  }
1729  }
1730 
1731  return channel->GetPropagationDelayModel();
1732 }
1733 
1736 {
1737  return m_propagationDelayModel;
1738 }
1739 
1740 } // namespace ns3
GeoCoordinate class is used to store and operate with geodetic coordinates.
double GetLatitude() const
Gets latitude value of coordinate.
Vector ToVector() const
Converts Geodetic coordinates to Cartesian coordinates.
Base class for fading models such as Markov-based fading or fading trace.
Callback< double > VelocityCallback
Gets velocity in m/s.
Callback< double > ElevationCallback
Gets elevation angle in degrees.
void SetAntennaGainPatterns(Ptr< SatAntennaGainPatternContainer > antennaPatterns)
Set the antenna gain patterns to be used when configuring the beams to the GEO satellite.
NetDeviceContainer AddMulticastGroupRoutes(MulticastBeamInfo_t beamInfo, Ptr< Node > sourceUtNode, Ipv4Address sourceAddress, Ipv4Address groupAddress, bool routeToGwUsers, Ptr< NetDevice > &gwOutputDev)
std::map< std::pair< uint32_t, uint32_t >, uint32_t > m_beam
SatEnums::DvbVersion_t m_dvbVersion
Indicates if using DVB-S2 or DVB-S2X.
Time m_constantPropagationDelay
Constant propagation delay.
bool m_printDetailedInformationToCreationTraces
Flag indicating whether to print detailed information to the creation traces.
void SetChannelAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each Channel created by the helper.
Ptr< SatChannelPair > m_flChannels
ObjectFactory m_channelFactory
SatEnums::RegenerationMode_t m_forwardLinkRegenerationMode
The regeneration mode used in satellites for forward link.
void SetIslRoutes()
Set ISL routes.
Ptr< SatSuperframeSeq > m_superframeSeq
bool StoreGwNode(uint32_t id, Ptr< Node > node)
Creates GW node according to given id and stores GW to map.
Ptr< SatBstpController > m_bstpController
Beam Switching Time Plan controller, which is created if FWD link beam hopping is enabled (m_enableFw...
void SetDeviceAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each NetDevice created by the helper.
void InstallIsls()
Create all the ISLs.
Ptr< SatGwHelper > GetGwHelper() const
SatEnums::PropagationDelayModel_t GetPropagationDelayModelEnum()
Ptr< SatAntennaGainPatternContainer > m_antennaGainPatterns
SatTypedefs::CarrierBandwidthConverter_t m_carrierBandwidthConverter
CarrierFreqConverter m_carrierFreqConverter
bool m_enableFwdLinkBeamHopping
Flag indicating whether beam hopping is enabled in FWD link.
Ptr< SatUtHelper > GetUtHelper() const
void EnableCreationTraces(Ptr< OutputStreamWrapper > stream, CallbackBase &cb)
Enables creation traces to be written in given file.
uint32_t GetGwId(uint32_t satId, uint32_t beamId) const
std::map< uint32_t, Ptr< NetDevice > > m_gwNdMap
Map used in regenerative mode to store GW Net device (we need only one per GW)
virtual void DoDispose()
Dispose of this class instance.
Ptr< PropagationDelayModel > GetPropagationDelayModel(uint32_t satId, uint32_t beamId, SatEnums::ChannelType_t channelType)
TracedCallback< std::string > m_creationTrace
Trace callback for creation traces.
SatBeamHelper()
Default constructor for SatBeamHelper (should not be used).
SatEnums::LinkResults_t m_rlLinkResultsType
Type of Return channel link results.
std::string GetBeamInfo() const
Ptr< SatGeoHelper > GetGeoHelper() const
uint32_t GetUtBeamId(Ptr< Node > utNode) const
Get beam Id of the given UT.
NodeContainer GetGeoSatNodes() const
Gets Geo Satellite nodes.
Ptr< SatNcc > GetNcc() const
Ptr< SatBaseFading > InstallFadingContainer(Ptr< Node > node) const
Install fading model to node, if fading model doesn't exist already in node.
Time m_ctrlMsgStoreTimeFwdLink
Control message store time in container for forward link.
SatPhyRxCarrierConf::RandomAccessCollisionModel m_raCollisionModel
The used collision model for random access.
std::pair< uint32_t, uint32_t > FrequencyPair_t
std::map< std::pair< uint32_t, uint32_t >, FrequencyPair_t > m_beamFreqs
std::map< uint32_t, Ptr< Node > > m_gwNode
std::list< std::pair< uint32_t, uint32_t > > GetBeams() const
Ptr< SatMarkovConf > m_markovConf
Common configuration for Markov model.
Ptr< SatUtHelper > m_utHelper
void AddMulticastRouteToUt(Ptr< Node > utNode, Ipv4Address sourceAddress, Ipv4Address groupAddress, bool routeToSatellite)
Add multicast route to UT node.
static TypeId GetTypeId(void)
Get the type ID.
std::string GetUtInfo() const
std::string CreateBeamInfo() const
Creates info of the beam.
NodeContainer GetUtNodes() const
NodeContainer GetGwNodes() const
SatEnums::PropagationDelayModel_t m_propagationDelayModel
Propagation delay model.
SatEnums::RegenerationMode_t GetReturnLinkRegenerationMode() const
Get the regeneration mode used in satellites for return link.
std::pair< Ptr< NetDevice >, NetDeviceContainer > Install(NodeContainer ut, Ptr< Node > gwNode, uint32_t gwId, uint32_t satId, uint32_t beamId, uint32_t rtnUlFreqId, uint32_t rtnFlFreqId, uint32_t fwdUlFreqId, uint32_t fwdFlFreqId, SatUtMac::RoutingUpdateCallback routingCallback)
void SetStandard(SatEnums::Standard_t standard)
Set the standard to either DVB or Lora.
void EnablePacketTrace()
Enable packet traces.
virtual TypeId GetInstanceTypeId(void) const
Get the type ID of instance.
void Init()
Init method is called after all the initial configurations have been done by the SatHelper and SatBea...
SatPhyRxCarrierConf::InterferenceEliminationModel m_raInterferenceEliminationModel
The used interference model for random access.
Ptr< SatPacketTrace > m_packetTrace
Packet trace.
SatEnums::FadingModel_t m_fadingModel
Configured fading model.
Ptr< Node > GetGwNode(uint32_t gwId) const
Gets GW node according to given id.
SatChannelPair::ChannelPair_t GetChannelPair(uint32_t satId, uint32_t beamId, uint32_t fwdFrequencyId, uint32_t rtnFrequencyId, bool isUserLink)
Gets satellite channel pair from requested map.
std::vector< std::pair< uint32_t, uint32_t > > m_isls
Vector constaining all the ISLs of the topology.
SatEnums::RandomAccessModel_t m_randomAccessModel
The used random access model.
NetDeviceContainer InstallUser(Ptr< SatGeoNetDevice > geoNetDevice, NodeContainer ut, Ptr< NetDevice > gwNd, uint32_t satId, uint32_t beamId, SatChannelPair::ChannelPair_t userLink, uint32_t rtnUlFreqId, uint32_t fwdUlFreqId, SatUtMac::RoutingUpdateCallback routingCallback)
Time m_ctrlMsgStoreTimeRtnLink
Control message store in container for return link.
uint32_t GetClosestSat(GeoCoordinate position)
Get closest satellite to a ground station.
Ptr< SatChannelPair > m_ulChannels
Ptr< NetDevice > InstallFeeder(Ptr< SatGeoNetDevice > geoNetDevice, Ptr< Node > gwNode, uint32_t gwId, uint32_t satId, uint32_t beamId, SatChannelPair::ChannelPair_t feederLink, uint32_t rtnFlFreqId, uint32_t fwdFlFreqId, SatUtMac::RoutingUpdateCallback routingCallback)
SatEnums::RegenerationMode_t m_returnLinkRegenerationMode
The regeneration mode used in satellites for return link.
Ptr< SatGwHelper > m_gwHelper
SatEnums::Standard_t m_standard
The global standard used.
Ptr< SatGeoHelper > m_geoHelper
std::map< uint32_t, std::set< Ptr< Node > > > MulticastBeamInfo_t
SatPhyRxCarrierConf::InterferenceModel m_raInterferenceModel
The used interference model for random access.
double m_raConstantErrorRate
Constant error rate for random access.
void SetNccRoutingCallback(SatNcc::UpdateRoutingCallback cb)
Attach an update routing callback to the NCC of this simulation.
std::multimap< std::pair< uint32_t, uint32_t >, Ptr< Node > > m_utNode
bool m_enableTracesOnReturnLink
Helper flag to activate packet traces on the return link only.
Callback< void, bool > ToggleCallback
Callback to fetch queue statistics.
Satellite channel implementation.
virtual void SetChannelType(SatEnums::ChannelType_t chType)
Set the type of the channel.
std::pair< Ptr< SatChannel >, Ptr< SatChannel > > ChannelPair_t
ChannelPair_t GetChannelPair(uint32_t satId, uint32_t beamId) const
Retrieve the channel pair associated to a beam.
Ptr< SatControlMessage > Read(uint32_t recvId)
Read a control message.
uint32_t Send(uint32_t sendId)
Add a control message.
uint32_t ReserveIdAndStore(Ptr< SatControlMessage > controlMsg)
Reserve an id and store a control message.
SatEnums class is for simplifying the use of enumerators in the satellite module.
SatBbFrameType_t
BB frame type used in DVB-S2 FWD link.
ChannelType_t
Types of channel.
PropagationDelayModel_t
Propagation delay model.
@ SHORT_FRAMES
SHORT_FRAMES.
Standard_t
The global standard used.
RegenerationMode_t
The regeneration mode used in satellites.
void TbtpSent(Ptr< SatTbtpMessage > tbtp)
Function called when a TBTP has been sent by the SatBeamScheduler.
bool SendControlMsg(Ptr< SatControlMessage > msg, const Address &dest)
The SatLowerLayerServiceConf class holds information of all configures lower layer service entries.
uint16_t GetRaHighLoadBackOffProbability(uint8_t index) const
Get high load back off probability.
uint16_t GetRaHighLoadBackOffTimeInMilliSeconds(uint8_t index) const
Get high load back off time in milliseconds.
double GetRaAverageNormalizedOfferedLoadThreshold(uint8_t index) const
Get average normalized offeredLoad Threshold.
uint16_t GetRaBackOffProbability(uint8_t index) const
Get back off probability.
uint16_t GetRaBackOffTimeInMilliSeconds(uint8_t index) const
Get back off time in milliseconds.
Callback< uint32_t, Ptr< SatControlMessage > > ReserveCtrlMsgCallback
Callback to reserve an id and initially store the control message.
Callback< void, Address, Address > RoutingUpdateCallback
Callback to update routing and ARP tables after handover.
Callback< uint32_t, uint32_t > SendCtrlMsgCallback
Callback to send a control message and allocate a recv ID for it.
Callback< Ptr< SatControlMessage >, uint32_t > ReadCtrlMsgCallback
Callback to read control messages from container storing control messages.
Keep track of the current position and velocity of an object in satellite network.
Observes given mobilities and keeps track of certain wanted properties.
double GetVelocity(void)
Get velocity of own movement (speed).
double GetElevationAngle(void)
Get elevation angle.
Callback< void, Address, Address, Address > UpdateRoutingCallback
Update routes and ARP tables on gateways after a terminal handover.
void ToggleState(bool enabled)
Toggle the state of the device.
bool SendControlMsg(Ptr< SatControlMessage > msg, const Address &dest)
void AddTraceEntry(Time now, SatEnums::SatPacketEvent_t packetEvent, SatEnums::SatNodeType_t nodeType, uint32_t nodeId, Mac48Address macAddress, SatEnums::SatLogLevel_t logLevel, SatEnums::SatLinkDir_t linkDir, std::string packetInfo)
Add a packet trace entry to the log.
Information of beam users liken UTs and their users.
Keep track of the current position and velocity of satellite using SGP4 model.
Callback< double, SatEnums::ChannelType_t, uint32_t, SatEnums::CarrierBandwidthType_t > CarrierBandwidthConverter_t
Callback for carrier bandwidths.
constexpr double SPEED_OF_LIGHT
Constant definition for the speed of light in m/s.
constexpr uint32_t BITS_PER_BYTE
Number of bits in a byte.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.
SatPhyRxCarrierConf::RandomAccessCollisionModel m_raCollisionModel
SatPhyRxCarrierConf::InterferenceEliminationModel m_raInterferenceEliminationModel
SatPhyRxCarrierConf::InterferenceModel m_raRtnInterferenceModel
SatPhyRxCarrierConf::InterferenceModel m_raFwdInterferenceModel
SatEnums::RandomAccessModel_t m_randomAccessModel
SatPhyRxCarrierConf::InterferenceModel m_raInterferenceModel
SatPhyRxCarrierConf::InterferenceEliminationModel m_raInterferenceEliminationModel
SatEnums::RandomAccessModel_t m_randomAccessModel
SatPhyRxCarrierConf::RandomAccessCollisionModel m_raCollisionModel
Define RandomAccessSettings as a struct.
SatEnums::RandomAccessModel_t m_randomAccessModel
SatPhyRxCarrierConf::RandomAccessCollisionModel m_raCollisionModel
SatPhyRxCarrierConf::InterferenceEliminationModel m_raInterferenceEliminationModel
SatPhyRxCarrierConf::InterferenceModel m_raInterferenceModel