A Discrete-Event Network Simulator
API
phy-rx-stats-calculator.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation;
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16  *
17  * Author: Jaume Nin <jnin@cttc.es>
18  * modified by: Marco Miozzo <mmiozzo@cttc.es>
19  * Convert MacStatsCalculator in PhyRxStatsCalculator
20  */
21 
22 #ifndef PHY_RX_STATS_CALCULATOR_H_
23 #define PHY_RX_STATS_CALCULATOR_H_
24 
25 #include "ns3/lte-stats-calculator.h"
26 #include "ns3/nstime.h"
27 #include "ns3/uinteger.h"
28 #include <ns3/lte-common.h>
29 
30 #include <fstream>
31 #include <string>
32 
33 namespace ns3
34 {
35 
52 {
53  public:
58 
62  ~PhyRxStatsCalculator() override;
63 
64  // Inherited from ns3::Object
69  static TypeId GetTypeId();
70 
76  void SetUlRxOutputFilename(std::string outputFilename);
77 
82  std::string GetUlRxOutputFilename();
83 
89  void SetDlRxOutputFilename(std::string outputFilename);
90 
95  std::string GetDlRxOutputFilename();
96 
102 
108 
116  static void DlPhyReceptionCallback(Ptr<PhyRxStatsCalculator> phyRxStats,
117  std::string path,
119 
127  static void UlPhyReceptionCallback(Ptr<PhyRxStatsCalculator> phyRxStats,
128  std::string path,
130 
131  private:
139 
147 
151  std::ofstream m_dlRxOutFile;
152 
156  std::ofstream m_ulRxOutFile;
157 };
158 
159 } // namespace ns3
160 
161 #endif /* PHY_RX_STATS_CALCULATOR_H_ */
Base class for ***StatsCalculator classes.
Takes care of storing the information generated at PHY layer regarding reception.
static TypeId GetTypeId()
Register this type.
bool m_dlRxFirstWrite
When writing DL RX PHY statistics first time to file, columns description is added.
std::ofstream m_ulRxOutFile
UL RX PHY output trace file.
bool m_ulRxFirstWrite
When writing UL RX PHY statistics first time to file, columns description is added.
static void UlPhyReceptionCallback(Ptr< PhyRxStatsCalculator > phyRxStats, std::string path, PhyReceptionStatParameters params)
trace sink
std::string GetUlRxOutputFilename()
Get the name of the file where the UL RX PHY statistics will be stored.
void DlPhyReception(PhyReceptionStatParameters params)
Notifies the stats calculator that an downlink reception has occurred.
void SetDlRxOutputFilename(std::string outputFilename)
Set the name of the file where the DL RX PHY statistics will be stored.
std::string GetDlRxOutputFilename()
Get the name of the file where the DL RX PHY statistics will be stored.
~PhyRxStatsCalculator() override
Destructor.
static void DlPhyReceptionCallback(Ptr< PhyRxStatsCalculator > phyRxStats, std::string path, PhyReceptionStatParameters params)
trace sink
void UlPhyReception(PhyReceptionStatParameters params)
Notifies the stats calculator that an uplink reception has occurred.
void SetUlRxOutputFilename(std::string outputFilename)
Set the name of the file where the UL Rx PHY statistics will be stored.
std::ofstream m_dlRxOutFile
DL RX PHY output trace file.
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:78
a unique identifier for an interface.
Definition: type-id.h:60
Every class exported by the ns3 library is enclosed in the ns3 namespace.
params
Fit Fluctuating Two Ray model to the 3GPP TR 38.901 using the Anderson-Darling goodness-of-fit ##.
PhyReceptionStatParameters structure.
Definition: lte-common.h:206