Loading...
Searching...
No Matches
satellite-stats-carrier-id-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_CARRIER_ID_HELPER_H
22#define SATELLITE_STATS_CARRIER_ID_HELPER_H
23
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
34namespace ns3
35{
36
37// BASE CLASS /////////////////////////////////////////////////////////////////
38
39class SatHelper;
40class Node;
41class DataCollectionObject;
42
48{
49 public:
50 // inherited from SatStatsHelper base class
51 SatStatsCarrierIdHelper(Ptr<const SatHelper> satHelper);
52
57
61 static TypeId GetTypeId();
62
69 void CarrierIdRxCallback(uint32_t carrierId, const Address& from);
70
74 std::string GetTraceSourceName() const;
75
84
85 protected:
86 // inherited from SatStatsHelper base class
87 void DoInstall();
88
92 void SetTraceSourceName(std::string traceSourceName);
93
99 {
100 m_carrierType = carrierType;
101 }
102
103 private:
106
108 Ptr<DataCollectionObject> m_aggregator;
109
110 std::string m_traceSourceName;
111
113
114}; // end of class SatStatsCarrierIdHelper
115
116} // end of namespace ns3
117
118#endif /* SATELLITE_STATS_CARRIER_ID_HELPER_H */
Build a satellite network set with needed objects and configuration.
CarrierType
Possible carrier types.
SatStatsCarrierIdHelper(Ptr< const SatHelper > satHelper)
SatPhyRxCarrier::CarrierType GetValidCarrierType() const
Get the valid carrier type.
Ptr< DataCollectionObject > m_aggregator
The aggregator created by this helper.
void SetValidCarrierType(SatPhyRxCarrier::CarrierType carrierType)
Set valid carrier type for this statistics helper type.
static TypeId GetTypeId()
inherited from ObjectBase base class
void CarrierIdRxCallback(uint32_t carrierId, const Address &from)
Receive inputs from trace sources and determine the right collector to forward the inputs to.
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.
void SetTraceSourceName(std::string traceSourceName)
SatStatsHelper(Ptr< const SatHelper > satHelper)
Creates a new helper instance.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.