satellite-stats-composite-sinr-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: Budiarto Herman <budiarto.herman@magister.fi>
19  *
20  */
21 
22 #ifndef SATELLITE_STATS_COMPOSITE_SINR_HELPER_H
23 #define SATELLITE_STATS_COMPOSITE_SINR_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 DataCollectionObject;
41 
48 {
49  public:
50  // inherited from SatStatsHelper base class
51  SatStatsCompositeSinrHelper(Ptr<const SatHelper> satHelper);
52 
57 
61  static TypeId GetTypeId();
62 
67  void InstallProbes();
68 
69  protected:
70  // inherited from SatStatsHelper base class
71  void DoInstall();
72 
76  virtual void DoInstallProbes() = 0;
77 
79  CollectorMap m_terminalCollectors;
80 
82  Ptr<DataCollectionObject> m_aggregator;
83 
84 }; // end of class SatStatsCompositeSinrHelper
85 
86 // FORWARD LINK ///////////////////////////////////////////////////////////////
87 
88 class Probe;
89 
108 {
109  public:
110  // inherited from SatStatsHelper base class
111  SatStatsFwdCompositeSinrHelper(Ptr<const SatHelper> satHelper);
112 
117 
121  static TypeId GetTypeId();
122 
123  protected:
124  // inherited from SatStatsCompositeSinrHelper base class
125  void DoInstallProbes();
126 
127  private:
129  std::list<Ptr<Probe>> m_probes;
130 
131 }; // end of class SatStatsFwdCompositeSinrHelper
132 
133 // RETURN LINK ////////////////////////////////////////////////////////////////
134 
153 {
154  public:
155  // inherited from SatStatsHelper base class
156  SatStatsRtnCompositeSinrHelper(Ptr<const SatHelper> satHelper);
157 
162 
166  static TypeId GetTypeId();
167 
174  void SinrCallback(double sinrDb, const Address& from);
175 
176  protected:
177  // inherited from SatStatsCompositeSinrHelper base class
178  void DoInstallProbes();
179 
180  private:
191  void SaveAddressAndIdentifier(Ptr<Node> utNode);
192 
194  std::map<const Address, uint32_t> m_identifierMap;
195 
196 }; // end of class SatStatsRtnCompositeSinrHelper
197 
198 } // end of namespace ns3
199 
200 #endif /* SATELLITE_STATS_COMPOSITE_SINR_HELPER_H */
Abstract class inherited by SatStatsFwdCompositeSinrHelper and SatStatsRtnCompositeSinrHelper.
static TypeId GetTypeId()
inherited from ObjectBase base class
void InstallProbes()
Set up several probes or other means of listeners and connect them to the collectors.
void DoInstall()
Install the probes, collectors, and aggregators necessary to produce the statistics output.
CollectorMap m_terminalCollectors
Maintains a list of collectors created by this helper.
Ptr< DataCollectionObject > m_aggregator
The aggregator created by this helper.
SatStatsCompositeSinrHelper(Ptr< const SatHelper > satHelper)
Produce forward link composite SINR statistics from a satellite module simulation.
std::list< Ptr< Probe > > m_probes
Maintains a list of probes created by this helper.
static TypeId GetTypeId()
inherited from ObjectBase base class
SatStatsFwdCompositeSinrHelper(Ptr< const SatHelper > satHelper)
Parent abstract class of all satellite statistics helpers.
Produce return link composite SINR statistics from a satellite module simulation.
void SaveAddressAndIdentifier(Ptr< Node > utNode)
Save the address and the proper identifier from the given UT node.
SatStatsRtnCompositeSinrHelper(Ptr< const SatHelper > satHelper)
std::map< const Address, uint32_t > m_identifierMap
Map of address and the identifier associated with it (for return link).
void SinrCallback(double sinrDb, const Address &from)
Receive inputs from trace sources and determine the right collector to forward the inputs to.
static TypeId GetTypeId()
inherited from ObjectBase base class
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.