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-output-interface.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_OUTPUT_INTERFACE_H
22
#define DATA_OUTPUT_INTERFACE_H
23
24
#include "ns3/object.h"
25
#include "ns3/nstime.h"
26
#include "ns3/data-calculator.h"
27
28
namespace
ns3 {
29
30
class
DataCollector;
31
32
//------------------------------------------------------------
33
//--------------------------------------------
39
class
DataOutputInterface
:
public
Object
{
40
public
:
41
DataOutputInterface
();
42
virtual
~DataOutputInterface
();
43
48
virtual
void
Output
(
DataCollector
&dc) = 0;
49
54
void
SetFilePrefix
(
const
std::string prefix);
59
std::string
GetFilePrefix
()
const
;
60
61
protected
:
62
virtual
void
DoDispose
();
63
64
std::string
m_filePrefix
;
65
66
// end class DataOutputInterface
67
};
68
75
class
DataOutputCallback
{
76
public
:
80
virtual
~DataOutputCallback
() {}
81
88
virtual
void
OutputStatistic
(std::string key,
89
std::string variable,
90
const
StatisticalSummary
*statSum) = 0;
91
98
virtual
void
OutputSingleton
(std::string key,
99
std::string variable,
100
int
val) = 0;
101
108
virtual
void
OutputSingleton
(std::string key,
109
std::string variable,
110
uint32_t val) = 0;
111
118
virtual
void
OutputSingleton
(std::string key,
119
std::string variable,
120
double
val) = 0;
121
128
virtual
void
OutputSingleton
(std::string key,
129
std::string variable,
130
std::string val) = 0;
131
138
virtual
void
OutputSingleton
(std::string key,
139
std::string variable,
140
Time
val) = 0;
141
// end class DataOutputCallback
142
};
143
144
// end namespace ns3
145
};
146
147
148
#endif
/* DATA_OUTPUT_INTERFACE_H */
ns3::Time
keep track of time values and allow control of global simulation resolution
Definition:
nstime.h:81
ns3::DataOutputInterface
Abstract Data Output Interface class s.
Definition:
data-output-interface.h:39
ns3::DataOutputInterface::Output
virtual void Output(DataCollector &dc)=0
Outputs information from the provided DataCollector.
ns3::StatisticalSummary
Abstract class for calculating statistical data.
Definition:
data-calculator.h:46
ns3::DataOutputInterface::DoDispose
virtual void DoDispose()
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
Definition:
data-output-interface.cc:41
ns3::DataOutputInterface::m_filePrefix
std::string m_filePrefix
File prefix for the DataOutputInterface.
Definition:
data-output-interface.h:64
ns3::DataOutputInterface::~DataOutputInterface
virtual ~DataOutputInterface()
Definition:
data-output-interface.cc:36
ns3::DataOutputCallback
Callback class for the DataOutput classes.
Definition:
data-output-interface.h:75
ns3::DataOutputInterface::DataOutputInterface
DataOutputInterface()
Definition:
data-output-interface.cc:32
ns3::DataOutputInterface::SetFilePrefix
void SetFilePrefix(const std::string prefix)
Sets the DataOutputInterface prefix to the provided prefix.
Definition:
data-output-interface.cc:50
ns3::DataCollector
Collects data.
Definition:
data-collector.h:49
ns3::DataOutputCallback::~DataOutputCallback
virtual ~DataOutputCallback()
Destructor.
Definition:
data-output-interface.h:80
ns3::Object
a base class which provides memory management and object aggregation
Definition:
object.h:63
ns3::DataOutputCallback::OutputStatistic
virtual void OutputStatistic(std::string key, std::string variable, const StatisticalSummary *statSum)=0
Outputs the data from the specified StatisticalSummary.
ns3::DataOutputCallback::OutputSingleton
virtual void OutputSingleton(std::string key, std::string variable, int val)=0
Associates the integer value with the variable name for a specific output format. ...
ns3::DataOutputInterface::GetFilePrefix
std::string GetFilePrefix() const
Gets the file prefix of the DataOutputInterface.
Definition:
data-output-interface.cc:56
src
stats
model
data-output-interface.h
Generated on Sat Apr 19 2014 14:07:08 for ns-3 by
1.8.6