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 <ns3/address.h>
25 #include <ns3/collector-map.h>
26 #include <ns3/ptr.h>
27 #include <ns3/satellite-phy-rx-carrier.h>
28 #include <ns3/satellite-stats-helper.h>
29 
30 #include <map>
31 
32 namespace ns3
33 {
34 
35 // BASE CLASS /////////////////////////////////////////////////////////////////
36 
37 class SatHelper;
38 class Node;
39 class DataCollectionObject;
40 
46 {
47  public:
48  // inherited from SatStatsHelper base class
49  SatStatsMarsalaCorrelationHelper(Ptr<const SatHelper> satHelper);
50 
55 
59  static TypeId GetTypeId();
60 
68  void CorrelationRxCallback(uint32_t nPackets, const Address& from, bool isCollided);
69 
73  std::string GetTraceSourceName() const;
74 
80  {
81  return m_carrierType;
82  }
83 
84  protected:
85  // inherited from SatStatsHelper base class
86  void DoInstall();
87 
91  void SetTraceSourceName(std::string traceSourceName);
92 
98  {
99  m_carrierType = carrierType;
100  }
101 
102  private:
110  void SaveAddressAndIdentifier(Ptr<Node> utNode);
111 
113  CollectorMap m_terminalCollectors;
114 
116  Ptr<DataCollectionObject> m_aggregator;
117 
119  std::map<const Address, uint32_t> m_identifierMap;
120 
121  std::string m_traceSourceName;
122 
124 
125 }; // end of class SatStatsMarsalaCorrelationHelper
126 
127 } // end of namespace ns3
128 
129 #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.
void SaveAddressAndIdentifier(Ptr< Node > utNode)
Save the address and the proper identifier from the given UT node.
SatPhyRxCarrier::CarrierType GetValidCarrierType() const
Get the valid carrier type.
std::map< const Address, uint32_t > m_identifierMap
Map of address and the identifier associated with it (for forward link).
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.