satellite-stats-signalling-load-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_SIGNALLING_LOAD_HELPER_H
23 #define SATELLITE_STATS_SIGNALLING_LOAD_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 Packet;
41 class DataCollectionObject;
42 
49 {
50  public:
51  // inherited from SatStatsHelper base class
52  SatStatsSignallingLoadHelper(Ptr<const SatHelper> satHelper);
53 
58 
62  static TypeId GetTypeId();
63 
68  void InstallProbes();
69 
79  void SignallingTxCallback(Ptr<const Packet> packet, const Address& to);
80 
81  protected:
82  // inherited from SatStatsHelper base class
83  void DoInstall();
84 
88  virtual void DoInstallProbes() = 0;
89 
100  void SaveAddressAndIdentifier(Ptr<Node> utNode);
101 
104 
106  CollectorMap m_terminalCollectors;
107 
109  Ptr<DataCollectionObject> m_aggregator;
110 
112  std::map<const Address, uint32_t> m_identifierMap;
113 
114 }; // end of class SatStatsSignallingLoadHelper
115 
116 // FORWARD LINK ///////////////////////////////////////////////////////////////
117 
136 {
137  public:
138  // inherited from SatStatsHelper base class
139  SatStatsFwdSignallingLoadHelper(Ptr<const SatHelper> satHelper);
140 
145 
149  static TypeId GetTypeId();
150 
151  protected:
152  // inherited from SatStatsThroughputHelper base class
153  void DoInstallProbes();
154 
155 }; // end of class SatStatsFwdSignallingLoadHelper
156 
157 // RETURN LINK ////////////////////////////////////////////////////////////////
158 
159 class Probe;
160 
179 {
180  public:
181  // inherited from SatStatsHelper base class
182  SatStatsRtnSignallingLoadHelper(Ptr<const SatHelper> satHelper);
183 
188 
192  static TypeId GetTypeId();
193 
194  protected:
195  // inherited from SatStatsThroughputHelper base class
196  void DoInstallProbes();
197 
198  private:
200  std::list<Ptr<Probe>> m_probes;
201 
202 }; // end of class SatStatsRtnSignallingLoadHelper
203 
204 } // end of namespace ns3
205 
206 #endif /* SATELLITE_STATS_SIGNALLING_LOAD_HELPER_H */
Produce forward link signalling load statistics from a satellite module simulation.
SatStatsFwdSignallingLoadHelper(Ptr< const SatHelper > satHelper)
static TypeId GetTypeId()
inherited from ObjectBase base class
Parent abstract class of all satellite statistics helpers.
Produce return link signalling load statistics from a satellite module simulation.
SatStatsRtnSignallingLoadHelper(Ptr< const SatHelper > satHelper)
std::list< Ptr< Probe > > m_probes
Maintains a list of probes created by this helper.
static TypeId GetTypeId()
inherited from ObjectBase base class
Abstract class inherited by SatStatsFwdSignallingLoadHelper and SatStatsRtnSignallingLoadHelper.
Ptr< DataCollectionObject > m_aggregator
The aggregator created by this helper.
void DoInstall()
Install the probes, collectors, and aggregators necessary to produce the statistics output.
void InstallProbes()
Set up several probes or other means of listeners and connect them to the first-level collectors.
CollectorMap m_terminalCollectors
Maintains a list of second-level collectors created by this helper.
void SaveAddressAndIdentifier(Ptr< Node > utNode)
Save the address and the proper identifier from the given UT node.
void SignallingTxCallback(Ptr< const Packet > packet, const Address &to)
Receive inputs from trace sources and determine the right collector to forward the inputs to.
static TypeId GetTypeId()
inherited from ObjectBase base class
SatStatsSignallingLoadHelper(Ptr< const SatHelper > satHelper)
std::map< const Address, uint32_t > m_identifierMap
Map of address and the identifier associated with it (for forward link).
CollectorMap m_conversionCollectors
Maintains a list of first-level collectors created by this helper.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.