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
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
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
NS_LOG_FUNCTION
#define NS_LOG_FUNCTION(parameters)
Definition:
log.h:311
ns3::LteStatsCalculator::SetCellIdPath
void SetCellIdPath(std::string path, uint16_t cellId)
Definition:
lte-stats-calculator.cc:118
NS_LOG_COMPONENT_DEFINE
#define NS_LOG_COMPONENT_DEFINE(name)
Definition:
log.h:122
ns3::LteStatsCalculator::SetUlOutputFilename
void SetUlOutputFilename(std::string outputFilename)
Definition:
lte-stats-calculator.cc:54
ns3::LteStatsCalculator::GetUlOutputFilename
std::string GetUlOutputFilename(void)
Definition:
lte-stats-calculator.cc:60
ns3::LteStatsCalculator::LteStatsCalculator
LteStatsCalculator()
Definition:
lte-stats-calculator.cc:28
ns3::LteStatsCalculator::ExistsCellIdPath
bool ExistsCellIdPath(std::string path)
Definition:
lte-stats-calculator.cc:105
ns3::LteStatsCalculator::SetDlOutputFilename
void SetDlOutputFilename(std::string outputFilename)
Definition:
lte-stats-calculator.cc:66
ns3::LteStatsCalculator::GetCellIdPath
uint16_t GetCellIdPath(std::string path)
Definition:
lte-stats-calculator.cc:125
ns3::LteStatsCalculator::GetImsiPath
uint64_t GetImsiPath(std::string path)
Definition:
lte-stats-calculator.cc:99
ns3::LteStatsCalculator::~LteStatsCalculator
virtual ~LteStatsCalculator()
Definition:
lte-stats-calculator.cc:36
ns3::LteStatsCalculator::SetImsiPath
void SetImsiPath(std::string path, uint64_t imsi)
Definition:
lte-stats-calculator.cc:92
ns3::Object
a base class which provides memory management and object aggregation
Definition:
object.h:63
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:44
ns3::TypeId::SetParent
TypeId SetParent(TypeId tid)
Definition:
type-id.cc:471
ns3::LteStatsCalculator::ExistsImsiPath
bool ExistsImsiPath(std::string path)
Definition:
lte-stats-calculator.cc:79
ns3::LteStatsCalculator::GetDlOutputFilename
std::string GetDlOutputFilename(void)
Definition:
lte-stats-calculator.cc:72
src
lte
helper
lte-stats-calculator.cc
Generated on Sun Mar 16 2014 11:25:05 for ns-3 by
1.8.6