satellite-stats-marsala-correlation-helper.h
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2018 CNES
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: Mathias Ettinger <mettinger@toulouse.viveris.com>
19  */
20 
21 #ifndef SATELLITE_STATS_MARSALA_CORRELATION_HELPER_H
22 #define SATELLITE_STATS_MARSALA_CORRELATION_HELPER_H
23 
24 #include "satellite-stats-helper.h"
25 
26 #include <ns3/address.h>
27 #include <ns3/collector-map.h>
28 #include <ns3/ptr.h>
29 #include <ns3/satellite-phy-rx-carrier.h>
30 
31 #include <map>
32 #include <string>
33 
34 namespace ns3
35 {
36 
37 // BASE CLASS /////////////////////////////////////////////////////////////////
38 
39 class SatHelper;
40 class Node;
41 class DataCollectionObject;
42 
48 {
49  public:
50  // inherited from SatStatsHelper base class
51  SatStatsMarsalaCorrelationHelper(Ptr<const SatHelper> satHelper);
52 
57 
61  static TypeId GetTypeId();
62 
70  void CorrelationRxCallback(uint32_t nPackets, const Address& from, bool isCollided);
71 
75  std::string GetTraceSourceName() const;
76 
82  {
83  return m_carrierType;
84  }
85 
86  protected:
87  // inherited from SatStatsHelper base class
88  void DoInstall();
89 
93  void SetTraceSourceName(std::string traceSourceName);
94 
100  {
101  m_carrierType = carrierType;
102  }
103 
104  private:
106  CollectorMap m_terminalCollectors;
107 
109  Ptr<DataCollectionObject> m_aggregator;
110 
111  std::string m_traceSourceName;
112 
114 
115 }; // end of class SatStatsMarsalaCorrelationHelper
116 
117 } // end of namespace ns3
118 
119 #endif /* SATELLITE_STATS_MARSALA_CORRELATION_HELPER_H */
CarrierType
Possible carrier types.
Parent abstract class of all satellite statistics helpers.
void CorrelationRxCallback(uint32_t nPackets, const Address &from, bool isCollided)
Receive inputs from trace sources and determine the right collector to forward the inputs to.
SatPhyRxCarrier::CarrierType GetValidCarrierType() const
Get the valid carrier type.
void SetValidCarrierType(SatPhyRxCarrier::CarrierType carrierType)
Set valid carrier type for this statistics helper type.
CollectorMap m_terminalCollectors
Maintains a list of collectors created by this helper.
Ptr< DataCollectionObject > m_aggregator
The aggregator created by this helper.
void DoInstall()
Install the probes, collectors, and aggregators necessary to produce the statistics output.
static TypeId GetTypeId()
inherited from ObjectBase base class
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.