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 <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  SatStatsLinkDelayHelper(Ptr<const SatHelper> satHelper);
53 
57  virtual ~SatStatsLinkDelayHelper();
58 
62  static TypeId GetTypeId();
63 
67  void SetAveragingMode(bool averagingMode);
68 
72  bool GetAveragingMode() const;
73 
78  void InstallProbes();
79 
89  void RxLinkDelayCallback(const Time& delay, 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(const Time& delay, 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 SatStatsLinkDelayHelper
143 
144 // FORWARD FEEDER LINK DEV-LEVEL /////////////////////////////////////////////////////
145 
163 {
164  public:
165  // inherited from SatStatsHelper base class
166  SatStatsFwdFeederDevLinkDelayHelper(Ptr<const SatHelper> satHelper);
167 
172 
176  static TypeId GetTypeId();
177 
178  protected:
179  // inherited from SatStatsLinkDelayHelper base class
180  void DoInstallProbes();
181 
182  private:
184  std::list<Ptr<Probe>> m_probes;
185 
186 }; // end of class SatStatsFwdFeederDevLinkDelayHelper
187 
188 // FORWARD USER LINK DEV-LEVEL /////////////////////////////////////////////////////
189 
208 {
209  public:
210  // inherited from SatStatsHelper base class
211  SatStatsFwdUserDevLinkDelayHelper(Ptr<const SatHelper> satHelper);
212 
217 
221  static TypeId GetTypeId();
222 
223  protected:
224  // inherited from SatStatsLinkDelayHelper base class
225  void DoInstallProbes();
226 
227  private:
229  std::list<Ptr<Probe>> m_probes;
230 
231 }; // end of class SatStatsFwdUserDevLinkDelayHelper
232 
233 // FORWARD FEEDER LINK MAC-LEVEL /////////////////////////////////////////////////////
234 
252 {
253  public:
254  // inherited from SatStatsHelper base class
255  SatStatsFwdFeederMacLinkDelayHelper(Ptr<const SatHelper> satHelper);
256 
261 
265  static TypeId GetTypeId();
266 
267  protected:
268  // inherited from SatStatsLinkDelayHelper base class
269  void DoInstallProbes();
270 
271  private:
273  std::list<Ptr<Probe>> m_probes;
274 
275 }; // end of class SatStatsFwdFeederMacLinkDelayHelper
276 
277 // FORWARD USER LINK MAC-LEVEL /////////////////////////////////////////////////////
278 
297 {
298  public:
299  // inherited from SatStatsHelper base class
300  SatStatsFwdUserMacLinkDelayHelper(Ptr<const SatHelper> satHelper);
301 
306 
310  static TypeId GetTypeId();
311 
312  protected:
313  // inherited from SatStatsLinkDelayHelper base class
314  void DoInstallProbes();
315 
316  private:
318  std::list<Ptr<Probe>> m_probes;
319 
320 }; // end of class SatStatsFwdUserMacLinkDelayHelper
321 
322 // FORWARD FEEDER LINK PHY-LEVEL /////////////////////////////////////////////////////
323 
341 {
342  public:
343  // inherited from SatStatsHelper base class
344  SatStatsFwdFeederPhyLinkDelayHelper(Ptr<const SatHelper> satHelper);
345 
350 
354  static TypeId GetTypeId();
355 
356  protected:
357  // inherited from SatStatsLinkDelayHelper base class
358  void DoInstallProbes();
359 
360  private:
362  std::list<Ptr<Probe>> m_probes;
363 
364 }; // end of class SatStatsFwdFeederPhyLinkDelayHelper
365 
366 // FORWARD USER LINK PHY-LEVEL /////////////////////////////////////////////////////
367 
386 {
387  public:
388  // inherited from SatStatsHelper base class
389  SatStatsFwdUserPhyLinkDelayHelper(Ptr<const SatHelper> satHelper);
390 
395 
399  static TypeId GetTypeId();
400 
401  protected:
402  // inherited from SatStatsLinkDelayHelper base class
403  void DoInstallProbes();
404 
405  private:
407  std::list<Ptr<Probe>> 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  private:
492  std::list<Ptr<Probe>> m_probes;
493 
494 }; // end of class SatStatsRtnUserDevLinkDelayHelper
495 
496 // RETURN FEEDER LINK MAC-LEVEL //////////////////////////////////////////////
497 
515 {
516  public:
517  // inherited from SatStatsHelper base class
518  SatStatsRtnFeederMacLinkDelayHelper(Ptr<const SatHelper> satHelper);
519 
524 
528  static TypeId GetTypeId();
529 
530  protected:
531  // inherited from SatStatsLinkDelayHelper base class
532  void DoInstallProbes();
533 
534 }; // end of class SatStatsRtnFeederMacLinkDelayHelper
535 
536 // RETURN USER LINK MAC-LEVEL //////////////////////////////////////////////
537 
556 {
557  public:
558  // inherited from SatStatsHelper base class
559  SatStatsRtnUserMacLinkDelayHelper(Ptr<const SatHelper> satHelper);
560 
565 
569  static TypeId GetTypeId();
570 
571  protected:
572  // inherited from SatStatsLinkDelayHelper base class
573  void DoInstallProbes();
574 
575  private:
577  std::list<Ptr<Probe>> m_probes;
578 
579 }; // end of class SatStatsRtnUserMacLinkDelayHelper
580 
581 // RETURN FEEDER LINK PHY-LEVEL //////////////////////////////////////////////
582 
600 {
601  public:
602  // inherited from SatStatsHelper base class
603  SatStatsRtnFeederPhyLinkDelayHelper(Ptr<const SatHelper> satHelper);
604 
609 
613  static TypeId GetTypeId();
614 
615  protected:
616  // inherited from SatStatsLinkDelayHelper base class
617  void DoInstallProbes();
618 
619 }; // end of class SatStatsRtnFeederPhyLinkDelayHelper
620 
621 // RETURN USER LINK PHY-LEVEL //////////////////////////////////////////////
622 
641 {
642  public:
643  // inherited from SatStatsHelper base class
644  SatStatsRtnUserPhyLinkDelayHelper(Ptr<const SatHelper> satHelper);
645 
650 
654  static TypeId GetTypeId();
655 
656  protected:
657  // inherited from SatStatsLinkDelayHelper base class
658  void DoInstallProbes();
659 
660  private:
662  std::list<Ptr<Probe>> m_probes;
663 
664 }; // end of class SatStatsRtnUserPhyLinkDelayHelper
665 
666 } // end of namespace ns3
667 
668 #endif /* SATELLITE_STATS_DELAY_HELPER_H */
Parent abstract class of all satellite statistics helpers.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.