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
data-collector.h
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::Ptr< DataCalculator >
ns3::DataCollector
Definition:
data-collector.h:46
ns3::DataCollector::DoDispose
virtual void DoDispose()
Definition:
data-collector.cc:43
ns3::Object
a base class which provides memory management and object aggregation
Definition:
object.h:63
src
stats
model
data-collector.h
Generated on Sun Mar 16 2014 11:25:10 for ns-3 by
1.8.6