satellite-stats-queue-helper.cc
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2014 Magister Solutions
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Budiarto Herman <budiarto.herman@magister.fi>
19  *
20  */
21 
23 
24 #include <ns3/boolean.h>
25 #include <ns3/data-collection-object.h>
26 #include <ns3/distribution-collector.h>
27 #include <ns3/enum.h>
28 #include <ns3/fatal-error.h>
29 #include <ns3/interval-rate-collector.h>
30 #include <ns3/log.h>
31 #include <ns3/mac48-address.h>
32 #include <ns3/magister-gnuplot-aggregator.h>
33 #include <ns3/multi-file-aggregator.h>
34 #include <ns3/net-device.h>
35 #include <ns3/node-container.h>
36 #include <ns3/satellite-helper.h>
37 #include <ns3/satellite-id-mapper.h>
38 #include <ns3/satellite-llc.h>
39 #include <ns3/satellite-net-device.h>
40 #include <ns3/satellite-phy-rx.h>
41 #include <ns3/satellite-phy.h>
42 #include <ns3/scalar-collector.h>
43 #include <ns3/simulator.h>
44 #include <ns3/singleton.h>
45 #include <ns3/string.h>
46 #include <ns3/unit-conversion-collector.h>
47 
48 NS_LOG_COMPONENT_DEFINE("SatStatsQueueHelper");
49 
50 namespace ns3
51 {
52 
53 // BASE CLASS /////////////////////////////////////////////////////////////////
54 
55 NS_OBJECT_ENSURE_REGISTERED(SatStatsQueueHelper);
56 
57 std::string // static
59 {
60  switch (unitType)
61  {
63  return "UNIT_BYTES";
65  return "UNIT_NUMBER_OF_PACKETS";
66  default:
67  NS_FATAL_ERROR("SatStatsQueueHelper - Invalid unit type");
68  break;
69  }
70 
71  NS_FATAL_ERROR("SatStatsQueueHelper - Invalid unit type");
72  return "";
73 }
74 
75 SatStatsQueueHelper::SatStatsQueueHelper(Ptr<const SatHelper> satHelper)
76  : SatStatsHelper(satHelper),
77  m_pollInterval(MilliSeconds(10)),
78  m_unitType(SatStatsQueueHelper::UNIT_BYTES),
79  m_shortLabel(""),
80  m_longLabel("")
81 {
82  NS_LOG_FUNCTION(this << satHelper);
83 }
84 
86 {
87  NS_LOG_FUNCTION(this);
88 }
89 
90 TypeId // static
92 {
93  static TypeId tid = TypeId("ns3::SatStatsQueueHelper")
94  .SetParent<SatStatsHelper>()
95  .AddAttribute("PollInterval",
96  "",
97  TimeValue(MilliSeconds(10)),
98  MakeTimeAccessor(&SatStatsQueueHelper::SetPollInterval,
100  MakeTimeChecker());
101  return tid;
102 }
103 
104 void
106 {
107  NS_LOG_FUNCTION(this << GetUnitTypeName(unitType));
108  m_unitType = unitType;
109 
110  // Update presentation-based attributes.
111  if (unitType == SatStatsQueueHelper::UNIT_BYTES)
112  {
113  m_shortLabel = "size_bytes";
114  m_longLabel = "Queue size (in bytes)";
115  }
116  else if (unitType == SatStatsQueueHelper::UNIT_NUMBER_OF_PACKETS)
117  {
118  m_shortLabel = "num_packets";
119  m_longLabel = "Queue size (in number of packets)";
120  }
121  else
122  {
123  NS_FATAL_ERROR("SatStatsQueueHelper - Invalid unit type");
124  }
125 }
126 
129 {
130  return m_unitType;
131 }
132 
133 void
135 {
136  NS_LOG_FUNCTION(this << pollInterval.GetSeconds());
137  m_pollInterval = pollInterval;
138 }
139 
140 Time
142 {
143  return m_pollInterval;
144 }
145 
146 void
148 {
149  NS_LOG_FUNCTION(this);
150 
151  switch (GetOutputType())
152  {
154  NS_FATAL_ERROR(GetOutputTypeName(GetOutputType())
155  << " is not a valid output type for this statistics.");
156  break;
157 
159  // Setup aggregator.
160  m_aggregator = CreateAggregator("ns3::MultiFileAggregator",
161  "OutputFileName",
162  StringValue(GetOutputFileName()),
163  "MultiFileMode",
164  BooleanValue(false),
165  "EnableContextPrinting",
166  BooleanValue(true),
167  "GeneralHeading",
168  StringValue(GetIdentifierHeading(m_shortLabel)));
169 
170  // Setup collectors.
171  m_terminalCollectors.SetType("ns3::ScalarCollector");
172  m_terminalCollectors.SetAttribute("InputDataType",
173  EnumValue(ScalarCollector::INPUT_DATA_TYPE_UINTEGER));
174  m_terminalCollectors.SetAttribute(
175  "OutputType",
176  EnumValue(ScalarCollector::OUTPUT_TYPE_AVERAGE_PER_SAMPLE));
178  m_terminalCollectors.ConnectToAggregator("Output",
179  m_aggregator,
180  &MultiFileAggregator::Write1d);
181  break;
182  }
183 
185  // Setup aggregator.
186  m_aggregator = CreateAggregator("ns3::MultiFileAggregator",
187  "OutputFileName",
188  StringValue(GetOutputFileName()),
189  "GeneralHeading",
190  StringValue(GetTimeHeading(m_shortLabel)));
191 
192  // Setup second-level collectors.
193  m_terminalCollectors.SetType("ns3::IntervalRateCollector");
194  m_terminalCollectors.SetAttribute(
195  "InputDataType",
196  EnumValue(IntervalRateCollector::INPUT_DATA_TYPE_UINTEGER));
198  m_terminalCollectors.ConnectToAggregator("OutputWithTime",
199  m_aggregator,
200  &MultiFileAggregator::Write2d);
201  m_terminalCollectors.ConnectToAggregator("OutputString",
202  m_aggregator,
203  &MultiFileAggregator::AddContextHeading);
204 
205  break;
206  }
207 
211  // Setup aggregator.
212  m_aggregator = CreateAggregator("ns3::MultiFileAggregator",
213  "OutputFileName",
214  StringValue(GetOutputFileName()),
215  "GeneralHeading",
216  StringValue(GetDistributionHeading(m_shortLabel)));
217 
218  // Setup collectors.
219  m_terminalCollectors.SetType("ns3::DistributionCollector");
220  DistributionCollector::OutputType_t outputType =
221  DistributionCollector::OUTPUT_TYPE_HISTOGRAM;
223  {
224  outputType = DistributionCollector::OUTPUT_TYPE_PROBABILITY;
225  }
227  {
228  outputType = DistributionCollector::OUTPUT_TYPE_CUMULATIVE;
229  }
230  m_terminalCollectors.SetAttribute("OutputType", EnumValue(outputType));
232  m_terminalCollectors.ConnectToAggregator("Output",
233  m_aggregator,
234  &MultiFileAggregator::Write2d);
235  m_terminalCollectors.ConnectToAggregator("OutputString",
236  m_aggregator,
237  &MultiFileAggregator::AddContextHeading);
238  m_terminalCollectors.ConnectToAggregator("Warning",
239  m_aggregator,
240  &MultiFileAggregator::EnableContextWarning);
241  break;
242  }
243 
246  NS_FATAL_ERROR(GetOutputTypeName(GetOutputType())
247  << " is not a valid output type for this statistics.");
248  break;
249 
251  // Setup aggregator.
252  m_aggregator = CreateAggregator("ns3::MagisterGnuplotAggregator",
253  "OutputPath",
254  StringValue(GetOutputPath()),
255  "OutputFileName",
256  StringValue(GetName()));
257  Ptr<MagisterGnuplotAggregator> plotAggregator =
258  m_aggregator->GetObject<MagisterGnuplotAggregator>();
259  NS_ASSERT(plotAggregator != nullptr);
260  // plot->SetTitle ("");
261  plotAggregator->SetLegend("Time (in seconds)", "Queued packets");
262  plotAggregator->Set2dDatasetDefaultStyle(Gnuplot2dDataset::STEPS);
263 
264  // Setup second-level collectors.
265  m_terminalCollectors.SetType("ns3::IntervalRateCollector");
266  m_terminalCollectors.SetAttribute(
267  "InputDataType",
268  EnumValue(IntervalRateCollector::INPUT_DATA_TYPE_UINTEGER));
270  for (CollectorMap::Iterator it = m_terminalCollectors.Begin();
271  it != m_terminalCollectors.End();
272  ++it)
273  {
274  const std::string context = it->second->GetName();
275  plotAggregator->Add2dDataset(context, context);
276  }
277  m_terminalCollectors.ConnectToAggregator("OutputWithTime",
278  m_aggregator,
279  &MagisterGnuplotAggregator::Write2d);
280 
281  break;
282  }
283 
287  // Setup aggregator.
288  m_aggregator = CreateAggregator("ns3::MagisterGnuplotAggregator",
289  "OutputPath",
290  StringValue(GetOutputPath()),
291  "OutputFileName",
292  StringValue(GetName()));
293  Ptr<MagisterGnuplotAggregator> plotAggregator =
294  m_aggregator->GetObject<MagisterGnuplotAggregator>();
295  NS_ASSERT(plotAggregator != nullptr);
296  // plot->SetTitle ("");
297  plotAggregator->SetLegend(m_longLabel, "Frequency");
298  plotAggregator->Set2dDatasetDefaultStyle(Gnuplot2dDataset::LINES);
299 
300  // Setup collectors.
301  m_terminalCollectors.SetType("ns3::DistributionCollector");
302  DistributionCollector::OutputType_t outputType =
303  DistributionCollector::OUTPUT_TYPE_HISTOGRAM;
305  {
306  outputType = DistributionCollector::OUTPUT_TYPE_PROBABILITY;
307  }
309  {
310  outputType = DistributionCollector::OUTPUT_TYPE_CUMULATIVE;
311  }
312  m_terminalCollectors.SetAttribute("OutputType", EnumValue(outputType));
314  for (CollectorMap::Iterator it = m_terminalCollectors.Begin();
315  it != m_terminalCollectors.End();
316  ++it)
317  {
318  const std::string context = it->second->GetName();
319  plotAggregator->Add2dDataset(context, context);
320  }
321  m_terminalCollectors.ConnectToAggregator("Output",
322  m_aggregator,
323  &MagisterGnuplotAggregator::Write2d);
324  break;
325  }
326 
327  default:
328  NS_FATAL_ERROR("SatStatsQueueHelper - Invalid output type");
329  break;
330  }
331 
332  // Identify the list of source of queue events.
333  EnlistSource();
334 
335  // Schedule the first polling session.
336  Simulator::Schedule(m_pollInterval, &SatStatsQueueHelper::Poll, this);
337 
338 } // end of `void DoInstall ();`
339 
340 void
342 {
343  NS_LOG_FUNCTION(this);
344 
345  // The method below is supposed to be implemented by the child class.
346  DoEnlistSource();
347 }
348 
349 void
351 {
352  NS_LOG_FUNCTION(this);
353 
354  // The method below is supposed to be implemented by the child class.
355  DoPoll();
356 
357  // Schedule the next polling session.
358  Simulator::Schedule(m_pollInterval, &SatStatsQueueHelper::Poll, this);
359 }
360 
361 void
362 SatStatsQueueHelper::PushToCollector(uint32_t identifier, uint32_t value)
363 {
364  // NS_LOG_FUNCTION (this << identifier << value);
365 
366  // Find the collector with the right identifier.
367  Ptr<DataCollectionObject> collector = m_terminalCollectors.Get(identifier);
368  NS_ASSERT_MSG(collector != nullptr, "Unable to find collector with identifier " << identifier);
369 
370  switch (GetOutputType())
371  {
374  Ptr<ScalarCollector> c = collector->GetObject<ScalarCollector>();
375  NS_ASSERT(c != nullptr);
376  c->TraceSinkUinteger32(0, value);
377  break;
378  }
379 
382  Ptr<IntervalRateCollector> c = collector->GetObject<IntervalRateCollector>();
383  NS_ASSERT(c != nullptr);
384  c->TraceSinkUinteger32(0, value);
385  break;
386  }
387 
394  Ptr<DistributionCollector> c = collector->GetObject<DistributionCollector>();
395  NS_ASSERT(c != nullptr);
396  c->TraceSinkUinteger32(0, value);
397  break;
398  }
399 
400  default:
401  NS_FATAL_ERROR(GetOutputTypeName(GetOutputType())
402  << " is not a valid output type for this statistics.");
403  break;
404 
405  } // end of `switch (GetOutputType ())`
406 
407 } // end of `void PushToCollector (uint32_t, uint32_t)`
408 
409 // FORWARD LINK ///////////////////////////////////////////////////////////////
410 
411 NS_OBJECT_ENSURE_REGISTERED(SatStatsFwdQueueHelper);
412 
413 SatStatsFwdQueueHelper::SatStatsFwdQueueHelper(Ptr<const SatHelper> satHelper)
414  : SatStatsQueueHelper(satHelper)
415 {
416  NS_LOG_FUNCTION(this << satHelper);
417 }
418 
420 {
421  NS_LOG_FUNCTION(this);
422 }
423 
424 TypeId // static
426 {
427  static TypeId tid = TypeId("ns3::SatStatsFwdQueueHelper").SetParent<SatStatsQueueHelper>();
428  return tid;
429 }
430 
431 void
433 {
434  NS_LOG_FUNCTION(this);
435 
436  const SatIdMapper* satIdMapper = Singleton<SatIdMapper>::Get();
437 
438  NodeContainer gws = GetSatHelper()->GetBeamHelper()->GetGwNodes();
439  for (NodeContainer::Iterator it1 = gws.Begin(); it1 != gws.End(); ++it1)
440  {
441  NetDeviceContainer devs = GetGwSatNetDevice(*it1);
442 
443  for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
444  {
445  Ptr<SatNetDevice> satDev = (*itDev)->GetObject<SatNetDevice>();
446  NS_ASSERT(satDev != nullptr);
447 
448  // Get the beam ID of this device.
449  Ptr<SatPhy> satPhy = satDev->GetPhy();
450  NS_ASSERT(satPhy != nullptr);
451  Ptr<SatPhyRx> satPhyRx = satPhy->GetPhyRx();
452  NS_ASSERT(satPhyRx != nullptr);
453  const uint32_t satId = satPhyRx->GetSatId();
454  const uint32_t beamId = satPhyRx->GetBeamId();
455  NS_LOG_DEBUG(this << " enlisting UT from sat ID " << satId << " and beam ID "
456  << beamId);
457 
458  // Go through the UTs of this beam.
459  ListOfUt_t listOfUt;
460  NodeContainer uts = GetSatHelper()->GetBeamHelper()->GetUtNodes(satId, beamId);
461  for (NodeContainer::Iterator it2 = uts.Begin(); it2 != uts.End(); ++it2)
462  {
463  const Address addr = satIdMapper->GetUtMacWithNode(*it2);
464  const Mac48Address mac48Addr = Mac48Address::ConvertFrom(addr);
465 
466  if (addr.IsInvalid())
467  {
468  NS_LOG_WARN(this << " Node " << (*it2)->GetId() << " is not a valid UT");
469  }
470  else
471  {
472  const uint32_t identifier = GetIdentifierForUt(*it2);
473  listOfUt.push_back(std::make_pair(mac48Addr, identifier));
474  }
475  }
476 
477  // Add an entry to the LLC list.
478  Ptr<SatLlc> satLlc = satDev->GetLlc();
479  NS_ASSERT(satLlc != nullptr);
480  m_llc.push_back(std::make_pair(satLlc, listOfUt));
481 
482  } // end of `for (NetDeviceContainer::Iterator itDev = devs)`
483 
484  } // end of `for (it1 = gws.Begin(); it1 != gws.End (); ++it1)`
485 
486 } // end of `void DoInstall ();`
487 
488 void
490 {
491  // NS_LOG_FUNCTION (this);
492 
493  // Go through the LLC list.
494  std::list<std::pair<Ptr<SatLlc>, ListOfUt_t>>::const_iterator it1;
495  for (it1 = m_llc.begin(); it1 != m_llc.end(); ++it1)
496  {
497  for (ListOfUt_t::const_iterator it2 = it1->second.begin(); it2 != it1->second.end(); ++it2)
498  {
499  const Mac48Address addr = it2->first;
500  const uint32_t identifier = it2->second;
502  {
503  PushToCollector(identifier, it1->first->GetNBytesInQueue(addr));
504  }
505  else
506  {
508  PushToCollector(identifier, it1->first->GetNPacketsInQueue(addr));
509  }
510  }
511  }
512 }
513 
514 // FORWARD LINK IN BYTES //////////////////////////////////////////////////////
515 
516 NS_OBJECT_ENSURE_REGISTERED(SatStatsFwdQueueBytesHelper);
517 
519  : SatStatsFwdQueueHelper(satHelper)
520 {
521  NS_LOG_FUNCTION(this << satHelper);
523 }
524 
526 {
527  NS_LOG_FUNCTION(this);
528 }
529 
530 TypeId // static
532 {
533  static TypeId tid =
534  TypeId("ns3::SatStatsFwdQueueBytesHelper").SetParent<SatStatsFwdQueueHelper>();
535  return tid;
536 }
537 
538 // FORWARD LINK IN PACKETS ////////////////////////////////////////////////////
539 
540 NS_OBJECT_ENSURE_REGISTERED(SatStatsFwdQueuePacketsHelper);
541 
543  : SatStatsFwdQueueHelper(satHelper)
544 {
545  NS_LOG_FUNCTION(this << satHelper);
547 }
548 
550 {
551  NS_LOG_FUNCTION(this);
552 }
553 
554 TypeId // static
556 {
557  static TypeId tid =
558  TypeId("ns3::SatStatsFwdQueuePacketsHelper").SetParent<SatStatsFwdQueueHelper>();
559  return tid;
560 }
561 
562 // RETURN LINK ////////////////////////////////////////////////////////////////
563 
564 NS_OBJECT_ENSURE_REGISTERED(SatStatsRtnQueueHelper);
565 
566 SatStatsRtnQueueHelper::SatStatsRtnQueueHelper(Ptr<const SatHelper> satHelper)
567  : SatStatsQueueHelper(satHelper)
568 {
569  NS_LOG_FUNCTION(this << satHelper);
570 }
571 
573 {
574  NS_LOG_FUNCTION(this);
575 }
576 
577 TypeId // static
579 {
580  static TypeId tid = TypeId("ns3::SatStatsRtnQueueHelper").SetParent<SatStatsQueueHelper>();
581  return tid;
582 }
583 
584 void
586 {
587  NS_LOG_FUNCTION(this);
588 
589  NodeContainer uts = GetSatHelper()->GetBeamHelper()->GetUtNodes();
590  for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
591  {
592  const uint32_t identifier = GetIdentifierForUt(*it);
593  Ptr<NetDevice> dev = GetUtSatNetDevice(*it);
594  Ptr<SatNetDevice> satDev = dev->GetObject<SatNetDevice>();
595  NS_ASSERT(satDev != nullptr);
596  Ptr<SatLlc> satLlc = satDev->GetLlc();
597  NS_ASSERT(satLlc != nullptr);
598  m_llc.push_back(std::make_pair(satLlc, identifier));
599  }
600 
601 } // end of `void DoInstall ();`
602 
603 void
605 {
606  // NS_LOG_FUNCTION (this);
607 
608  // Go through the LLC list.
609  std::list<std::pair<Ptr<SatLlc>, uint32_t>>::const_iterator it;
610  for (it = m_llc.begin(); it != m_llc.end(); ++it)
611  {
613  {
614  PushToCollector(it->second, it->first->GetNBytesInQueue());
615  }
616  else
617  {
619  PushToCollector(it->second, it->first->GetNPacketsInQueue());
620  }
621  }
622 }
623 
624 // RETURN LINK IN BYTES ///////////////////////////////////////////////////////
625 
626 NS_OBJECT_ENSURE_REGISTERED(SatStatsRtnQueueBytesHelper);
627 
629  : SatStatsRtnQueueHelper(satHelper)
630 {
631  NS_LOG_FUNCTION(this << satHelper);
633 }
634 
636 {
637  NS_LOG_FUNCTION(this);
638 }
639 
640 TypeId // static
642 {
643  static TypeId tid =
644  TypeId("ns3::SatStatsRtnQueueBytesHelper").SetParent<SatStatsRtnQueueHelper>();
645  return tid;
646 }
647 
648 // RETURN LINK IN PACKETS /////////////////////////////////////////////////////
649 
650 NS_OBJECT_ENSURE_REGISTERED(SatStatsRtnQueuePacketsHelper);
651 
653  : SatStatsRtnQueueHelper(satHelper)
654 {
655  NS_LOG_FUNCTION(this << satHelper);
657 }
658 
660 {
661  NS_LOG_FUNCTION(this);
662 }
663 
664 TypeId // static
666 {
667  static TypeId tid =
668  TypeId("ns3::SatStatsRtnQueuePacketsHelper").SetParent<SatStatsRtnQueueHelper>();
669  return tid;
670 }
671 
672 } // end of namespace ns3
Class for ID-mapper.
Address GetUtMacWithNode(Ptr< Node > utNode) const
SatNetDevice to be utilized in the UT and GW nodes.
Helper for forward link queue statistics using byte as unit.
SatStatsFwdQueueBytesHelper(Ptr< const SatHelper > satHelper)
static TypeId GetTypeId()
inherited from ObjectBase base class
Helper for forward link queue statistics.
SatStatsFwdQueueHelper(Ptr< const SatHelper > satHelper)
void DoPoll()
Retrieve the queue size of every relevant encapsulator and push the values to the right collectors.
virtual ~SatStatsFwdQueueHelper()
/ Destructor.
std::list< std::pair< Mac48Address, uint32_t > > ListOfUt_t
std::list< std::pair< Ptr< SatLlc >, ListOfUt_t > > m_llc
Maintains a list of GW LLC, its UT address, and its identifier.
static TypeId GetTypeId()
inherited from ObjectBase base class
Helper for forward link queue statistics using packet as unit.
static TypeId GetTypeId()
inherited from ObjectBase base class
SatStatsFwdQueuePacketsHelper(Ptr< const SatHelper > satHelper)
Parent abstract class of all satellite statistics helpers.
Ptr< const SatHelper > GetSatHelper() const
static NetDeviceContainer GetGwSatNetDevice(Ptr< Node > gwNode)
static std::string GetOutputTypeName(OutputType_t outputType)
virtual std::string GetIdentifierHeading(std::string dataLabel) const
virtual std::string GetOutputPath() const
Ptr< DataCollectionObject > CreateAggregator(std::string aggregatorTypeId, std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue())
Create the aggregator according to the output type.
virtual std::string GetOutputFileName() const
Compute the path and file name where statistics output should be written to.
uint32_t CreateCollectorPerIdentifier(CollectorMap &collectorMap) const
Create one collector instance for each identifier in the simulation.
static Ptr< NetDevice > GetUtSatNetDevice(Ptr< Node > utNode)
OutputType_t GetOutputType() const
uint32_t GetIdentifierForUt(Ptr< Node > utNode) const
std::string GetName() const
virtual std::string GetTimeHeading(std::string dataLabel) const
virtual std::string GetDistributionHeading(std::string dataLabel) const
Helper for queue statistics.
static std::string GetUnitTypeName(UnitType_t unitType)
virtual void DoEnlistSource()=0
CollectorMap m_terminalCollectors
Maintains a list of collectors created by this helper.
void DoInstall()
Install the probes, collectors, and aggregators necessary to produce the statistics output.
void Poll()
Retrieve the queue size of every relevant encapsulator and push the values to the right collectors.
virtual ~SatStatsQueueHelper()
/ Destructor.
void EnlistSource()
Identify the list of source of queue events.
void SetPollInterval(Time pollInterval)
void PushToCollector(uint32_t identifier, uint32_t value)
static TypeId GetTypeId()
inherited from ObjectBase base class
void SetUnitType(UnitType_t unitType)
Ptr< DataCollectionObject > m_aggregator
The aggregator created by this helper.
SatStatsQueueHelper(Ptr< const SatHelper > satHelper)
Time m_pollInterval
PollInterval attribute.
virtual void DoPoll()=0
Retrieve the queue size of every relevant encapsulator and push the values to the right collectors.
Helper for return link queue statistics using byte as unit.
static TypeId GetTypeId()
inherited from ObjectBase base class
SatStatsRtnQueueBytesHelper(Ptr< const SatHelper > satHelper)
Helper for return link queue statistics.
virtual ~SatStatsRtnQueueHelper()
/ Destructor.
std::list< std::pair< Ptr< SatLlc >, uint32_t > > m_llc
Maintains a list of UT LLC and its identifier.
SatStatsRtnQueueHelper(Ptr< const SatHelper > satHelper)
void DoPoll()
Retrieve the queue size of every relevant encapsulator and push the values to the right collectors.
static TypeId GetTypeId()
inherited from ObjectBase base class
Helper for return link queue statistics using packet as unit.
static TypeId GetTypeId()
inherited from ObjectBase base class
SatStatsRtnQueuePacketsHelper(Ptr< const SatHelper > satHelper)
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.