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
data-collector.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2008 Drexel University
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: Joe Kopena (tjkopena@cs.drexel.edu)
19
*/
20
21
#ifndef DATA_COLLECTOR_H
22
#define DATA_COLLECTOR_H
23
24
#include <list>
25
#include <string>
26
27
#include "ns3/object.h"
28
29
namespace
ns3 {
30
35
class
DataCalculator
;
36
37
//------------------------------------------------------------
38
//--------------------------------------------
39
typedef
std::list<Ptr<DataCalculator> >
DataCalculatorList
;
40
typedef
std::list<std::pair<std::string, std::string> >
MetadataList
;
41
46
class
DataCollector
:
public
Object
{
47
public
:
48
DataCollector
();
49
virtual
~DataCollector
();
50
51
void
DescribeRun
(std::string
experiment
,
52
std::string strategy,
53
std::string input,
54
std::string runID,
55
std::string description =
""
);
56
57
std::string
GetExperimentLabel
()
const
{
return
m_experimentLabel
; }
58
std::string
GetStrategyLabel
()
const
{
return
m_strategyLabel
; }
59
std::string
GetInputLabel
()
const
{
return
m_inputLabel
; }
60
std::string
GetRunLabel
()
const
{
return
m_runLabel
; }
61
std::string
GetDescription
()
const
{
return
m_description
; }
62
63
void
AddMetadata
(std::string key, std::string value);
64
void
AddMetadata
(std::string key,
double
value);
65
void
AddMetadata
(std::string key, uint32_t value);
66
MetadataList::iterator
MetadataBegin
();
67
MetadataList::iterator
MetadataEnd
();
68
69
void
AddDataCalculator
(
Ptr<DataCalculator>
datac);
70
DataCalculatorList::iterator
DataCalculatorBegin
();
71
DataCalculatorList::iterator
DataCalculatorEnd
();
72
73
protected
:
74
virtual
void
DoDispose
();
75
76
private
:
77
std::string
m_experimentLabel
;
78
std::string
m_strategyLabel
;
79
std::string
m_inputLabel
;
80
std::string
m_runLabel
;
81
std::string
m_description
;
82
83
MetadataList
m_metadata
;
84
DataCalculatorList
m_calcList
;
85
86
// end class DataCollector
87
};
88
89
// end namespace ns3
90
};
91
92
#endif
/* DATA_COLLECTOR_H */
ns3::DataCollector::m_strategyLabel
std::string m_strategyLabel
Definition:
data-collector.h:78
ns3::DataCollector::DataCalculatorEnd
DataCalculatorList::iterator DataCalculatorEnd()
Definition:
data-collector.cc:86
experiment
void experiment(bool enableCtsRts)
Run single 10 seconds experiment with enabled or disabled RTS/CTS mechanism.
Definition:
wifi-hidden-terminal.cc:44
ns3::Ptr< DataCalculator >
ns3::DataCalculatorList
std::list< Ptr< DataCalculator > > DataCalculatorList
Definition:
data-collector.h:35
ns3::DataCollector::GetRunLabel
std::string GetRunLabel() const
Definition:
data-collector.h:60
ns3::DataCollector::m_description
std::string m_description
Definition:
data-collector.h:81
ns3::DataCollector::~DataCollector
virtual ~DataCollector()
Definition:
data-collector.cc:38
ns3::DataCollector::MetadataBegin
MetadataList::iterator MetadataBegin()
Definition:
data-collector.cc:121
ns3::DataCollector::AddDataCalculator
void AddDataCalculator(Ptr< DataCalculator > datac)
Definition:
data-collector.cc:71
ns3::DataCollector::GetStrategyLabel
std::string GetStrategyLabel() const
Definition:
data-collector.h:58
ns3::DataCollector::AddMetadata
void AddMetadata(std::string key, std::string value)
Definition:
data-collector.cc:93
ns3::DataCollector::m_experimentLabel
std::string m_experimentLabel
Definition:
data-collector.h:77
ns3::DataCollector::m_runLabel
std::string m_runLabel
Definition:
data-collector.h:80
ns3::DataCollector::GetExperimentLabel
std::string GetExperimentLabel() const
Definition:
data-collector.h:57
ns3::DataCollector::DataCollector
DataCollector()
Definition:
data-collector.cc:33
ns3::DataCollector::m_calcList
DataCalculatorList m_calcList
Definition:
data-collector.h:84
ns3::DataCollector::m_inputLabel
std::string m_inputLabel
Definition:
data-collector.h:79
ns3::DataCalculator
Definition:
data-calculator.h:87
ns3::DataCollector
Definition:
data-collector.h:46
ns3::DataCollector::GetDescription
std::string GetDescription() const
Definition:
data-collector.h:61
ns3::DataCollector::DataCalculatorBegin
DataCalculatorList::iterator DataCalculatorBegin()
Definition:
data-collector.cc:80
ns3::DataCollector::DescribeRun
void DescribeRun(std::string experiment, std::string strategy, std::string input, std::string runID, std::string description="")
Definition:
data-collector.cc:54
ns3::DataCollector::DoDispose
virtual void DoDispose()
Definition:
data-collector.cc:43
ns3::DataCollector::GetInputLabel
std::string GetInputLabel() const
Definition:
data-collector.h:59
ns3::Object
a base class which provides memory management and object aggregation
Definition:
object.h:63
ns3::DataCollector::m_metadata
MetadataList m_metadata
Definition:
data-collector.h:83
ns3::DataCollector::MetadataEnd
MetadataList::iterator MetadataEnd()
Definition:
data-collector.cc:127
ns3::MetadataList
std::list< std::pair< std::string, std::string > > MetadataList
Definition:
data-collector.h:40
src
stats
model
data-collector.h
Generated on Sat Nov 16 2013 12:55:38 for ns-3 by
1.8.5