satellite-stats-link-sinr-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_LINK_SINR_HELPER_H
23 #define SATELLITE_STATS_LINK_SINR_HELPER_H
24 
25 #include <ns3/callback.h>
26 #include <ns3/collector-map.h>
27 #include <ns3/ptr.h>
28 #include <ns3/satellite-stats-helper.h>
29 
30 namespace ns3
31 {
32 
33 // BASE CLASS /////////////////////////////////////////////////////////////////
34 
35 class SatHelper;
36 class Node;
37 class DataCollectionObject;
38 class DistributionCollector;
39 
45 {
46  public:
47  // inherited from SatStatsHelper base class
48  SatStatsLinkSinrHelper(Ptr<const SatHelper> satHelper);
49 
53  virtual ~SatStatsLinkSinrHelper();
54 
58  static TypeId GetTypeId();
59 
63  void SetAveragingMode(bool averagingMode);
64 
69  void InstallProbes();
70 
76  void SinrCallback(double sinrDb, const Address& addr);
77 
81  Callback<void, double, const Address&> GetTraceSinkCallback() const;
82 
83  protected:
84  // inherited from SatStatsHelper base class
85  void DoInstall();
86 
90  virtual void DoInstallProbes() = 0;
91 
102  void SaveAddressAndIdentifier(Ptr<Node> utNode);
103 
109  bool ConnectProbeToCollector(Ptr<Probe> probe, uint32_t identifier);
110 
117  void PassSampleToCollector(double sinrDb, uint32_t identifier);
118 
120  CollectorMap m_terminalCollectors;
121 
123  Ptr<DataCollectionObject> m_collector;
124 
126  Ptr<DataCollectionObject> m_aggregator;
127 
129  Ptr<DistributionCollector> m_averagingCollector;
130 
132  std::map<const Address, uint32_t> m_identifierMap;
133 
134  private:
136  Callback<void, double, const Address&> m_traceSinkCallback;
137 
139 
140 }; // end of class SatStatsLinkSinrHelper
141 
142 // FORWARD FEEDER LINK ////////////////////////////////////////////////////////
143 
161 {
162  public:
163  // inherited from SatStatsHelper base class
164  SatStatsFwdFeederLinkSinrHelper(Ptr<const SatHelper> satHelper);
165 
170 
174  static TypeId GetTypeId();
175 
176  protected:
177  // inherited from SatStatsLinkSinrHelper base class
178  void DoInstallProbes();
179 
180 }; // end of class SatStatsFwdFeederLinkSinrHelper
181 
182 // FORWARD USER LINK //////////////////////////////////////////////////////////
183 
201 {
202  public:
203  // inherited from SatStatsHelper base class
204  SatStatsFwdUserLinkSinrHelper(Ptr<const SatHelper> satHelper);
205 
210 
214  static TypeId GetTypeId();
215 
216  protected:
217  // inherited from SatStatsLinkSinrHelper base class
218  void DoInstallProbes();
219 
220 }; // end of class SatStatsFwdUserLinkSinrHelper
221 
222 // RETURN FEEDER LINK /////////////////////////////////////////////////////////
223 
241 {
242  public:
243  // inherited from SatStatsHelper base class
244  SatStatsRtnFeederLinkSinrHelper(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 SatStatsRtnFeederLinkSinrHelper
261 
262 // RETURN USER LINK ///////////////////////////////////////////////////////////
263 
281 {
282  public:
283  // inherited from SatStatsHelper base class
284  SatStatsRtnUserLinkSinrHelper(Ptr<const SatHelper> satHelper);
285 
290 
294  static TypeId GetTypeId();
295 
296  protected:
297  // inherited from SatStatsLinkSinrHelper base class
298  void DoInstallProbes();
299 
300 }; // end of class SatStatsRtnUserLinkSinrHelper
301 
302 } // end of namespace ns3
303 
304 #endif /* SATELLITE_STATS_LINK_SINR_HELPER_H */
Parent abstract class of all satellite statistics helpers.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.