satellite-stats-link-rx-power-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_RX_POWER_HELPER_H
23 #define SATELLITE_STATS_LINK_RX_POWER_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  SatStatsLinkRxPowerHelper(Ptr<const SatHelper> satHelper);
49 
54 
58  static TypeId GetTypeId();
59 
63  void SetAveragingMode(bool averagingMode);
64 
69  void InstallProbes();
70 
76  void RxPowerCallback(double rxPowerDb, 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 rxPowerDb, 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 SatStatsLinkRxPowerHelper
141 
142 // FORWARD FEEDER LINK ////////////////////////////////////////////////////////
143 
160 {
161  public:
162  // inherited from SatStatsHelper base class
163  SatStatsFwdFeederLinkRxPowerHelper(Ptr<const SatHelper> satHelper);
164 
169 
173  static TypeId GetTypeId();
174 
175  protected:
176  // inherited from SatStatsLinkRxPowerHelper base class
177  void DoInstallProbes();
178 
179 }; // end of class SatStatsFwdFeederLinkRxPowerHelper
180 
181 // FORWARD USER LINK //////////////////////////////////////////////////////////
182 
200 {
201  public:
202  // inherited from SatStatsHelper base class
203  SatStatsFwdUserLinkRxPowerHelper(Ptr<const SatHelper> satHelper);
204 
209 
213  static TypeId GetTypeId();
214 
215  protected:
216  // inherited from SatStatsLinkRxPowerHelper base class
217  void DoInstallProbes();
218 
219 }; // end of class SatStatsFwdUserLinkRxPowerHelper
220 
221 // RETURN FEEDER LINK /////////////////////////////////////////////////////////
222 
239 {
240  public:
241  // inherited from SatStatsHelper base class
242  SatStatsRtnFeederLinkRxPowerHelper(Ptr<const SatHelper> satHelper);
243 
248 
252  static TypeId GetTypeId();
253 
254  protected:
255  // inherited from SatStatsLinkRxPowerHelper base class
256  void DoInstallProbes();
257 
258 }; // end of class SatStatsRtnFeederLinkRxPowerHelper
259 
260 // RETURN USER LINK ///////////////////////////////////////////////////////////
261 
279 {
280  public:
281  // inherited from SatStatsHelper base class
282  SatStatsRtnUserLinkRxPowerHelper(Ptr<const SatHelper> satHelper);
283 
288 
292  static TypeId GetTypeId();
293 
294  protected:
295  // inherited from SatStatsLinkRxPowerHelper base class
296  void DoInstallProbes();
297 
298 }; // end of class SatStatsRtnUserLinkRxPowerHelper
299 
300 } // end of namespace ns3
301 
302 #endif /* SATELLITE_STATS_LINK_RX_POWER_HELPER_H */
Parent abstract class of all satellite statistics helpers.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.