satellite-stats-link-modcod-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_MODCOD_HELPER_H
23 #define SATELLITE_STATS_LINK_MODCOD_HELPER_H
24 
25 #include <ns3/address.h>
26 #include <ns3/collector-map.h>
27 #include <ns3/ptr.h>
28 #include <ns3/satellite-stats-helper.h>
29 
30 #include <list>
31 #include <map>
32 
33 namespace ns3
34 {
35 
36 // BASE CLASS /////////////////////////////////////////////////////////////////
37 
38 class SatHelper;
39 class Node;
40 class Time;
41 class DataCollectionObject;
42 class DistributionCollector;
43 
49 {
50  public:
51  // inherited from SatStatsHelper base class
52  SatStatsLinkModcodHelper(Ptr<const SatHelper> satHelper);
53 
57  virtual ~SatStatsLinkModcodHelper();
58 
62  static TypeId GetTypeId();
63 
67  void SetAveragingMode(bool averagingMode);
68 
72  bool GetAveragingMode() const;
73 
78  void InstallProbes();
79 
89  void RxLinkModcodCallback(uint32_t modcod, const Address& from);
90 
91  protected:
92  // inherited from SatStatsHelper base class
93  void DoInstall();
94 
98  virtual void DoInstallProbes() = 0;
99 
110  void SaveAddressAndIdentifier(Ptr<Node> utNode);
111 
117  bool ConnectProbeToCollector(Ptr<Probe> probe, uint32_t identifier);
118 
125  void PassSampleToCollector(uint32_t modcod, uint32_t identifier);
126 
128  CollectorMap m_terminalCollectors;
129 
131  Ptr<DistributionCollector> m_averagingCollector;
132 
134  Ptr<DataCollectionObject> m_aggregator;
135 
137  std::map<const Address, uint32_t> m_identifierMap;
138 
139  private:
141 
142 }; // end of class SatStatsLinkModcodHelper
143 
144 // FORWARD FEEDER LINK /////////////////////////////////////////////////////
145 
164 {
165  public:
166  // inherited from SatStatsHelper base class
167  SatStatsFwdFeederLinkModcodHelper(Ptr<const SatHelper> satHelper);
168 
173 
177  static TypeId GetTypeId();
178 
179  protected:
180  // inherited from SatStatsLinkModcodHelper base class
181  void DoInstallProbes();
182 
183  private:
185  std::list<Ptr<Probe>> m_probes;
186 
187 }; // end of class SatStatsFwdFeederLinkModcodHelper
188 
189 // FORWARD USER LINK /////////////////////////////////////////////////////
190 
209 {
210  public:
211  // inherited from SatStatsHelper base class
212  SatStatsFwdUserLinkModcodHelper(Ptr<const SatHelper> satHelper);
213 
218 
222  static TypeId GetTypeId();
223 
224  protected:
225  // inherited from SatStatsLinkModcodHelper base class
226  void DoInstallProbes();
227 
228  private:
230  std::list<Ptr<Probe>> m_probes;
231 
232 }; // end of class SatStatsFwdUserLinkModcodHelper
233 
234 // RETURN FEEDER LINK //////////////////////////////////////////////
235 
254 {
255  public:
256  // inherited from SatStatsHelper base class
257  SatStatsRtnFeederLinkModcodHelper(Ptr<const SatHelper> satHelper);
258 
263 
267  static TypeId GetTypeId();
268 
269  protected:
270  // inherited from SatStatsLinkModcodHelper base class
271  void DoInstallProbes();
272 
273 }; // end of class SatStatsRtnFeederLinkModcodHelper
274 
275 // RETURN USER LINK //////////////////////////////////////////////
276 
295 {
296  public:
297  // inherited from SatStatsHelper base class
298  SatStatsRtnUserLinkModcodHelper(Ptr<const SatHelper> satHelper);
299 
304 
308  static TypeId GetTypeId();
309 
310  protected:
311  // inherited from SatStatsLinkModcodHelper base class
312  void DoInstallProbes();
313 
314  private:
316  std::list<Ptr<Probe>> m_probes;
317 
318 }; // end of class SatStatsRtnUserLinkModcodHelper
319 
320 } // end of namespace ns3
321 
322 #endif /* SATELLITE_STATS_LINK_MODCOD_HELPER_H */
Parent abstract class of all satellite statistics helpers.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.