A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
lte-stats-calculator.cc
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
#include "
lte-stats-calculator.h
"
22
#include <ns3/log.h>
23
24
namespace
ns3 {
25
26
NS_LOG_COMPONENT_DEFINE
(
"LteStatsCalculator"
);
27
28
LteStatsCalculator::LteStatsCalculator
()
29
: m_dlOutputFilename (
""
),
30
m_ulOutputFilename (
""
)
31
{
32
// Nothing to do here
33
34
}
35
36
LteStatsCalculator::~LteStatsCalculator
()
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
60
LteStatsCalculator::GetUlOutputFilename
(
void
)
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
72
LteStatsCalculator::GetDlOutputFilename
(
void
)
73
{
74
return
m_dlOutputFilename
;
75
}
76
77
78
bool
79
LteStatsCalculator::ExistsImsiPath
(std::string path)
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
99
LteStatsCalculator::GetImsiPath
(std::string path)
100
{
101
return
m_pathImsiMap
.find (path)->second;
102
}
103
104
bool
105
LteStatsCalculator::ExistsCellIdPath
(std::string path)
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
125
LteStatsCalculator::GetCellIdPath
(std::string path)
126
{
127
return
m_pathCellIdMap
.find (path)->second;
128
}
129
130
131
}
// namespace ns3
src
lte
helper
lte-stats-calculator.cc
Generated on Tue May 14 2013 11:08:24 for ns-3 by
1.8.1.2