satellite-stats-throughput-helper.h
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 
22 #ifndef SATELLITE_STATS_THROUGHPUT_HELPER_H
23 #define SATELLITE_STATS_THROUGHPUT_HELPER_H
24 
25 #include <ns3/address.h>
26 #include <ns3/collector-map.h>
27 #include <ns3/ptr.h>
28 #include <ns3/satellite-stats-helper.h>
29 
30 #include <list>
31 #include <map>
32 
33 namespace ns3
34 {
35 
36 // BASE CLASS /////////////////////////////////////////////////////////////////
37 
38 class SatHelper;
39 class Node;
40 class Packet;
41 class DataCollectionObject;
42 class DistributionCollector;
43 
49 {
50  public:
51  // inherited from SatStatsHelper base class
52  SatStatsThroughputHelper(Ptr<const SatHelper> satHelper);
53 
57  virtual ~SatStatsThroughputHelper();
58 
62  static TypeId GetTypeId();
63 
67  void SetAveragingMode(bool averagingMode);
68 
72  bool GetAveragingMode() const;
73 
78  void InstallProbes();
79 
89  void RxCallback(Ptr<const Packet> packet, const Address& from);
90 
91  protected:
92  // inherited from SatStatsHelper base class
93  void DoInstall();
94 
98  virtual void DoInstallProbes() = 0;
99 
110  void SaveAddressAndIdentifier(Ptr<Node> utNode);
111 
114 
116  CollectorMap m_terminalCollectors;
117 
119  Ptr<DistributionCollector> m_averagingCollector;
120 
122  Ptr<DataCollectionObject> m_aggregator;
123 
125  std::map<const Address, uint32_t> m_identifierMap;
126 
127  private:
129 
130 }; // end of class SatStatsThroughputHelper
131 
132 // FORWARD LINK APPLICATION-LEVEL /////////////////////////////////////////////
133 
134 class Probe;
135 
154 {
155  public:
156  // inherited from SatStatsHelper base class
157  SatStatsFwdAppThroughputHelper(Ptr<const SatHelper> satHelper);
158 
163 
167  static TypeId GetTypeId();
168 
169  protected:
170  // inherited from SatStatsThroughputHelper base class
171  void DoInstallProbes();
172 
173  private:
175  std::list<Ptr<Probe>> m_probes;
176 
177 }; // end of class SatStatsFwdAppThroughputHelper
178 
179 // FORWARD FEEDER LINK DEVICE-LEVEL //////////////////////////////////////////////////
180 
198 {
199  public:
200  // inherited from SatStatsHelper base class
201  SatStatsFwdFeederDevThroughputHelper(Ptr<const SatHelper> satHelper);
202 
207 
211  static TypeId GetTypeId();
212 
213  protected:
214  // inherited from SatStatsThroughputHelper base class
215  void DoInstallProbes();
216 
217  private:
219  std::list<Ptr<Probe>> m_probes;
220 
221 }; // end of class SatStatsFwdFeederDevThroughputHelper
222 
223 // FORWARD USER LINK DEVICE-LEVEL //////////////////////////////////////////////////
224 
242 {
243  public:
244  // inherited from SatStatsHelper base class
245  SatStatsFwdUserDevThroughputHelper(Ptr<const SatHelper> satHelper);
246 
251 
255  static TypeId GetTypeId();
256 
257  protected:
258  // inherited from SatStatsThroughputHelper base class
259  void DoInstallProbes();
260 
261  private:
263  std::list<Ptr<Probe>> m_probes;
264 
265 }; // end of class SatStatsFwdUserDevThroughputHelper
266 
267 // FORWARD FEEDER LINK MAC-LEVEL /////////////////////////////////////////////////////
268 
288 {
289  public:
290  // inherited from SatStatsHelper base class
291  SatStatsFwdFeederMacThroughputHelper(Ptr<const SatHelper> satHelper);
292 
297 
301  static TypeId GetTypeId();
302 
303  protected:
304  // inherited from SatStatsThroughputHelper base class
305  void DoInstallProbes();
306 
307  private:
309  std::list<Ptr<Probe>> m_probes;
310 
311 }; // end of class SatStatsFwdFeederMacThroughputHelper
312 
313 // FORWARD USER LINK MAC-LEVEL /////////////////////////////////////////////////////
314 
334 {
335  public:
336  // inherited from SatStatsHelper base class
337  SatStatsFwdUserMacThroughputHelper(Ptr<const SatHelper> satHelper);
338 
343 
347  static TypeId GetTypeId();
348 
349  protected:
350  // inherited from SatStatsThroughputHelper base class
351  void DoInstallProbes();
352 
353  private:
355  std::list<Ptr<Probe>> m_probes;
356 
357 }; // end of class SatStatsFwdUserMacThroughputHelper
358 
359 // FORWARD FEEDER LINK PHY-LEVEL /////////////////////////////////////////////////////
360 
380 {
381  public:
382  // inherited from SatStatsHelper base class
383  SatStatsFwdFeederPhyThroughputHelper(Ptr<const SatHelper> satHelper);
384 
389 
393  static TypeId GetTypeId();
394 
395  protected:
396  // inherited from SatStatsThroughputHelper base class
397  void DoInstallProbes();
398 
399  private:
401  std::list<Ptr<Probe>> m_probes;
402 
403 }; // end of class SatStatsFwdFeederPhyThroughputHelper
404 
405 // FORWARD USER LINK PHY-LEVEL /////////////////////////////////////////////////////
406 
426 {
427  public:
428  // inherited from SatStatsHelper base class
429  SatStatsFwdUserPhyThroughputHelper(Ptr<const SatHelper> satHelper);
430 
435 
439  static TypeId GetTypeId();
440 
441  protected:
442  // inherited from SatStatsThroughputHelper base class
443  void DoInstallProbes();
444 
445  private:
447  std::list<Ptr<Probe>> m_probes;
448 
449 }; // end of class SatStatsFwdUserPhyThroughputHelper
450 
451 // RETURN LINK APPLICATION-LEVEL //////////////////////////////////////////////
452 
471 {
472  public:
473  // inherited from SatStatsHelper base class
474  SatStatsRtnAppThroughputHelper(Ptr<const SatHelper> satHelper);
475 
480 
484  static TypeId GetTypeId();
485 
492  void Ipv4Callback(Ptr<const Packet> packet, const Address& from);
493 
494  protected:
495  // inherited from SatStatsThroughputHelper base class
496  void DoInstallProbes();
497 
498  private:
507  void SaveIpv4AddressAndIdentifier(Ptr<Node> utUserNode);
508 
510 
511 }; // end of class SatStatsRtnAppThroughputHelper
512 
513 // RETURN FEEDER LINK DEVICE-LEVEL ///////////////////////////////////////////////////
514 
532 {
533  public:
534  // inherited from SatStatsHelper base class
535  SatStatsRtnFeederDevThroughputHelper(Ptr<const SatHelper> satHelper);
536 
541 
545  static TypeId GetTypeId();
546 
547  protected:
548  // inherited from SatStatsThroughputHelper base class
549  void DoInstallProbes();
550 
551 }; // end of class SatStatsRtnFeederDevThroughputHelper
552 
553 // RETURN USER LINK DEVICE-LEVEL ///////////////////////////////////////////////////
554 
572 {
573  public:
574  // inherited from SatStatsHelper base class
575  SatStatsRtnUserDevThroughputHelper(Ptr<const SatHelper> satHelper);
576 
581 
585  static TypeId GetTypeId();
586 
587  protected:
588  // inherited from SatStatsThroughputHelper base class
589  void DoInstallProbes();
590 
591 }; // end of class SatStatsRtnUserDevThroughputHelper
592 
593 // RETURN FEEDER LINK MAC-LEVEL //////////////////////////////////////////////////////
594 
614 {
615  public:
616  // inherited from SatStatsHelper base class
617  SatStatsRtnFeederMacThroughputHelper(Ptr<const SatHelper> satHelper);
618 
623 
627  static TypeId GetTypeId();
628 
629  protected:
630  // inherited from SatStatsThroughputHelper base class
631  void DoInstallProbes();
632 
633 }; // end of class SatStatsRtnFeederMacThroughputHelper
634 
635 // RETURN USER LINK MAC-LEVEL //////////////////////////////////////////////////////
636 
656 {
657  public:
658  // inherited from SatStatsHelper base class
659  SatStatsRtnUserMacThroughputHelper(Ptr<const SatHelper> satHelper);
660 
665 
669  static TypeId GetTypeId();
670 
671  protected:
672  // inherited from SatStatsThroughputHelper base class
673  void DoInstallProbes();
674 
675 }; // end of class SatStatsRtnUserMacThroughputHelper
676 
677 // RETURN FEEDER LINK PHY-LEVEL //////////////////////////////////////////////////////
678 
698 {
699  public:
700  // inherited from SatStatsHelper base class
701  SatStatsRtnFeederPhyThroughputHelper(Ptr<const SatHelper> satHelper);
702 
707 
711  static TypeId GetTypeId();
712 
713  protected:
714  // inherited from SatStatsThroughputHelper base class
715  void DoInstallProbes();
716 
717 }; // end of class SatStatsRtnFeederPhyThroughputHelper
718 
719 // RETURN USER LINK PHY-LEVEL //////////////////////////////////////////////////////
720 
740 {
741  public:
742  // inherited from SatStatsHelper base class
743  SatStatsRtnUserPhyThroughputHelper(Ptr<const SatHelper> satHelper);
744 
749 
753  static TypeId GetTypeId();
754 
755  protected:
756  // inherited from SatStatsThroughputHelper base class
757  void DoInstallProbes();
758 
759 }; // end of class SatStatsRtnUserPhyThroughputHelper
760 
761 } // end of namespace ns3
762 
763 #endif /* SATELLITE_STATS_THROUGHPUT_HELPER_H */
Produce forward link application-level throughput statistics from a satellite module simulation.
SatStatsFwdAppThroughputHelper(Ptr< const SatHelper > satHelper)
std::list< Ptr< Probe > > m_probes
Maintains a list of probes created by this helper.
static TypeId GetTypeId()
inherited from ObjectBase base class
Produce forward feeder link device-level throughput statistics from a satellite module simulation.
static TypeId GetTypeId()
inherited from ObjectBase base class
std::list< Ptr< Probe > > m_probes
Maintains a list of probes created by this helper.
SatStatsFwdFeederDevThroughputHelper(Ptr< const SatHelper > satHelper)
Produce forward feeder link MAC-level throughput statistics from a satellite module simulation.
SatStatsFwdFeederMacThroughputHelper(Ptr< const SatHelper > satHelper)
static TypeId GetTypeId()
inherited from ObjectBase base class
std::list< Ptr< Probe > > m_probes
Maintains a list of probes created by this helper.
Produce forward feeder link PHY-level throughput statistics from a satellite module simulation.
SatStatsFwdFeederPhyThroughputHelper(Ptr< const SatHelper > satHelper)
static TypeId GetTypeId()
inherited from ObjectBase base class
std::list< Ptr< Probe > > m_probes
Maintains a list of probes created by this helper.
Produce forward user link device-level throughput statistics from a satellite module simulation.
std::list< Ptr< Probe > > m_probes
Maintains a list of probes created by this helper.
SatStatsFwdUserDevThroughputHelper(Ptr< const SatHelper > satHelper)
static TypeId GetTypeId()
inherited from ObjectBase base class
Produce forward user link MAC-level throughput statistics from a satellite module simulation.
SatStatsFwdUserMacThroughputHelper(Ptr< const SatHelper > satHelper)
std::list< Ptr< Probe > > m_probes
Maintains a list of probes created by this helper.
static TypeId GetTypeId()
inherited from ObjectBase base class
Produce forward user link PHY-level throughput statistics from a satellite module simulation.
SatStatsFwdUserPhyThroughputHelper(Ptr< const SatHelper > satHelper)
static TypeId GetTypeId()
inherited from ObjectBase base class
std::list< Ptr< Probe > > m_probes
Maintains a list of probes created by this helper.
Parent abstract class of all satellite statistics helpers.
Produce return link application-level throughput statistics from a satellite module simulation.
void Ipv4Callback(Ptr< const Packet > packet, const Address &from)
Receive inputs from trace sources and determine the right collector to forward the inputs to.
SatStatsRtnAppThroughputHelper(Ptr< const SatHelper > satHelper)
static TypeId GetTypeId()
inherited from ObjectBase base class
void SaveIpv4AddressAndIdentifier(Ptr< Node > utUserNode)
Save the IPv4 address and the proper identifier from the given UT user node.
Produce return feeder link device-level throughput statistics from a satellite module simulation.
SatStatsRtnFeederDevThroughputHelper(Ptr< const SatHelper > satHelper)
static TypeId GetTypeId()
inherited from ObjectBase base class
Produce return feeder link MAC-level throughput statistics from a satellite module simulation.
SatStatsRtnFeederMacThroughputHelper(Ptr< const SatHelper > satHelper)
static TypeId GetTypeId()
inherited from ObjectBase base class
Produce return feeder link PHY-level throughput statistics from a satellite module simulation.
static TypeId GetTypeId()
inherited from ObjectBase base class
SatStatsRtnFeederPhyThroughputHelper(Ptr< const SatHelper > satHelper)
Produce return user link device-level throughput statistics from a satellite module simulation.
static TypeId GetTypeId()
inherited from ObjectBase base class
SatStatsRtnUserDevThroughputHelper(Ptr< const SatHelper > satHelper)
Produce return user link MAC-level throughput statistics from a satellite module simulation.
SatStatsRtnUserMacThroughputHelper(Ptr< const SatHelper > satHelper)
static TypeId GetTypeId()
inherited from ObjectBase base class
Produce return user link PHY-level throughput statistics from a satellite module simulation.
static TypeId GetTypeId()
inherited from ObjectBase base class
SatStatsRtnUserPhyThroughputHelper(Ptr< const SatHelper > satHelper)
CollectorMap m_conversionCollectors
Maintains a list of first-level collectors created by this helper.
void InstallProbes()
Set up several probes or other means of listeners and connect them to the first-level collectors.
Ptr< DistributionCollector > m_averagingCollector
The final collector utilized in averaged output (histogram, PDF, and CDF).
void RxCallback(Ptr< const Packet > packet, const Address &from)
Receive inputs from trace sources and determine the right collector to forward the inputs to.
Ptr< DataCollectionObject > m_aggregator
The aggregator created by this helper.
static TypeId GetTypeId()
inherited from ObjectBase base class
virtual void DoInstallProbes()=0
CollectorMap m_terminalCollectors
Maintains a list of second-level collectors created by this helper.
SatStatsThroughputHelper(Ptr< const SatHelper > satHelper)
std::map< const Address, uint32_t > m_identifierMap
Map of address and the identifier associated with it (for return link).
void DoInstall()
Install the probes, collectors, and aggregators necessary to produce the statistics output.
void SaveAddressAndIdentifier(Ptr< Node > utNode)
Save the address and the proper identifier from the given UT node.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.