satellite-stats-window-load-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_WINDOW_LOAD_HELPER_H
23 #define SATELLITE_STATS_WINDOW_LOAD_HELPER_H
24 
25 #include <ns3/callback.h>
26 #include <ns3/ptr.h>
27 #include <ns3/satellite-stats-helper.h>
28 
29 namespace ns3
30 {
31 
32 // BASE CLASS /////////////////////////////////////////////////////////////////
33 
34 class SatHelper;
35 class Node;
36 class DataCollectionObject;
37 
43 {
44  public:
45  // inherited from SatStatsHelper base class
46  SatStatsWindowLoadHelper(Ptr<const SatHelper> satHelper);
47 
51  virtual ~SatStatsWindowLoadHelper();
52 
56  static TypeId GetTypeId();
57 
62  void InstallProbes();
63 
68  void WindowLoadCallback(double windowLoad);
69 
73  Callback<void, double> GetTraceSinkCallback() const;
74 
75  protected:
76  // inherited from SatStatsHelper base class
77  void DoInstall();
78 
82  virtual void DoInstallProbes() = 0;
83 
85  Ptr<DataCollectionObject> m_collector;
86 
88  Ptr<DataCollectionObject> m_aggregator;
89 
90  private:
92  Callback<void, double> m_traceSinkCallback;
93 
94 }; // end of class SatStatsWindowLoadHelper
95 
96 // RETURN FEEDER LINK /////////////////////////////////////////////////////////
97 
115 {
116  public:
117  // inherited from SatStatsHelper base class
118  SatStatsRtnFeederWindowLoadHelper(Ptr<const SatHelper> satHelper);
119 
124 
128  static TypeId GetTypeId();
129 
130  protected:
131  // inherited from SatStatsWindowLoadHelper base class
132  void DoInstallProbes();
133 
134 }; // end of class SatStatsRtnFeederWindowLoadHelper
135 
136 } // end of namespace ns3
137 
138 #endif /* SATELLITE_STATS_WINDOW_LOAD_HELPER_H */
Parent abstract class of all satellite statistics helpers.
Produce return feeder window load statistics from a satellite module simulation.
SatStatsRtnFeederWindowLoadHelper(Ptr< const SatHelper > satHelper)
static TypeId GetTypeId()
inherited from ObjectBase base class
Abstract class inherited by SatStatsRtnFeederWindowLoadHelper.
void WindowLoadCallback(double windowLoad)
Receive inputs from trace sources and forward them to the collector.
Ptr< DataCollectionObject > m_aggregator
The aggregator created by this helper.
void InstallProbes()
Set up several probes or other means of listeners and connect them to the collectors.
void DoInstall()
Install the probes, collectors, and aggregators necessary to produce the statistics output.
Callback< void, double > GetTraceSinkCallback() const
virtual void DoInstallProbes()=0
SatStatsWindowLoadHelper(Ptr< const SatHelper > satHelper)
Ptr< DataCollectionObject > m_collector
The collector created by this helper.
static TypeId GetTypeId()
inherited from ObjectBase base class
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.