satellite-stats-satellite-queue-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: Bastien Tauran <bastien.tauran@viveris.fr>
19  *
20  */
21 
22 #ifndef SATELLITE_STATS_SAT_QUEUE_HELPER_H
23 #define SATELLITE_STATS_SAT_QUEUE_HELPER_H
24 
25 #include "satellite-stats-helper.h"
26 
27 #include <ns3/callback.h>
28 #include <ns3/collector-map.h>
29 #include <ns3/ptr.h>
30 
31 #include <string>
32 
33 namespace ns3
34 {
35 
36 // BASE CLASS /////////////////////////////////////////////////////////////////
37 
38 class SatHelper;
39 class Node;
40 class DataCollectionObject;
41 class DistributionCollector;
42 
48 {
49  public:
54  typedef enum
55  {
58  } UnitType_t;
59 
64  static std::string GetUnitTypeName(UnitType_t unitType);
65 
66  // inherited from SatStatsHelper base class
67  SatStatsSatelliteQueueHelper(Ptr<const SatHelper> satHelper);
68 
73 
77  static TypeId GetTypeId();
78 
82  void SetUnitType(UnitType_t unitType);
83 
87  void SetAveragingMode(bool averagingMode);
88 
93  void InstallProbes();
94 
100  void QueueSizeCallback(uint32_t size, const Address& addr);
101 
102  protected:
103  // inherited from SatStatsHelper base class
104  void DoInstall();
105 
109  virtual void DoInstallProbes() = 0;
110 
116  bool ConnectProbeToCollector(Ptr<Probe> probe, uint32_t identifier);
117 
124  void PassSampleToCollector(uint32_t size, uint32_t identifier);
125 
127  CollectorMap m_terminalCollectors;
128 
130  Ptr<DataCollectionObject> m_collector;
131 
133  Ptr<DataCollectionObject> m_aggregator;
134 
136  Ptr<DistributionCollector> m_averagingCollector;
137 
138  private:
141  std::string m_shortLabel;
142  std::string m_longLabel;
143 
144 }; // end of class SatStatsLinkSinrHelper
145 
146 // RTN FEEDER QUEUE IN PACKETS ////////////////////////////////////////////////////////
147 
163 {
164  public:
165  // inherited from SatStatsHelper base class
166  SatStatsRtnFeederQueuePacketsHelper(Ptr<const SatHelper> satHelper);
167 
172 
176  static TypeId GetTypeId();
177 
178  protected:
179  // inherited from SatStatsLinkSinrHelper base class
180  void DoInstallProbes();
181 
182 }; // end of class SatStatsRtnFeederQueuePacketsHelper
183 
184 // RTN FEEDER QUEUE IN BYTES ////////////////////////////////////////////////////////
185 
202 {
203  public:
204  // inherited from SatStatsHelper base class
205  SatStatsRtnFeederQueueBytesHelper(Ptr<const SatHelper> satHelper);
206 
211 
215  static TypeId GetTypeId();
216 
217  protected:
218  // inherited from SatStatsLinkSinrHelper base class
219  void DoInstallProbes();
220 
221 }; // end of class SatStatsRtnFeederQueueBytesHelper
222 
223 // FWD USER QUEUE IN PACKETS ////////////////////////////////////////////////////////
224 
241 {
242  public:
243  // inherited from SatStatsHelper base class
244  SatStatsFwdUserQueuePacketsHelper(Ptr<const SatHelper> satHelper);
245 
250 
254  static TypeId GetTypeId();
255 
256  protected:
257  // inherited from SatStatsLinkSinrHelper base class
258  void DoInstallProbes();
259 
260 }; // end of class SatStatsFwdUserQueuePacketsHelper
261 
262 // FWD USER QUEUE IN BYTES ////////////////////////////////////////////////////////
263 
280 {
281  public:
282  // inherited from SatStatsHelper base class
283  SatStatsFwdUserQueueBytesHelper(Ptr<const SatHelper> satHelper);
284 
289 
293  static TypeId GetTypeId();
294 
295  protected:
296  // inherited from SatStatsLinkSinrHelper base class
297  void DoInstallProbes();
298 
299 }; // end of class SatStatsFwdUserQueueBytesHelper
300 
301 } // end of namespace ns3
302 
303 #endif /* SATELLITE_STATS_SAT_QUEUE_HELPER_H */
Produce queue size statistics in packets for return feeder link.
static TypeId GetTypeId()
inherited from ObjectBase base class
SatStatsFwdUserQueueBytesHelper(Ptr< const SatHelper > satHelper)
Produce queue size statistics in packets for return feeder link.
SatStatsFwdUserQueuePacketsHelper(Ptr< const SatHelper > satHelper)
static TypeId GetTypeId()
inherited from ObjectBase base class
Parent abstract class of all satellite statistics helpers.
Produce queue size statistics in packets for return feeder link.
static TypeId GetTypeId()
inherited from ObjectBase base class
SatStatsRtnFeederQueueBytesHelper(Ptr< const SatHelper > satHelper)
Produce queue size statistics in packets for return feeder link.
static TypeId GetTypeId()
inherited from ObjectBase base class
Base class for sat queue statistics helpers.
SatStatsSatelliteQueueHelper(Ptr< const SatHelper > satHelper)
void DoInstall()
Install the probes, collectors, and aggregators necessary to produce the statistics output.
bool ConnectProbeToCollector(Ptr< Probe > probe, uint32_t identifier)
Connect the probe to the right collector.
Ptr< DataCollectionObject > m_collector
The collector created by this helper.
Ptr< DistributionCollector > m_averagingCollector
The final collector utilized in averaged output (histogram, PDF, and CDF).
void InstallProbes()
Set up several probes or other means of listeners and connect them to the collectors.
static TypeId GetTypeId()
inherited from ObjectBase base class
void QueueSizeCallback(uint32_t size, const Address &addr)
Receive inputs from trace sources and forward them to the collector.
CollectorMap m_terminalCollectors
Maintains a list of collectors created by this helper.
static std::string GetUnitTypeName(UnitType_t unitType)
void PassSampleToCollector(uint32_t size, uint32_t identifier)
Find a collector with the right identifier and pass a sample data to it.
Ptr< DataCollectionObject > m_aggregator
The aggregator created by this helper.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.