satellite-stats-frame-type-usage-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: Lauri Sormunen <lauri.sormunen@magister.fi>
19  *
20  */
21 
22 #ifndef SATELLITE_STATS_FRAME_TYPE_USAGE_HELPER_H
23 #define SATELLITE_STATS_FRAME_TYPE_USAGE_HELPER_H
24 
25 #include <ns3/collector-map.h>
26 #include <ns3/ptr.h>
27 #include <ns3/satellite-bbframe.h>
28 #include <ns3/satellite-stats-helper.h>
29 
30 #include <map>
31 
32 namespace ns3
33 {
34 
35 class SatHelper;
36 class DataCollectionObject;
37 
43 {
44  public:
49  SatStatsFrameTypeUsageHelper(Ptr<const SatHelper> satHelper);
50 
55 
60  static TypeId GetTypeId();
61 
66  static const std::map<SatEnums::SatBbFrameType_t, uint32_t> frameTypeIdMap;
67 
68  protected:
69  // inherited from SatStatsHelper base class
70  void DoInstall();
71 
78  std::string GetIdentifierHeading(std::string dataLabel) const;
79 
80  private:
85  void FrameTypeUsageCallback(std::string context, Ptr<SatBbFrame> bbFrame);
86 
92  static uint32_t GetFrameTypeId(SatEnums::SatBbFrameType_t frameType);
93 
99 
104  std::map<uint32_t, CollectorMap> m_collectors;
105 
107  Ptr<DataCollectionObject> m_aggregator;
108 
109 }; // end of class SatStatsFrameTypeUsageHelper
110 
111 } // end of namespace ns3
112 
113 #endif /* SATELLITE_STATS_FRAME_TYPE_USAGE_HELPER_H */
SatBbFrameType_t
BB frame type used in DVB-S2 FWD link.
SatStatsFrameTypeUsageHelper(Ptr< const SatHelper > satHelper)
Constructor.
std::string GetIdentifierHeading(std::string dataLabel) const
Get identifier header for file.
void FrameTypeUsageCallback(std::string context, Ptr< SatBbFrame > bbFrame)
static const std::map< SatEnums::SatBbFrameType_t, uint32_t > frameTypeIdMap
Mapping for frame type IDs to integers, in case that SatBbFrameType_t enums are assigned.
std::map< uint32_t, CollectorMap > m_collectors
Two-dimensional map of collectors, indexed first by the the frame type identifier and second by the g...
void DoInstall()
Install the probes, collectors, and aggregators necessary to produce the statistics output.
static uint32_t GetFrameTypeId(SatEnums::SatBbFrameType_t frameType)
Get frame type ID.
bool m_usePercentage
Flag for using percentage of the frame types in beam/in gw/globally instead of sum by type.
static TypeId GetTypeId()
inherited from ObjectBase base class
Ptr< DataCollectionObject > m_aggregator
The aggregator created by this helper.
Parent abstract class of all satellite statistics helpers.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.