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 "satellite-stats-helper.h"
26 
27 #include <ns3/address.h>
28 #include <ns3/collector-map.h>
29 #include <ns3/ptr.h>
30 
31 #include <list>
32 #include <map>
33 #include <utility>
34 
35 namespace ns3
36 {
37 
38 // BASE CLASS /////////////////////////////////////////////////////////////////
39 
40 class SatHelper;
41 class Node;
42 class Packet;
43 class DataCollectionObject;
44 class DistributionCollector;
45 
51 {
52  public:
53  // inherited from SatStatsHelper base class
54  SatStatsThroughputHelper(Ptr<const SatHelper> satHelper);
55 
59  virtual ~SatStatsThroughputHelper();
60 
64  static TypeId GetTypeId();
65 
69  void SetAveragingMode(bool averagingMode);
70 
74  bool GetAveragingMode() const;
75 
80  void InstallProbes();
81 
91  void RxCallback(Ptr<const Packet> packet, const Address& from);
92 
93  protected:
94  // inherited from SatStatsHelper base class
95  void DoInstall();
96 
100  virtual void DoInstallProbes() = 0;
101 
104 
106  CollectorMap m_terminalCollectors;
107 
109  Ptr<DistributionCollector> m_averagingCollector;
110 
112  Ptr<DataCollectionObject> m_aggregator;
113 
114  private:
116 
117 }; // end of class SatStatsThroughputHelper
118 
119 // FORWARD LINK APPLICATION-LEVEL /////////////////////////////////////////////
120 
121 class Probe;
122 
141 {
142  public:
143  // inherited from SatStatsHelper base class
144  SatStatsFwdAppThroughputHelper(Ptr<const SatHelper> satHelper);
145 
150 
154  static TypeId GetTypeId();
155 
159  virtual void UpdateIdentifierOnProbes();
160 
161  protected:
162  // inherited from SatStatsThroughputHelper base class
163  void DoInstallProbes();
164 
165  private:
167  std::map<Ptr<Probe>, std::pair<Ptr<Node>, uint32_t>> m_probes;
168 
169 }; // end of class SatStatsFwdAppThroughputHelper
170 
171 // FORWARD FEEDER LINK DEVICE-LEVEL //////////////////////////////////////////////////
172 
190 {
191  public:
192  // inherited from SatStatsHelper base class
193  SatStatsFwdFeederDevThroughputHelper(Ptr<const SatHelper> satHelper);
194 
199 
203  static TypeId GetTypeId();
204 
205  protected:
206  // inherited from SatStatsThroughputHelper base class
207  void DoInstallProbes();
208 
209 }; // end of class SatStatsFwdFeederDevThroughputHelper
210 
211 // FORWARD USER LINK DEVICE-LEVEL //////////////////////////////////////////////////
212 
230 {
231  public:
232  // inherited from SatStatsHelper base class
233  SatStatsFwdUserDevThroughputHelper(Ptr<const SatHelper> satHelper);
234 
239 
243  static TypeId GetTypeId();
244 
248  virtual void UpdateIdentifierOnProbes();
249 
250  protected:
251  // inherited from SatStatsThroughputHelper base class
252  void DoInstallProbes();
253 
254  private:
256  std::map<Ptr<Probe>, std::pair<Ptr<Node>, uint32_t>> m_probes;
257 
258 }; // end of class SatStatsFwdUserDevThroughputHelper
259 
260 // FORWARD FEEDER LINK MAC-LEVEL /////////////////////////////////////////////////////
261 
281 {
282  public:
283  // inherited from SatStatsHelper base class
284  SatStatsFwdFeederMacThroughputHelper(Ptr<const SatHelper> satHelper);
285 
290 
294  static TypeId GetTypeId();
295 
296  protected:
297  // inherited from SatStatsThroughputHelper base class
298  void DoInstallProbes();
299 
300 }; // end of class SatStatsFwdFeederMacThroughputHelper
301 
302 // FORWARD USER LINK MAC-LEVEL /////////////////////////////////////////////////////
303 
323 {
324  public:
325  // inherited from SatStatsHelper base class
326  SatStatsFwdUserMacThroughputHelper(Ptr<const SatHelper> satHelper);
327 
332 
336  static TypeId GetTypeId();
337 
341  virtual void UpdateIdentifierOnProbes();
342 
343  protected:
344  // inherited from SatStatsThroughputHelper base class
345  void DoInstallProbes();
346 
347  private:
349  std::map<Ptr<Probe>, std::pair<Ptr<Node>, uint32_t>> m_probes;
350 
351 }; // end of class SatStatsFwdUserMacThroughputHelper
352 
353 // FORWARD FEEDER LINK PHY-LEVEL /////////////////////////////////////////////////////
354 
374 {
375  public:
376  // inherited from SatStatsHelper base class
377  SatStatsFwdFeederPhyThroughputHelper(Ptr<const SatHelper> satHelper);
378 
383 
387  static TypeId GetTypeId();
388 
389  protected:
390  // inherited from SatStatsThroughputHelper base class
391  void DoInstallProbes();
392 
393 }; // end of class SatStatsFwdFeederPhyThroughputHelper
394 
395 // FORWARD USER LINK PHY-LEVEL /////////////////////////////////////////////////////
396 
416 {
417  public:
418  // inherited from SatStatsHelper base class
419  SatStatsFwdUserPhyThroughputHelper(Ptr<const SatHelper> satHelper);
420 
425 
429  static TypeId GetTypeId();
430 
434  virtual void UpdateIdentifierOnProbes();
435 
436  protected:
437  // inherited from SatStatsThroughputHelper base class
438  void DoInstallProbes();
439 
440  private:
442  std::map<Ptr<Probe>, std::pair<Ptr<Node>, uint32_t>> m_probes;
443 
444 }; // end of class SatStatsFwdUserPhyThroughputHelper
445 
446 // RETURN LINK APPLICATION-LEVEL //////////////////////////////////////////////
447 
466 {
467  public:
468  // inherited from SatStatsHelper base class
469  SatStatsRtnAppThroughputHelper(Ptr<const SatHelper> satHelper);
470 
475 
479  static TypeId GetTypeId();
480 
487  void Ipv4Callback(Ptr<const Packet> packet, const Address& from);
488 
489  protected:
490  // inherited from SatStatsThroughputHelper base class
491  void DoInstallProbes();
492 
493  private:
502  void SaveIpv4AddressAndIdentifier(Ptr<Node> utUserNode);
503 
505 
506 }; // end of class SatStatsRtnAppThroughputHelper
507 
508 // RETURN FEEDER LINK DEVICE-LEVEL ///////////////////////////////////////////////////
509 
527 {
528  public:
529  // inherited from SatStatsHelper base class
530  SatStatsRtnFeederDevThroughputHelper(Ptr<const SatHelper> satHelper);
531 
536 
540  static TypeId GetTypeId();
541 
542  protected:
543  // inherited from SatStatsThroughputHelper base class
544  void DoInstallProbes();
545 
546 }; // end of class SatStatsRtnFeederDevThroughputHelper
547 
548 // RETURN USER LINK DEVICE-LEVEL ///////////////////////////////////////////////////
549 
567 {
568  public:
569  // inherited from SatStatsHelper base class
570  SatStatsRtnUserDevThroughputHelper(Ptr<const SatHelper> satHelper);
571 
576 
580  static TypeId GetTypeId();
581 
582  protected:
583  // inherited from SatStatsThroughputHelper base class
584  void DoInstallProbes();
585 
586 }; // end of class SatStatsRtnUserDevThroughputHelper
587 
588 // RETURN FEEDER LINK MAC-LEVEL //////////////////////////////////////////////////////
589 
609 {
610  public:
611  // inherited from SatStatsHelper base class
612  SatStatsRtnFeederMacThroughputHelper(Ptr<const SatHelper> satHelper);
613 
618 
622  static TypeId GetTypeId();
623 
624  protected:
625  // inherited from SatStatsThroughputHelper base class
626  void DoInstallProbes();
627 
628 }; // end of class SatStatsRtnFeederMacThroughputHelper
629 
630 // RETURN USER LINK MAC-LEVEL //////////////////////////////////////////////////////
631 
651 {
652  public:
653  // inherited from SatStatsHelper base class
654  SatStatsRtnUserMacThroughputHelper(Ptr<const SatHelper> satHelper);
655 
660 
664  static TypeId GetTypeId();
665 
666  protected:
667  // inherited from SatStatsThroughputHelper base class
668  void DoInstallProbes();
669 
670 }; // end of class SatStatsRtnUserMacThroughputHelper
671 
672 // RETURN FEEDER LINK PHY-LEVEL //////////////////////////////////////////////////////
673 
693 {
694  public:
695  // inherited from SatStatsHelper base class
696  SatStatsRtnFeederPhyThroughputHelper(Ptr<const SatHelper> satHelper);
697 
702 
706  static TypeId GetTypeId();
707 
708  protected:
709  // inherited from SatStatsThroughputHelper base class
710  void DoInstallProbes();
711 
712 }; // end of class SatStatsRtnFeederPhyThroughputHelper
713 
714 // RETURN USER LINK PHY-LEVEL //////////////////////////////////////////////////////
715 
735 {
736  public:
737  // inherited from SatStatsHelper base class
738  SatStatsRtnUserPhyThroughputHelper(Ptr<const SatHelper> satHelper);
739 
744 
748  static TypeId GetTypeId();
749 
750  protected:
751  // inherited from SatStatsThroughputHelper base class
752  void DoInstallProbes();
753 
754 }; // end of class SatStatsRtnUserPhyThroughputHelper
755 
756 } // end of namespace ns3
757 
758 #endif /* SATELLITE_STATS_THROUGHPUT_HELPER_H */
Produce forward link application-level throughput statistics from a satellite module simulation.
std::map< Ptr< Probe >, std::pair< Ptr< Node >, uint32_t > > m_probes
Maintains a list of probes created by this helper.
SatStatsFwdAppThroughputHelper(Ptr< const SatHelper > satHelper)
static TypeId GetTypeId()
inherited from ObjectBase base class
virtual void UpdateIdentifierOnProbes()
Change identifier used on probes, when handovers occur.
Produce forward feeder link device-level throughput statistics from a satellite module simulation.
static TypeId GetTypeId()
inherited from ObjectBase base class
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
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
Produce forward user link device-level throughput statistics from a satellite module simulation.
SatStatsFwdUserDevThroughputHelper(Ptr< const SatHelper > satHelper)
std::map< Ptr< Probe >, std::pair< Ptr< Node >, uint32_t > > m_probes
Maintains a list of probes created by this helper.
virtual void UpdateIdentifierOnProbes()
Change identifier used on probes, when handovers occur.
static TypeId GetTypeId()
inherited from ObjectBase base class
Produce forward user link MAC-level throughput statistics from a satellite module simulation.
std::map< Ptr< Probe >, std::pair< Ptr< Node >, uint32_t > > m_probes
Maintains a list of probes created by this helper.
virtual void UpdateIdentifierOnProbes()
Change identifier used on probes, when handovers occur.
SatStatsFwdUserMacThroughputHelper(Ptr< const SatHelper > satHelper)
static TypeId GetTypeId()
inherited from ObjectBase base class
Produce forward user link PHY-level throughput statistics from a satellite module simulation.
virtual void UpdateIdentifierOnProbes()
Change identifier used on probes, when handovers occur.
SatStatsFwdUserPhyThroughputHelper(Ptr< const SatHelper > satHelper)
static TypeId GetTypeId()
inherited from ObjectBase base class
std::map< Ptr< Probe >, std::pair< Ptr< Node >, uint32_t > > 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)
void DoInstall()
Install the probes, collectors, and aggregators necessary to produce the statistics output.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.