A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
lte-stats-calculator.cc
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 #include "lte-stats-calculator.h"
22 #include <ns3/log.h>
23 
24 namespace ns3 {
25 
26 NS_LOG_COMPONENT_DEFINE ("LteStatsCalculator");
27 
29  : m_dlOutputFilename (""),
30  m_ulOutputFilename ("")
31 {
32  // Nothing to do here
33 
34 }
35 
37 {
38  // Nothing to do here
39 }
40 
41 
42 TypeId
43 LteStatsCalculator::GetTypeId (void)
44 {
45  static TypeId tid = TypeId ("ns3::LteStatsCalculator")
46  .SetParent<Object> ()
47  .AddConstructor<LteStatsCalculator> ()
48  ;
49  return tid;
50 }
51 
52 
53 void
54 LteStatsCalculator::SetUlOutputFilename (std::string outputFilename)
55 {
56  m_ulOutputFilename = outputFilename;
57 }
58 
59 std::string
61 {
62  return m_ulOutputFilename;
63 }
64 
65 void
66 LteStatsCalculator::SetDlOutputFilename (std::string outputFilename)
67 {
68  m_dlOutputFilename = outputFilename;
69 }
70 
71 std::string
73 {
74  return m_dlOutputFilename;
75 }
76 
77 
78 bool
80 {
81  if (m_pathImsiMap.find (path) == m_pathImsiMap.end () )
82  {
83  return false;
84  }
85  else
86  {
87  return true;
88  }
89 }
90 
91 void
92 LteStatsCalculator::SetImsiPath (std::string path, uint64_t imsi)
93 {
94  NS_LOG_FUNCTION (this << path << imsi);
95  m_pathImsiMap[path] = imsi;
96 }
97 
98 uint64_t
100 {
101  return m_pathImsiMap.find (path)->second;
102 }
103 
104 bool
106 {
107  if (m_pathCellIdMap.find (path) == m_pathCellIdMap.end () )
108  {
109  return false;
110  }
111  else
112  {
113  return true;
114  }
115 }
116 
117 void
118 LteStatsCalculator::SetCellIdPath (std::string path, uint16_t cellId)
119 {
120  NS_LOG_FUNCTION (this << path << cellId);
121  m_pathCellIdMap[path] = cellId;
122 }
123 
124 uint16_t
126 {
127  return m_pathCellIdMap.find (path)->second;
128 }
129 
130 
131 } // namespace ns3
#define NS_LOG_FUNCTION(parameters)
Definition: log.h:311
void SetCellIdPath(std::string path, uint16_t cellId)
#define NS_LOG_COMPONENT_DEFINE(name)
Definition: log.h:122
void SetUlOutputFilename(std::string outputFilename)
std::string GetUlOutputFilename(void)
bool ExistsCellIdPath(std::string path)
void SetDlOutputFilename(std::string outputFilename)
uint16_t GetCellIdPath(std::string path)
uint64_t GetImsiPath(std::string path)
void SetImsiPath(std::string path, uint64_t imsi)
a base class which provides memory management and object aggregation
Definition: object.h:63
a unique identifier for an interface.
Definition: type-id.h:44
TypeId SetParent(TypeId tid)
Definition: type-id.cc:471
bool ExistsImsiPath(std::string path)
std::string GetDlOutputFilename(void)