A Discrete-Event Network Simulator
API
lte-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  */
19 
20 #ifndef LTE_STATS_CALCULATOR_H_
21 #define LTE_STATS_CALCULATOR_H_
22 
23 #include "ns3/object.h"
24 #include "ns3/string.h"
25 
26 #include <map>
27 
28 namespace ns3
29 {
30 
39 class LteStatsCalculator : public Object
40 {
41  public:
46 
50  ~LteStatsCalculator() override;
51 
56  static TypeId GetTypeId();
57 
63  void SetUlOutputFilename(std::string outputFilename);
64 
69  std::string GetUlOutputFilename();
70 
76  void SetDlOutputFilename(std::string outputFilename);
77 
82  std::string GetDlOutputFilename();
83 
89  bool ExistsImsiPath(std::string path);
90 
96  void SetImsiPath(std::string path, uint64_t imsi);
97 
103  uint64_t GetImsiPath(std::string path);
104 
110  bool ExistsCellIdPath(std::string path);
111 
117  void SetCellIdPath(std::string path, uint16_t cellId);
118 
124  uint16_t GetCellIdPath(std::string path);
125 
126  protected:
132  static uint64_t FindImsiFromEnbRlcPath(std::string path);
133 
139  static uint64_t FindImsiFromUePhy(std::string path);
140 
146  static uint64_t FindImsiFromLteNetDevice(std::string path);
147 
153  static uint16_t FindCellIdFromEnbRlcPath(std::string path);
154 
161  static uint64_t FindImsiFromEnbMac(std::string path, uint16_t rnti);
162 
169  static uint16_t FindCellIdFromEnbMac(std::string path, uint16_t rnti);
170 
177  static uint64_t FindImsiForEnb(std::string path, uint16_t rnti);
178 
185  static uint64_t FindImsiForUe(std::string path, uint16_t rnti);
186 
187  private:
191  std::map<std::string, uint64_t> m_pathImsiMap;
192 
196  std::map<std::string, uint16_t> m_pathCellIdMap;
197 
201  std::string m_dlOutputFilename;
202 
206  std::string m_ulOutputFilename;
207 };
208 
209 } // namespace ns3
210 
211 #endif /* LTE_STATS_CALCULATOR_H_ */
Base class for ***StatsCalculator classes.
void SetImsiPath(std::string path, uint64_t imsi)
Stores the (path, imsi) pairs in a map.
void SetCellIdPath(std::string path, uint16_t cellId)
Stores the (path, cellId) pairs in a map.
bool ExistsCellIdPath(std::string path)
Checks if there is an already stored cell id for the given path.
std::string m_ulOutputFilename
Name of the file where the uplink results will be saved.
std::string GetUlOutputFilename()
Get the name of the file where the uplink statistics will be stored.
void SetDlOutputFilename(std::string outputFilename)
Set the name of the file where the downlink statistics will be stored.
static uint64_t FindImsiFromEnbRlcPath(std::string path)
Retrieves IMSI from Enb RLC path in the attribute system.
static uint64_t FindImsiForUe(std::string path, uint16_t rnti)
Retrieves IMSI from path for Ue in the attribute system.
uint64_t GetImsiPath(std::string path)
Retrieves the imsi information for the given path.
~LteStatsCalculator() override
Destructor.
static uint64_t FindImsiFromUePhy(std::string path)
Retrieves IMSI from Ue PHY path in the attribute system.
std::map< std::string, uint64_t > m_pathImsiMap
List of IMSI by path in the attribute system.
void SetUlOutputFilename(std::string outputFilename)
Set the name of the file where the uplink statistics will be stored.
static TypeId GetTypeId()
Register this type.
std::map< std::string, uint16_t > m_pathCellIdMap
List of CellId by path in the attribute system.
bool ExistsImsiPath(std::string path)
Checks if there is an already stored IMSI for the given path.
static uint16_t FindCellIdFromEnbRlcPath(std::string path)
Retrieves CellId from Enb RLC path in the attribute system.
std::string GetDlOutputFilename()
Get the name of the file where the downlink statistics will be stored.
static uint64_t FindImsiFromLteNetDevice(std::string path)
Retrieves IMSI from LteNetDevice path in the attribute system.
static uint16_t FindCellIdFromEnbMac(std::string path, uint16_t rnti)
Retrieves CellId from Enb MAC path in the attribute system.
uint16_t GetCellIdPath(std::string path)
Retrieves the cell id information for the given path.
std::string m_dlOutputFilename
Name of the file where the downlink results will be saved.
static uint64_t FindImsiFromEnbMac(std::string path, uint16_t rnti)
Retrieves IMSI from Enb MAC path in the attribute system.
static uint64_t FindImsiForEnb(std::string path, uint16_t rnti)
Retrieves IMSI from path for Enb in the attribute system.
A base class which provides memory management and object aggregation.
Definition: object.h:89
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.