A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
src
stats
model
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
static
TypeId
GetTypeId
(
void
);
49
54
virtual
void
Output
(
DataCollector
&dc) = 0;
55
60
void
SetFilePrefix
(
const
std::string prefix);
65
std::string
GetFilePrefix
()
const
;
66
67
protected
:
68
virtual
void
DoDispose
();
69
70
std::string
m_filePrefix
;
71
72
// end class DataOutputInterface
73
};
74
81
class
DataOutputCallback
{
82
public
:
86
virtual
~DataOutputCallback
() {}
87
94
virtual
void
OutputStatistic
(std::string key,
95
std::string
variable
,
96
const
StatisticalSummary
*statSum) = 0;
97
104
virtual
void
OutputSingleton
(std::string key,
105
std::string
variable
,
106
int
val) = 0;
107
114
virtual
void
OutputSingleton
(std::string key,
115
std::string
variable
,
116
uint32_t val) = 0;
117
124
virtual
void
OutputSingleton
(std::string key,
125
std::string
variable
,
126
double
val) = 0;
127
134
virtual
void
OutputSingleton
(std::string key,
135
std::string
variable
,
136
std::string val) = 0;
137
144
virtual
void
OutputSingleton
(std::string key,
145
std::string
variable
,
146
Time
val) = 0;
147
// end class DataOutputCallback
148
};
149
150
// end namespace ns3
151
};
152
153
154
#endif
/* DATA_OUTPUT_INTERFACE_H */
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:102
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::GetTypeId
static TypeId GetTypeId(void)
Register this type.
Definition:
data-output-interface.cc:41
ns3::DataOutputInterface::DoDispose
virtual void DoDispose()
Destructor implementation.
Definition:
data-output-interface.cc:52
anonymous_namespace{print-introspected-doxygen.cc}::variable
std::string variable
variable or class member
Definition:
print-introspected-doxygen.cc:86
ns3::DataOutputInterface::m_filePrefix
std::string m_filePrefix
File prefix for the DataOutputInterface.
Definition:
data-output-interface.h:70
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::DataOutputInterface::~DataOutputInterface
virtual ~DataOutputInterface()
Definition:
data-output-interface.cc:35
ns3::DataOutputCallback
Callback class for the DataOutput classes.
Definition:
data-output-interface.h:81
ns3::DataOutputInterface::DataOutputInterface
DataOutputInterface()
Definition:
data-output-interface.cc:31
ns3::DataOutputInterface::SetFilePrefix
void SetFilePrefix(const std::string prefix)
Sets the DataOutputInterface prefix to the provided prefix.
Definition:
data-output-interface.cc:61
ns3::DataOutputInterface::GetFilePrefix
std::string GetFilePrefix() const
Gets the file prefix of the DataOutputInterface.
Definition:
data-output-interface.cc:69
ns3::DataCollector
Collects data.
Definition:
data-collector.h:49
ns3::DataOutputCallback::~DataOutputCallback
virtual ~DataOutputCallback()
Destructor.
Definition:
data-output-interface.h:86
ns3::Object
A base class which provides memory management and object aggregation.
Definition:
object.h:87
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::TypeId
a unique identifier for an interface.
Definition:
type-id.h:58
Generated on Wed Nov 7 2018 10:02:10 for ns-3 by
1.8.14