satellite-stats-link-jitter-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_JITTER_HELPER_H
23 #define SATELLITE_STATS_LINK_JITTER_HELPER_H
24 
25 #include <ns3/address.h>
26 #include <ns3/collector-map.h>
27 #include <ns3/ptr.h>
28 #include <ns3/satellite-enums.h>
29 #include <ns3/satellite-stats-helper.h>
30 
31 #include <list>
32 #include <map>
33 
34 namespace ns3
35 {
36 
37 // BASE CLASS /////////////////////////////////////////////////////////////////
38 
39 class SatHelper;
40 class Node;
41 class Time;
42 class DataCollectionObject;
43 class DistributionCollector;
44 
50 {
51  public:
52  // inherited from SatStatsHelper base class
53  SatStatsLinkJitterHelper(Ptr<const SatHelper> satHelper);
54 
58  virtual ~SatStatsLinkJitterHelper();
59 
63  static TypeId GetTypeId();
64 
68  void SetAveragingMode(bool averagingMode);
69 
73  bool GetAveragingMode() const;
74 
79  void InstallProbes();
80 
90  void RxLinkJitterCallback(const Time& jitter, const Address& from);
91 
92  protected:
93  // inherited from SatStatsHelper base class
94  void DoInstall();
95 
99  virtual void DoInstallProbes() = 0;
100 
111  void SaveAddressAndIdentifier(Ptr<Node> utNode);
112 
118  bool ConnectProbeToCollector(Ptr<Probe> probe, uint32_t identifier);
119 
126  void PassSampleToCollector(const Time& jitter, uint32_t identifier);
127 
132  void SetChannelLink(SatEnums::ChannelType_t channelLink);
133 
135  CollectorMap m_terminalCollectors;
136 
138  Ptr<DistributionCollector> m_averagingCollector;
139 
141  Ptr<DataCollectionObject> m_aggregator;
142 
144  std::map<const Address, uint32_t> m_identifierMap;
145 
146  private:
148 
150 
151 }; // end of class SatStatsLinkJitterHelper
152 
153 // FORWARD FEEDER LINK DEV-LEVEL /////////////////////////////////////////////////////
154 
172 {
173  public:
174  // inherited from SatStatsHelper base class
175  SatStatsFwdFeederDevLinkJitterHelper(Ptr<const SatHelper> satHelper);
176 
181 
185  static TypeId GetTypeId();
186 
187  protected:
188  // inherited from SatStatsLinkJitterHelper base class
189  void DoInstallProbes();
190 
191  private:
193  std::list<Ptr<Probe>> m_probes;
194 
195 }; // end of class SatStatsFwdFeederDevLinkJitterHelper
196 
197 // FORWARD USER LINK DEV-LEVEL /////////////////////////////////////////////////////
198 
216 {
217  public:
218  // inherited from SatStatsHelper base class
219  SatStatsFwdUserDevLinkJitterHelper(Ptr<const SatHelper> satHelper);
220 
225 
229  static TypeId GetTypeId();
230 
231  protected:
232  // inherited from SatStatsLinkJitterHelper base class
233  void DoInstallProbes();
234 
235  private:
237  std::list<Ptr<Probe>> m_probes;
238 
239 }; // end of class SatStatsFwdUserDevLinkJitterHelper
240 
241 // FORWARD FEEDER LINK MAC-LEVEL /////////////////////////////////////////////////////
242 
260 {
261  public:
262  // inherited from SatStatsHelper base class
263  SatStatsFwdFeederMacLinkJitterHelper(Ptr<const SatHelper> satHelper);
264 
269 
273  static TypeId GetTypeId();
274 
275  protected:
276  // inherited from SatStatsLinkJitterHelper base class
277  void DoInstallProbes();
278 
279  private:
281  std::list<Ptr<Probe>> m_probes;
282 
283 }; // end of class SatStatsFwdFeederMacLinkJitterHelper
284 
285 // FORWARD USER LINK MAC-LEVEL /////////////////////////////////////////////////////
286 
304 {
305  public:
306  // inherited from SatStatsHelper base class
307  SatStatsFwdUserMacLinkJitterHelper(Ptr<const SatHelper> satHelper);
308 
313 
317  static TypeId GetTypeId();
318 
319  protected:
320  // inherited from SatStatsLinkJitterHelper base class
321  void DoInstallProbes();
322 
323  private:
325  std::list<Ptr<Probe>> m_probes;
326 
327 }; // end of class SatStatsFwdUserMacLinkJitterHelper
328 
329 // FORWARD FEEDER LINK PHY-LEVEL /////////////////////////////////////////////////////
330 
348 {
349  public:
350  // inherited from SatStatsHelper base class
351  SatStatsFwdFeederPhyLinkJitterHelper(Ptr<const SatHelper> satHelper);
352 
357 
361  static TypeId GetTypeId();
362 
363  protected:
364  // inherited from SatStatsLinkJitterHelper base class
365  void DoInstallProbes();
366 
367  private:
369  std::list<Ptr<Probe>> m_probes;
370 
371 }; // end of class SatStatsFwdFeederPhyLinkJitterHelper
372 
373 // FORWARD USER LINK PHY-LEVEL /////////////////////////////////////////////////////
374 
392 {
393  public:
394  // inherited from SatStatsHelper base class
395  SatStatsFwdUserPhyLinkJitterHelper(Ptr<const SatHelper> satHelper);
396 
401 
405  static TypeId GetTypeId();
406 
407  protected:
408  // inherited from SatStatsLinkJitterHelper base class
409  void DoInstallProbes();
410 
411  private:
413  std::list<Ptr<Probe>> m_probes;
414 
415 }; // end of class SatStatsFwdUserPhyLinkJitterHelper
416 
417 // RETURN FEEDER LINK DEV-LEVEL //////////////////////////////////////////////
418 
436 {
437  public:
438  // inherited from SatStatsHelper base class
439  SatStatsRtnFeederDevLinkJitterHelper(Ptr<const SatHelper> satHelper);
440 
445 
449  static TypeId GetTypeId();
450 
451  protected:
452  // inherited from SatStatsLinkJitterHelper base class
453  void DoInstallProbes();
454 
455 }; // end of class SatStatsRtnFeederDevLinkJitterHelper
456 
457 // RETURN USER LINK DEV-LEVEL //////////////////////////////////////////////
458 
476 {
477  public:
478  // inherited from SatStatsHelper base class
479  SatStatsRtnUserDevLinkJitterHelper(Ptr<const SatHelper> satHelper);
480 
485 
489  static TypeId GetTypeId();
490 
491  protected:
492  // inherited from SatStatsLinkJitterHelper base class
493  void DoInstallProbes();
494 
495  private:
497  std::list<Ptr<Probe>> m_probes;
498 
499 }; // end of class SatStatsRtnUserDevLinkJitterHelper
500 
501 // RETURN FEEDER LINK MAC-LEVEL //////////////////////////////////////////////
502 
520 {
521  public:
522  // inherited from SatStatsHelper base class
523  SatStatsRtnFeederMacLinkJitterHelper(Ptr<const SatHelper> satHelper);
524 
529 
533  static TypeId GetTypeId();
534 
535  protected:
536  // inherited from SatStatsLinkJitterHelper base class
537  void DoInstallProbes();
538 
539 }; // end of class SatStatsRtnFeederMacLinkJitterHelper
540 
541 // RETURN USER LINK MAC-LEVEL //////////////////////////////////////////////
542 
560 {
561  public:
562  // inherited from SatStatsHelper base class
563  SatStatsRtnUserMacLinkJitterHelper(Ptr<const SatHelper> satHelper);
564 
569 
573  static TypeId GetTypeId();
574 
575  protected:
576  // inherited from SatStatsLinkJitterHelper base class
577  void DoInstallProbes();
578 
579  private:
581  std::list<Ptr<Probe>> m_probes;
582 
583 }; // end of class SatStatsRtnUserMacLinkJitterHelper
584 
585 // RETURN FEEDER LINK PHY-LEVEL //////////////////////////////////////////////
586 
604 {
605  public:
606  // inherited from SatStatsHelper base class
607  SatStatsRtnFeederPhyLinkJitterHelper(Ptr<const SatHelper> satHelper);
608 
613 
617  static TypeId GetTypeId();
618 
619  protected:
620  // inherited from SatStatsLinkJitterHelper base class
621  void DoInstallProbes();
622 
623 }; // end of class SatStatsRtnFeederPhyLinkJitterHelper
624 
625 // RETURN USER LINK PHY-LEVEL //////////////////////////////////////////////
626 
644 {
645  public:
646  // inherited from SatStatsHelper base class
647  SatStatsRtnUserPhyLinkJitterHelper(Ptr<const SatHelper> satHelper);
648 
653 
657  static TypeId GetTypeId();
658 
659  protected:
660  // inherited from SatStatsLinkJitterHelper base class
661  void DoInstallProbes();
662 
663  private:
665  std::list<Ptr<Probe>> m_probes;
666 
667 }; // end of class SatStatsRtnUserPhyLinkJitterHelper
668 
669 } // end of namespace ns3
670 
671 #endif /* SATELLITE_STATS_JITTER_HELPER_H */
ChannelType_t
Types of channel.
Parent abstract class of all satellite statistics helpers.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.