A Discrete-Event Network Simulator
API
lte-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 LTE_STATS_CALCULATOR_H_
22 #define LTE_STATS_CALCULATOR_H_
23 
24 #include "ns3/object.h"
25 #include "ns3/string.h"
26 #include <map>
27 
28 namespace ns3 {
29 
38 class LteStatsCalculator : public Object
39 {
40 public:
45 
49  virtual ~LteStatsCalculator ();
50 
55  static TypeId GetTypeId (void);
56 
62  void SetUlOutputFilename (std::string outputFilename);
63 
68  std::string GetUlOutputFilename (void);
69 
75  void SetDlOutputFilename (std::string outputFilename);
76 
81  std::string GetDlOutputFilename (void);
82 
88  bool ExistsImsiPath (std::string path);
89 
95  void SetImsiPath (std::string path, uint64_t imsi);
96 
102  uint64_t GetImsiPath (std::string path);
103 
109  bool ExistsCellIdPath (std::string path);
110 
116  void SetCellIdPath (std::string path, uint16_t cellId);
117 
123  uint16_t GetCellIdPath (std::string path);
124 
125 protected:
126 
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.
std::string GetDlOutputFilename(void)
Get the name of the file where the downlink statistics will be stored.
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.
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.
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.
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.
virtual ~LteStatsCalculator()
Destructor.
std::string GetUlOutputFilename(void)
Get the name of the file where the uplink 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 TypeId GetTypeId(void)
Register this type.
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:88
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.