satellite-orbiter-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 
24 
25 #include "satellite-helper.h"
27 
28 #include "ns3/config.h"
29 #include "ns3/double.h"
30 #include "ns3/enum.h"
31 #include "ns3/log.h"
32 #include "ns3/names.h"
33 #include "ns3/packet.h"
34 #include "ns3/pointer.h"
35 #include "ns3/satellite-channel-estimation-error-container.h"
36 #include "ns3/satellite-const-variables.h"
37 #include "ns3/satellite-id-mapper.h"
38 #include "ns3/satellite-orbiter-feeder-llc.h"
39 #include "ns3/satellite-orbiter-feeder-mac.h"
40 #include "ns3/satellite-orbiter-feeder-phy.h"
41 #include "ns3/satellite-orbiter-user-llc.h"
42 #include "ns3/satellite-orbiter-user-mac.h"
43 #include "ns3/satellite-orbiter-user-phy.h"
44 #include "ns3/satellite-phy-rx-carrier-conf.h"
45 #include "ns3/satellite-phy-rx.h"
46 #include "ns3/satellite-phy-tx.h"
47 #include "ns3/satellite-topology.h"
48 #include "ns3/satellite-typedefs.h"
49 #include "ns3/satellite-utils.h"
50 #include "ns3/singleton.h"
51 #include "ns3/uinteger.h"
52 
53 #include <algorithm>
54 #include <string>
55 #include <utility>
56 #include <vector>
57 
58 NS_LOG_COMPONENT_DEFINE("SatOrbiterHelper");
59 
60 namespace ns3
61 {
62 
63 NS_OBJECT_ENSURE_REGISTERED(SatOrbiterHelper);
64 
65 TypeId
67 {
68  static TypeId tid =
69  TypeId("ns3::SatOrbiterHelper")
70  .SetParent<Object>()
71  .AddAttribute("DaFwdLinkInterferenceModel",
72  "Forward link interference model for dedicated access",
74  MakeEnumAccessor<SatPhyRxCarrierConf::InterferenceModel>(
76  MakeEnumChecker(SatPhyRxCarrierConf::IF_CONSTANT,
77  "Constant",
79  "Trace",
81  "PerPacket",
83  "PerFragment"))
84  .AddAttribute("DaRtnLinkInterferenceModel",
85  "Return link interference model for dedicated access",
87  MakeEnumAccessor<SatPhyRxCarrierConf::InterferenceModel>(
89  MakeEnumChecker(SatPhyRxCarrierConf::IF_CONSTANT,
90  "Constant",
92  "Trace",
94  "PerPacket",
96  "PerFragment"))
97  .AddAttribute("FwdLinkErrorModel",
98  "Forward feeder link error model",
100  MakeEnumAccessor<SatPhyRxCarrierConf::ErrorModel>(
102  MakeEnumChecker(SatPhyRxCarrierConf::EM_NONE,
103  "None",
105  "Constant",
107  "AVI"))
108  .AddAttribute("FwdLinkConstantErrorRate",
109  "Constant error rate on forward feeder link",
110  DoubleValue(0.0),
111  MakeDoubleAccessor(&SatOrbiterHelper::m_fwdDaConstantErrorRate),
112  MakeDoubleChecker<double>())
113  .AddAttribute("RtnLinkErrorModel",
114  "Return user link error model",
115  EnumValue(SatPhyRxCarrierConf::EM_NONE),
116  MakeEnumAccessor<SatPhyRxCarrierConf::ErrorModel>(
118  MakeEnumChecker(SatPhyRxCarrierConf::EM_NONE,
119  "None",
121  "Constant",
123  "AVI"))
124  .AddAttribute("RtnLinkConstantErrorRate",
125  "Constant error rate on return user link",
126  DoubleValue(0.0),
127  MakeDoubleAccessor(&SatOrbiterHelper::m_rtnDaConstantErrorRate),
128  MakeDoubleChecker<double>())
129  .AddAttribute(
130  "IslArbiterType",
131  "Arbiter in use to route packets on ISLs",
132  EnumValue(SatEnums::UNICAST),
133  MakeEnumAccessor<SatEnums::IslArbiterType_t>(&SatOrbiterHelper::m_islArbiterType),
134  MakeEnumChecker(SatEnums::UNICAST, "Unicast", SatEnums::ECMP, "ECMP"))
135  .AddTraceSource("Creation",
136  "Creation traces",
137  MakeTraceSourceAccessor(&SatOrbiterHelper::m_creationTrace),
138  "ns3::SatTypedefs::CreationCallback");
139  return tid;
140 }
141 
142 TypeId
144 {
145  NS_LOG_FUNCTION(this);
146 
147  return GetTypeId();
148 }
149 
151  : m_carrierBandwidthConverter(),
152  m_fwdLinkCarrierCount(),
153  m_rtnLinkCarrierCount(),
154  m_deviceCount(),
155  m_deviceFactory(),
156  m_daFwdLinkInterferenceModel(SatPhyRxCarrierConf::IF_CONSTANT),
157  m_daRtnLinkInterferenceModel(SatPhyRxCarrierConf::IF_CONSTANT),
158  m_raSettings(),
159  m_fwdLinkResults(),
160  m_rtnLinkResults(),
161  m_islArbiterType(SatEnums::UNICAST),
162  m_fwdReadCtrlCb(),
163  m_rtnReadCtrlCb()
164 {
165  NS_LOG_FUNCTION(this);
166 
167  // this default constructor should be never called
168  NS_ASSERT(false);
169 }
170 
172  uint32_t rtnLinkCarrierCount,
173  uint32_t fwdLinkCarrierCount,
174  Ptr<SatSuperframeSeq> seq,
175  SatMac::ReadCtrlMsgCallback fwdReadCb,
176  SatMac::ReadCtrlMsgCallback rtnReadCb,
177  RandomAccessSettings_s randomAccessSettings)
178  : m_carrierBandwidthConverter(bandwidthConverterCb),
179  m_fwdLinkCarrierCount(fwdLinkCarrierCount),
180  m_rtnLinkCarrierCount(rtnLinkCarrierCount),
181  m_deviceCount(),
182  m_deviceFactory(),
183  m_daFwdLinkInterferenceModel(SatPhyRxCarrierConf::IF_CONSTANT),
184  m_daRtnLinkInterferenceModel(SatPhyRxCarrierConf::IF_CONSTANT),
185  m_superframeSeq(seq),
186  m_raSettings(randomAccessSettings),
187  m_fwdLinkResults(),
188  m_rtnLinkResults(),
189  m_fwdReadCtrlCb(fwdReadCb),
190  m_rtnReadCtrlCb(rtnReadCb)
191 {
192  NS_LOG_FUNCTION(this << rtnLinkCarrierCount << fwdLinkCarrierCount);
193 }
194 
195 void
196 SatOrbiterHelper::Initialize(Ptr<SatLinkResultsFwd> lrFwd, Ptr<SatLinkResultsRtn> lrRcs2)
197 {
198  NS_LOG_FUNCTION(this);
199 
200  /*
201  * Forward channel link results (DVB-S2 or DVB-S2X).
202  */
204  {
205  m_fwdLinkResults = lrFwd;
206  }
207 
208  /*
209  * Return channel link results (DVB-RCS2).
210  */
212  {
213  m_rtnLinkResults = lrRcs2;
214  }
215 
219  CreateObject<SatBbFrameConf>(m_symbolRateRtn,
220  SatEnums::DVB_S2); // TODO We should be able to switch to S2X ?
221  m_bbFrameConfRtn->InitializeCNoRequirements(lrFwd);
222 
226  CreateObject<SatBbFrameConf>(m_symbolRateFwd,
227  SatEnums::DVB_S2); // TODO We should be able to switch to S2X ?
228  m_bbFrameConfFwd->InitializeCNoRequirements(lrFwd);
229 }
230 
231 void
232 SatOrbiterHelper::SetDeviceAttribute(std::string n1, const AttributeValue& v1)
233 {
234  NS_LOG_FUNCTION(this << n1);
235 
236  m_deviceFactory.Set(n1, v1);
237 }
238 
239 void
240 SatOrbiterHelper::SetUserPhyAttribute(std::string n1, const AttributeValue& v1)
241 {
242  NS_LOG_FUNCTION(this << n1);
243 
244  Config::SetDefault("ns3::SatOrbiterUserPhy::" + n1, v1);
245 }
246 
247 void
248 SatOrbiterHelper::SetFeederPhyAttribute(std::string n1, const AttributeValue& v1)
249 {
250  NS_LOG_FUNCTION(this << n1);
251 
252  Config::SetDefault("ns3::SatOrbiterFeederPhy::" + n1, v1);
253 }
254 
255 NetDeviceContainer
257 {
258  NS_LOG_FUNCTION(this);
259 
260  NodeContainer c = Singleton<SatTopology>::Get()->GetOrbiterNodes();
261  NetDeviceContainer devs;
262 
263  for (NodeContainer::Iterator i = c.Begin(); i != c.End(); i++)
264  {
265  devs.Add(Install(*i));
266  }
267 
268  return devs;
269 }
270 
271 Ptr<NetDevice>
273 {
274  NS_LOG_FUNCTION(this << n);
275 
276  NS_ASSERT(m_deviceCount[n->GetId()] == 0);
277 
278  // Create SatOrbiterNetDevice
279  Ptr<SatOrbiterNetDevice> satDev = CreateOrbiterNetDevice();
280 
281  satDev->SetAddress(Mac48Address::Allocate());
282  n->AddDevice(satDev);
283  m_deviceCount[n->GetId()]++;
284  m_nodeIds.push_back(n->GetId());
285 
286  Singleton<SatIdMapper>::Get()->AttachMacToTraceId(satDev->GetAddress());
287  Singleton<SatIdMapper>::Get()->AttachMacToSatId(satDev->GetAddress(), m_nodeIds.size());
288 
289  return satDev;
290 }
291 
292 Ptr<NetDevice>
293 SatOrbiterHelper::Install(std::string aName)
294 {
295  NS_LOG_FUNCTION(this << aName);
296 
297  Ptr<Node> n = Names::Find<Node>(aName);
298 
299  return Install(n);
300 }
301 
302 void
304  Ptr<SatChannel> ff,
305  Ptr<SatChannel> fr,
306  Ptr<SatChannel> uf,
307  Ptr<SatChannel> ur,
308  Ptr<SatAntennaGainPattern> userAgp,
309  Ptr<SatAntennaGainPattern> feederAgp,
310  Ptr<SatNcc> ncc,
311  uint32_t satId,
312  uint32_t gwId,
313  uint32_t userBeamId)
314 {
315  NS_LOG_FUNCTION(this << d << ff << fr << uf << ur << userAgp << feederAgp << satId << gwId
316  << userBeamId);
317 
318  Ptr<SatOrbiterNetDevice> dev = DynamicCast<SatOrbiterNetDevice>(d);
319 
320  dev->SetForwardLinkRegenerationMode(
321  Singleton<SatTopology>::Get()->GetForwardLinkRegenerationMode());
322  dev->SetReturnLinkRegenerationMode(
323  Singleton<SatTopology>::Get()->GetReturnLinkRegenerationMode());
324  dev->SetNodeId(satId);
325 
326  AttachChannelsFeeder(dev, ff, fr, feederAgp, ncc, satId, gwId, userBeamId);
327  AttachChannelsUser(dev, uf, ur, userAgp, ncc, satId, userBeamId);
328 }
329 
330 void
331 SatOrbiterHelper::AttachChannelsFeeder(Ptr<SatOrbiterNetDevice> dev,
332  Ptr<SatChannel> ff,
333  Ptr<SatChannel> fr,
334  Ptr<SatAntennaGainPattern> feederAgp,
335  Ptr<SatNcc> ncc,
336  uint32_t satId,
337  uint32_t gwId,
338  uint32_t userBeamId)
339 {
340  NS_LOG_FUNCTION(this << dev << ff << fr << feederAgp << satId << gwId << userBeamId);
341 
342  SatPhy::CreateParam_t params;
343  params.m_satId = satId;
344  params.m_beamId = userBeamId;
345  params.m_device = dev;
347 
351  Ptr<SatChannelEstimationErrorContainer> cec =
352  Create<SatSimpleChannelEstimationErrorContainer>();
353 
354  SatPhyRxCarrierConf::RxCarrierCreateParams_s parametersFeeder =
355  SatPhyRxCarrierConf::RxCarrierCreateParams_s();
356  parametersFeeder.m_errorModel = m_fwdErrorModel;
357  parametersFeeder.m_daConstantErrorRate = m_fwdDaConstantErrorRate;
358  parametersFeeder.m_daIfModel = m_daFwdLinkInterferenceModel;
359  parametersFeeder.m_raIfModel = m_raSettings.m_raFwdInterferenceModel;
360  parametersFeeder.m_raIfEliminateModel = m_raSettings.m_raInterferenceEliminationModel;
361  parametersFeeder.m_linkRegenerationMode =
362  Singleton<SatTopology>::Get()->GetForwardLinkRegenerationMode();
363  parametersFeeder.m_bwConverter = m_carrierBandwidthConverter;
364  parametersFeeder.m_carrierCount = m_fwdLinkCarrierCount;
365  parametersFeeder.m_cec = cec;
366  parametersFeeder.m_raCollisionModel = m_raSettings.m_raCollisionModel;
367  parametersFeeder.m_randomAccessModel = m_raSettings.m_randomAccessModel;
368 
369  params.m_txCh = fr;
370  params.m_rxCh = ff;
371 
372  Ptr<SatOrbiterFeederPhy> fPhy = CreateObject<SatOrbiterFeederPhy>(
373  params,
375  parametersFeeder,
377 
378  // Note, that currently we have only one set of antenna patterns,
379  // which are utilized in both in user link and feeder link, and
380  // in both uplink and downlink directions.
381  fPhy->SetTxAntennaGainPattern(feederAgp, dev->GetNode()->GetObject<SatMobilityModel>());
382  fPhy->SetRxAntennaGainPattern(feederAgp, dev->GetNode()->GetObject<SatMobilityModel>());
383 
384  dev->AddFeederPhy(fPhy, userBeamId);
385 
386  fPhy->Initialize();
387 
388  Ptr<SatOrbiterFeederMac> fMac;
389  Ptr<SatOrbiterFeederLlc> fLlc;
390  bool startScheduler = false;
391 
392  // Create MAC layer
393  fMac = CreateObject<SatOrbiterFeederMac>(satId, userBeamId);
394 
395  Mac48Address feederAddress;
396 
397  // Create layers needed depending on max regeneration mode
398  switch (std::max(Singleton<SatTopology>::Get()->GetForwardLinkRegenerationMode(),
399  Singleton<SatTopology>::Get()->GetReturnLinkRegenerationMode()))
400  {
403  // Create a node info to PHY layers
404  Ptr<SatNodeInfo> niPhyFeeder =
405  Create<SatNodeInfo>(SatEnums::NT_SAT,
406  m_nodeIds[satId],
407  Mac48Address::ConvertFrom(dev->GetAddress()));
408  fPhy->SetNodeInfo(niPhyFeeder);
409  fMac->SetNodeInfo(niPhyFeeder);
410 
411  break;
412  }
414  // Create LLC layer
415  fLlc = CreateObject<SatOrbiterFeederLlc>();
416 
417  if (m_gwMacMap.count(std::make_pair(satId, gwId)))
418  {
419  // MAC already exists for this GW ID, reusing it, and disabling the other
420  dev->AddFeederMac(fMac, m_gwMacMap[std::make_pair(satId, gwId)], userBeamId);
421  Singleton<SatTopology>::Get()->AddOrbiterFeederMacPair(
422  fMac,
423  m_gwMacMap[std::make_pair(satId, gwId)]);
424  }
425  else
426  {
427  // First MAC for this GW ID, storing it to the map
428  dev->AddFeederMac(fMac, fMac, userBeamId);
429  Singleton<SatTopology>::Get()->AddOrbiterFeederMacPair(fMac, fMac);
430  m_gwMacMap[std::make_pair(satId, gwId)] = fMac;
431  startScheduler = true;
432  }
433 
434  fMac->SetReadCtrlCallback(m_fwdReadCtrlCb);
435  fLlc->SetReadCtrlCallback(m_fwdReadCtrlCb);
436 
437  // Create a node info to PHY and MAC layers
438  feederAddress = Mac48Address::Allocate();
439  Ptr<SatNodeInfo> niFeeder =
440  Create<SatNodeInfo>(SatEnums::NT_SAT, m_nodeIds[satId], feederAddress);
441  fPhy->SetNodeInfo(niFeeder);
442  fMac->SetNodeInfo(niFeeder);
443  fLlc->SetNodeInfo(niFeeder);
444 
445  dev->AddFeederPair(userBeamId, feederAddress);
446 
447  break;
448  }
450  // Create LLC layer
451  fLlc = CreateObject<SatOrbiterFeederLlc>();
452 
453  if (m_gwMacMap.count(std::make_pair(satId, gwId)))
454  {
455  // MAC already exists for this GW ID, reusing it, and disabling the other
456  dev->AddFeederMac(fMac, m_gwMacMap[std::make_pair(satId, gwId)], userBeamId);
457  Singleton<SatTopology>::Get()->AddOrbiterFeederMacPair(
458  fMac,
459  m_gwMacMap[std::make_pair(satId, gwId)]);
460  }
461  else
462  {
463  // First MAC for this GW ID, storing it to the map
464  dev->AddFeederMac(fMac, fMac, userBeamId);
465  Singleton<SatTopology>::Get()->AddOrbiterFeederMacPair(fMac, fMac);
466  m_gwMacMap[std::make_pair(satId, gwId)] = fMac;
467  startScheduler = true;
468  }
469 
470  fMac->SetReadCtrlCallback(m_fwdReadCtrlCb);
471  fLlc->SetReadCtrlCallback(m_fwdReadCtrlCb);
472 
473  // Create a node info to PHY and MAC layers
474  feederAddress = Mac48Address::Allocate();
475  Ptr<SatNodeInfo> niFeeder =
476  Create<SatNodeInfo>(SatEnums::NT_SAT, m_nodeIds[satId], feederAddress);
477  fPhy->SetNodeInfo(niFeeder);
478  fMac->SetNodeInfo(niFeeder);
479  fLlc->SetNodeInfo(niFeeder);
480 
481  dev->AddFeederPair(userBeamId, feederAddress);
482 
483  break;
484  }
485  default:
486  NS_FATAL_ERROR("Forward or return link regeneration mode unknown");
487  }
488 
489  // Connect callbacks on forward link
490  switch (Singleton<SatTopology>::Get()->GetForwardLinkRegenerationMode())
491  {
494  SatPhy::ReceiveCallback fCb = MakeCallback(&SatOrbiterFeederMac::Receive, fMac);
495  fPhy->SetAttribute("ReceiveCb", CallbackValue(fCb));
496 
497  fMac->SetReceiveNetDeviceCallback(MakeCallback(&SatOrbiterNetDevice::ReceiveFeeder, dev));
498 
499  break;
500  }
502  SatPhy::ReceiveCallback fCb = MakeCallback(&SatOrbiterFeederMac::Receive, fMac);
503  fPhy->SetAttribute("ReceiveCb", CallbackValue(fCb));
504 
505  fMac->SetReceiveCallback(MakeCallback(&SatOrbiterFeederLlc::Receive, fLlc));
506 
507  fLlc->SetReceiveSatelliteCallback(
508  MakeCallback(&SatOrbiterNetDevice::ReceivePacketFeeder, dev));
509 
510  break;
511  }
512  default:
513  NS_FATAL_ERROR("Forward link regeneration mode unknown");
514  }
515 
516  // Connect callbacks on return link
517  switch (Singleton<SatTopology>::Get()->GetReturnLinkRegenerationMode())
518  {
521  // Nothing to do on feeder side
522  break;
523  }
526  fMac->SetTransmitCallback(MakeCallback(&SatOrbiterFeederPhy::SendPduWithParams, fPhy));
527 
529  0,
531  Ptr<SatScpcScheduler> scpcScheduler =
532  CreateObject<SatScpcScheduler>(m_bbFrameConfRtn, feederAddress, carrierBandwidth);
533  fMac->SetFwdScheduler(scpcScheduler);
534  fMac->SetLlc(fLlc);
535  if (startScheduler)
536  {
537  fMac->StartPeriodicTransmissions();
538  }
539 
540  // Attach the LLC Tx opportunity and scheduling context getter callbacks to
541  // SatFwdLinkScheduler
542  scpcScheduler->SetTxOpportunityCallback(
543  MakeCallback(&SatOrbiterLlc::NotifyTxOpportunity, fLlc));
544  scpcScheduler->SetSchedContextCallback(MakeCallback(&SatLlc::GetSchedulingContexts, fLlc));
545 
546  break;
547  }
548  default:
549  NS_FATAL_ERROR("Return link regeneration mode unknown");
550  }
551 
552  Singleton<SatTopology>::Get()->AddOrbiterFeederLayers(dev->GetNode(),
553  dev->GetNode()->GetId(),
554  userBeamId,
555  dev,
556  fLlc,
557  fMac,
558  fPhy);
559 }
560 
561 void
562 SatOrbiterHelper::EnableCreationTraces(Ptr<OutputStreamWrapper> stream, CallbackBase& cb)
563 {
564  NS_LOG_FUNCTION(this);
565 
566  TraceConnect("Creation", "SatOrbiterHelper", cb);
567 }
568 
569 void
570 SatOrbiterHelper::SetIslRoutes(std::vector<std::pair<uint32_t, uint32_t>> isls)
571 {
572  NS_LOG_FUNCTION(this);
573 
574  switch (m_islArbiterType)
575  {
576  case SatEnums::UNICAST: {
577  Ptr<SatIslArbiterUnicastHelper> satIslArbiterHelper =
578  CreateObject<SatIslArbiterUnicastHelper>(isls);
579  satIslArbiterHelper->InstallArbiters();
580  break;
581  }
582  case SatEnums::ECMP: {
583  NS_FATAL_ERROR("ISL Arbiter ECMP not implemented yet");
584  }
585  default: {
586  NS_FATAL_ERROR("Unknown ISL arbiter");
587  }
588  }
589 }
590 
591 } // namespace ns3
SatEnums class is for simplifying the use of enumerators in the satellite module.
virtual void GetSchedulingContexts(std::vector< Ptr< SatSchedulingObject >> &output) const =0
Create and fill the scheduling objects based on LLC layer information.
virtual void Receive(Ptr< Packet > packet, Mac48Address source, Mac48Address dest)
Receive user data packet from lower layer.
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.
void Receive(SatPhy::PacketContainer_t packets, Ptr< SatSignalParameters > rxParams)
Receive packet from lower layer.
virtual void SendPduWithParams(Ptr< SatSignalParameters > rxParams)
Send Pdu to the PHY tx module (for satellite switch packet forwarding)
Ptr< SatLinkResults > m_rtnLinkResults
Return channel link results (DVB-RCS2) are created if ErrorModel is configured to be AVI.
SatPhy::InterferenceModel m_daFwdLinkInterferenceModel
SatMac::ReadCtrlMsgCallback m_fwdReadCtrlCb
Control forward link messages callback.
SatEnums::IslArbiterType_t m_islArbiterType
Arbiter in use to route packets on ISLs.
virtual void AttachChannelsUser(Ptr< SatOrbiterNetDevice > dev, Ptr< SatChannel > uf, Ptr< SatChannel > ur, Ptr< SatAntennaGainPattern > userAgp, Ptr< SatNcc > ncc, uint32_t satId, uint32_t userBeamId)=0
void Initialize(Ptr< SatLinkResultsFwd > lrFwd, Ptr< SatLinkResultsRtn > lrRcs2)
std::map< std::pair< uint32_t, uint32_t >, Ptr< SatOrbiterFeederMac > > m_gwMacMap
Map used in regenerative mode to store if MAC already created for a given pair SAT ID / GW ID.
void SetFeederPhyAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each Feeder Phy created by the helper.
void SetUserPhyAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each User Phy created by the helper.
TypeId GetInstanceTypeId(void) const
RandomAccessSettings_s m_raSettings
The used random access model settings.
std::vector< uint32_t > m_nodeIds
Satellites node id.
SatPhy::ErrorModel m_rtnErrorModel
NetDeviceContainer InstallAllOrbiters()
This method creates a ns3::SatOrbiterNetDevices with the requested attributes and associate the resul...
Ptr< SatBbFrameConf > m_bbFrameConfFwd
void AttachChannelsFeeder(Ptr< SatOrbiterNetDevice > dev, Ptr< SatChannel > ff, Ptr< SatChannel > fr, Ptr< SatAntennaGainPattern > feederAgp, Ptr< SatNcc > ncc, uint32_t satId, uint32_t gwId, uint32_t userBeamId)
TracedCallback< std::string > m_creationTrace
Trace callback for creation traces.
Ptr< SatLinkResults > m_fwdLinkResults
Forward channel link results (DVB-S2) are created if ErrorModel is configured to be AVI.
Ptr< SatSuperframeSeq > m_superframeSeq
Superframe sequence.
SatPhy::InterferenceModel m_daRtnLinkInterferenceModel
virtual Ptr< SatOrbiterNetDevice > CreateOrbiterNetDevice()=0
Create a SatOrbiterNetDevice instance, with correct type infered from child classes.
SatPhy::ErrorModel m_fwdErrorModel
void AttachChannels(Ptr< NetDevice > dev, Ptr< SatChannel > ff, Ptr< SatChannel > fr, Ptr< SatChannel > uf, Ptr< SatChannel > ur, Ptr< SatAntennaGainPattern > userAgp, Ptr< SatAntennaGainPattern > feederAgp, Ptr< SatNcc > ncc, uint32_t satId, uint32_t gwId, uint32_t userBeamId)
SatTypedefs::CarrierBandwidthConverter_t m_carrierBandwidthConverter
void SetIslRoutes(std::vector< std::pair< uint32_t, uint32_t >> isls)
Set ISL routes.
void EnableCreationTraces(Ptr< OutputStreamWrapper > stream, CallbackBase &cb)
Enables creation traces to be written in given file.
Ptr< SatBbFrameConf > m_bbFrameConfRtn
SatOrbiterHelper()
Default constructor.
Ptr< NetDevice > Install(Ptr< Node > n)
void SetDeviceAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each NetDevice created by the helper.
static TypeId GetTypeId(void)
Get the type ID.
std::map< uint32_t, uint16_t > m_deviceCount
virtual Ptr< Packet > NotifyTxOpportunity(uint32_t bytes, Mac48Address utAddr, uint8_t flowId, uint32_t &bytesLeft, uint32_t &nextMinTxO)
Called from lower layer (MAC) to inform a Tx opportunity of certain amount of bytes.
void ReceiveFeeder(SatPhy::PacketContainer_t packets, Ptr< SatSignalParameters > rxParams)
Receive the packet from the lower layers.
virtual void ReceivePacketFeeder(Ptr< Packet > packet, const Address &feederAddress)=0
Receive the packet from the lower layers, in network regeneration on forward link.
Callback< void, PacketContainer_t, Ptr< SatSignalParameters > > ReceiveCallback
Definition: satellite-phy.h:85
Information of beam users liken UTs and their users.
Callback< double, SatEnums::ChannelType_t, uint32_t, SatEnums::CarrierBandwidthType_t > CarrierBandwidthConverter_t
Callback for carrier bandwidths.
constexpr uint8_t SUPERFRAME_SEQUENCE
Used superframe sequence in the RTN link.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.
SatPhyRxCarrierConf::InterferenceModel m_raFwdInterferenceModel
SatPhyRxCarrierConf::RandomAccessCollisionModel m_raCollisionModel
SatPhyRxCarrierConf::InterferenceEliminationModel m_raInterferenceEliminationModel
Creation parameters for base PHY object.
Ptr< SatChannel > m_rxCh
Ptr< NetDevice > m_device
Ptr< SatChannel > m_txCh
SatEnums::SatLoraNodeType_t m_standard