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_ */
ns3::TypeId
a unique identifier for an interface.
Definition: type-id.h:59
ns3::LteStatsCalculator::GetCellIdPath
uint16_t GetCellIdPath(std::string path)
Retrieves the cell id information for the given path.
Definition: lte-stats-calculator.cc:134
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::LteStatsCalculator::SetDlOutputFilename
void SetDlOutputFilename(std::string outputFilename)
Set the name of the file where the downlink statistics will be stored.
Definition: lte-stats-calculator.cc:75
ns3::LteStatsCalculator::FindImsiFromLteNetDevice
static uint64_t FindImsiFromLteNetDevice(std::string path)
Retrieves IMSI from LteNetDevice path in the attribute system.
Definition: lte-stats-calculator.cc:189
ns3::LteStatsCalculator::ExistsCellIdPath
bool ExistsCellIdPath(std::string path)
Checks if there is an already stored cell id for the given path.
Definition: lte-stats-calculator.cc:114
ns3::LteStatsCalculator::GetTypeId
static TypeId GetTypeId(void)
Register this type.
Definition: lte-stats-calculator.cc:51
ns3::LteStatsCalculator
Base class for ***StatsCalculator classes.
Definition: lte-stats-calculator.h:39
ns3::LteStatsCalculator::SetCellIdPath
void SetCellIdPath(std::string path, uint16_t cellId)
Stores the (path, cellId) pairs in a map.
Definition: lte-stats-calculator.cc:127
ns3::LteStatsCalculator::m_pathImsiMap
std::map< std::string, uint64_t > m_pathImsiMap
List of IMSI by path in the attribute system.
Definition: lte-stats-calculator.h:191
ns3::Object
A base class which provides memory management and object aggregation.
Definition: object.h:88
ns3::LteStatsCalculator::m_pathCellIdMap
std::map< std::string, uint16_t > m_pathCellIdMap
List of CellId by path in the attribute system.
Definition: lte-stats-calculator.h:196
ns3::LteStatsCalculator::~LteStatsCalculator
virtual ~LteStatsCalculator()
Destructor.
Definition: lte-stats-calculator.cc:44
ns3::LteStatsCalculator::m_ulOutputFilename
std::string m_ulOutputFilename
Name of the file where the uplink results will be saved.
Definition: lte-stats-calculator.h:206
ns3::LteStatsCalculator::ExistsImsiPath
bool ExistsImsiPath(std::string path)
Checks if there is an already stored IMSI for the given path.
Definition: lte-stats-calculator.cc:88
ns3::LteStatsCalculator::GetUlOutputFilename
std::string GetUlOutputFilename(void)
Get the name of the file where the uplink statistics will be stored.
Definition: lte-stats-calculator.cc:69
ns3::LteStatsCalculator::m_dlOutputFilename
std::string m_dlOutputFilename
Name of the file where the downlink results will be saved.
Definition: lte-stats-calculator.h:201
ns3::LteStatsCalculator::FindCellIdFromEnbRlcPath
static uint16_t FindCellIdFromEnbRlcPath(std::string path)
Retrieves CellId from Enb RLC path in the attribute system.
Definition: lte-stats-calculator.cc:211
ns3::LteStatsCalculator::SetImsiPath
void SetImsiPath(std::string path, uint64_t imsi)
Stores the (path, imsi) pairs in a map.
Definition: lte-stats-calculator.cc:101
ns3::LteStatsCalculator::GetDlOutputFilename
std::string GetDlOutputFilename(void)
Get the name of the file where the downlink statistics will be stored.
Definition: lte-stats-calculator.cc:81
ns3::LteStatsCalculator::FindImsiForUe
static uint64_t FindImsiForUe(std::string path, uint16_t rnti)
Retrieves IMSI from path for Ue in the attribute system.
Definition: lte-stats-calculator.cc:288
ns3::LteStatsCalculator::FindCellIdFromEnbMac
static uint16_t FindCellIdFromEnbMac(std::string path, uint16_t rnti)
Retrieves CellId from Enb MAC path in the attribute system.
Definition: lte-stats-calculator.cc:248
ns3::LteStatsCalculator::FindImsiFromEnbMac
static uint64_t FindImsiFromEnbMac(std::string path, uint16_t rnti)
Retrieves IMSI from Enb MAC path in the attribute system.
Definition: lte-stats-calculator.cc:233
ns3::LteStatsCalculator::FindImsiFromEnbRlcPath
static uint64_t FindImsiFromEnbRlcPath(std::string path)
Retrieves IMSI from Enb RLC path in the attribute system.
Definition: lte-stats-calculator.cc:141
ns3::LteStatsCalculator::LteStatsCalculator
LteStatsCalculator()
Constructor.
Definition: lte-stats-calculator.cc:36
ns3::LteStatsCalculator::GetImsiPath
uint64_t GetImsiPath(std::string path)
Retrieves the imsi information for the given path.
Definition: lte-stats-calculator.cc:108
ns3::LteStatsCalculator::FindImsiForEnb
static uint64_t FindImsiForEnb(std::string path, uint16_t rnti)
Retrieves IMSI from path for Enb in the attribute system.
Definition: lte-stats-calculator.cc:263
ns3::LteStatsCalculator::SetUlOutputFilename
void SetUlOutputFilename(std::string outputFilename)
Set the name of the file where the uplink statistics will be stored.
Definition: lte-stats-calculator.cc:63
ns3::LteStatsCalculator::FindImsiFromUePhy
static uint64_t FindImsiFromUePhy(std::string path)
Retrieves IMSI from Ue PHY path in the attribute system.
Definition: lte-stats-calculator.cc:164