A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
phy-tx-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 PhyTxStatsCalculator
20 */
21
22#ifndef PHY_TX_STATS_CALCULATOR_H_
23#define PHY_TX_STATS_CALCULATOR_H_
24
26
27#include "ns3/nstime.h"
28#include "ns3/uinteger.h"
29#include <ns3/lte-common.h>
30
31#include <fstream>
32#include <string>
33
34namespace ns3
35{
36
53{
54 public:
59
63 ~PhyTxStatsCalculator() override;
64
65 // Inherited from ns3::Object
70 static TypeId GetTypeId();
71
77 void SetUlTxOutputFilename(std::string outputFilename);
78
83 std::string GetUlTxOutputFilename();
84
90 void SetDlTxOutputFilename(std::string outputFilename);
91
96 std::string GetDlTxOutputFilename();
97
103
109
118 std::string path,
120
129 std::string path,
131
132 private:
140
148
152 std::ofstream m_dlTxOutFile;
153
157 std::ofstream m_ulTxOutFile;
158};
159
160} // namespace ns3
161
162#endif /* PHY_TX_STATS_CALCULATOR_H_ */
Base class for ***StatsCalculator classes.
Takes care of storing the information generated at PHY layer regarding transmission.
bool m_ulTxFirstWrite
When writing UL TX PHY statistics first time to file, columns description is added.
void SetDlTxOutputFilename(std::string outputFilename)
Set the name of the file where the DL TX PHY statistics will be stored.
void SetUlTxOutputFilename(std::string outputFilename)
Set the name of the file where the UL Tx PHY statistics will be stored.
bool m_dlTxFirstWrite
When writing DL TX PHY statistics first time to file, columns description is added.
static void DlPhyTransmissionCallback(Ptr< PhyTxStatsCalculator > phyTxStats, std::string path, PhyTransmissionStatParameters params)
trace sink
std::ofstream m_ulTxOutFile
UL TX PHY statistics output trace file.
void DlPhyTransmission(PhyTransmissionStatParameters params)
Notifies the stats calculator that an downlink transmission has occurred.
std::string GetDlTxOutputFilename()
Get the name of the file where the DL TX PHY statistics will be stored.
std::ofstream m_dlTxOutFile
DL TX PHY statistics output trace file.
void UlPhyTransmission(PhyTransmissionStatParameters params)
Notifies the stats calculator that an uplink transmission has occurred.
std::string GetUlTxOutputFilename()
Get the name of the file where the UL RX PHY statistics will be stored.
static TypeId GetTypeId()
Register this type.
static void UlPhyTransmissionCallback(Ptr< PhyTxStatsCalculator > phyTxStats, std::string path, PhyTransmissionStatParameters params)
trace sink
~PhyTxStatsCalculator() override
Destructor.
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:78
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.
PhyTransmissionStatParameters structure.
Definition: lte-common.h:188