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 "satellite-stats-helper.h"
26 
27 #include <ns3/address.h>
28 #include <ns3/collector-map.h>
29 #include <ns3/ptr.h>
30 #include <ns3/satellite-enums.h>
31 
32 #include <list>
33 #include <map>
34 #include <utility>
35 
36 namespace ns3
37 {
38 
39 // BASE CLASS /////////////////////////////////////////////////////////////////
40 
41 class SatHelper;
42 class Node;
43 class Time;
44 class DataCollectionObject;
45 class DistributionCollector;
46 
52 {
53  public:
54  // inherited from SatStatsHelper base class
55  SatStatsLinkJitterHelper(Ptr<const SatHelper> satHelper);
56 
60  virtual ~SatStatsLinkJitterHelper();
61 
65  static TypeId GetTypeId();
66 
70  void SetAveragingMode(bool averagingMode);
71 
75  bool GetAveragingMode() const;
76 
81  void InstallProbes();
82 
92  void RxLinkJitterCallback(const Time& jitter, const Address& from);
93 
94  protected:
95  // inherited from SatStatsHelper base class
96  void DoInstall();
97 
101  virtual void DoInstallProbes() = 0;
102 
108  bool ConnectProbeToCollector(Ptr<Probe> probe, uint32_t identifier);
109 
115  bool DisconnectProbeFromCollector(Ptr<Probe> probe, uint32_t identifier);
116 
123  void PassSampleToCollector(const Time& jitter, uint32_t identifier);
124 
129  void SetChannelLink(SatEnums::ChannelType_t channelLink);
130 
132  CollectorMap m_terminalCollectors;
133 
135  Ptr<DistributionCollector> m_averagingCollector;
136 
138  Ptr<DataCollectionObject> m_aggregator;
139 
140  private:
142 
144 
145 }; // end of class SatStatsLinkJitterHelper
146 
147 // FORWARD FEEDER LINK DEV-LEVEL /////////////////////////////////////////////////////
148 
166 {
167  public:
168  // inherited from SatStatsHelper base class
169  SatStatsFwdFeederDevLinkJitterHelper(Ptr<const SatHelper> satHelper);
170 
175 
179  static TypeId GetTypeId();
180 
181  protected:
182  // inherited from SatStatsLinkJitterHelper base class
183  void DoInstallProbes();
184 
185 }; // end of class SatStatsFwdFeederDevLinkJitterHelper
186 
187 // FORWARD USER LINK DEV-LEVEL /////////////////////////////////////////////////////
188 
206 {
207  public:
208  // inherited from SatStatsHelper base class
209  SatStatsFwdUserDevLinkJitterHelper(Ptr<const SatHelper> satHelper);
210 
215 
219  static TypeId GetTypeId();
220 
224  virtual void UpdateIdentifierOnProbes();
225 
226  protected:
227  // inherited from SatStatsLinkJitterHelper base class
228  void DoInstallProbes();
229 
230  private:
232  std::map<Ptr<Probe>, std::pair<Ptr<Node>, uint32_t>> m_probes;
233 
234 }; // end of class SatStatsFwdUserDevLinkJitterHelper
235 
236 // FORWARD FEEDER LINK MAC-LEVEL /////////////////////////////////////////////////////
237 
255 {
256  public:
257  // inherited from SatStatsHelper base class
258  SatStatsFwdFeederMacLinkJitterHelper(Ptr<const SatHelper> satHelper);
259 
264 
268  static TypeId GetTypeId();
269 
270  protected:
271  // inherited from SatStatsLinkJitterHelper base class
272  void DoInstallProbes();
273 
274 }; // end of class SatStatsFwdFeederMacLinkJitterHelper
275 
276 // FORWARD USER LINK MAC-LEVEL /////////////////////////////////////////////////////
277 
295 {
296  public:
297  // inherited from SatStatsHelper base class
298  SatStatsFwdUserMacLinkJitterHelper(Ptr<const SatHelper> satHelper);
299 
304 
308  static TypeId GetTypeId();
309 
313  virtual void UpdateIdentifierOnProbes();
314 
315  protected:
316  // inherited from SatStatsLinkJitterHelper base class
317  void DoInstallProbes();
318 
319  private:
321  std::map<Ptr<Probe>, std::pair<Ptr<Node>, uint32_t>> m_probes;
322 
323 }; // end of class SatStatsFwdUserMacLinkJitterHelper
324 
325 // FORWARD FEEDER LINK PHY-LEVEL /////////////////////////////////////////////////////
326 
344 {
345  public:
346  // inherited from SatStatsHelper base class
347  SatStatsFwdFeederPhyLinkJitterHelper(Ptr<const SatHelper> satHelper);
348 
353 
357  static TypeId GetTypeId();
358 
359  protected:
360  // inherited from SatStatsLinkJitterHelper base class
361  void DoInstallProbes();
362 
363 }; // end of class SatStatsFwdFeederPhyLinkJitterHelper
364 
365 // FORWARD USER LINK PHY-LEVEL /////////////////////////////////////////////////////
366 
384 {
385  public:
386  // inherited from SatStatsHelper base class
387  SatStatsFwdUserPhyLinkJitterHelper(Ptr<const SatHelper> satHelper);
388 
393 
397  static TypeId GetTypeId();
398 
402  virtual void UpdateIdentifierOnProbes();
403 
404  protected:
405  // inherited from SatStatsLinkJitterHelper base class
406  void DoInstallProbes();
407 
408  private:
410  std::map<Ptr<Probe>, std::pair<Ptr<Node>, uint32_t>> m_probes;
411 
412 }; // end of class SatStatsFwdUserPhyLinkJitterHelper
413 
414 // RETURN FEEDER LINK DEV-LEVEL //////////////////////////////////////////////
415 
433 {
434  public:
435  // inherited from SatStatsHelper base class
436  SatStatsRtnFeederDevLinkJitterHelper(Ptr<const SatHelper> satHelper);
437 
442 
446  static TypeId GetTypeId();
447 
448  protected:
449  // inherited from SatStatsLinkJitterHelper base class
450  void DoInstallProbes();
451 
452 }; // end of class SatStatsRtnFeederDevLinkJitterHelper
453 
454 // RETURN USER LINK DEV-LEVEL //////////////////////////////////////////////
455 
473 {
474  public:
475  // inherited from SatStatsHelper base class
476  SatStatsRtnUserDevLinkJitterHelper(Ptr<const SatHelper> satHelper);
477 
482 
486  static TypeId GetTypeId();
487 
488  protected:
489  // inherited from SatStatsLinkJitterHelper base class
490  void DoInstallProbes();
491 
492 }; // end of class SatStatsRtnUserDevLinkJitterHelper
493 
494 // RETURN FEEDER LINK MAC-LEVEL //////////////////////////////////////////////
495 
513 {
514  public:
515  // inherited from SatStatsHelper base class
516  SatStatsRtnFeederMacLinkJitterHelper(Ptr<const SatHelper> satHelper);
517 
522 
526  static TypeId GetTypeId();
527 
528  protected:
529  // inherited from SatStatsLinkJitterHelper base class
530  void DoInstallProbes();
531 
532 }; // end of class SatStatsRtnFeederMacLinkJitterHelper
533 
534 // RETURN USER LINK MAC-LEVEL //////////////////////////////////////////////
535 
553 {
554  public:
555  // inherited from SatStatsHelper base class
556  SatStatsRtnUserMacLinkJitterHelper(Ptr<const SatHelper> satHelper);
557 
562 
566  static TypeId GetTypeId();
567 
568  protected:
569  // inherited from SatStatsLinkJitterHelper base class
570  void DoInstallProbes();
571 
572 }; // end of class SatStatsRtnUserMacLinkJitterHelper
573 
574 // RETURN FEEDER LINK PHY-LEVEL //////////////////////////////////////////////
575 
593 {
594  public:
595  // inherited from SatStatsHelper base class
596  SatStatsRtnFeederPhyLinkJitterHelper(Ptr<const SatHelper> satHelper);
597 
602 
606  static TypeId GetTypeId();
607 
608  protected:
609  // inherited from SatStatsLinkJitterHelper base class
610  void DoInstallProbes();
611 
612 }; // end of class SatStatsRtnFeederPhyLinkJitterHelper
613 
614 // RETURN USER LINK PHY-LEVEL //////////////////////////////////////////////
615 
633 {
634  public:
635  // inherited from SatStatsHelper base class
636  SatStatsRtnUserPhyLinkJitterHelper(Ptr<const SatHelper> satHelper);
637 
642 
646  static TypeId GetTypeId();
647 
648  protected:
649  // inherited from SatStatsLinkJitterHelper base class
650  void DoInstallProbes();
651 
652 }; // end of class SatStatsRtnUserPhyLinkJitterHelper
653 
654 } // end of namespace ns3
655 
656 #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.