A Discrete-Event Network Simulator
API
phy-stats-calculator.h
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
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: Jaume Nin <jnin@cttc.es>
19  */
20 
21 #ifndef PHY_STATS_CALCULATOR_H_
22 #define PHY_STATS_CALCULATOR_H_
23 
24 #include "ns3/lte-stats-calculator.h"
25 #include "ns3/nstime.h"
26 #include "ns3/uinteger.h"
27 #include "ns3/spectrum-value.h"
28 #include <string>
29 #include <fstream>
30 
31 namespace ns3 {
32 
56 {
57 public:
62 
66  virtual ~PhyStatsCalculator ();
67 
68  // Inherited from ns3::Object
73  static TypeId GetTypeId (void);
74 
80  void SetCurrentCellRsrpSinrFilename (std::string filename);
81 
86  std::string GetCurrentCellRsrpSinrFilename (void);
87 
93  void SetUeSinrFilename (std::string filename);
94 
99  std::string GetUeSinrFilename (void);
100 
106  void SetInterferenceFilename (std::string filename);
107 
112  std::string GetInterferenceFilename (void);
113 
122  void ReportCurrentCellRsrpSinr (uint16_t cellId, uint64_t imsi, uint16_t rnti, double rsrp, double sinr);
123 
131  void ReportUeSinr (uint16_t cellId, uint64_t imsi, uint16_t rnti, double sinrLinear);
132 
138  void ReportInterference (uint16_t cellId, Ptr<SpectrumValue> interference);
139 
151  std::string path, uint16_t cellId, uint16_t rnti,
152  double rsrp, double sinr);
153 
163  static void ReportUeSinr (Ptr<PhyStatsCalculator> phyStats, std::string path,
164  uint16_t cellId, uint16_t rnti, double sinrLinear);
165 
174  static void ReportInterference (Ptr<PhyStatsCalculator> phyStats, std::string path,
175  uint16_t cellId, Ptr<SpectrumValue> interference);
176 
177 
178 private:
186 
194 
202 
206  std::string m_RsrpSinrFilename;
207 
211  std::string m_ueSinrFilename;
212 
217 
218 };
219 
220 } // namespace ns3
221 
222 #endif /* PHY_STATS_CALCULATOR_H_ */
Base class for ***StatsCalculator classes.
std::string GetInterferenceFilename(void)
Get the name of the file where the interference statistics will be stored.
std::string m_ueSinrFilename
Name of the file where the UE SINR statistics will be saved.
void ReportUeSinr(uint16_t cellId, uint64_t imsi, uint16_t rnti, double sinrLinear)
Notifies the stats calculator that an UE SINR report has occurred.
void SetCurrentCellRsrpSinrFilename(std::string filename)
Set the name of the file where the RSRP/SINR statistics will be stored.
bool m_RsrpSinrFirstWrite
When writing RSRP SINR statistics first time to file, columns description is added.
static TypeId GetTypeId(void)
Register this type.
static void ReportCurrentCellRsrpSinrCallback(Ptr< PhyStatsCalculator > phyStats, std::string path, uint16_t cellId, uint16_t rnti, double rsrp, double sinr)
trace sink
std::string m_interferenceFilename
Name of the file where the interference statistics will be saved.
bool m_InterferenceFirstWrite
When writing interference statistics first time to file, columns description is added.
void SetUeSinrFilename(std::string filename)
Set the name of the file where the UE SINR statistics will be stored.
Takes care of storing the information generated at PHY layer.
virtual ~PhyStatsCalculator()
Destructor.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::string m_RsrpSinrFilename
Name of the file where the RSRP/SINR statistics will be saved.
void SetInterferenceFilename(std::string filename)
Set the name of the file where the interference statistics will be stored.
std::string GetUeSinrFilename(void)
Get the name of the file where the UE SINR statistics will be stored.
void ReportInterference(uint16_t cellId, Ptr< SpectrumValue > interference)
Notifies the stats calculator that an interference report has occurred.
a unique identifier for an interface.
Definition: type-id.h:58
std::string GetCurrentCellRsrpSinrFilename(void)
Get the name of the file where the RSRP/SINR statistics will be stored.
bool m_UeSinrFirstWrite
When writing UE SINR statistics first time to file, columns description is added. ...
void ReportCurrentCellRsrpSinr(uint16_t cellId, uint64_t imsi, uint16_t rnti, double rsrp, double sinr)
Notifies the stats calculator that an RSRP and SINR report has occurred.