satellite-stats-link-delay-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_DELAY_HELPER_H
23 #define SATELLITE_STATS_LINK_DELAY_HELPER_H
24 
25 #include "satellite-stats-helper.h"
26 
27 #include <ns3/address.h>
28 #include <ns3/collector-map.h>
29 #include <ns3/ptr.h>
30 
31 #include <list>
32 #include <map>
33 #include <utility>
34 
35 namespace ns3
36 {
37 
38 // BASE CLASS /////////////////////////////////////////////////////////////////
39 
40 class SatHelper;
41 class Node;
42 class Time;
43 class DataCollectionObject;
44 class DistributionCollector;
45 
51 {
52  public:
53  // inherited from SatStatsHelper base class
54  SatStatsLinkDelayHelper(Ptr<const SatHelper> satHelper);
55 
59  virtual ~SatStatsLinkDelayHelper();
60 
64  static TypeId GetTypeId();
65 
69  void SetAveragingMode(bool averagingMode);
70 
74  bool GetAveragingMode() const;
75 
80  void InstallProbes();
81 
91  void RxLinkDelayCallback(const Time& delay, const Address& from);
92 
93  protected:
94  // inherited from SatStatsHelper base class
95  void DoInstall();
96 
100  virtual void DoInstallProbes() = 0;
101 
107  bool ConnectProbeToCollector(Ptr<Probe> probe, uint32_t identifier);
108 
114  bool DisconnectProbeFromCollector(Ptr<Probe> probe, uint32_t identifier);
115 
122  void PassSampleToCollector(const Time& delay, uint32_t identifier);
123 
125  CollectorMap m_terminalCollectors;
126 
128  Ptr<DistributionCollector> m_averagingCollector;
129 
131  Ptr<DataCollectionObject> m_aggregator;
132 
134  std::map<const Address, uint32_t> m_identifierMap;
135 
136  private:
138 
139 }; // end of class SatStatsLinkDelayHelper
140 
141 // FORWARD FEEDER LINK DEV-LEVEL /////////////////////////////////////////////////////
142 
160 {
161  public:
162  // inherited from SatStatsHelper base class
163  SatStatsFwdFeederDevLinkDelayHelper(Ptr<const SatHelper> satHelper);
164 
169 
173  static TypeId GetTypeId();
174 
175  protected:
176  // inherited from SatStatsLinkDelayHelper base class
177  void DoInstallProbes();
178 
179 }; // end of class SatStatsFwdFeederDevLinkDelayHelper
180 
181 // FORWARD USER LINK DEV-LEVEL /////////////////////////////////////////////////////
182 
201 {
202  public:
203  // inherited from SatStatsHelper base class
204  SatStatsFwdUserDevLinkDelayHelper(Ptr<const SatHelper> satHelper);
205 
210 
214  static TypeId GetTypeId();
215 
219  virtual void UpdateIdentifierOnProbes();
220 
221  protected:
222  // inherited from SatStatsLinkDelayHelper base class
223  void DoInstallProbes();
224 
225  private:
227  std::map<Ptr<Probe>, std::pair<Ptr<Node>, uint32_t>> m_probes;
228 
229 }; // end of class SatStatsFwdUserDevLinkDelayHelper
230 
231 // FORWARD FEEDER LINK MAC-LEVEL /////////////////////////////////////////////////////
232 
250 {
251  public:
252  // inherited from SatStatsHelper base class
253  SatStatsFwdFeederMacLinkDelayHelper(Ptr<const SatHelper> satHelper);
254 
259 
263  static TypeId GetTypeId();
264 
265  protected:
266  // inherited from SatStatsLinkDelayHelper base class
267  void DoInstallProbes();
268 
269 }; // end of class SatStatsFwdFeederMacLinkDelayHelper
270 
271 // FORWARD USER LINK MAC-LEVEL /////////////////////////////////////////////////////
272 
291 {
292  public:
293  // inherited from SatStatsHelper base class
294  SatStatsFwdUserMacLinkDelayHelper(Ptr<const SatHelper> satHelper);
295 
300 
304  static TypeId GetTypeId();
305 
309  virtual void UpdateIdentifierOnProbes();
310 
311  protected:
312  // inherited from SatStatsLinkDelayHelper base class
313  void DoInstallProbes();
314 
315  private:
317  std::map<Ptr<Probe>, std::pair<Ptr<Node>, uint32_t>> m_probes;
318 
319 }; // end of class SatStatsFwdUserMacLinkDelayHelper
320 
321 // FORWARD FEEDER LINK PHY-LEVEL /////////////////////////////////////////////////////
322 
340 {
341  public:
342  // inherited from SatStatsHelper base class
343  SatStatsFwdFeederPhyLinkDelayHelper(Ptr<const SatHelper> satHelper);
344 
349 
353  static TypeId GetTypeId();
354 
355  protected:
356  // inherited from SatStatsLinkDelayHelper base class
357  void DoInstallProbes();
358 
359 }; // end of class SatStatsFwdFeederPhyLinkDelayHelper
360 
361 // FORWARD USER LINK PHY-LEVEL /////////////////////////////////////////////////////
362 
381 {
382  public:
383  // inherited from SatStatsHelper base class
384  SatStatsFwdUserPhyLinkDelayHelper(Ptr<const SatHelper> satHelper);
385 
390 
394  static TypeId GetTypeId();
395 
399  virtual void UpdateIdentifierOnProbes();
400 
401  protected:
402  // inherited from SatStatsLinkDelayHelper base class
403  void DoInstallProbes();
404 
405  private:
407  std::map<Ptr<Probe>, std::pair<Ptr<Node>, uint32_t>> m_probes;
408 
409 }; // end of class SatStatsFwdUserPhyLinkDelayHelper
410 
411 // RETURN FEEDER LINK DEV-LEVEL //////////////////////////////////////////////
412 
430 {
431  public:
432  // inherited from SatStatsHelper base class
433  SatStatsRtnFeederDevLinkDelayHelper(Ptr<const SatHelper> satHelper);
434 
439 
443  static TypeId GetTypeId();
444 
445  protected:
446  // inherited from SatStatsLinkDelayHelper base class
447  void DoInstallProbes();
448 
449 }; // end of class SatStatsRtnFeederDevLinkDelayHelper
450 
451 // RETURN USER LINK DEV-LEVEL //////////////////////////////////////////////
452 
471 {
472  public:
473  // inherited from SatStatsHelper base class
474  SatStatsRtnUserDevLinkDelayHelper(Ptr<const SatHelper> satHelper);
475 
480 
484  static TypeId GetTypeId();
485 
486  protected:
487  // inherited from SatStatsLinkDelayHelper base class
488  void DoInstallProbes();
489 
490 }; // end of class SatStatsRtnUserDevLinkDelayHelper
491 
492 // RETURN FEEDER LINK MAC-LEVEL //////////////////////////////////////////////
493 
511 {
512  public:
513  // inherited from SatStatsHelper base class
514  SatStatsRtnFeederMacLinkDelayHelper(Ptr<const SatHelper> satHelper);
515 
520 
524  static TypeId GetTypeId();
525 
526  protected:
527  // inherited from SatStatsLinkDelayHelper base class
528  void DoInstallProbes();
529 
530 }; // end of class SatStatsRtnFeederMacLinkDelayHelper
531 
532 // RETURN USER LINK MAC-LEVEL //////////////////////////////////////////////
533 
552 {
553  public:
554  // inherited from SatStatsHelper base class
555  SatStatsRtnUserMacLinkDelayHelper(Ptr<const SatHelper> satHelper);
556 
561 
565  static TypeId GetTypeId();
566 
567  protected:
568  // inherited from SatStatsLinkDelayHelper base class
569  void DoInstallProbes();
570 
571 }; // end of class SatStatsRtnUserMacLinkDelayHelper
572 
573 // RETURN FEEDER LINK PHY-LEVEL //////////////////////////////////////////////
574 
592 {
593  public:
594  // inherited from SatStatsHelper base class
595  SatStatsRtnFeederPhyLinkDelayHelper(Ptr<const SatHelper> satHelper);
596 
601 
605  static TypeId GetTypeId();
606 
607  protected:
608  // inherited from SatStatsLinkDelayHelper base class
609  void DoInstallProbes();
610 
611 }; // end of class SatStatsRtnFeederPhyLinkDelayHelper
612 
613 // RETURN USER LINK PHY-LEVEL //////////////////////////////////////////////
614 
633 {
634  public:
635  // inherited from SatStatsHelper base class
636  SatStatsRtnUserPhyLinkDelayHelper(Ptr<const SatHelper> satHelper);
637 
642 
646  static TypeId GetTypeId();
647 
648  protected:
649  // inherited from SatStatsLinkDelayHelper base class
650  void DoInstallProbes();
651 
652 }; // end of class SatStatsRtnUserPhyLinkDelayHelper
653 
654 } // end of namespace ns3
655 
656 #endif /* SATELLITE_STATS_DELAY_HELPER_H */
Parent abstract class of all satellite statistics helpers.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.